SYMBOL INDEX (42052 symbols across 1940 files) FILE: benchmark/flexllmgen/bench_suite.py class Case (line 8) | class Case: FILE: benchmark/hf_ds/bench_hf.py function run_huggingface (line 8) | def run_huggingface(model, prompt_len, gen_len, cut_gen_len, batch_size, function bench_one_case (line 38) | def bench_one_case(case): class Case (line 61) | class Case: FILE: benchmark/hf_ds/hf_opt.py function get_filename (line 32) | def get_filename(model_name, batch_size, prompt_len, gen_len, function meta_to_cpu (line 51) | def meta_to_cpu(container, dtype=None): function realize_meta_module (line 62) | def realize_meta_module(module, dtype=None, device=None): function get_model_config (line 80) | def get_model_config(model_name): function get_ds_opt_model (line 94) | def get_ds_opt_model(model_name, dtype, cpu_offload, disk_offload, offlo... function get_hf_opt_model (line 155) | def get_hf_opt_model(model_name, dtype, cpu_offload, disk_offload, offlo... function run_generation (line 212) | def run_generation(model_name, batch_size, prompt_len, gen_len, cut_gen_... FILE: benchmark/petals/run_opt_requests.py function _patch_bloom_config (line 11) | def _patch_bloom_config(bloom_config: BloomConfig, opt_config: OPTConfig): function client_process (line 18) | def client_process( function main (line 50) | def main(): function run_bench (line 90) | def run_bench(args, sequence_length, max_tokens, config_bloom): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/all_gather.py function timed_all_gather (line 8) | def timed_all_gather(input, output, args): function run_all_gather (line 62) | def run_all_gather(local_rank, args): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/all_reduce.py function timed_all_reduce (line 7) | def timed_all_reduce(input, args): function run_all_reduce (line 41) | def run_all_reduce(local_rank, args): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/all_to_all.py function timed_all_to_all (line 7) | def timed_all_to_all(input, output, args): function run_all_to_all (line 41) | def run_all_to_all(local_rank, args): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/broadcast.py function timed_broadcast (line 8) | def timed_broadcast(input, args): function run_broadcast (line 42) | def run_broadcast(local_rank, args): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/pt2pt.py function timed_pt2pt (line 7) | def timed_pt2pt(input, args): function run_pt2pt (line 60) | def run_pt2pt(local_rank, args): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/run_all.py function main (line 11) | def main(args, rank): FILE: benchmark/third_party/DeepSpeed/benchmarks/communication/utils.py function init_torch_distributed (line 10) | def init_torch_distributed(backend): function init_deepspeed_comm (line 18) | def init_deepspeed_comm(backend): function init_processes (line 27) | def init_processes(local_rank, args): function print_rank_0 (line 37) | def print_rank_0(message): function print_header (line 42) | def print_header(args, comm_op): function get_bw (line 58) | def get_bw(comm_op, size, duration, args): function get_metric_strings (line 86) | def get_metric_strings(args, tput, busbw, duration): function sync_all (line 101) | def sync_all(): function max_numel (line 106) | def max_numel(comm_op, dtype, mem_factor, local_rank, args): function convert_size (line 131) | def convert_size(size_bytes): function _element_size (line 142) | def _element_size(dtype): function benchmark_parser (line 160) | def benchmark_parser(): FILE: benchmark/third_party/DeepSpeed/benchmarks/inference/bert-bench.py function print_latency (line 19) | def print_latency(latency_set, title, warmup=3): FILE: benchmark/third_party/DeepSpeed/benchmarks/inference/collect_results.py function get_branch (line 32) | def get_branch(file_path): function get_benchmark_params (line 40) | def get_benchmark_params(root_dir, file_path): function get_perf_data (line 60) | def get_perf_data(file_content): function get_generated_text (line 68) | def get_generated_text(file_content, gen_text_n): function get_error (line 78) | def get_error(file_content): FILE: benchmark/third_party/DeepSpeed/benchmarks/inference/gpt-bench.py function print_latency (line 35) | def print_latency(latency_set, title, warmup=3): FILE: benchmark/third_party/DeepSpeed/csrc/adagrad/cpu_adagrad.cpp function create_adagrad_optimizer (line 98) | int create_adagrad_optimizer(int optimizer_id, function ds_adagrad_step (line 150) | int ds_adagrad_step(int optimizer_id, function ds_adagrad_step_plus_copy (line 177) | int ds_adagrad_step_plus_copy(int optimizer_id, function destroy_adagrad_optimizer (line 212) | int destroy_adagrad_optimizer(int optimizer_id) function PYBIND11_MODULE (line 219) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/adam/cpu_adam.cpp function create_adam_optimizer (line 124) | int create_adam_optimizer(int optimizer_id, function ds_adam_step (line 193) | int ds_adam_step(int optimizer_id, function ds_adam_step_plus_copy (line 235) | int ds_adam_step_plus_copy(int optimizer_id, function destroy_adam_optimizer (line 277) | int destroy_adam_optimizer(int optimizer_id) function PYBIND11_MODULE (line 284) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/adam/fused_adam_frontend.cpp function PYBIND11_MODULE (line 15) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/aio/common/deepspeed_aio_common.cpp function _report_aio_statistics (line 45) | static void _report_aio_statistics(const char* tag, function _get_aio_latencies (line 58) | static void _get_aio_latencies(std::vector... function _do_io_submit_singles (line 69) | static void _do_io_submit_singles(const long long int n_iocbs, function _do_io_submit_block (line 90) | static void _do_io_submit_block(const long long int n_iocbs, function _do_io_complete (line 110) | static int _do_io_complete(const long long int min_completes, function do_aio_operation_sequential (line 124) | void do_aio_operation_sequential(const bool read_op, function do_aio_operation_overlap (line 188) | void do_aio_operation_overlap(const bool read_op, function report_file_error (line 256) | void report_file_error(const char* filename, const std::string file_op, ... function open_file (line 263) | int open_file(const char* filename, const bool read_op) function regular_read (line 277) | int regular_read(const char* filename, std::vector& buffer) function _validate_buffer (line 304) | static bool _validate_buffer(const char* filename, void* aio_buffer, con... function validate_aio_operation (line 317) | bool validate_aio_operation(const bool read_op, FILE: benchmark/third_party/DeepSpeed/csrc/aio/common/deepspeed_aio_types.cpp type deepspeed_aio_latency_t (line 44) | struct deepspeed_aio_latency_t type iocb (line 63) | struct iocb type iocb (line 63) | struct iocb FILE: benchmark/third_party/DeepSpeed/csrc/aio/common/deepspeed_aio_types.h type deepspeed_aio_latency_t (line 16) | struct deepspeed_aio_latency_t { type deepspeed_aio_perf_t (line 26) | struct deepspeed_aio_perf_t { type deepspeed_aio_config_t (line 33) | struct deepspeed_aio_config_t { type aio_context (line 48) | struct aio_context { FILE: benchmark/third_party/DeepSpeed/csrc/aio/common/deepspeed_aio_utils.cpp type iocb (line 28) | struct iocb type iocb (line 68) | struct iocb function get_file_size (line 95) | int get_file_size(const char* filename, long long int& size) FILE: benchmark/third_party/DeepSpeed/csrc/aio/common/deepspeed_aio_utils.h type io_xfer_ctxt (line 29) | struct io_xfer_ctxt { type io_prep_context (line 41) | struct io_prep_context { type io_prep_generator (line 58) | struct io_prep_generator { FILE: benchmark/third_party/DeepSpeed/csrc/aio/py_lib/deepspeed_aio_thread.cpp type io_op_desc_t (line 49) | struct io_op_desc_t FILE: benchmark/third_party/DeepSpeed/csrc/aio/py_lib/deepspeed_aio_thread.h type io_op_desc_t (line 13) | struct io_op_desc_t { type thread_sync_t (line 34) | struct thread_sync_t { type deepspeed_aio_thread_t (line 39) | struct deepspeed_aio_thread_t { FILE: benchmark/third_party/DeepSpeed/csrc/aio/py_lib/deepspeed_py_aio.cpp function deepspeed_py_aio_write (line 38) | int deepspeed_py_aio_write(const torch::Tensor& buffer, function deepspeed_py_aio_read (line 77) | int deepspeed_py_aio_read(torch::Tensor& buffer, FILE: benchmark/third_party/DeepSpeed/csrc/aio/py_lib/deepspeed_py_aio_handle.cpp function _start_aio_thread (line 13) | static void _start_aio_thread(std::shared_ptr(); } function DS_D_INLINE (line 245) | DS_D_INLINE void update(__half2 val) function DS_D_INLINE (line 284) | DS_D_INLINE GroupStats() function DS_D_INLINE (line 295) | DS_D_INLINE void update(__half2 val) function data_i8 (line 427) | auto data_i8 = PackedInt4{data_i8_2, data_i8_1}; function _chunk (line 434) | void _chunk(int8_t* local_output, const __half2* data, Params function partitioned_block (line 567) | int num_threads> FILE: benchmark/third_party/DeepSpeed/csrc/includes/simd.h function simd_store (line 60) | void simd_store(float* dst, AVX_Data* src, bool half_precision) function simd_load (line 67) | void simd_load(AVX_Data* dst, float* src, bool half_precision) function simd_fma (line 74) | void simd_fma(AVX_Data* dst, AVX_Data* src_m_l, AVX_Data src_m_r, AVX_Da... function simd_fma (line 82) | void simd_fma(AVX_Data* dst, AVX_Data* src_m_l, AVX_Data src_m_r, AVX_Da... function simd_fma (line 90) | void simd_fma(AVX_Data* dst, AVX_Data* src_m_l, AVX_Data* src_m_r, AVX_D... function simd_sqrt (line 98) | void simd_sqrt(AVX_Data* dst, AVX_Data* src) function simd_add (line 104) | void simd_add(AVX_Data* dst, AVX_Data* src_a_l, AVX_Data src_a_r) function simd_add (line 110) | void simd_add(AVX_Data* dst, AVX_Data* src_a_l, AVX_Data* src_a_r) function simd_mul (line 116) | void simd_mul(AVX_Data* dst, AVX_Data* src_a_l, AVX_Data src_a_r) function simd_mul (line 122) | void simd_mul(AVX_Data* dst, AVX_Data* src_a_l, AVX_Data* src_a_r) function simd_div (line 128) | void simd_div(AVX_Data* dst, AVX_Data* src_a_l, AVX_Data* src_a_r) FILE: benchmark/third_party/DeepSpeed/csrc/includes/softmax.h type Config (line 15) | struct Config { function SetSeqLength (line 56) | inline void SetSeqLength(size_t seq_len) { config_.seq_length = seq_len; } FILE: benchmark/third_party/DeepSpeed/csrc/includes/strided_batch_gemm.h type Config (line 11) | struct Config { function ForwardPlusSave (line 82) | void ForwardPlusSave(T* output, const T* _buffer_a, const T* _buffer_b, ... function T (line 185) | inline const T* GetBufferA() const { return k_buf; } function T (line 187) | inline const T* GetBufferB() const { return q_buf; } function SetConfig (line 189) | inline void SetConfig(int m, int n, int k) { _config.SetConfig(m, n, k); } FILE: benchmark/third_party/DeepSpeed/csrc/lamb/fused_lamb_cuda.cpp function lamb (line 32) | at::Tensor lamb(at::Tensor& p, function PYBIND11_MODULE (line 106) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/quantization/pt_binding.cpp function ds_quantize (line 8) | at::Tensor ds_quantize(at::Tensor& vals, int groups, int bits) function ds_sr_quantize (line 22) | at::Tensor ds_sr_quantize(at::Tensor& vals, int groups, int bits) function ds_quantize_asym (line 36) | at::Tensor ds_quantize_asym(at::Tensor& vals, int groups, int bits) function ds_sr_quantize_asym (line 50) | at::Tensor ds_sr_quantize_asym(at::Tensor& vals, int groups, int bits) function quantize_kernel (line 73) | std::vector quantize_kernel(at::Tensor& input_vals, function dequantize (line 116) | at::Tensor dequantize(at::Tensor& quantized_data, function PYBIND11_MODULE (line 147) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/sparse_attention/utils.cpp function segment_blocks (line 14) | void segment_blocks(torch::Tensor layout, function ret_t (line 90) | ret_t sdd_segment(torch::Tensor layout, int start_width) function PYBIND11_MODULE (line 117) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/spatial/csrc/pt_binding.cpp function ChannelsLastProblem (line 11) | ChannelsLastProblem dimension_problem(at::Tensor& input) function seq_unroll_bias_add (line 34) | at::Tensor seq_unroll_bias_add(at::Tensor& input, at::Tensor& bias) function seq_bias_add_add (line 57) | at::Tensor seq_bias_add_add(at::Tensor& input, at::Tensor& bias, at::Ten... function seq_bias_add_bias_add (line 80) | at::Tensor seq_bias_add_bias_add(at::Tensor& input, function PYBIND11_MODULE (line 106) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/transformer/ds_transformer_cuda.cpp function get_workspace_size (line 22) | unsigned get_workspace_size(unsigned maxBatchSize, function create_transformer_layer (line 591) | int create_transformer_layer(unsigned layer_id, function ds_transformer_forward (line 638) | std::vector ds_transformer_forward(unsigned layer_id, function ds_transformer_backward (line 823) | std::vector ds_transformer_backward(unsigned layer_id, function PYBIND11_MODULE (line 1029) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/transformer/inference/csrc/pt_binding.cpp type ActivationFuncType (line 18) | enum class ActivationFuncType { UNKNOWN = 0, GELU = 1, ReLU = 2 } type TransformerType (line 20) | enum class TransformerType : uint8_t { UNKNOWN = 0, GPTType = 1, BERTTyp... function infer_transformer_type (line 24) | inline auto infer_transformer_type(at::Tensor& attn_mask) -> Transformer... function get_attn_mask_stride (line 38) | inline auto get_attn_mask_stride(at::Tensor& attn_mask) -> int function ds_softmax (line 56) | at::Tensor ds_softmax(at::Tensor& attn_scores, function allocate_workspace (line 104) | void allocate_workspace(unsigned hidden_dim, function einsum_sec_sm_ecm (line 127) | at::Tensor einsum_sec_sm_ecm(at::Tensor& Q, at::Tensor& W) function attention_unfused (line 170) | void attention_unfused(at::Tensor& prev_key_cont, function ds_softmax_context1 (line 258) | std::vector ds_softmax_context1(at::Tensor& query, function ds_softmax_internal (line 311) | void ds_softmax_internal(T* attn_scores, function attention_unfused (line 345) | void attention_unfused(T* prev_key_cont, function ds_softmax_context (line 425) | std::vector ds_softmax_context(at::Tensor& query_key_value, function ds_bias_gelu (line 533) | at::Tensor ds_bias_gelu(at::Tensor& input, at::Tensor& bias) function ds_bias_geglu (line 548) | at::Tensor ds_bias_geglu(at::Tensor& activation, at::Tensor& bias) function ds_bias_relu (line 584) | at::Tensor ds_bias_relu(at::Tensor& input, at::Tensor& bias) function ds_bias_add (line 600) | at::Tensor ds_bias_add(at::Tensor& input, at::Tensor& bias) function ds_bias_residual (line 616) | at::Tensor ds_bias_residual(at::Tensor& input, at::Tensor& residual, at:... function ds_layer_norm (line 632) | at::Tensor ds_layer_norm(at::Tensor& input, at::Tensor& gamma, at::Tenso... function ds_layer_norm_internal (line 662) | void ds_layer_norm_internal(T* workspace, function ds_layer_norm_residual (line 680) | at::Tensor ds_layer_norm_residual(at::Tensor& input, function ds_layer_norm_residual_store (line 719) | std::vector ds_layer_norm_residual_store(at::Tensor& input, function quantized_gemm (line 761) | void quantized_gemm(void* output, function qkv_unfused_cublas (line 807) | at::Tensor qkv_unfused_cublas(at::Tensor& output, function ds_qkv_gemm (line 859) | std::vector ds_qkv_gemm(at::Tensor& input, function quantized_gemm (line 891) | void quantized_gemm(at::Tensor& output, function ds_qkv_gemm_int8 (line 936) | at::Tensor ds_qkv_gemm_int8(at::Tensor& input, function ds_linear_layer (line 970) | at::Tensor ds_linear_layer(at::Tensor& input, function add_padding (line 1083) | std::vector add_padding(at::Tensor& query, at::Tensor& key, ... function padd_add_transform (line 1125) | std::vector padd_add_transform(at::Tensor& query, function ds_linear_layer_int8 (line 1176) | at::Tensor ds_linear_layer_int8(at::Tensor& input, function ds_vector_matmul (line 1202) | at::Tensor ds_vector_matmul(at::Tensor& input, function ds_vector_matmul_int8 (line 1252) | at::Tensor ds_vector_matmul_int8(at::Tensor& input, function mlp_unfused_cublas (line 1272) | at::Tensor mlp_unfused_cublas(at::Tensor& output, function ds_mlp_gemm (line 1382) | std::vector ds_mlp_gemm(at::Tensor& input, function ds_mlp_gemm_int8 (line 1432) | std::vector ds_mlp_gemm_int8(at::Tensor& input, function fused_gemm_gelu (line 1468) | at::Tensor fused_gemm_gelu(at::Tensor& input, function apply_rotary_pos_emb (line 1602) | std::vector apply_rotary_pos_emb(at::Tensor& mixed_query, function fused_gemm_gelu_int8 (line 1647) | at::Tensor fused_gemm_gelu_int8(at::Tensor& input, function moe_res_matmul (line 1676) | at::Tensor moe_res_matmul(at::Tensor& moe_res, at::Tensor& coef, at::Ten... function PYBIND11_MODULE (line 1699) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) FILE: benchmark/third_party/DeepSpeed/csrc/transformer/inference/includes/inference_context.h function DS_GET_BLOCKS (line 40) | inline int DS_GET_BLOCKS(const int N) function class (line 48) | class Context { function virtual (line 73) | virtual ~Context() function Context (line 83) | static Context& Instance() function GenWorkSpace (line 89) | void GenWorkSpace(const unsigned& num_layers, function cudaEvent_t (line 163) | cudaEvent_t GetCompEvent(int id) { return id == 1 ? _comp1_event : _comp... function new_token (line 172) | inline unsigned new_token(unsigned layer_id) function advance_tokens (line 185) | inline void advance_tokens() { _num_tokens++; } function cublasHandle_t (line 205) | cublasHandle_t GetCublasHandle() { return _cublasHandle; } function SetSeed (line 214) | void SetSeed(uint64_t new_seed) { _seed = new_seed; } function SynchComp (line 218) | inline void SynchComp() function SynchComm (line 223) | inline void SynchComm() FILE: benchmark/third_party/DeepSpeed/csrc/utils/flatten_unflatten.cpp function flatten (line 11) | at::Tensor flatten(std::vector tensors) function unflatten (line 16) | std::vector unflatten(at::Tensor flat, std::vector list: method restore_slots (line 280) | def restore_slots(self, slots: list): class Reservation (line 284) | class Reservation: method __init__ (line 285) | def __init__(self, node, slots): method restore_slots (line 289) | def restore_slots(self): method desc (line 292) | def desc(self): function get_job_id (line 297) | def get_job_id(): function get_user (line 310) | def get_user(): function run_experiment (line 319) | def run_experiment(exp: dict, reservations, user_script, user_args): function clean_up (line 410) | def clean_up(exp: dict, reservations): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/tuner/base_tuner.py class BaseTuner (line 8) | class BaseTuner: method __init__ (line 9) | def __init__(self, exps, resource_manager, metric): method has_next (line 18) | def has_next(self): method next_batch (line 25) | def next_batch(self, sample_size): method update (line 29) | def update(self): method tune (line 32) | def tune(self, sample_size=1, n_trials=1000, early_stopping=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/tuner/cost_model.py class XGBoostCostModel (line 9) | class XGBoostCostModel(): method __init__ (line 10) | def __init__(self, loss_type, num_threads=None, log_interval=25, upper... method fit (line 45) | def fit(self, xs, ys): method predict (line 56) | def predict(self, xs): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/tuner/index_based_tuner.py class RandomTuner (line 6) | class RandomTuner(BaseTuner): method __init__ (line 8) | def __init__(self, exps: list, resource_manager, metric): method next_batch (line 11) | def next_batch(self, sample_size=1): class GridSearchTuner (line 21) | class GridSearchTuner(BaseTuner): method __init__ (line 23) | def __init__(self, exps: list, resource_manager, metric): method next_batch (line 26) | def next_batch(self, sample_size=1): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/tuner/model_based_tuner.py class ModelBasedTuner (line 14) | class ModelBasedTuner(BaseTuner): method __init__ (line 16) | def __init__(self, exps: list, resource_manager, metric, tuning_sapce): method find_estimated_top_configs (line 53) | def find_estimated_top_configs(self): method next_batch (line 80) | def next_batch(self, sample_size): method has_next (line 113) | def has_next(self): method update (line 116) | def update(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/tuner/utils.py function index_to_feature (line 7) | def index_to_feature(p, dims): function feature_to_index (line 16) | def feature_to_index(feature, dims): function dict_to_dims (line 25) | def dict_to_dims(tuning_space): function gen_combinations (line 40) | def gen_combinations(d: dict): function flatten (line 52) | def flatten(d, parent_key='', sep='_'): function dict_to_feature (line 63) | def dict_to_feature(feature_dict, keys, max_value=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/autotuning/utils.py function search_error (line 12) | def search_error(filename): function was_interruptted (line 24) | def was_interruptted(filename): function find_replace_str (line 36) | def find_replace_str(value, replace_dict): function find_replace (line 54) | def find_replace(target, replace_dict): function get_list (line 69) | def get_list(val): function combine_dict (line 76) | def combine_dict(d, u): function del_if_exists (line 90) | def del_if_exists(t, d): function replace_dict (line 105) | def replace_dict(d, u, ignored_keys=[]): function get_val_by_key (line 128) | def get_val_by_key(d: dict, k): function set_val_by_key (line 137) | def set_val_by_key(d: dict, k, vv): function fetch_hostfile (line 145) | def fetch_hostfile(hostfile_path): function validate_ds_config (line 176) | def validate_ds_config(config: dict): function remove_dupe_dicts (line 210) | def remove_dupe_dicts(l): function prune_config (line 224) | def prune_config(config, ignored_keys=[]): function prune_configs (line 248) | def prune_configs(configs, ignored_keys=[]): function get_tuning_keys (line 266) | def get_tuning_keys(tuning_space: dict): function get_all_configs (line 284) | def get_all_configs(tuning_space: dict, ignore_keys=None): function canonical_name (line 312) | def canonical_name(config: dict, tuning_keys=None, prefix="", omit_val=F... function get_first_config (line 384) | def get_first_config(config: dict): function write_experiments (line 400) | def write_experiments(exps: list, exps_dir: str): function memory_to_string (line 413) | def memory_to_string(n, postfix="", units=None, precision=2): function number_to_string (line 438) | def number_to_string(n, postfix="", units=None, precision=2): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/deepspeed_checkpoint.py class DeepSpeedCheckpoint (line 37) | class DeepSpeedCheckpoint(object): method __init__ (line 38) | def __init__(self, dir, tp_degree=None, pp_degree=None, dp_degree=None): method is_change_tp_degree (line 89) | def is_change_tp_degree(self): method is_change_pp_degree (line 92) | def is_change_pp_degree(self): method is_change_dp_degree (line 95) | def is_change_dp_degree(self): method show_2d_mapping (line 98) | def show_2d_mapping(self): method show_tp_embedding_map (line 108) | def show_tp_embedding_map(self): method show_tp_final_norm_map (line 111) | def show_tp_final_norm_map(self): method show_pp_tranformer_map (line 114) | def show_pp_tranformer_map(self): method show_transformer_file_map (line 117) | def show_transformer_file_map(self): method _build_global_state (line 120) | def _build_global_state(self): method get_zero_checkpoint_state (line 125) | def get_zero_checkpoint_state(self, pp_index, tp_index, dp_index) -> d... method get_zero_files (line 131) | def get_zero_files(self, pp_index, tp_index, dp_index) -> list: method get_embedding_layer_id (line 136) | def get_embedding_layer_id(self): method get_final_norm_layer_id (line 139) | def get_final_norm_layer_id(self): method get_iteration (line 142) | def get_iteration(self): method get_embedding_state (line 149) | def get_embedding_state(self, tp_index: int) -> Dict: method get_embedding_files (line 159) | def get_embedding_files(self, tp_index: int) -> list: method _get_checkpoint_value (line 163) | def _get_checkpoint_value(self, key): method get_args (line 170) | def get_args(self): method get_checkpoint_info (line 173) | def get_checkpoint_info(self, info_key=CHECKPOINT_INFO_KEY): method get_2d_parallel_state (line 176) | def get_2d_parallel_state(self, tp_index: int, pp_index: int) -> dict: method get_transformer_state (line 194) | def get_transformer_state(self, tp_index: int, pp_index: int) -> list: method get_pp_transformer_map (line 207) | def get_pp_transformer_map(self, pp_index: int) -> list: method get_final_norm_state (line 211) | def get_final_norm_state(self, tp_index: int) -> Dict: method get_final_norm_files (line 217) | def get_final_norm_files(self, tp_index: int) -> list: method _build_tp_other_layer_map (line 221) | def _build_tp_other_layer_map(self, layer_index: int): method get_2d_parallel_files (line 229) | def get_2d_parallel_files(self, tp_index: int, pp_index: int) -> list: method _build_pp_transformer_map (line 235) | def _build_pp_transformer_map(self): method _dump_mapping (line 246) | def _dump_mapping(self, data_map, map_tag=None): method _build_transformer_file_map (line 252) | def _build_transformer_file_map(self): method _sanity_check (line 272) | def _sanity_check(self): method validate_files (line 280) | def validate_files(self): method _get_layer_keys (line 285) | def _get_layer_keys(self): method _merge_state_dicts (line 293) | def _merge_state_dicts(self, sd_list): method _validate_folder (line 304) | def _validate_folder(self, dir): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/reshape_3d_utils.py class model_3d_desc (line 15) | class model_3d_desc(object): method __init__ (line 16) | def __init__(self, pp_degree=1, tp_degree=1, dp_degree=1): method reshape (line 21) | def reshape(self, target_3d_desc, verbose=False): method get_desc (line 37) | def get_desc(self): method world_size (line 40) | def world_size(self): method is_valid (line 43) | def is_valid(self, pp_index, tp_index, dp_index): method can_reshape (line 57) | def can_reshape(self, target_3d_desc): function get_model_3d_descriptor (line 77) | def get_model_3d_descriptor(dir): function flatten_dp_dimension (line 93) | def flatten_dp_dimension(meg_2d_map, src_2d_size, dp_degree): function unflatten_dp_dimension (line 104) | def unflatten_dp_dimension(meg_2d_map, dp_degree): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/reshape_meg_2d.py class meg_2d_parallel_map (line 4) | class meg_2d_parallel_map(object): method __init__ (line 5) | def __init__(self, pp_degree, tp_degree): method simple_init (line 10) | def simple_init(self): method add_data (line 17) | def add_data(self, pp_index, tp_index, data): method get_data (line 26) | def get_data(self, pp_index=None, tp_index=None): method print_data (line 38) | def print_data(self, tag): method _validate_indices (line 43) | def _validate_indices(self, pp_index, tp_index): method _make_key (line 47) | def _make_key(self, i, j): function _reshape_tp_dimension (line 51) | def _reshape_tp_dimension(old_2d_map, new_tp_degree): function _reshape_pp_dimension (line 63) | def _reshape_pp_dimension(old_2d_map, new_pp_degree): function reshape_meg_2d_parallel (line 75) | def reshape_meg_2d_parallel(old_pp_degree, function get_mpu_ranks (line 106) | def get_mpu_ranks(tp_size=1, pp_size=1, dp_size=1, virtual_pp_size=None): function reshape (line 186) | def reshape(src, tgt): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/reshape_utils.py function basic_folder_validation (line 7) | def basic_folder_validation(dir): function get_files_with_prefix (line 12) | def get_files_with_prefix(all_files, prefix): function validate_files (line 22) | def validate_files(file_list): function get_files (line 28) | def get_files(dir): function get_zero_files (line 36) | def get_zero_files(dir): function partition_data (line 46) | def partition_data(data_list, num_partitions): function _key_list_to_string (line 58) | def _key_list_to_string(key_list): function merge_state_dict (line 62) | def merge_state_dict(dict_a, dict_b, key_list): function merge_state_list (line 74) | def merge_state_list(list_a, list_b, key_list): function merge_state (line 84) | def merge_state(state_a, state_b, key_list=[]): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/universal_checkpoint.py function load_hp_checkpoint_state (line 13) | def load_hp_checkpoint_state(self, folder, tp_rank, tp_world_size): function enable_universal_checkpoint (line 105) | def enable_universal_checkpoint(param_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/utils.py function get_model_ckpt_name_for_rank (line 8) | def get_model_ckpt_name_for_rank(base_folder, mp_rank_str): function get_zero_ckpt_name_for_rank (line 16) | def get_zero_ckpt_name_for_rank(base_folder, dp_rank, mp_rank): function get_layer_ckpt_name_for_rank (line 26) | def get_layer_ckpt_name_for_rank(base_folder, layer_id, tp_rank): FILE: benchmark/third_party/DeepSpeed/deepspeed/checkpoint/zero_checkpoint.py class ZeROCheckpoint (line 15) | class ZeROCheckpoint(object): method __init__ (line 16) | def __init__(self, dir): method get_src_world_size (line 29) | def get_src_world_size(self): method get_src_tp_degree (line 32) | def get_src_tp_degree(self): method get_src_pp_degree (line 35) | def get_src_pp_degree(self): method get_src_dp_degree (line 38) | def get_src_dp_degree(self): method get_file_indices_for_rank (line 41) | def get_file_indices_for_rank(self, pp_index, tp_index, dp_index): method get_files_for_rank (line 46) | def get_files_for_rank(self, pp_index, tp_index, dp_index): method get_state_for_rank (line 50) | def get_state_for_rank(self, method print_3d_index_map (line 77) | def print_3d_index_map(self, tag=None): method print_3d_file_map (line 83) | def print_3d_file_map(self, tag=None): method reshape (line 93) | def reshape(self, target_3d_desc: model_3d_desc): method _strip_tensor_paddings (line 97) | def _strip_tensor_paddings(self, sd): method _clear_group_paddings (line 117) | def _clear_group_paddings(self, sd): method _get_optimizer_state (line 123) | def _get_optimizer_state(self, sd, state_key): method _get_param_group_states (line 130) | def _get_param_group_states(self, sd): method _update_partition_count (line 141) | def _update_partition_count(self, sd): FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/__init__.py function get_world_group (line 18) | def get_world_group(): function get_global_rank (line 21) | def get_global_rank(group, group_rank): function allgather_fn (line 28) | def allgather_fn(output_tensor, input_tensor, group=None, async_op=False): function reduce_scatter_fn (line 34) | def reduce_scatter_fn(output_tensor, input_tensor, group=None, async_op=... function configure (line 40) | def configure(deepspeed_config=None, FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/backend.py class Backend (line 21) | class Backend(object): method __init__ (line 22) | def __init__(self, name='backend', rank=0, size=1): method is_initialized (line 32) | def is_initialized(self): method new_group (line 35) | def new_group(self): method init_process_group (line 39) | def init_process_group(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/comm.py class ReduceOp (line 36) | class ReduceOp(Enum): function _configure_using_config_file (line 77) | def _configure_using_config_file(config): function configure (line 82) | def configure( function timed_op (line 111) | def timed_op(func): function init_deepspeed_backend (line 153) | def init_deepspeed_backend(ds_backend): function is_initialized (line 169) | def is_initialized(): function destroy_process_group (line 177) | def destroy_process_group(group=None): function new_group (line 182) | def new_group(ranks): function is_available (line 188) | def is_available() -> bool: function set_backend (line 198) | def set_backend(backend): function broadcast (line 223) | def broadcast(tensor, function all_gather (line 235) | def all_gather(tensor_list, function has_reduce_scatter_base (line 249) | def has_reduce_scatter_base(): function reduce_scatter_fn (line 256) | def reduce_scatter_fn(output_tensor, function reduce_scatter_base (line 292) | def reduce_scatter_base(output_tensor, function all_gather_base (line 309) | def all_gather_base(output_tensor, function has_allgather_base (line 323) | def has_allgather_base(): function allgather_fn (line 330) | def allgather_fn(output_tensor, function all_to_all_single (line 360) | def all_to_all_single(output, function send (line 379) | def send(tensor, function recv (line 391) | def recv(tensor, function isend (line 403) | def isend(tensor, function irecv (line 415) | def irecv(tensor, function gather (line 427) | def gather(tensor, function scatter (line 444) | def scatter(tensor, function barrier (line 461) | def barrier(group=None, function monitored_barrier (line 472) | def monitored_barrier(group=None, function log_summary (line 482) | def log_summary(): function reduce (line 491) | def reduce(tensor, function reduce_scatter (line 504) | def reduce_scatter(output, function all_reduce (line 521) | def all_reduce(tensor, function get_world_group (line 537) | def get_world_group(): function get_world_size (line 543) | def get_world_size(group=None) -> int: function get_rank (line 559) | def get_rank(group=None): function get_local_rank (line 578) | def get_local_rank(): function get_global_rank (line 591) | def get_global_rank(group=None, group_rank=0): function init_distributed (line 598) | def init_distributed(dist_backend="nccl", function mpi_discovery (line 661) | def mpi_discovery(distributed_port=TORCH_DISTRIBUTED_DEFAULT_PORT, verbo... function in_aml (line 705) | def in_aml(): function in_aws_sm (line 710) | def in_aws_sm(): function in_dlts (line 715) | def in_dlts(): function patch_aml_env_for_torch_nccl_backend (line 720) | def patch_aml_env_for_torch_nccl_backend(master_port=6105, verbose=True): function patch_aws_sm_env_for_torch_nccl_backend (line 757) | def patch_aws_sm_env_for_torch_nccl_backend(verbose=True): FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/config.py class CommsConfig (line 10) | class CommsConfig(BaseModel): class Config (line 11) | class Config: class CommsLoggerConfig (line 18) | class CommsLoggerConfig(CommsConfig): class DeepSpeedCommsConfig (line 26) | class DeepSpeedCommsConfig: method __init__ (line 27) | def __init__(self, ds_config): FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/torch.py class TorchBackend (line 11) | class TorchBackend(Backend): method __init__ (line 19) | def __init__(self, backend, timeout, init_method, name='torch'): method init_process_group (line 32) | def init_process_group(self, backend, timeout, init_method): method all_reduce (line 39) | def all_reduce(self, method reduce (line 50) | def reduce(self, tensor, dst, op=ReduceOp.SUM, group=None, async_op=Fa... method reduce_scatter (line 57) | def reduce_scatter(self, method broadcast (line 69) | def broadcast(self, tensor, src, group=None, async_op=False): method all_gather (line 75) | def all_gather(self, tensor_list, tensor, group=None, async_op=False): method all_gather_base (line 81) | def all_gather_base(self, output_tensor, input_tensor, group=None, asy... method reduce_scatter_base (line 95) | def reduce_scatter_base(self, method all_to_all_single (line 114) | def all_to_all_single(self, method send (line 128) | def send(self, tensor, dst, group=None, tag=0): method recv (line 131) | def recv(self, tensor, src=None, group=None, tag=0): method isend (line 134) | def isend(self, tensor, dst, group=None, tag=0): method irecv (line 137) | def irecv(self, tensor, src=None, group=None, tag=0): method gather (line 140) | def gather(self, tensor, gather_list=None, dst=0, group=None, async_op... method scatter (line 147) | def scatter(self, tensor, scatter_list=None, src=0, group=None, async_... method barrier (line 154) | def barrier(self, method monitored_barrier (line 164) | def monitored_barrier(self, method get_rank (line 174) | def get_rank(self, group=None): method get_world_size (line 177) | def get_world_size(self, group=None): method is_initialized (line 180) | def is_initialized(self): method get_backend (line 183) | def get_backend(self, group=None): method new_group (line 186) | def new_group(self, ranks): method get_global_rank (line 189) | def get_global_rank(self, group, group_rank): method get_world_group (line 196) | def get_world_group(self): method destroy_process_group (line 199) | def destroy_process_group(self, group=None): method _reduce_op (line 202) | def _reduce_op(self, op): FILE: benchmark/third_party/DeepSpeed/deepspeed/comm/utils.py function older_torch (line 7) | def older_torch(): function has_allgather_base (line 21) | def has_allgather_base(): function has_reduce_scatter_base (line 28) | def has_reduce_scatter_base(): function get_local_rank_from_launcher (line 35) | def get_local_rank_from_launcher(): function get_world_rank_from_launcher (line 50) | def get_world_rank_from_launcher(): function get_world_size_from_launcher (line 65) | def get_world_size_from_launcher(): function get_default_args (line 83) | def get_default_args(func): function get_tensor_position (line 93) | def get_tensor_position(func): function get_tensor_kwarg (line 111) | def get_tensor_kwarg(func, kwargs): function get_msg_size_from_args (line 125) | def get_msg_size_from_args(func, *args, **kwargs): function get_debug_log_name (line 152) | def get_debug_log_name(func_args, debug): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/basic_layer.py class QuantAct (line 12) | class QuantAct(nn.Module): method __init__ (line 22) | def __init__(self, act_range_momentum=0.95, quant_mode='symmetric'): method forward (line 34) | def forward(self, x, num_bits, *args): class Embedding_Compress (line 61) | class Embedding_Compress(nn.Embedding): method __init__ (line 62) | def __init__(self, *kargs): method extra_repr (line 70) | def extra_repr(self): method enable_weight_quantization (line 76) | def enable_weight_quantization(self, method fix_weight_quantization (line 105) | def fix_weight_quantization(self): method forward (line 114) | def forward(self, input): class LinearLayer_Compress (line 134) | class LinearLayer_Compress(nn.Linear): method __init__ (line 138) | def __init__(self, *kargs, bias=True): method extra_repr (line 154) | def extra_repr(self): method enable_sparse_pruning (line 159) | def enable_sparse_pruning(self, ratio, method): method enable_row_pruning (line 179) | def enable_row_pruning(self, ratio, method): method enable_head_pruning (line 200) | def enable_head_pruning(self, ratio, method, num_heads): method fix_sparse_pruning_helper (line 217) | def fix_sparse_pruning_helper(self): method fix_row_col_pruning_helper (line 227) | def fix_row_col_pruning_helper(self, mask=None, dim_reduction=False): method fix_head_pruning_helper (line 269) | def fix_head_pruning_helper(self, mask=None, num_heads=None, dim_reduc... method get_mask (line 312) | def get_mask(self, pruning_type='row'): method enable_weight_quantization (line 341) | def enable_weight_quantization(self, method fix_weight_quantization (line 369) | def fix_weight_quantization(self): method enable_activation_quantization (line 378) | def enable_activation_quantization(self, bits, quantization_type, rang... method head_pruning_reshape (line 390) | def head_pruning_reshape(self, w, mask): method forward (line 397) | def forward(self, input, skip_bias_add=False): class Conv2dLayer_Compress (line 444) | class Conv2dLayer_Compress(nn.Conv2d): method __init__ (line 448) | def __init__(self, *kargs): method __repr__ (line 461) | def __repr__(self): method enable_sparse_pruning (line 484) | def enable_sparse_pruning(self, ratio, method): method enable_channel_pruning (line 503) | def enable_channel_pruning(self, ratio, method): method fix_sparse_pruning_helper (line 529) | def fix_sparse_pruning_helper(self): method fix_channel_pruning_helper (line 539) | def fix_channel_pruning_helper(self, mask=None, dim_reduction=False): method get_mask (line 575) | def get_mask(self, pruning_type='sparse'): method fix_weight_quantization (line 597) | def fix_weight_quantization(self): method enable_weight_quantization (line 606) | def enable_weight_quantization(self, method enable_activation_quantization (line 628) | def enable_activation_quantization(self, bits, quantization_type, rang... method forward (line 640) | def forward(self, input): class BNLayer_Compress (line 683) | class BNLayer_Compress(nn.BatchNorm2d): method fix_channel_pruning_helper (line 684) | def fix_channel_pruning_helper(self, mask, dim_reduction=True): function _reduce (line 691) | def _reduce(input_): function split_tensor_along_last_dim (line 705) | def split_tensor_along_last_dim(tensor, num_partitions, contiguous_split... function _split (line 726) | def _split(input_): function _gather (line 746) | def _gather(input_): class _CopyToModelParallelRegion (line 769) | class _CopyToModelParallelRegion(torch.autograd.Function): method forward (line 772) | def forward(ctx, input_): method backward (line 776) | def backward(ctx, grad_output): class _ReduceFromModelParallelRegion (line 780) | class _ReduceFromModelParallelRegion(torch.autograd.Function): method forward (line 783) | def forward(ctx, input_): method backward (line 787) | def backward(ctx, grad_output): class _ScatterToModelParallelRegion (line 791) | class _ScatterToModelParallelRegion(torch.autograd.Function): method forward (line 794) | def forward(ctx, input_): method backward (line 798) | def backward(ctx, grad_output): class _GatherFromModelParallelRegion (line 802) | class _GatherFromModelParallelRegion(torch.autograd.Function): method forward (line 805) | def forward(ctx, input_): method backward (line 809) | def backward(ctx, grad_output): function copy_to_model_parallel_region (line 818) | def copy_to_model_parallel_region(input_): function reduce_from_model_parallel_region (line 822) | def reduce_from_model_parallel_region(input_): function scatter_to_model_parallel_region (line 826) | def scatter_to_model_parallel_region(input_): function gather_from_model_parallel_region (line 830) | def gather_from_model_parallel_region(input_): class ColumnParallelLinear_Compress (line 834) | class ColumnParallelLinear_Compress(LinearLayer_Compress): method __init__ (line 835) | def __init__(self, method forward (line 860) | def forward(self, input_): class RowParallelLinear_Compress (line 877) | class RowParallelLinear_Compress(LinearLayer_Compress): method __init__ (line 878) | def __init__(self, method forward (line 903) | def forward(self, input_): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/compress.py function check_deepspeed_config (line 10) | def check_deepspeed_config(config): function get_module_name (line 23) | def get_module_name(group_name, function get_compress_methods (line 49) | def get_compress_methods(model, compress_methods, mpu=None): function init_compression (line 97) | def init_compression(model, deepspeed_config, teacher_model=None, mpu=No... function redundancy_clean (line 127) | def redundancy_clean(model, deepspeed_config, mpu=None): function student_initialization (line 182) | def student_initialization(student_model, teacher_model, deepspeed_config): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/config.py function get_compression_config (line 6) | def get_compression_config(param_dict): function get_layer_reduction (line 25) | def get_layer_reduction(param_dict): function get_layer_reduction_enabled (line 35) | def get_layer_reduction_enabled(param_dict): function get_layer_reduction_params (line 44) | def get_layer_reduction_params(param_dict): function get_quantize_enabled (line 53) | def get_quantize_enabled(param_dict): function get_weight_quantization (line 62) | def get_weight_quantization(param_dict): function get_weight_quantization_shared_parameters (line 76) | def get_weight_quantization_shared_parameters(param_dict): function get_weight_quantization_different_groups (line 140) | def get_weight_quantization_different_groups(param_dict): function get_activation_quantization (line 170) | def get_activation_quantization(param_dict): function get_activation_quantization_shared_parameters (line 189) | def get_activation_quantization_shared_parameters(param_dict): function get_activation_quantization_different_groups (line 220) | def get_activation_quantization_different_groups(param_dict): function get_sparse_pruning (line 245) | def get_sparse_pruning(param_dict): function get_sparse_pruning_shared_parameters (line 259) | def get_sparse_pruning_shared_parameters(param_dict): function get_sparse_pruning_different_groups (line 282) | def get_sparse_pruning_different_groups(param_dict): function get_row_pruning (line 307) | def get_row_pruning(param_dict): function get_row_pruning_shared_parameters (line 321) | def get_row_pruning_shared_parameters(param_dict): function get_row_pruning_different_groups (line 343) | def get_row_pruning_different_groups(param_dict): function get_head_pruning (line 367) | def get_head_pruning(param_dict): function get_head_pruning_shared_parameters (line 381) | def get_head_pruning_shared_parameters(param_dict): function get_head_pruning_different_groups (line 406) | def get_head_pruning_different_groups(param_dict): function get_channel_pruning (line 430) | def get_channel_pruning(param_dict): function get_channel_pruning_shared_parameters (line 444) | def get_channel_pruning_shared_parameters(param_dict): function get_channel_pruning_different_groups (line 468) | def get_channel_pruning_different_groups(param_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/helper.py function recursive_getattr (line 6) | def recursive_getattr(model, module_name): function recursive_setattr (line 22) | def recursive_setattr(model, module_name, module): function module_replacement (line 40) | def module_replacement(model, module_name, compression_technique=None, m... function is_module_compressible (line 189) | def is_module_compressible(module, mpu=None): function compression_preparation (line 204) | def compression_preparation(model, compression_techinique_list, mpu): function fix_compression (line 226) | def fix_compression(model, function convert_conv1d_to_linear (line 259) | def convert_conv1d_to_linear(model, convert_type): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/scheduler.py class compression_scheduler (line 7) | class compression_scheduler(): method __init__ (line 11) | def __init__(self, model, compression_config): method make_init (line 27) | def make_init(self): method check_weight_quantization (line 56) | def check_weight_quantization(self): method check_activation_quantization (line 75) | def check_activation_quantization(self): method check_sparse_pruning (line 93) | def check_sparse_pruning(self): method check_head_pruning (line 110) | def check_head_pruning(self): method check_row_pruning (line 126) | def check_row_pruning(self): method check_channel_pruning (line 142) | def check_channel_pruning(self): method check_all_modules (line 159) | def check_all_modules(self): method step (line 168) | def step(self, step_zero_check=False): FILE: benchmark/third_party/DeepSpeed/deepspeed/compression/utils.py class TopKBinarizer (line 6) | class TopKBinarizer(autograd.Function): method forward (line 15) | def forward(ctx, inputs: torch.tensor, threshold: float, sigmoid: bool): method backward (line 48) | def backward(ctx, gradOutput): class SymQuantizer (line 56) | class SymQuantizer(torch.autograd.Function): method forward (line 61) | def forward(ctx, input, num_bits, min_value=None, max_value=None, num_... method backward (line 93) | def backward(ctx, grad_output): class AsymQuantizer (line 98) | class AsymQuantizer(torch.autograd.Function): method forward (line 103) | def forward(ctx, input, num_bits, min_value=None, max_value=None, num_... method backward (line 139) | def backward(ctx, grad_output): class TernaryQuantizer (line 144) | class TernaryQuantizer(torch.autograd.Function): method forward (line 149) | def forward(ctx, input, num_bits, min_value=None, max_value=None, num_... method backward (line 179) | def backward(ctx, grad_output): class BinaryQuantizer (line 184) | class BinaryQuantizer(torch.autograd.Function): method forward (line 189) | def forward(ctx, input, num_bits, min_value=None, max_value=None, num_... method backward (line 214) | def backward(ctx, grad_output): FILE: benchmark/third_party/DeepSpeed/deepspeed/elasticity/config.py class ElasticityError (line 9) | class ElasticityError(Exception): class ElasticityConfigError (line 15) | class ElasticityConfigError(ElasticityError): class ElasticityIncompatibleWorldSize (line 21) | class ElasticityIncompatibleWorldSize(ElasticityError): class ElasticityConfig (line 27) | class ElasticityConfig: method __init__ (line 46) | def __init__(self, param_dict): method repr (line 118) | def repr(self): method __repr__ (line 121) | def __repr__(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/elasticity/elastic_agent.py class DSElasticAgent (line 23) | class DSElasticAgent(LocalElasticAgent): method __init__ (line 24) | def __init__( method _set_master_addr_port (line 36) | def _set_master_addr_port(store: Store, method _start_workers (line 52) | def _start_workers(self, worker_group: WorkerGroup) -> Dict[int, Any]: method _invoke_run (line 115) | def _invoke_run(self, role: str = "default") -> RunResult: FILE: benchmark/third_party/DeepSpeed/deepspeed/elasticity/elasticity.py function get_candidate_batch_sizes (line 61) | def get_candidate_batch_sizes(base_list, max_acceptable_batch_size): function get_valid_gpus (line 75) | def get_valid_gpus(batch_size, micro_batches, min_valid_gpus, max_valid_... function get_best_candidates (line 97) | def get_best_candidates(candidate_batch_sizes, function _get_compatible_gpus_v01 (line 125) | def _get_compatible_gpus_v01(micro_batches, function _get_compatible_gpus_v02 (line 173) | def _get_compatible_gpus_v02(micro_batches, function _compatible_ds_version_check (line 237) | def _compatible_ds_version_check(target_deepspeed_version: str): function elasticity_enabled (line 248) | def elasticity_enabled(ds_config: dict): function ensure_immutable_elastic_config (line 254) | def ensure_immutable_elastic_config(runtime_elastic_config_dict: dict): function compute_elastic_config (line 287) | def compute_elastic_config(ds_config: dict, FILE: benchmark/third_party/DeepSpeed/deepspeed/elasticity/utils.py function is_torch_elastic_compatible (line 4) | def is_torch_elastic_compatible(): FILE: benchmark/third_party/DeepSpeed/deepspeed/env_report.py function op_report (line 23) | def op_report(verbose=True): function ninja_installed (line 54) | def ninja_installed(): function nvcc_version (line 62) | def nvcc_version(): function debug_report (line 79) | def debug_report(): function parse_arguments (line 112) | def parse_arguments(): function main (line 127) | def main(hide_operator_status=False, hide_errors_and_warnings=False): function cli_main (line 133) | def cli_main(): FILE: benchmark/third_party/DeepSpeed/deepspeed/inference/config.py class DtypeEnum (line 10) | class DtypeEnum(Enum): method __new__ (line 20) | def __new__(cls, *values): method __repr__ (line 29) | def __repr__(self): class MoETypeEnum (line 37) | class MoETypeEnum(str, Enum): class DeepSpeedTPConfig (line 42) | class DeepSpeedTPConfig(DeepSpeedConfigModel): class DeepSpeedMoEConfig (line 60) | class DeepSpeedMoEConfig(DeepSpeedConfigModel): class QuantTypeEnum (line 83) | class QuantTypeEnum(str, Enum): class BaseQuantConfig (line 88) | class BaseQuantConfig(DeepSpeedConfigModel): class WeightQuantConfig (line 95) | class WeightQuantConfig(BaseQuantConfig): class ActivationQuantConfig (line 99) | class ActivationQuantConfig(BaseQuantConfig): class QKVQuantConfig (line 103) | class QKVQuantConfig(DeepSpeedConfigModel): class QuantizationConfig (line 107) | class QuantizationConfig(DeepSpeedConfigModel): class InferenceCheckpointConfig (line 115) | class InferenceCheckpointConfig(DeepSpeedConfigModel): class DeepSpeedInferenceConfig (line 121) | class DeepSpeedInferenceConfig(DeepSpeedConfigModel): method moe_backward_compat (line 269) | def moe_backward_compat(cls, field_value, values): class Config (line 274) | class Config: FILE: benchmark/third_party/DeepSpeed/deepspeed/inference/engine.py class InferenceEngine (line 32) | class InferenceEngine(Module): method __init__ (line 37) | def __init__(self, model, config): method profile_model_time (line 137) | def profile_model_time(self, use_cuda_events=True): method _get_model_config_generate (line 147) | def _get_model_config_generate(self, config): method remove_mask_prepare_for_bloom (line 155) | def remove_mask_prepare_for_bloom(self): method _pre_forward_hook (line 160) | def _pre_forward_hook(self, module, *inputs, **kwargs): method _post_forward_hook (line 167) | def _post_forward_hook(self, module, input, output): method _create_model_parallel_group (line 177) | def _create_model_parallel_group(self, config): method _create_ep_parallel_group (line 190) | def _create_ep_parallel_group(self, moe_experts): method _init_quantization_setting (line 220) | def _init_quantization_setting(self, quantization_setting): method _validate_args (line 236) | def _validate_args(self, mpu, replace_with_kernel_inject): method load_model_with_checkpoint (line 268) | def load_model_with_checkpoint(self, r_module): method _apply_injection_policy (line 335) | def _apply_injection_policy(self, config, client_module=None): method _get_all_ckpt_names (line 355) | def _get_all_ckpt_names(self, checkpoints_path, tag): method _get_ckpt_name (line 365) | def _get_ckpt_name(self, checkpoints_path, tag, mp_placeholder=None): method _load_checkpoint (line 378) | def _load_checkpoint(self, load_dir, load_module_strict=True, tag=None): method _choose_module_key (line 439) | def _choose_module_key(self, sd): method _convert_to_dtype (line 447) | def _convert_to_dtype(self, config): method _create_cuda_graph (line 464) | def _create_cuda_graph(self, *inputs, **kwargs): method _graph_replay (line 483) | def _graph_replay(self, *inputs, **kwargs): method model_times (line 493) | def model_times(self): method forward (line 505) | def forward(self, *inputs, **kwargs): FILE: benchmark/third_party/DeepSpeed/deepspeed/launcher/launch.py function parse_args (line 31) | def parse_args(): function terminate_process_tree (line 115) | def terminate_process_tree(pid): function main (line 129) | def main(): FILE: benchmark/third_party/DeepSpeed/deepspeed/launcher/multinode_runner.py class MultiNodeRunner (line 13) | class MultiNodeRunner(ABC): method __init__ (line 14) | def __init__(self, args, world_info_base64): method backend_exists (line 23) | def backend_exists(self): method get_cmd (line 27) | def get_cmd(self, environment, active_resources): method add_export (line 30) | def add_export(self, key, var): method parse_user_args (line 33) | def parse_user_args(self): method name (line 37) | def name(self): method validate_args (line 41) | def validate_args(self): class PDSHRunner (line 45) | class PDSHRunner(MultiNodeRunner): method __init__ (line 46) | def __init__(self, args, world_info_base64): method backend_exists (line 49) | def backend_exists(self): method name (line 53) | def name(self): method parse_user_args (line 56) | def parse_user_args(self): method get_cmd (line 61) | def get_cmd(self, environment, active_resources): class OpenMPIRunner (line 109) | class OpenMPIRunner(MultiNodeRunner): method __init__ (line 110) | def __init__(self, args, world_info_base64, resource_pool): method backend_exists (line 115) | def backend_exists(self): method name (line 120) | def name(self): method validate_args (line 123) | def validate_args(self): method get_cmd (line 133) | def get_cmd(self, environment, active_resources): class SlurmRunner (line 164) | class SlurmRunner(MultiNodeRunner): method __init__ (line 165) | def __init__(self, args, world_info_base64, resource_pool): method backend_exists (line 169) | def backend_exists(self): method name (line 173) | def name(self): method get_cmd (line 176) | def get_cmd(self, environment, active_resources): class MVAPICHRunner (line 211) | class MVAPICHRunner(MultiNodeRunner): method __init__ (line 212) | def __init__(self, args, world_info_base64, resource_pool): method backend_exists (line 235) | def backend_exists(self): method name (line 253) | def name(self): method validate_args (line 256) | def validate_args(self): method get_cmd (line 266) | def get_cmd(self, environment, active_resources): FILE: benchmark/third_party/DeepSpeed/deepspeed/launcher/runner.py function parse_args (line 37) | def parse_args(args=None): function fetch_hostfile (line 177) | def fetch_hostfile(hostfile_path): function _stable_remove_duplicates (line 208) | def _stable_remove_duplicates(data): function parse_resource_filter (line 218) | def parse_resource_filter(host_info, include_str="", exclude_str=""): function parse_inclusion_exclusion (line 308) | def parse_inclusion_exclusion(resource_pool, inclusion, exclusion): function encode_world_info (line 318) | def encode_world_info(world_info): function run_autotuning (line 324) | def run_autotuning(args, active_resources): function parse_num_nodes (line 338) | def parse_num_nodes(str_num_nodes: str, elastic_training: bool): function main (line 353) | def main(args=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/model_implementations/diffusers/unet.py class DSUNet (line 7) | class DSUNet(torch.nn.Module): method __init__ (line 8) | def __init__(self, unet, enable_cuda_graph=True): method _graph_replay (line 22) | def _graph_replay(self, *inputs, **kwargs): method forward (line 32) | def forward(self, *inputs, **kwargs): method _create_cuda_graph (line 43) | def _create_cuda_graph(self, *inputs, **kwargs): method _forward (line 62) | def _forward(self, sample, timestamp, encoder_hidden_states, return_di... FILE: benchmark/third_party/DeepSpeed/deepspeed/model_implementations/diffusers/vae.py class DSVAE (line 7) | class DSVAE(torch.nn.Module): method __init__ (line 8) | def __init__(self, vae, enable_cuda_graph=True): method _graph_replay_decoder (line 19) | def _graph_replay_decoder(self, *inputs, **kwargs): method _decode (line 29) | def _decode(self, x, return_dict=True): method _create_cuda_graph_decoder (line 32) | def _create_cuda_graph_decoder(self, *inputs, **kwargs): method decode (line 52) | def decode(self, *inputs, **kwargs): method _graph_replay_encoder (line 63) | def _graph_replay_encoder(self, *inputs, **kwargs): method _encode (line 73) | def _encode(self, x, return_dict=True): method _create_cuda_graph_encoder (line 76) | def _create_cuda_graph_encoder(self, *inputs, **kwargs): method encode (line 96) | def encode(self, *inputs, **kwargs): method _graph_replay_all (line 107) | def _graph_replay_all(self, *inputs, **kwargs): method forward (line 117) | def forward(self, *inputs, **kwargs): method _create_cuda_graph (line 128) | def _create_cuda_graph(self, *inputs, **kwargs): method _forward (line 147) | def _forward(self, sample, timestamp, encoder_hidden_states, return_di... FILE: benchmark/third_party/DeepSpeed/deepspeed/model_implementations/transformers/clip_encoder.py class DSClipEncoder (line 7) | class DSClipEncoder(torch.nn.Module): method __init__ (line 8) | def __init__(self, enc, enable_cuda_graph=False): method _build_causal_attention_mask (line 23) | def _build_causal_attention_mask(self, bsz, seq_len, dtype): method _graph_replay (line 34) | def _graph_replay(self, *inputs, **kwargs): method forward (line 44) | def forward(self, *inputs, **kwargs): method _create_cuda_graph (line 56) | def _create_cuda_graph(self, *inputs, **kwargs): method _forward (line 77) | def _forward(self, *inputs, **kwargs): FILE: benchmark/third_party/DeepSpeed/deepspeed/model_implementations/transformers/ds_transformer.py class DeepSpeedTransformerInference (line 17) | class DeepSpeedTransformerInference(nn.Module): method __init__ (line 35) | def __init__(self, method forward (line 84) | def forward( FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/inject.py function module_inject (line 6) | def module_inject(layer_obj, function test_hi (line 84) | def test_hi(): FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/layers.py class LinearAllreduce (line 9) | class LinearAllreduce(nn.Module): method __init__ (line 10) | def __init__(self, weight, bias=None, mp_group=None): method forward (line 16) | def forward(self, input): class LinearLayer (line 25) | class LinearLayer(nn.Module): method __init__ (line 26) | def __init__(self, weight_shape=None, dtype=torch.half, weight=None, b... method forward (line 43) | def forward(self, input): class Normalize (line 50) | class Normalize(nn.Module): method __init__ (line 51) | def __init__(self, dim, dtype=torch.float, eps=1e-5): method forward (line 57) | def forward(self, input): class EmbeddingLayer (line 61) | class EmbeddingLayer(nn.Module): method __init__ (line 62) | def __init__(self, weight_shape, dtype=torch.half): method forward (line 70) | def forward(self, input): class OPTEmbedding (line 74) | class OPTEmbedding(EmbeddingLayer): method __init__ (line 78) | def __init__(self, weight_shape): method forward (line 84) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/load_checkpoint.py function load_model_with_checkpoint (line 9) | def load_model_with_checkpoint(r_module, FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/module_quantize.py function quantize_transformer_layer (line 4) | def quantize_transformer_layer(orig_layer_impl, model, megatron=False, p... function quantize_module (line 64) | def quantize_module(model, orig_class, quantize_fn): function _quantize_module (line 69) | def _quantize_module(model, policies): FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/replace_module.py class ReplaceWithTensorSlicing (line 21) | class ReplaceWithTensorSlicing: method __init__ (line 22) | def __init__(self, mp_group=None, mp_size=1, out_dim=1, in_dim=0): method merge_assert (line 31) | def merge_assert(self, dim1, dim2): method qkv_copy (line 37) | def qkv_copy(self, dst, src): method copy (line 87) | def copy(self, dst, src): function get_transformer_name (line 126) | def get_transformer_name(replaced_module): class GroupQuantizer (line 141) | class GroupQuantizer: method __init__ (line 142) | def __init__(self, q_int8=True, group_size=1, num_bits=8): method quantize (line 147) | def quantize(self, inputs, qkv=True, count=1, parallel_dim=0): function _module_match (line 192) | def _module_match(module): function generic_injection (line 200) | def generic_injection(module, fp16=False, enable_cuda_graph=True): function replace_transformer_layer (line 296) | def replace_transformer_layer(orig_layer_impl, function revert_transformer_layer (line 1074) | def revert_transformer_layer(orig_layer_impl, model, config, preln=False): function replace_module (line 1142) | def replace_module(model, orig_class, replace_fn, _replace_policy): function _replace_module (line 1175) | def _replace_module(model, policies, layer_id=0): FILE: benchmark/third_party/DeepSpeed/deepspeed/module_inject/replace_policy.py class DSPolicy (line 15) | class DSPolicy(ABC): method __init__ (line 18) | def __init__(self): method attention (line 21) | def attention(self): class UNetPolicy (line 30) | class UNetPolicy(DSPolicy): method __init__ (line 31) | def __init__(self): method match (line 39) | def match(self, module): method apply (line 42) | def apply(self, module, enable_cuda_graph=True): method attention (line 47) | def attention(self, client_module): class VAEPolicy (line 71) | class VAEPolicy(DSPolicy): method __init__ (line 72) | def __init__(self): method match (line 80) | def match(self, module): method apply (line 83) | def apply(self, module, enable_cuda_graph=True): class TransformerPolicy (line 89) | class TransformerPolicy(DSPolicy): method __init__ (line 94) | def __init__( method attention (line 118) | def attention(self): method get_hidden_heads (line 126) | def get_hidden_heads(self): method mlp (line 132) | def mlp(self): method layerNorm (line 140) | def layerNorm(self): method get_param_names (line 148) | def get_param_names(self): class HFBertLayerPolicy (line 174) | class HFBertLayerPolicy(TransformerPolicy): method __init__ (line 175) | def __init__(self, client_module, inference=False): method get_hidden_heads (line 190) | def get_hidden_heads(self): method attention (line 194) | def attention(self): method mlp (line 213) | def mlp(self): method layerNorm (line 223) | def layerNorm(self): class HFCLIPLayerPolicy (line 236) | class HFCLIPLayerPolicy(TransformerPolicy): method __init__ (line 237) | def __init__(self, client_module, inference=False): method get_hidden_heads (line 249) | def get_hidden_heads(self): method attention (line 253) | def attention(self): method mlp (line 272) | def mlp(self): method layerNorm (line 279) | def layerNorm(self): class HFGPTNEOLayerPolicy (line 286) | class HFGPTNEOLayerPolicy(TransformerPolicy): method __init__ (line 287) | def __init__(self, client_module, inference=True): method get_hidden_heads (line 296) | def get_hidden_heads(self): method attention (line 300) | def attention(self): method mlp (line 315) | def mlp(self): method layerNorm (line 322) | def layerNorm(self): method get_param_names (line 328) | def get_param_names(self): class HFGPTJLayerPolicy (line 345) | class HFGPTJLayerPolicy(TransformerPolicy): method __init__ (line 348) | def __init__(self, client_module, inference=True): method get_hidden_heads (line 357) | def get_hidden_heads(self): method attention (line 361) | def attention(self): method mlp (line 376) | def mlp(self): method layerNorm (line 383) | def layerNorm(self): method get_param_names (line 389) | def get_param_names(self): class MegatronLayerPolicy (line 404) | class MegatronLayerPolicy(TransformerPolicy): method __init__ (line 410) | def __init__(self, client_module, inference=True): method get_hidden_heads (line 425) | def get_hidden_heads(self): method attention (line 429) | def attention(self): method mlp (line 444) | def mlp(self, moe_type='standard'): method layerNorm (line 478) | def layerNorm(self): class HFGPT2LayerPolicy (line 485) | class HFGPT2LayerPolicy(TransformerPolicy): method __init__ (line 488) | def __init__(self, client_module, inference=True): method get_hidden_heads (line 498) | def get_hidden_heads(self): method attention (line 502) | def attention(self): method mlp (line 511) | def mlp(self): method layerNorm (line 518) | def layerNorm(self): class BLOOMLayerPolicy (line 525) | class BLOOMLayerPolicy(TransformerPolicy): method __init__ (line 528) | def __init__(self, method get_hidden_heads (line 544) | def get_hidden_heads(self): method attention (line 548) | def attention(self): method mlp (line 557) | def mlp(self): method layerNorm (line 564) | def layerNorm(self): method get_param_names (line 570) | def get_param_names(self): class GPTNEOXLayerPolicy (line 587) | class GPTNEOXLayerPolicy(TransformerPolicy): method __init__ (line 591) | def __init__(self, client_module, inference=True, megatron_v2=True, sp... method get_hidden_heads (line 604) | def get_hidden_heads(self): method attention (line 613) | def attention(self): method mlp (line 627) | def mlp(self): method layerNorm (line 634) | def layerNorm(self): method get_param_names (line 640) | def get_param_names(self): class HFOPTLayerPolicy (line 657) | class HFOPTLayerPolicy(TransformerPolicy): method __init__ (line 660) | def __init__(self, client_module, inference=True, use_load_prefix=True): method get_hidden_heads (line 675) | def get_hidden_heads(self): method attention (line 679) | def attention(self): method mlp (line 700) | def mlp(self): method layerNorm (line 707) | def layerNorm(self): method get_param_names (line 713) | def get_param_names(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/moe/experts.py class Experts (line 9) | class Experts(torch.nn.Module): method __init__ (line 10) | def __init__(self, expert, num_local_experts=1, expert_group_name=None): method forward (line 24) | def forward(self, inputs): FILE: benchmark/third_party/DeepSpeed/deepspeed/moe/layer.py class MoE (line 15) | class MoE(torch.nn.Module): method __init__ (line 34) | def __init__(self, method set_deepspeed_parallelism (line 87) | def set_deepspeed_parallelism(self): method _create_process_groups (line 90) | def _create_process_groups(self): method forward (line 108) | def forward(self, hidden_states, used_token=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/moe/mappings.py function _gather_tokens (line 27) | def _gather_tokens(input_, dim=0): function _drop_tokens (line 50) | def _drop_tokens(input_, dim=0): class _GatherTokens (line 62) | class _GatherTokens(torch.autograd.Function): method symbolic (line 65) | def symbolic(graph, input_, dim): method forward (line 69) | def forward(ctx, input_, dim): method backward (line 74) | def backward(ctx, grad_output): class _DropTokens (line 78) | class _DropTokens(torch.autograd.Function): method symbolic (line 82) | def symbolic(graph, input_, dim): method forward (line 86) | def forward(ctx, input_, dim): method backward (line 91) | def backward(ctx, input_): function gather_tokens (line 95) | def gather_tokens(input_, dim=0): function drop_tokens (line 103) | def drop_tokens(input_, dim=0): FILE: benchmark/third_party/DeepSpeed/deepspeed/moe/sharded_moe.py function multiplicative_jitter (line 46) | def multiplicative_jitter(x, device: torch.device, epsilon=1e-2): function gumbel_rsample (line 72) | def gumbel_rsample(shape: Tuple, device: torch.device) -> Tensor: class _AllToAll (line 89) | class _AllToAll(torch.autograd.Function): method forward (line 91) | def forward( method backward (line 103) | def backward(ctx: Any, *grad_output: Tensor) -> Tuple[None, Tensor]: function einsum (line 114) | def einsum(rule, a, b): function _capacity (line 155) | def _capacity(gates: Tensor, capacity_factor: Tensor, min_capacity: Tens... function _top_idx (line 168) | def _top_idx(source, k): function _one_hot_to_float (line 173) | def _one_hot_to_float(x, num_classes): function top1gating (line 177) | def top1gating(logits: Tensor, function top2gating (line 278) | def top2gating(logits: Tensor, class TopKGate (line 351) | class TopKGate(Module): method __init__ (line 369) | def __init__(self, method forward (line 396) | def forward( class MOELayer (line 439) | class MOELayer(Base): method __init__ (line 456) | def __init__(self, method _set_ep_group (line 488) | def _set_ep_group(self, ep_group): method forward (line 491) | def forward(self, *input: Tensor, **kwargs: Any) -> Tensor: FILE: benchmark/third_party/DeepSpeed/deepspeed/moe/utils.py function has_moe_layers (line 6) | def has_moe_layers(m): function is_moe_param (line 18) | def is_moe_param(param: torch.Tensor) -> bool: function split_params_into_shared_and_expert_params (line 24) | def split_params_into_shared_and_expert_params( function split_params_grads_into_shared_and_expert_params (line 36) | def split_params_grads_into_shared_and_expert_params( function split_params_into_different_moe_groups_for_optimizer (line 62) | def split_params_into_different_moe_groups_for_optimizer(param_groups: T... FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/config.py class MonitorConfig (line 10) | class MonitorConfig(BaseModel): class Config (line 11) | class Config: class TensorBoardConfig (line 18) | class TensorBoardConfig(MonitorConfig): class WandbConfig (line 24) | class WandbConfig(MonitorConfig): class CSVConfig (line 31) | class CSVConfig(MonitorConfig): class DeepSpeedMonitorConfig (line 37) | class DeepSpeedMonitorConfig: method __init__ (line 38) | def __init__(self, ds_config): FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/csv_monitor.py class csvMonitor (line 7) | class csvMonitor(Monitor): method __init__ (line 8) | def __init__(self, monitor_config): method setup_log_dir (line 16) | def setup_log_dir(self, base=os.path.join(os.path.expanduser("~"), "cs... method write_events (line 34) | def write_events(self, event_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/monitor.py class Monitor (line 9) | class Monitor(ABC): method __init__ (line 11) | def __init__(self, monitor_config): method write_events (line 15) | def write_events(self, event_list): class MonitorMaster (line 24) | class MonitorMaster(Monitor): method __init__ (line 25) | def __init__(self, monitor_config): method write_events (line 40) | def write_events(self, event_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/tensorboard.py class TensorBoardMonitor (line 8) | class TensorBoardMonitor(Monitor): method __init__ (line 9) | def __init__(self, monitor_config): method get_summary_writer (line 21) | def get_summary_writer(self, method write_events (line 43) | def write_events(self, event_list, flush=True): method flush (line 50) | def flush(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/utils.py function check_tb_availability (line 1) | def check_tb_availability(): function check_wandb_availability (line 11) | def check_wandb_availability(): FILE: benchmark/third_party/DeepSpeed/deepspeed/monitor/wandb.py class WandbMonitor (line 7) | class WandbMonitor(Monitor): method __init__ (line 8) | def __init__(self, monitor_config): method log (line 21) | def log(self, data, step=None, commit=None, sync=None): method write_events (line 26) | def write_events(self, event_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/nebula/config.py class DeepSpeedNebulaConfig (line 10) | class DeepSpeedNebulaConfig(DeepSpeedConfigObject): method __init__ (line 11) | def __init__(self, param_dict): method _initialize (line 27) | def _initialize(self, nebula_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/adagrad/cpu_adagrad.py class DeepSpeedCPUAdagrad (line 10) | class DeepSpeedCPUAdagrad(torch.optim.Optimizer): method __init__ (line 13) | def __init__(self, method __del__ (line 35) | def __del__(self): method __setstate__ (line 40) | def __setstate__(self, state): method step (line 46) | def step(self, closure=None, fp16_param_groups=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/adam/cpu_adam.py class DeepSpeedCPUAdam (line 12) | class DeepSpeedCPUAdam(torch.optim.Optimizer): method __init__ (line 15) | def __init__(self, method __del__ (line 105) | def __del__(self): method __setstate__ (line 110) | def __setstate__(self, state): method step (line 116) | def step(self, closure=None, fp16_param_groups=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/adam/fused_adam.py class FusedAdam (line 15) | class FusedAdam(torch.optim.Optimizer): method __init__ (line 49) | def __init__(self, method zero_grad (line 77) | def zero_grad(self): method step (line 85) | def step(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/adam/multi_tensor_apply.py class MultiTensorApply (line 9) | class MultiTensorApply(object): method __init__ (line 10) | def __init__(self, chunk_size): method __call__ (line 13) | def __call__(self, op, noop_flag_buffer, tensor_lists, *args): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/lamb/fused_lamb.py class FusedLamb (line 12) | class FusedLamb(torch.optim.Optimizer): method __init__ (line 38) | def __init__(self, method step (line 67) | def step(self, method get_lamb_coeffs (line 187) | def get_lamb_coeffs(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/quantizer/quantizer.py function ds_quantizer (line 12) | def ds_quantizer(input, groups=1, bit_num=8, sr=False, asym=False): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/bert_sparse_self_attention.py class BertSparseSelfAttention (line 9) | class BertSparseSelfAttention(nn.Module): method __init__ (line 16) | def __init__( method transpose_for_scores (line 46) | def transpose_for_scores(self, x): method forward (line 52) | def forward(self, hidden_states, attention_mask): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/matmul.py function _kernel (line 12) | def _kernel(A, class _sparse_matmul (line 212) | class _sparse_matmul(torch.autograd.Function): method load_balance (line 224) | def load_balance(sizes, block): method get_locks (line 275) | def get_locks(size, dev): method make_sdd_lut (line 286) | def make_sdd_lut(layout, block, dtype, device): method _sdd_matmul (line 317) | def _sdd_matmul(a, method make_dxx_lut (line 427) | def make_dxx_lut(layout, block, step, trans, device, transform=lambda ... method _dds_matmul (line 521) | def _dds_matmul(a, method _dsd_matmul (line 593) | def _dsd_matmul(a, method forward (line 672) | def forward(ctx, method backward (line 734) | def backward(ctx, dc): class MatMul (line 777) | class MatMul: method make_lut (line 785) | def make_lut(self, dtype, device): method __init__ (line 819) | def __init__(self, layout, block, mode, trans_a=False, trans_b=False, ... method _pad_shape (line 873) | def _pad_shape(x, is_sparse): method __call__ (line 879) | def __call__(self, a, b): method _validate_inputs (line 946) | def _validate_inputs(self, a, b): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/softmax.py function next_power_of_2 (line 10) | def next_power_of_2(n): function num_warps (line 21) | def num_warps(n): function _forward (line 38) | def _forward(X, function _backward (line 112) | def _backward(X, scale, DX, LUT, sizemax, stride_zx, stride_zdx, **meta): class _sparse_softmax (line 142) | class _sparse_softmax(torch.autograd.Function): method make_lut (line 147) | def make_lut(layout, block, device): method forward (line 169) | def forward(ctx, method backward (line 245) | def backward(ctx, dx): class Softmax (line 263) | class Softmax: method sparse_softmax (line 271) | def sparse_softmax(*args, **kwargs): method make_lut (line 274) | def make_lut(self, device): method __init__ (line 284) | def __init__(self, layout, block, bench=False): method __call__ (line 300) | def __call__(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/sparse_attention_utils.py class SparseAttentionUtils (line 13) | class SparseAttentionUtils: method extend_position_embedding (line 19) | def extend_position_embedding(model, max_position): method update_tokenizer_model_max_length (line 68) | def update_tokenizer_model_max_length(tokenizer, max_position): method replace_model_self_attention_with_sparse_self_attention (line 85) | def replace_model_self_attention_with_sparse_self_attention( method replace_self_attention_layer_with_sparse_self_attention_layer (line 123) | def replace_self_attention_layer_with_sparse_self_attention_layer( method pad_to_block_size (line 151) | def pad_to_block_size(block_size, method unpad_sequence_output (line 210) | def unpad_sequence_output(pad_len, sequence_output): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/sparse_self_attention.py class SparseSelfAttention (line 11) | class SparseSelfAttention(nn.Module): method __init__ (line 18) | def __init__( method get_layout (line 48) | def get_layout(self, L): method get_ops (line 63) | def get_ops(self, H, L): method transpose_key_for_scores (line 87) | def transpose_key_for_scores(self, x, L): method transpose_mask_for_sparse (line 93) | def transpose_mask_for_sparse(self, qtype, x, is_key_padding_mask=False): method forward (line 103) | def forward(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/sparsity_config.py class SparsityConfig (line 9) | class SparsityConfig: method __init__ (line 13) | def __init__(self, num_heads, block=16, different_layout_per_head=False): method setup_layout (line 29) | def setup_layout(self, seq_len): method check_and_propagate_first_head_layout (line 48) | def check_and_propagate_first_head_layout(self, layout): class DenseSparsityConfig (line 63) | class DenseSparsityConfig(SparsityConfig): method __init__ (line 67) | def __init__(self, num_heads, block=16, different_layout_per_head=False): method make_layout (line 79) | def make_layout(self, seq_len): class FixedSparsityConfig (line 94) | class FixedSparsityConfig(SparsityConfig): method __init__ (line 99) | def __init__(self, method set_local_layout (line 154) | def set_local_layout(self, h, layout): method set_global_layout (line 175) | def set_global_layout(self, h, layout): method make_layout (line 224) | def make_layout(self, seq_len): class VariableSparsityConfig (line 243) | class VariableSparsityConfig(SparsityConfig): method __init__ (line 253) | def __init__(self, method set_random_layout (line 309) | def set_random_layout(self, h, layout): method set_local_layout (line 331) | def set_local_layout(self, h, layout): method set_global_layout (line 364) | def set_global_layout(self, h, layout): method make_layout (line 401) | def make_layout(self, seq_len): class BigBirdSparsityConfig (line 421) | class BigBirdSparsityConfig(SparsityConfig): method __init__ (line 426) | def __init__(self, method set_random_layout (line 459) | def set_random_layout(self, h, layout): method set_sliding_window_layout (line 486) | def set_sliding_window_layout(self, h, layout): method set_global_layout_itc (line 510) | def set_global_layout_itc(self, h, layout): method make_layout (line 539) | def make_layout(self, seq_len): class BSLongformerSparsityConfig (line 559) | class BSLongformerSparsityConfig(SparsityConfig): method __init__ (line 567) | def __init__(self, method set_sliding_window_layout (line 608) | def set_sliding_window_layout(self, h, layout): method set_global_layout (line 632) | def set_global_layout(self, h, layout): method make_layout (line 667) | def make_layout(self, seq_len): class LocalSlidingWindowSparsityConfig (line 686) | class LocalSlidingWindowSparsityConfig(SparsityConfig): method __init__ (line 690) | def __init__(self, method set_sliding_window_layout (line 708) | def set_sliding_window_layout(self, h, layout): method make_layout (line 731) | def make_layout(self, seq_len): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/sparse_attention/trsrc/__init__.py function _build_file_index (line 5) | def _build_file_index(directory, suffix='.tr'): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/bias_add.py function nhwc_bias_add (line 13) | def nhwc_bias_add(activation: torch.Tensor, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/config.py class TransformerConfig (line 8) | class TransformerConfig(): method __init__ (line 9) | def __init__(self, hidden_size, intermediate_size, heads, num_hidden_l... class DeepSpeedInferenceConfig (line 17) | class DeepSpeedInferenceConfig(TransformerConfig): method __init__ (line 43) | def __init__(self, method from_dict (line 99) | def from_dict(cls, json_object): method from_json_file (line 106) | def from_json_file(cls, json_file): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/diffusers_2d_transformer.py class Diffusers2DTransformerConfig (line 6) | class Diffusers2DTransformerConfig(): method __init__ (line 7) | def __init__(self, int8_quantization=False): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/diffusers_attention.py function load_triton_flash_attn (line 17) | def load_triton_flash_attn(): class DeepSpeedDiffusersAttentionFunction (line 30) | class DeepSpeedDiffusersAttentionFunction(Function): method forward (line 32) | def forward(ctx, method backward (line 120) | def backward(ctx, grad_output, grad_output1, grad_output2, grad_output3): class DeepSpeedDiffusersAttention (line 125) | class DeepSpeedDiffusersAttention(nn.Module): method __init__ (line 134) | def __init__( method forward (line 214) | def forward(self, input, context=None, input_mask=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/diffusers_transformer_block.py function load_transformer_module (line 19) | def load_transformer_module(): function load_spatial_module (line 26) | def load_spatial_module(): class DeepSpeedDiffusersTransformerBlock (line 33) | class DeepSpeedDiffusersTransformerBlock(nn.Module): method __init__ (line 34) | def __init__(self, method forward (line 93) | def forward(self, hidden_states, context=None, timestep=None): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/ds_attention.py class DeepSpeedSelfAttentionFunction (line 16) | class DeepSpeedSelfAttentionFunction(Function): method forward (line 18) | def forward(ctx, method backward (line 375) | def backward(ctx, grad_output, grad_output1, grad_output2, grad_output3): class DeepSpeedSelfAttention (line 380) | class DeepSpeedSelfAttention(nn.Module): method __init__ (line 383) | def __init__(self, method forward (line 446) | def forward(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/ds_mlp.py class DeepSpeedMLPFunction (line 16) | class DeepSpeedMLPFunction(Function): method forward (line 18) | def forward(ctx, method backward (line 84) | def backward(ctx, grad_output): class DeepSpeedMLP (line 89) | class DeepSpeedMLP(nn.Module): method __init__ (line 90) | def __init__(self, method forward (line 156) | def forward(self, input, residual, residual_norm, bias): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/moe_inference.py class DeepSpeedMoEInferenceConfig (line 20) | class DeepSpeedMoEInferenceConfig(DeepSpeedInferenceConfig): method __init__ (line 45) | def __init__(self, method from_dict (line 104) | def from_dict(cls, json_object): method from_json_file (line 111) | def from_json_file(cls, json_file): class DeepSpeedMLPFunction (line 117) | class DeepSpeedMLPFunction(Function): method forward (line 119) | def forward(ctx, method backward (line 162) | def backward(ctx, grad_output): class DeepSpeedMoEMLP (line 167) | class DeepSpeedMoEMLP(nn.Module): method __init__ (line 168) | def __init__(self, method forward (line 194) | def forward(self, input, async_op=False): class DeepSpeedMoEInference (line 208) | class DeepSpeedMoEInference(nn.Module): method __init__ (line 226) | def __init__(self, method res_coef_func (line 313) | def res_coef_func(self, inp, async_op): method moe_gate_einsum (line 317) | def moe_gate_einsum(self, attention_output): method expert_exec (line 328) | def expert_exec(self, dispatched_input): method _alltoall (line 349) | def _alltoall(self, dispatched_attention): method scale_expert_output (line 359) | def scale_expert_output(self, attention_output, expert_output, combine... method forward (line 368) | def forward(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/inference/triton_ops.py function _fwd_kernel (line 12) | def _fwd_kernel( class triton_flash_attn (line 103) | class triton_flash_attn(torch.nn.Module): method __init__ (line 104) | def __init__(self, ): method forward (line 107) | def forward(self, q, k, v, sm_scale, block_128=True): FILE: benchmark/third_party/DeepSpeed/deepspeed/ops/transformer/transformer.py class TransformerConfig (line 17) | class TransformerConfig(): method __init__ (line 18) | def __init__(self, class DeepSpeedTransformerConfig (line 38) | class DeepSpeedTransformerConfig(TransformerConfig): method __init__ (line 92) | def __init__(self, method from_dict (line 139) | def from_dict(cls, json_object): method from_json_file (line 146) | def from_json_file(cls, json_file): class DeepSpeedTransformerFunction (line 152) | class DeepSpeedTransformerFunction(Function): method forward (line 154) | def forward(ctx, method backward (line 324) | def backward(ctx, grad_output): class DeepSpeedTransformerLayer (line 459) | class DeepSpeedTransformerLayer(nn.Module): method __init__ (line 474) | def __init__(self, config, initial_weights=None, initial_biases=None): method init_transformer_weights (line 558) | def init_transformer_weights(self, adjust_init_range=False): method forward (line 578) | def forward(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/profiling/config.py class DeepSpeedFlopsProfilerConfig (line 10) | class DeepSpeedFlopsProfilerConfig(DeepSpeedConfigObject): method __init__ (line 11) | def __init__(self, param_dict): method _initialize (line 26) | def _initialize(self, flops_profiler_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/profiling/flops_profiler/profiler.py class FlopsProfiler (line 17) | class FlopsProfiler(object): method __init__ (line 53) | def __init__(self, model, ds_engine=None): method start_profile (line 59) | def start_profile(self, ignore_list=None): method stop_profile (line 120) | def stop_profile(self): method reset_profile (line 149) | def reset_profile(self): method end_profile (line 163) | def end_profile(self): method get_total_flops (line 187) | def get_total_flops(self, as_string=False): method get_total_macs (line 199) | def get_total_macs(self, as_string=False): method get_total_duration (line 211) | def get_total_duration(self, as_string=False): method get_total_params (line 223) | def get_total_params(self, as_string=False): method print_model_profile (line 235) | def print_model_profile(self, method print_model_aggregated_profile (line 402) | def print_model_aggregated_profile(self, module_depth=-1, top_modules=1): function _prod (line 474) | def _prod(dims): function _linear_flops_compute (line 481) | def _linear_flops_compute(input, weight, bias=None): function _relu_flops_compute (line 487) | def _relu_flops_compute(input, inplace=False): function _prelu_flops_compute (line 491) | def _prelu_flops_compute(input: Tensor, weight: Tensor): function _elu_flops_compute (line 495) | def _elu_flops_compute(input: Tensor, alpha: float = 1.0, inplace: bool ... function _leaky_relu_flops_compute (line 499) | def _leaky_relu_flops_compute(input: Tensor, function _relu6_flops_compute (line 505) | def _relu6_flops_compute(input: Tensor, inplace: bool = False): function _silu_flops_compute (line 509) | def _silu_flops_compute(input: Tensor, inplace: bool = False): function _gelu_flops_compute (line 513) | def _gelu_flops_compute(input): function _pool_flops_compute (line 517) | def _pool_flops_compute(input, function _conv_flops_compute (line 529) | def _conv_flops_compute(input, function _conv_trans_flops_compute (line 569) | def _conv_trans_flops_compute( function _batch_norm_flops_compute (line 615) | def _batch_norm_flops_compute( function _layer_norm_flops_compute (line 633) | def _layer_norm_flops_compute( function _group_norm_flops_compute (line 645) | def _group_norm_flops_compute(input: Tensor, function _instance_norm_flops_compute (line 655) | def _instance_norm_flops_compute( function _upsample_flops_compute (line 670) | def _upsample_flops_compute(input, function _softmax_flops_compute (line 689) | def _softmax_flops_compute(input, dim=None, _stacklevel=3, dtype=None): function _embedding_flops_compute (line 693) | def _embedding_flops_compute( function _dropout_flops_compute (line 705) | def _dropout_flops_compute(input, p=0.5, training=True, inplace=False): function _matmul_flops_compute (line 709) | def _matmul_flops_compute(input, other, *, out=None): function _addmm_flops_compute (line 717) | def _addmm_flops_compute(input, mat1, mat2, *, beta=1, alpha=1, out=None): function _einsum_flops_compute (line 725) | def _einsum_flops_compute(equation, *operands): function _tensor_addmm_flops_compute (line 747) | def _tensor_addmm_flops_compute(self, mat1, mat2, *, beta=1, alpha=1, ou... function _mul_flops_compute (line 755) | def _mul_flops_compute(input, other, *, out=None): function _add_flops_compute (line 759) | def _add_flops_compute(input, other, *, alpha=1, out=None): function _elementwise_flops_compute (line 763) | def _elementwise_flops_compute(input, other): function wrapFunc (line 788) | def wrapFunc(func, funcFlopCompute): function _patch_functionals (line 806) | def _patch_functionals(): function _patch_tensor_methods (line 861) | def _patch_tensor_methods(): function _reload_functionals (line 881) | def _reload_functionals(): function _reload_tensor_methods (line 914) | def _reload_tensor_methods(): function _rnn_flops (line 918) | def _rnn_flops(flops, rnn_module, w_ih, w_hh, input_size): function _rnn_forward_hook (line 943) | def _rnn_forward_hook(rnn_module, input, output): function _rnn_cell_forward_hook (line 971) | def _rnn_cell_forward_hook(rnn_cell_module, input, output): function num_to_string (line 999) | def num_to_string(num, precision=2): function macs_to_string (line 1010) | def macs_to_string(macs, units=None, precision=2): function number_to_string (line 1031) | def number_to_string(num, units=None, precision=2): function flops_to_string (line 1052) | def flops_to_string(flops, units=None, precision=2): function params_to_string (line 1077) | def params_to_string(params_num, units=None, precision=2): function duration_to_string (line 1094) | def duration_to_string(duration, units=None, precision=2): function get_module_flops (line 1115) | def get_module_flops(module): function get_module_macs (line 1123) | def get_module_macs(module): function get_module_duration (line 1131) | def get_module_duration(module): function get_model_profile (line 1139) | def get_model_profile( FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/__init__.py class DeepSpeedOptimizer (line 1) | class DeepSpeedOptimizer(object): class ZeROOptimizer (line 5) | class ZeROOptimizer(DeepSpeedOptimizer): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/activation_checkpointing/checkpointing.py function detach_variable (line 64) | def detach_variable(inputs, device=None): function _set_cuda_rng_state (line 89) | def _set_cuda_rng_state(new_state, device=-1): class CudaRNGStatesTracker (line 122) | class CudaRNGStatesTracker: method __init__ (line 130) | def __init__(self): method reset (line 136) | def reset(self): method get_states (line 141) | def get_states(self): method set_states (line 146) | def set_states(self, states): method add (line 151) | def add(self, name, seed): method fork (line 169) | def fork(self, name=_MODEL_PARALLEL_RNG_TRACKER_NAME): function get_cuda_rng_tracker (line 193) | def get_cuda_rng_tracker(): function model_parallel_cuda_manual_seed (line 198) | def model_parallel_cuda_manual_seed(seed): function get_partition_start (line 243) | def get_partition_start(item): function get_partition_size (line 251) | def get_partition_size(item): function gather_partitioned_activations (line 259) | def gather_partitioned_activations(tensors, device=None): function extract_tensors (line 303) | def extract_tensors(all_objects): function merge_tensors (line 323) | def merge_tensors(tensor_objects, non_tensor_objects, tensor_flags): function is_activation_to_checkpoint (line 365) | def is_activation_to_checkpoint(item): function partition_activations (line 373) | def partition_activations(args, cpu_checkpoint, contiguous_checkpoint): function get_partitioned_activations_for_backward (line 439) | def get_partitioned_activations_for_backward(args, inputs, contiguous_ch... function get_cpu_activations_for_backward (line 486) | def get_cpu_activations_for_backward(args, inputs): class CheckpointFunction (line 499) | class CheckpointFunction(torch.autograd.Function): method forward (line 510) | def forward(ctx, run_function, all_outputs, *args): method backward (line 630) | def backward(ctx, *grads): function checkpoint (line 749) | def checkpoint(function, *args): function partition_activations_in_checkpoint (line 761) | def partition_activations_in_checkpoint(partition_activation): function set_num_layers (line 769) | def set_num_layers(nlayers): function reset (line 774) | def reset(): function _configure_using_config_file (line 800) | def _configure_using_config_file(config, mpu=None): function _configure_defaults (line 815) | def _configure_defaults(): function configure (line 831) | def configure( function is_configured (line 913) | def is_configured(): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/activation_checkpointing/config.py class DeepSpeedActivationCheckpointingConfig (line 59) | class DeepSpeedActivationCheckpointingConfig(DeepSpeedConfigObject): method __init__ (line 60) | def __init__(self, param_dict): method _initialize (line 77) | def _initialize(self, act_chkpt_config_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/bf16_optimizer.py class BF16_Optimizer (line 38) | class BF16_Optimizer(ZeROOptimizer): method __init__ (line 39) | def __init__(self, method _setup_for_real_optimizer (line 95) | def _setup_for_real_optimizer(self): method _enable_universal_checkpoint (line 189) | def _enable_universal_checkpoint(self): method _create_param_mapping (line 193) | def _create_param_mapping(self): method _link_all_hp_params (line 206) | def _link_all_hp_params(self): method initialize_optimizer_states (line 221) | def initialize_optimizer_states(self): method _split_flat_tensor (line 235) | def _split_flat_tensor(self, flat_tensor, num_elem_list): method _update_storage_to_flattened_tensor (line 246) | def _update_storage_to_flattened_tensor(self, tensor_list, flat_tensor): method _flatten_dense_tensors_aligned (line 251) | def _flatten_dense_tensors_aligned(self, tensor_list, alignment): method step (line 255) | def step(self, closure=None): method backward (line 280) | def backward(self, loss, update_hp_grads=True, clear_lp_grads=False, *... method update_hp_grads (line 296) | def update_hp_grads(self, clear_lp_grads=False): method get_grads_for_reduction (line 315) | def get_grads_for_reduction(self): method get_grads_for_norm (line 319) | def get_grads_for_norm(self, for_clipping=False): method update_lp_params (line 339) | def update_lp_params(self): method clear_hp_grads (line 352) | def clear_hp_grads(self): method clear_lp_grads (line 359) | def clear_lp_grads(self): method state_dict (line 364) | def state_dict(self): method _restore_from_bit16_weights (line 377) | def _restore_from_bit16_weights(self): method refresh_fp32_params (line 383) | def refresh_fp32_params(self): method load_state_dict (line 386) | def load_state_dict(self, method _load_legacy_checkpoint (line 400) | def _load_legacy_checkpoint(self, method _load_universal_checkpoint (line 425) | def _load_universal_checkpoint(self, method param_groups (line 432) | def param_groups(self): method _load_hp_checkpoint_state (line 436) | def _load_hp_checkpoint_state(self, checkpoint_dir): function _get_padded_tensor (line 452) | def _get_padded_tensor(src_tensor, size): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py class CheckpointEngine (line 1) | class CheckpointEngine(object): method __init__ (line 4) | def __init__(self, config_params=None): method create (line 7) | def create(self, tag): method save (line 11) | def save(self, state_dict, path: str): method load (line 14) | def load(self, path: str, map_location=None): method commit (line 17) | def commit(self, tag): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/checkpoint_engine/nebula_checkpoint_engine.py function _get_tag_from_path (line 11) | def _get_tag_from_path(path): class NebulaCheckpointEngine (line 15) | class NebulaCheckpointEngine(CheckpointEngine): method __init__ (line 16) | def __init__(self, config_params=None): method create (line 33) | def create(self, tag): method save (line 39) | def save(self, state_dict, path: str): method load (line 50) | def load(self, path: str, map_location=None): method commit (line 103) | def commit(self, tag): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/checkpoint_engine/torch_checkpoint_engine.py class TorchCheckpointEngine (line 7) | class TorchCheckpointEngine(CheckpointEngine): method __init__ (line 8) | def __init__(self, config_params=None): method create (line 11) | def create(self, tag): method save (line 14) | def save(self, state_dict, path: str): method load (line 20) | def load(self, path: str, map_location=None): method commit (line 26) | def commit(self, tag): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/comm/coalesced_collectives.py function _torch_reduce_scatter_fn (line 17) | def _torch_reduce_scatter_fn(input_tensor: Tensor, function reduce_scatter_coalesced (line 30) | def reduce_scatter_coalesced( FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/comm/mpi.py class MpiBackend (line 14) | class MpiBackend(object): method __init__ (line 15) | def __init__(self, cuda_aware): method my_igather (line 22) | def my_igather(self, rank, size, comm, sendbuf, recbuf, root): method gather_cuda (line 34) | def gather_cuda(self, method gather_host (line 64) | def gather_host(self, method allgather_cuda (line 125) | def allgather_cuda(self, method allgather_host (line 134) | def allgather_host(self, method compressed_allreduce (line 170) | def compressed_allreduce(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/comm/nccl.py class NcclBackend (line 13) | class NcclBackend(object): method __init__ (line 14) | def __init__(self, mpu=None): method my_igather (line 29) | def my_igather(self, rank, size, group, sendbuf, recvbuf, root): method my_gather (line 41) | def my_gather(self, rank, size, group, sendbuf, recvbuf, root): method compressed_allreduce (line 51) | def compressed_allreduce(self, FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/compression/cupy.py class CupyBackend (line 10) | class CupyBackend(object): method __init__ (line 11) | def __init__(self): method torch2cupy (line 14) | def torch2cupy(self, tensor): method cupy2torch (line 17) | def cupy2torch(self, cupy_tensor): method compress_by_chunk (line 20) | def compress_by_chunk(self, cupy_bool_tensor, num_chunks): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/config.py class DeepSpeedConfigError (line 86) | class DeepSpeedConfigError(Exception): function get_curriculum_enabled (line 90) | def get_curriculum_enabled(param_dict): function get_curriculum_params (line 99) | def get_curriculum_params(param_dict): function get_pld_enabled (line 108) | def get_pld_enabled(param_dict): function get_pld_params (line 117) | def get_pld_params(param_dict): function get_amp_enabled (line 126) | def get_amp_enabled(param_dict): function get_amp_params (line 133) | def get_amp_params(param_dict): function get_fp16_enabled (line 142) | def get_fp16_enabled(param_dict): function get_bfloat16_enabled (line 149) | def get_bfloat16_enabled(param_dict): function get_fp16_master_weights_and_grads_enabled (line 158) | def get_fp16_master_weights_and_grads_enabled(param_dict): function get_fp16_auto_cast (line 167) | def get_fp16_auto_cast(param_dict): function get_loss_scale (line 172) | def get_loss_scale(param_dict): function get_initial_dynamic_scale (line 183) | def get_initial_dynamic_scale(param_dict): function get_dynamic_loss_scale_args (line 196) | def get_dynamic_loss_scale_args(param_dict): function get_gradient_accumulation_steps (line 229) | def get_gradient_accumulation_steps(param_dict): function get_sparse_gradients_enabled (line 235) | def get_sparse_gradients_enabled(param_dict): function get_communication_data_type (line 239) | def get_communication_data_type(param_dict): function get_prescale_gradients (line 258) | def get_prescale_gradients(param_dict): function get_gradient_predivide_factor (line 262) | def get_gradient_predivide_factor(param_dict): function get_steps_per_print (line 268) | def get_steps_per_print(param_dict): function get_disable_allgather (line 272) | def get_disable_allgather(param_dict): function get_dump_state (line 276) | def get_dump_state(param_dict): function get_gradient_clipping (line 280) | def get_gradient_clipping(param_dict): function get_sparse_attention (line 284) | def get_sparse_attention(param_dict): function get_sparse_dense_config (line 307) | def get_sparse_dense_config(sparsity): function get_sparse_fixed_config (line 312) | def get_sparse_fixed_config(sparsity): function get_sparse_variable_config (line 351) | def get_sparse_variable_config(sparsity): function get_sparse_bigbird_config (line 394) | def get_sparse_bigbird_config(sparsity): function get_sparse_bslongformer_config (line 423) | def get_sparse_bslongformer_config(sparsity): function get_sparse_attention_mode (line 454) | def get_sparse_attention_mode(param_dict): function get_sparse_attention_type (line 461) | def get_sparse_attention_type(param_dict): function get_pipeline_config (line 468) | def get_pipeline_config(param_dict): function get_optimizer_name (line 482) | def get_optimizer_name(param_dict): function get_optimizer_params (line 489) | def get_optimizer_params(param_dict): function get_optimizer_gradient_clipping (line 497) | def get_optimizer_gradient_clipping(param_dict): function get_optimizer_legacy_fusion (line 505) | def get_optimizer_legacy_fusion(param_dict): function get_zero_allow_untested_optimizer (line 512) | def get_zero_allow_untested_optimizer(param_dict): function get_scheduler_name (line 518) | def get_scheduler_name(param_dict): function get_scheduler_params (line 525) | def get_scheduler_params(param_dict): function get_train_batch_size (line 533) | def get_train_batch_size(param_dict): function get_train_micro_batch_size_per_gpu (line 537) | def get_train_micro_batch_size_per_gpu(param_dict): function get_wall_clock_breakdown (line 545) | def get_wall_clock_breakdown(param_dict): function get_memory_breakdown (line 551) | def get_memory_breakdown(param_dict): function get_eigenvalue_config (line 555) | def get_eigenvalue_config(param_dict): function get_eigenvalue_enabled (line 582) | def get_eigenvalue_enabled(param_dict): function get_eigenvalue_verbose (line 591) | def get_eigenvalue_verbose(param_dict): function get_eigenvalue_max_iter (line 600) | def get_eigenvalue_max_iter(param_dict): function get_eigenvalue_tol (line 609) | def get_eigenvalue_tol(param_dict): function get_eigenvalue_stability (line 618) | def get_eigenvalue_stability(param_dict): function get_eigenvalue_gas_boundary_resolution (line 627) | def get_eigenvalue_gas_boundary_resolution(param_dict): function get_eigenvalue_layer_name (line 638) | def get_eigenvalue_layer_name(param_dict): function get_eigenvalue_layer_num (line 647) | def get_eigenvalue_layer_num(param_dict): function get_checkpoint_params (line 656) | def get_checkpoint_params(param_dict): function get_data_types_params (line 660) | def get_data_types_params(param_dict): function get_checkpoint_tag_validation_mode (line 664) | def get_checkpoint_tag_validation_mode(checkpoint_params): function get_checkpoint_parallel_write_pipeline (line 677) | def get_checkpoint_parallel_write_pipeline(checkpoint_params): function get_dataloader_drop_last (line 690) | def get_dataloader_drop_last(param_dict): class DeepSpeedConfigWriter (line 700) | class DeepSpeedConfigWriter: method __init__ (line 701) | def __init__(self, data=None): method add_config (line 704) | def add_config(self, key, value): method load_config (line 707) | def load_config(self, filename): method write_config (line 712) | def write_config(self, filename): class DeepSpeedConfig (line 717) | class DeepSpeedConfig(object): method __init__ (line 718) | def __init__(self, config: Union[str, dict], mpu=None): method _initialize_params (line 824) | def _initialize_params(self, param_dict): method _batch_assertion (line 930) | def _batch_assertion(self): method _set_batch_related_parameters (line 954) | def _set_batch_related_parameters(self): method _configure_train_batch_size (line 999) | def _configure_train_batch_size(self): method _do_sanity_check (line 1003) | def _do_sanity_check(self): method print_user_config (line 1008) | def print_user_config(self): method print (line 1019) | def print(self, name): method _do_error_check (line 1028) | def _do_error_check(self): method _do_warning_check (line 1047) | def _do_warning_check(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/config_utils.py class DeepSpeedConfigModel (line 16) | class DeepSpeedConfigModel(BaseModel): method __init__ (line 50) | def __init__(self, strict=False, **data): method _process_deprecated_field (line 58) | def _process_deprecated_field(self, pydantic_config, field): method _deprecated_fields_check (line 100) | def _deprecated_fields_check(self, pydantic_config): class Config (line 106) | class Config: class pp_int (line 114) | class pp_int(int): method __new__ (line 120) | def __new__(cls, val, custom_print_str=None): method __repr__ (line 125) | def __repr__(self): class ScientificNotationEncoder (line 132) | class ScientificNotationEncoder(json.JSONEncoder): method iterencode (line 141) | def iterencode(self, o, _one_shot=False, level=0): class DeepSpeedConfigObject (line 164) | class DeepSpeedConfigObject(object): method repr (line 168) | def repr(self): method __repr__ (line 171) | def __repr__(self): function get_scalar_param (line 180) | def get_scalar_param(param_dict, param_name, param_default_value): function get_list_param (line 184) | def get_list_param(param_dict, param_name, param_default_value): function get_dict_param (line 188) | def get_dict_param(param_dict, param_name, param_default_value): function dict_raise_error_on_duplicate_keys (line 192) | def dict_raise_error_on_duplicate_keys(ordered_pairs): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/constants.py class ValidationMode (line 358) | class ValidationMode: FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/data_pipeline/curriculum_scheduler.py class CurriculumScheduler (line 8) | class CurriculumScheduler(object): method __init__ (line 9) | def __init__(self, config): method get_current_difficulty (line 87) | def get_current_difficulty(self): method set_current_difficulty (line 90) | def set_current_difficulty(self, difficulty): method get_state (line 93) | def get_state(self): method set_state (line 96) | def set_state(self, state): method __fixed_discrete_get_difficulty (line 99) | def __fixed_discrete_get_difficulty(self, global_steps): method __fixed_root_get_difficulty (line 107) | def __fixed_root_get_difficulty(self, global_steps, root_degree=None): method get_difficulty (line 121) | def get_difficulty(self, global_steps): method update_difficulty (line 131) | def update_difficulty(self, global_steps): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/dataloader.py class RepeatingLoader (line 10) | class RepeatingLoader: method __init__ (line 11) | def __init__(self, loader): method __iter__ (line 21) | def __iter__(self): method __next__ (line 24) | def __next__(self): class DeepSpeedDataLoader (line 33) | class DeepSpeedDataLoader(object): method __init__ (line 34) | def __init__(self, method __iter__ (line 80) | def __iter__(self): method __len__ (line 84) | def __len__(self): method __next__ (line 87) | def __next__(self): method _create_dataloader (line 92) | def _create_dataloader(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/eigenvalue.py class Eigenvalue (line 7) | class Eigenvalue(object): method __init__ (line 8) | def __init__(self, method nan_to_num (line 34) | def nan_to_num(self, x): method normalize (line 40) | def normalize(self, v): method inner_product (line 47) | def inner_product(self, xs, ys): method get_layers (line 50) | def get_layers(self, module): method compute_eigenvalue (line 61) | def compute_eigenvalue(self, module, device=None, scale=1.0): method post_process (line 150) | def post_process(self, value_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/engine.py function split_half_float_double_sparse (line 103) | def split_half_float_double_sparse(tensors): function print_configuration (line 123) | def print_configuration(args, name): class EngineTimers (line 142) | class EngineTimers(object): method __init__ (line 144) | def __init__(self, enable_micro_timers, enable_global_timers): class DeepSpeedEngine (line 182) | class DeepSpeedEngine(Module): method __init__ (line 184) | def __init__( method destroy (line 381) | def destroy(self): method _get_model_parameters (line 385) | def _get_model_parameters(self): method get_batch_info (line 409) | def get_batch_info(self): method set_train_batch_size (line 425) | def set_train_batch_size(self, train_batch_size): method get_global_grad_norm (line 446) | def get_global_grad_norm(self) -> float: method __getattr__ (line 458) | def __getattr__(self, name): method checkpoint_tag_validation_enabled (line 474) | def checkpoint_tag_validation_enabled(self): method checkpoint_tag_validation_fail (line 477) | def checkpoint_tag_validation_fail(self): method elasticity_enabled (line 480) | def elasticity_enabled(self): method is_elastic_model_parallel_supported (line 483) | def is_elastic_model_parallel_supported(self): method pld_enabled (line 491) | def pld_enabled(self): method pld_params (line 494) | def pld_params(self): method pld_theta (line 497) | def pld_theta(self): method pld_gamma (line 500) | def pld_gamma(self): method eigenvalue_enabled (line 503) | def eigenvalue_enabled(self): method eigenvalue_verbose (line 506) | def eigenvalue_verbose(self): method eigenvalue_max_iter (line 509) | def eigenvalue_max_iter(self): method eigenvalue_tol (line 512) | def eigenvalue_tol(self): method eigenvalue_stability (line 515) | def eigenvalue_stability(self): method eigenvalue_gas_boundary_resolution (line 518) | def eigenvalue_gas_boundary_resolution(self): method eigenvalue_layer_name (line 521) | def eigenvalue_layer_name(self): method eigenvalue_layer_num (line 524) | def eigenvalue_layer_num(self): method curriculum_enabled (line 527) | def curriculum_enabled(self): method curriculum_params (line 530) | def curriculum_params(self): method wall_clock_breakdown (line 533) | def wall_clock_breakdown(self): method flops_profiler_enabled (line 536) | def flops_profiler_enabled(self): method flops_profiler_profile_step (line 539) | def flops_profiler_profile_step(self): method flops_profiler_module_depth (line 545) | def flops_profiler_module_depth(self): method flops_profiler_top_modules (line 548) | def flops_profiler_top_modules(self): method flops_profiler_detailed (line 551) | def flops_profiler_detailed(self): method flops_profiler_output_file (line 556) | def flops_profiler_output_file(self): method memory_breakdown (line 559) | def memory_breakdown(self): method autotuning_enabled (line 562) | def autotuning_enabled(self): method autotuning_start_profile_step (line 565) | def autotuning_start_profile_step(self): method autotuning_end_profile_step (line 568) | def autotuning_end_profile_step(self): method autotuning_metric_path (line 571) | def autotuning_metric_path(self): method autotuning_model_info_path (line 577) | def autotuning_model_info_path(self): method autotuning_metric (line 583) | def autotuning_metric(self): method autotuning_profile_model_info (line 586) | def autotuning_profile_model_info(self): method sparse_gradients_enabled (line 592) | def sparse_gradients_enabled(self): method train_batch_size (line 595) | def train_batch_size(self): method train_micro_batch_size_per_gpu (line 598) | def train_micro_batch_size_per_gpu(self): method optimizer_name (line 601) | def optimizer_name(self): method optimizer_params (line 605) | def optimizer_params(self): method optimizer_legacy_fusion (line 608) | def optimizer_legacy_fusion(self): method scheduler_name (line 611) | def scheduler_name(self): method scheduler_params (line 614) | def scheduler_params(self): method quantize_training (line 617) | def quantize_training(self): method zero_optimization (line 639) | def zero_optimization(self): method zero_allow_untested_optimizer (line 642) | def zero_allow_untested_optimizer(self): method zero_reduce_scatter (line 645) | def zero_reduce_scatter(self): method zero_overlap_comm (line 648) | def zero_overlap_comm(self): method zero_offload_optimizer (line 651) | def zero_offload_optimizer(self): method zero_offload_param (line 654) | def zero_offload_param(self): method zero_use_cpu_optimizer (line 657) | def zero_use_cpu_optimizer(self): method zero_cpu_offload (line 665) | def zero_cpu_offload(self): method zero_sub_group_size (line 670) | def zero_sub_group_size(self): method zero_optimization_stage (line 673) | def zero_optimization_stage(self): method zero_reduce_bucket_size (line 676) | def zero_reduce_bucket_size(self): method zero_allgather_bucket_size (line 679) | def zero_allgather_bucket_size(self): method zero_optimization_partition_gradients (line 682) | def zero_optimization_partition_gradients(self): method zero_optimization_partition_weights (line 685) | def zero_optimization_partition_weights(self): method zero_contiguous_gradients (line 688) | def zero_contiguous_gradients(self): method zero_load_from_fp32_weights (line 691) | def zero_load_from_fp32_weights(self): method zero_elastic_checkpoint (line 694) | def zero_elastic_checkpoint(self): method zero_max_live_parameters (line 697) | def zero_max_live_parameters(self): method zero_max_reuse_distance (line 700) | def zero_max_reuse_distance(self): method zero_prefetch_bucket_size (line 703) | def zero_prefetch_bucket_size(self): method zero_param_persistence_threshold (line 706) | def zero_param_persistence_threshold(self): method zero_model_persistence_threshold (line 709) | def zero_model_persistence_threshold(self): method zero_gather_16bit_weights_on_model_save (line 712) | def zero_gather_16bit_weights_on_model_save(self): method zero_grad_hooks (line 715) | def zero_grad_hooks(self): method zero_legacy_stage1 (line 718) | def zero_legacy_stage1(self): method zero_ignore_unused_parameters (line 721) | def zero_ignore_unused_parameters(self): method fp16_enabled (line 724) | def fp16_enabled(self): method bfloat16_enabled (line 727) | def bfloat16_enabled(self): method fp16_master_weights_and_gradients (line 730) | def fp16_master_weights_and_gradients(self): method amp_enabled (line 733) | def amp_enabled(self): method amp_params (line 736) | def amp_params(self): method fp16_auto_cast (line 739) | def fp16_auto_cast(self): method loss_scale (line 742) | def loss_scale(self): method gradient_accumulation_steps (line 745) | def gradient_accumulation_steps(self): method use_node_local_storage (line 748) | def use_node_local_storage(self): method load_universal_checkpoint (line 751) | def load_universal_checkpoint(self): method communication_data_type (line 755) | def communication_data_type(self): method postscale_gradients (line 766) | def postscale_gradients(self): method gradient_predivide_factor (line 769) | def gradient_predivide_factor(self): method steps_per_print (line 772) | def steps_per_print(self): method zero_allgather_partitions (line 775) | def zero_allgather_partitions(self): method zero_round_robin_gradients (line 778) | def zero_round_robin_gradients(self): method dump_state (line 781) | def dump_state(self): method gradient_clipping (line 784) | def gradient_clipping(self): method dynamic_loss_scale (line 787) | def dynamic_loss_scale(self): method initial_dynamic_scale (line 790) | def initial_dynamic_scale(self): method dynamic_loss_scale_args (line 793) | def dynamic_loss_scale_args(self): method swap_tensor_config (line 796) | def swap_tensor_config(self): method aio_config (line 799) | def aio_config(self): method get_data_types (line 802) | def get_data_types(self): method _configure_lr_scheduler (line 819) | def _configure_lr_scheduler(self, client_lr_scheduler): method _configure_checkpointing (line 838) | def _configure_checkpointing(self, dist_init_required): method _scheduler_from_config (line 872) | def _scheduler_from_config(self, optimizer): method _set_distributed_vars (line 890) | def _set_distributed_vars(self, args): method _configure_with_arguments (line 905) | def _configure_with_arguments(self, args, mpu): method _do_args_sanity_check (line 929) | def _do_args_sanity_check(self, args): method _is_supported_optimizer (line 959) | def _is_supported_optimizer(self, optimizer_name): method _supported_optims (line 965) | def _supported_optims(self): method _do_sanity_check (line 979) | def _do_sanity_check(self): method _broadcast_model (line 1006) | def _broadcast_model(self): method __check_params (line 1026) | def __check_params(model: Module, dtype: torch.dtype) -> None: method _set_client_model (line 1036) | def _set_client_model(self, model): method _configure_distributed_model (line 1043) | def _configure_distributed_model(self, model): method _check_for_duplicates (line 1109) | def _check_for_duplicates(self, optimizer): method _do_optimizer_sanity_check (line 1123) | def _do_optimizer_sanity_check(self, basic_optimizer): method _configure_optimizer (line 1179) | def _configure_optimizer(self, client_optimizer, model_parameters): method _configure_basic_optimizer (line 1233) | def _configure_basic_optimizer(self, model_parameters): method _configure_compression_scheduler (line 1313) | def _configure_compression_scheduler(self): method _configure_quantization (line 1316) | def _configure_quantization(self): method _configure_fp16_optimizer (line 1347) | def _configure_fp16_optimizer(self, optimizer): method _configure_bf16_optimizer (line 1403) | def _configure_bf16_optimizer(self, optimizer): method _configure_zero_optimizer (line 1423) | def _configure_zero_optimizer(self, optimizer): method _configure_eigenvalue (line 1541) | def _configure_eigenvalue(self): method _configure_progressive_layer_drop (line 1554) | def _configure_progressive_layer_drop(self): method _configure_curriculum_scheduler (line 1559) | def _configure_curriculum_scheduler(self): method is_map_style_dataset (line 1564) | def is_map_style_dataset(obj): method is_iterable_style_dataset (line 1568) | def is_iterable_style_dataset(obj): method dataloader_drop_last (line 1573) | def dataloader_drop_last(self): method was_step_applied (line 1576) | def was_step_applied(self) -> bool: method deepspeed_io (line 1586) | def deepspeed_io(self, method train (line 1631) | def train(self, mode=True): method eval (line 1637) | def eval(self): method _scale_loss_by_gas (line 1643) | def _scale_loss_by_gas(self, prescaled_loss): method forward (line 1664) | def forward(self, *inputs, **kwargs): method _cast_inputs_half (line 1750) | def _cast_inputs_half(self, inputs): method print_forward_breakdown (line 1766) | def print_forward_breakdown(self, fwd_time): method allreduce_gradients (line 1790) | def allreduce_gradients(self, bucket_size=MEMORY_OPT_ALLREDUCE_SIZE): method backward (line 1811) | def backward(self, method is_gradient_accumulation_boundary (line 1902) | def is_gradient_accumulation_boundary(self): method set_gradient_accumulation_boundary (line 1915) | def set_gradient_accumulation_boundary(self, is_boundary): method zero_grad (line 1938) | def zero_grad(self): method clip_fp32_gradients (line 1945) | def clip_fp32_gradients(self): method _take_model_step (line 1950) | def _take_model_step(self, lr_kwargs, block_eigenvalue={}): method step (line 2018) | def step(self, lr_kwargs=None): method _start_timers (line 2132) | def _start_timers(self, timer_names): method _stop_timers (line 2136) | def _stop_timers(self, timer_names): method _autotuning_exit (line 2143) | def _autotuning_exit(self): method _write_monitor (line 2166) | def _write_monitor(self): method _get_optimizer_param (line 2197) | def _get_optimizer_param(self, param_name): method get_lr (line 2208) | def get_lr(self): method get_type (line 2211) | def get_type(self): method get_mom (line 2214) | def get_mom(self): method get_pld_theta (line 2220) | def get_pld_theta(self): method _report_progress (line 2226) | def _report_progress(self, step): method allreduce_bucket (line 2232) | def allreduce_bucket(self, bucket, dp_group): method allreduce_and_copy (line 2259) | def allreduce_and_copy(self, small_bucket, dp_group): method allreduce_no_retain (line 2264) | def allreduce_no_retain(self, bucket, dp_group, numel_per_bucket=50000... method _get_gradients_for_reduction (line 2277) | def _get_gradients_for_reduction(self): method _reduce_non_expert_gradients (line 2307) | def _reduce_non_expert_gradients(self, grads, elements_per_buffer): method _reduce_expert_gradients (line 2324) | def _reduce_expert_gradients(self, expert_grads, elements_per_buffer): method buffered_allreduce_fallback (line 2340) | def buffered_allreduce_fallback(self, grads=None, elements_per_buffer=... method sparse_allreduce_no_retain (line 2352) | def sparse_allreduce_no_retain(self, bucket, dp_group): method sparse_allreduce_bucket (line 2361) | def sparse_allreduce_bucket(self, bucket, dp_group): method sparse_allreduce (line 2367) | def sparse_allreduce(self, sparse, dp_group): method sparse_all_gather (line 2393) | def sparse_all_gather(self, value, dp_group): method all_gather_scalar (line 2428) | def all_gather_scalar(self, value, dp_group): method module_state_dict (line 2436) | def module_state_dict(self, destination=None, prefix="", keep_vars=Fal... method load_moe_state_dict (line 2441) | def load_moe_state_dict(checkpoint_path, method load_module_state_dict (line 2503) | def load_module_state_dict(self, state_dict, strict=True, custom_load_... method _get_zero_ckpt_prefix (line 2510) | def _get_zero_ckpt_prefix(self, dp_rank, bf16_mode): method _get_rank_zero_ckpt_name (line 2513) | def _get_rank_zero_ckpt_name(self, method _get_zero_ckpt_name (line 2527) | def _get_zero_ckpt_name(self, checkpoints_path, tag): method _get_ckpt_name (line 2537) | def _get_ckpt_name(self, checkpoints_path, tag, mp_placeholder=None): method _get_optimizer_ckpt_name (line 2560) | def _get_optimizer_ckpt_name(self, checkpoints_path, tag, expp_rank): method _get_expert_ckpt_name (line 2569) | def _get_expert_ckpt_name(checkpoints_path, layer_id, expert_id, tag, ... method _get_all_ckpt_names (line 2586) | def _get_all_ckpt_names(self, checkpoints_path, tag): method load_checkpoint (line 2597) | def load_checkpoint(self, method _load_checkpoint (line 2669) | def _load_checkpoint(self, method _load_zero_checkpoint (line 2813) | def _load_zero_checkpoint(self, load_dir, tag, load_optimizer_states=T... method _get_mp_rank_zero_checkpoint_names (line 2845) | def _get_mp_rank_zero_checkpoint_names(self, method _get_all_zero_checkpoint_names (line 2862) | def _get_all_zero_checkpoint_names(self, load_dir, tag, bf16_mode): method _get_all_zero_checkpoint_state_dicts (line 2882) | def _get_all_zero_checkpoint_state_dicts(self, zero_ckpt_names): method _get_all_zero_checkpoints (line 2905) | def _get_all_zero_checkpoints(self, load_dir, tag): method _checkpoint_tag_validation (line 2923) | def _checkpoint_tag_validation(self, tag): method save_checkpoint (line 2941) | def save_checkpoint(self, save_dir, tag=None, client_state={}, save_la... method _get_non_moe_state_dict (line 3007) | def _get_non_moe_state_dict(self, full_state_dict): method _save_moe_checkpoint (line 3017) | def _save_moe_checkpoint(self, save_dir, tag, client_state={}): method _create_checkpoint_file (line 3127) | def _create_checkpoint_file(self, save_dir, tag, zero_checkpoint): method _create_zero_checkpoint_files (line 3139) | def _create_zero_checkpoint_files(self, save_dir, tag): method _save_checkpoint (line 3150) | def _save_checkpoint(self, save_dir, tag, client_state={}): method _get_buffer_names (line 3186) | def _get_buffer_names(self): method _get_zero_param_shapes (line 3207) | def _get_zero_param_shapes(self): method _copy_recovery_script (line 3249) | def _copy_recovery_script(self, save_path): method _save_zero_checkpoint (line 3259) | def _save_zero_checkpoint(self, save_path, tag): method _zero3_consolidated_16bit_state_dict (line 3271) | def _zero3_consolidated_16bit_state_dict(self): method save_fp16_model (line 3336) | def save_fp16_model(self, save_dir, save_filename="pytorch_model.bin"): method save_16bit_model (line 3341) | def save_16bit_model(self, save_dir, save_filename="pytorch_model.bin"): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/fused_optimizer.py class FP16_Optimizer (line 19) | class FP16_Optimizer(DeepSpeedOptimizer): method __init__ (line 25) | def __init__(self, method initialize_optimizer_states (line 120) | def initialize_optimizer_states(self): method zero_grad (line 133) | def zero_grad(self, set_grads_to_None=True): method step_fused_adam (line 147) | def step_fused_adam(self, closure=None): method start_timers (line 199) | def start_timers(self, name_list): method stop_timers (line 204) | def stop_timers(self, name_list): method log_timers (line 209) | def log_timers(self, name_list): method set_lr (line 213) | def set_lr(self, lr): method get_lr (line 218) | def get_lr(self): method override_loss_scale (line 222) | def override_loss_scale(self, loss_scale): method step (line 230) | def step(self, closure=None): method _get_norm_with_moe_layers (line 328) | def _get_norm_with_moe_layers(self, all_groups_norm): method unscale_and_clip_grads (line 344) | def unscale_and_clip_grads(self, grad_groups_flat, total_norm, apply_s... method backward (line 359) | def backward(self, loss, create_graph=False, retain_graph=False): method _update_scale (line 374) | def _update_scale(self, skip): method _get_state (line 405) | def _get_state(self): method _set_state (line 408) | def _set_state(self, value): method _get_param_groups (line 415) | def _get_param_groups(self): method _set_param_groups (line 418) | def _set_param_groups(self, value): method state_dict (line 423) | def state_dict(self): method refresh_fp32_params (line 448) | def refresh_fp32_params(self): method load_state_dict (line 452) | def load_state_dict(self, state_dict, load_optimizer_states=True): method __repr__ (line 496) | def __repr__(self): method _get_loss_scale (line 500) | def _get_loss_scale(self): method _set_loss_scale (line 506) | def _set_loss_scale(self, value): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/loss_scaler.py function to_python_float (line 26) | def to_python_float(t): class LossScalerBase (line 32) | class LossScalerBase: method __init__ (line 36) | def __init__(self, cur_scale): method loss_scale (line 40) | def loss_scale(self): method scale_gradient (line 43) | def scale_gradient(self, module, grad_in, grad_out): method update_scale (line 46) | def update_scale(self, overflow): method backward (line 49) | def backward(self, loss, retain_graph=False): class LossScaler (line 54) | class LossScaler(LossScalerBase): method __init__ (line 65) | def __init__(self, scale=1): method has_overflow (line 69) | def has_overflow(self, params): method _has_inf_or_nan (line 73) | def _has_inf_or_nan(x): class DynamicLossScaler (line 77) | class DynamicLossScaler(LossScalerBase): method __init__ (line 102) | def __init__(self, method has_overflow_serial (line 122) | def has_overflow_serial(self, params): method _has_inf_or_nan (line 130) | def _has_inf_or_nan(x): method update_scale (line 151) | def update_scale(self, overflow): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/onebit/adam.py class OnebitAdam (line 10) | class OnebitAdam(torch.optim.Optimizer): method __init__ (line 41) | def __init__(self, method step (line 106) | def step(self, closure=None, grads=None): method load_state_dict (line 262) | def load_state_dict(self, state_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/onebit/lamb.py class OnebitLamb (line 11) | class OnebitLamb(torch.optim.Optimizer): method __init__ (line 56) | def __init__(self, method step (line 137) | def step(self, closure=None, grads=None): method load_state_dict (line 406) | def load_state_dict(self, state_dict): method get_lamb_coeffs (line 468) | def get_lamb_coeffs(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/onebit/zoadam.py class ZeroOneAdam (line 10) | class ZeroOneAdam(torch.optim.Optimizer): method __init__ (line 51) | def __init__(self, method step (line 119) | def step(self, closure=None, grads=None): method load_state_dict (line 333) | def load_state_dict(self, state_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/fp16/unfused_optimizer.py class FP16_UnfusedOptimizer (line 20) | class FP16_UnfusedOptimizer(DeepSpeedOptimizer): method __init__ (line 26) | def __init__(self, method zero_grad (line 113) | def zero_grad(self, set_grads_to_None=True): method step_fused_lamb (line 128) | def step_fused_lamb(self, closure=None): method set_lr (line 190) | def set_lr(self, lr): method get_lr (line 195) | def get_lr(self): method override_loss_scale (line 199) | def override_loss_scale(self, loss_scale): method step (line 207) | def step(self, closure=None): method unscale_and_clip_grads (line 260) | def unscale_and_clip_grads(self, total_norm, apply_scale=True): method backward (line 277) | def backward(self, loss, create_graph=False, retain_graph=False): method _update_scale (line 292) | def _update_scale(self, skip): method _get_state (line 323) | def _get_state(self): method _set_state (line 326) | def _set_state(self, value): method _get_param_groups (line 333) | def _get_param_groups(self): method _set_param_groups (line 336) | def _set_param_groups(self, value): method _get_loss_scale (line 342) | def _get_loss_scale(self): method _set_loss_scale (line 348) | def _set_loss_scale(self, value): method state_dict (line 353) | def state_dict(self): method refresh_fp32_params (line 377) | def refresh_fp32_params(self): method load_state_dict (line 382) | def load_state_dict(self, state_dict, load_optimizer_states=True): method __repr__ (line 427) | def __repr__(self): method initialize_optimizer_states (line 430) | def initialize_optimizer_states(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/lr_schedules.py function add_tuning_arguments (line 55) | def add_tuning_arguments(parser): function parse_arguments (line 159) | def parse_arguments(): function override_lr_range_test_params (line 167) | def override_lr_range_test_params(args, params): function override_1cycle_params (line 184) | def override_1cycle_params(args, params): function override_warmupLR_params (line 223) | def override_warmupLR_params(args, params): function override_params (line 237) | def override_params(args, params): function get_config_from_args (line 248) | def get_config_from_args(args): function get_lr_from_config (line 269) | def get_lr_from_config(config): function get_torch_optimizer (line 297) | def get_torch_optimizer(optimizer): class LRRangeTest (line 308) | class LRRangeTest(object): method __init__ (line 346) | def __init__(self, method _staircase_interval (line 376) | def _staircase_interval(self): method _continuous_interval (line 379) | def _continuous_interval(self): method _get_increase (line 382) | def _get_increase(self): method get_lr (line 385) | def get_lr(self): method get_last_lr (line 391) | def get_last_lr(self): method _update_optimizer (line 397) | def _update_optimizer(self, group_lrs): method step (line 401) | def step(self, batch_iteration=None): method state_dict (line 408) | def state_dict(self): method load_state_dict (line 411) | def load_state_dict(self, sd): class OneCycle (line 415) | class OneCycle(object): method __init__ (line 483) | def __init__(self, method _initialize_cycle (line 529) | def _initialize_cycle(self, method _initialize_lr (line 554) | def _initialize_lr(self, method _initialize_momentum (line 572) | def _initialize_momentum(self, method _get_scale_factor (line 597) | def _get_scale_factor(self): method _get_cycle_mom (line 608) | def _get_cycle_mom(self): method _get_cycle_lr (line 619) | def _get_cycle_lr(self): method _get_decay_mom (line 629) | def _get_decay_mom(self, decay_batch_iteration): method _get_decay_lr (line 639) | def _get_decay_lr(self, decay_batch_iteration): method get_lr (line 653) | def get_lr(self): method get_mom (line 661) | def get_mom(self): method get_last_lr (line 672) | def get_last_lr(self): method step (line 678) | def step(self, batch_iteration=None): method state_dict (line 697) | def state_dict(self): method load_state_dict (line 700) | def load_state_dict(self, sd): class WarmupLR (line 704) | class WarmupLR(object): method __init__ (line 725) | def __init__(self, method get_lr (line 749) | def get_lr(self): method get_last_lr (line 761) | def get_last_lr(self): method step (line 767) | def step(self, last_batch_iteration=None): method state_dict (line 775) | def state_dict(self): method load_state_dict (line 778) | def load_state_dict(self, sd): method _get_gamma (line 781) | def _get_gamma(self): method _format_param (line 789) | def _format_param(self, optimizer, param_value, param_name): class WarmupDecayLR (line 800) | class WarmupDecayLR(WarmupLR): method __init__ (line 822) | def __init__(self, method _get_gamma (line 844) | def _get_gamma(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/pipe/engine.py function is_even (line 24) | def is_even(number): function _tensor_bytes (line 32) | def _tensor_bytes(tensor): class PipelineEngine (line 36) | class PipelineEngine(DeepSpeedEngine): method __init__ (line 58) | def __init__(self, has_bool_tensors=False, *super_args, **super_kwargs): method set_has_attention_mask (line 219) | def set_has_attention_mask(self, value): method _build_data_iter (line 223) | def _build_data_iter(self, dataset): method _exec_reduce_tied_grads (line 234) | def _exec_reduce_tied_grads(self): method _exec_reduce_grads (line 251) | def _exec_reduce_grads(self): method _bf16_reduce_grads (line 264) | def _bf16_reduce_grads(self): method _reserve_pipe_buffers (line 270) | def _reserve_pipe_buffers(self, num_buffers): method reset_activation_shape (line 286) | def reset_activation_shape(self): method train_batch (line 296) | def train_batch(self, data_iter=None): method eval_batch (line 381) | def eval_batch(self, method set_train_batch_size (line 469) | def set_train_batch_size(self, train_batch_size): method is_first_stage (line 482) | def is_first_stage(self): method is_last_stage (line 486) | def is_last_stage(self): method _reduce_outputs (line 490) | def _reduce_outputs(self, outputs, reduce='avg', reduce_dp=True): method _bcast_pipe_scalar (line 522) | def _bcast_pipe_scalar(self, data, src_rank=None, dtype=torch.float32): method _aggregate_total_loss (line 539) | def _aggregate_total_loss(self): method set_dataloader (line 571) | def set_dataloader(self, loader): method set_dataiterator (line 577) | def set_dataiterator(self, iterator): method set_batch_fn (line 583) | def set_batch_fn(self, fn): method is_gradient_accumulation_boundary (line 591) | def is_gradient_accumulation_boundary(self): method log_for_device (line 602) | def log_for_device(self, *msg): method tput_log (line 615) | def tput_log(self, *msg): method _next_batch (line 619) | def _next_batch(self): method _exec_forward_pass (line 631) | def _exec_forward_pass(self, buffer_id): method _exec_backward_pass (line 711) | def _exec_backward_pass(self, buffer_id): method _exec_load_micro_batch (line 787) | def _exec_load_micro_batch(self, buffer_id): method _send_tensor_meta (line 828) | def _send_tensor_meta(self, buffer, recv_stage): method _recv_tensor_meta (line 893) | def _recv_tensor_meta(self, send_stage): method _exec_send_activations (line 947) | def _exec_send_activations(self, buffer_id): method _exec_send_grads (line 983) | def _exec_send_grads(self, buffer_id): method _exec_recv_activations (line 1042) | def _exec_recv_activations(self, buffer_id): method _exec_recv_grads (line 1087) | def _exec_recv_grads(self, buffer_id): method _exec_optimizer_step (line 1154) | def _exec_optimizer_step(self, lr_kwargs=None): method _zero_grads (line 1198) | def _zero_grads(self, inputs): method _allocate_zeros (line 1207) | def _allocate_zeros(self, shape, **kwargs): method _allocate_buffer (line 1225) | def _allocate_buffer(self, shape, num_buffers=-1, **kwargs): method _allocate_buffers (line 1233) | def _allocate_buffers(self, shapes_and_dtypes, requires_grad=False, nu... method forward (line 1247) | def forward(self, *args, **kwargs): method backward (line 1251) | def backward(self, *args, **kwargs): method step (line 1255) | def step(self, *args, **kwargs): method mem_status (line 1259) | def mem_status(self, msg, print_rank=-1, reset_max=False): method module_state_dict (line 1308) | def module_state_dict(self): method load_module_state_dict (line 1326) | def load_module_state_dict(self, state_dict, strict=True, custom_load_... method _exec_schedule (line 1361) | def _exec_schedule(self, pipe_schedule): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/pipe/module.py class PipelineError (line 19) | class PipelineError(Exception): class LayerSpec (line 23) | class LayerSpec: method __init__ (line 45) | def __init__(self, typename, *module_args, **module_kwargs): method __repr__ (line 58) | def __repr__(self): method build (line 63) | def build(self, log=False): class TiedLayerSpec (line 71) | class TiedLayerSpec(LayerSpec): method __init__ (line 72) | def __init__(self, class PipelineModule (line 85) | class PipelineModule(nn.Module): method __init__ (line 120) | def __init__(self, method _build (line 211) | def _build(self): method _count_layer_params (line 267) | def _count_layer_params(self): method _find_layer_type (line 286) | def _find_layer_type(self, layername): method forward (line 308) | def forward(self, forward_input): method _partition_layers (line 364) | def _partition_layers(self, method='uniform'): method allreduce_tied_weight_gradients (line 420) | def allreduce_tied_weight_gradients(self): method get_tied_weights_and_groups (line 426) | def get_tied_weights_and_groups(self): method _synchronize_tied_weights (line 433) | def _synchronize_tied_weights(self): method _index_tied_modules (line 442) | def _index_tied_modules(self): method partitions (line 498) | def partitions(self): method stage_owner (line 501) | def stage_owner(self, layer_idx): method _set_bounds (line 508) | def _set_bounds(self, start=None, stop=None): method set_checkpoint_interval (line 518) | def set_checkpoint_interval(self, interval): method topology (line 522) | def topology(self): method mpu (line 526) | def mpu(self): method num_pipeline_stages (line 529) | def num_pipeline_stages(self): method ckpt_prefix (line 532) | def ckpt_prefix(self, checkpoints_path, tag): method ckpt_layer_path (line 548) | def ckpt_layer_path(self, ckpt_dir, local_layer_idx): method ckpt_layer_path_list (line 558) | def ckpt_layer_path_list(self, ckpt_dir, local_layer_idx): method save_state_dict (line 567) | def save_state_dict(self, save_dir, checkpoint_engine): method load_state_dir (line 605) | def load_state_dir(self, load_dir, checkpoint_engine, strict=True): method _is_checkpointable (line 631) | def _is_checkpointable(self, funcs): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/pipe/p2p.py function can_send_recv (line 21) | def can_send_recv() -> bool: function init_process_groups (line 29) | def init_process_groups(grid): function _is_valid_send_recv (line 39) | def _is_valid_send_recv(src_stage, dest_stage): function send (line 48) | def send(tensor, dest_stage, async_op=False): function recv (line 69) | def recv(tensor, src_stage, async_op=False): function wait (line 89) | def wait(): function send_obj (line 98) | def send_obj(msg: typing.Any, dest: int): function recv_obj (line 121) | def recv_obj(sender: int) -> typing.Any: function _get_send_recv_group (line 163) | def _get_send_recv_group(src_stage, dest_stage): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/pipe/schedule.py class PipeSchedule (line 6) | class PipeSchedule(ABC): method __init__ (line 43) | def __init__(self, micro_batches, stages, stage_id): method steps (line 52) | def steps(self): method num_pipe_buffers (line 63) | def num_pipe_buffers(self): method _valid_micro_batch (line 74) | def _valid_micro_batch(self, micro_batch_id): method _valid_stage (line 77) | def _valid_stage(self, stage_id): method stage (line 81) | def stage(self): method num_stages (line 86) | def num_stages(self): method num_micro_batches (line 91) | def num_micro_batches(self): method is_first_stage (line 96) | def is_first_stage(self): method is_last_stage (line 101) | def is_last_stage(self): method _buffer_idx (line 105) | def _buffer_idx(self, micro_batch_id): method __iter__ (line 119) | def __iter__(self): method __next__ (line 123) | def __next__(self): class InferenceSchedule (line 129) | class InferenceSchedule(PipeSchedule): method steps (line 132) | def steps(self): method num_pipe_buffers (line 173) | def num_pipe_buffers(self): class TrainSchedule (line 182) | class TrainSchedule(PipeSchedule): method steps (line 189) | def steps(self): method num_pipe_buffers (line 243) | def num_pipe_buffers(self): method _step_to_micro_batch (line 249) | def _step_to_micro_batch(self, step_id): method _even_step_forward_id (line 271) | def _even_step_forward_id(self, step_id): method _odd_step_forward_id (line 276) | def _odd_step_forward_id(self, step_id): method _even_step_backward_id (line 281) | def _even_step_backward_id(self, step_id): method _odd_step_backward_id (line 286) | def _odd_step_backward_id(self, step_id): class DataParallelSchedule (line 292) | class DataParallelSchedule(PipeSchedule): method steps (line 296) | def steps(self): method num_pipe_buffers (line 311) | def num_pipe_buffers(self): class PipeInstruction (line 317) | class PipeInstruction: method __init__ (line 326) | def __init__(self, **kwargs): method __repr__ (line 332) | def __repr__(self): class OptimizerStep (line 336) | class OptimizerStep(PipeInstruction): class ReduceGrads (line 346) | class ReduceGrads(PipeInstruction): class ReduceTiedGrads (line 352) | class ReduceTiedGrads(PipeInstruction): class BufferOpInstruction (line 364) | class BufferOpInstruction(PipeInstruction): method __init__ (line 370) | def __init__(self, buffer_id, **kwargs): class LoadMicroBatch (line 375) | class LoadMicroBatch(BufferOpInstruction): class ForwardPass (line 388) | class ForwardPass(BufferOpInstruction): class BackwardPass (line 400) | class BackwardPass(BufferOpInstruction): class SendActivation (line 416) | class SendActivation(BufferOpInstruction): class RecvActivation (line 432) | class RecvActivation(BufferOpInstruction): class SendGrad (line 448) | class SendGrad(BufferOpInstruction): class RecvGrad (line 463) | class RecvGrad(BufferOpInstruction): function _is_even (line 477) | def _is_even(x): function _is_odd (line 481) | def _is_odd(x): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/pipe/topology.py class ProcessTopology (line 9) | class ProcessTopology: method __init__ (line 22) | def __init__(self, axes, dims): method get_rank (line 45) | def get_rank(self, **coord_kwargs): method get_axis_names (line 61) | def get_axis_names(self): method get_rank_repr (line 65) | def get_rank_repr(self, method get_dim (line 99) | def get_dim(self, axis): method get_coord (line 111) | def get_coord(self, rank): method get_axis_comm_lists (line 128) | def get_axis_comm_lists(self, axis): method filter_match (line 168) | def filter_match(self, **filter_kwargs): method get_axis_list (line 193) | def get_axis_list(self, axis, idx): method world_size (line 210) | def world_size(self): method __str__ (line 213) | def __str__(self): function _prime_factors (line 217) | def _prime_factors(N): class PipeDataParallelTopology (line 232) | class PipeDataParallelTopology(ProcessTopology): method __init__ (line 239) | def __init__(self, num_pp, num_dp): class PipeModelDataParallelTopology (line 243) | class PipeModelDataParallelTopology(ProcessTopology): method __init__ (line 245) | def __init__(self, num_pp, num_mp, num_dp): class PipelineParallelGrid (line 249) | class PipelineParallelGrid: method __init__ (line 271) | def __init__(self, topology=None, process_group=None): method get_stage_id (line 364) | def get_stage_id(self): method get_data_parallel_id (line 367) | def get_data_parallel_id(self): method _build_p2p_groups (line 370) | def _build_p2p_groups(self): method _is_grid_valid (line 387) | def _is_grid_valid(self): method stage_to_global (line 395) | def stage_to_global(self, stage_id, **kwargs): method topology (line 400) | def topology(self): method get_global_rank (line 404) | def get_global_rank(self): method get_pipe_parallel_rank (line 407) | def get_pipe_parallel_rank(self): method get_pipe_parallel_world_size (line 411) | def get_pipe_parallel_world_size(self): method get_pipe_parallel_group (line 415) | def get_pipe_parallel_group(self): method get_data_parallel_rank (line 419) | def get_data_parallel_rank(self): method get_data_parallel_world_size (line 423) | def get_data_parallel_world_size(self): method get_data_parallel_group (line 427) | def get_data_parallel_group(self): method get_model_parallel_rank (line 433) | def get_model_parallel_rank(self): method get_model_parallel_world_size (line 436) | def get_model_parallel_world_size(self): method get_model_parallel_group (line 439) | def get_model_parallel_group(self): method get_slice_parallel_rank (line 443) | def get_slice_parallel_rank(self): method get_slice_parallel_world_size (line 449) | def get_slice_parallel_world_size(self): method get_slice_parallel_group (line 452) | def get_slice_parallel_group(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/progressive_layer_drop.py class ProgressiveLayerDrop (line 5) | class ProgressiveLayerDrop(object): method __init__ (line 14) | def __init__(self, theta=0.5, gamma=0.001): method get_state (line 22) | def get_state(self): method get_theta (line 26) | def get_theta(self): method update_state (line 29) | def update_state(self, global_step): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/quantize.py class Quantizer (line 9) | class Quantizer(object): method __init__ (line 10) | def __init__(self, method any_precision_switch (line 33) | def any_precision_switch(self): method quantize (line 46) | def quantize(self, method step (line 73) | def step(self): method quantize_highbit (line 76) | def quantize_highbit(self, inputs, num_bits): method quantize_tenary (line 104) | def quantize_tenary(self, inputs): method quantize_binary (line 117) | def quantize_binary(self, inputs): method mixed_fp16_quantize (line 125) | def mixed_fp16_quantize(self, input, input_q, index): method compute_quantization (line 132) | def compute_quantization(self, input, index=0, factor=1): method update_fp16_ratio (line 181) | def update_fp16_ratio(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/sparse_tensor.py class SparseTensor (line 11) | class SparseTensor(object): method __init__ (line 13) | def __init__(self, dense_tensor=None): method to_coo_tensor (line 31) | def to_coo_tensor(self): method type (line 37) | def type(): method to_dense (line 40) | def to_dense(self): method sparse_size (line 48) | def sparse_size(self): method add (line 56) | def add(self, b): method __str__ (line 61) | def __str__(self): method __repr__ (line 69) | def __repr__(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/state_dict_factory.py class SDLoaderFactory (line 20) | class SDLoaderFactory: method get_sd_loader_json (line 22) | def get_sd_loader_json(json_file, checkpoint_engine): method get_sd_loader (line 42) | def get_sd_loader(ckpt_list, checkpoint_engine, sd_type='Megatron', ve... class SDLoaderBase (line 49) | class SDLoaderBase(ABC): method __init__ (line 50) | def __init__(self, ckpt_list, version, checkpoint_engine): method load (line 58) | def load(self, method get_merge_state_dicts (line 116) | def get_merge_state_dicts(self, mp_world_size, mp_rank): method get_split_state_dict (line 134) | def get_split_state_dict(self, mp_world_size, mp_rank): method _choose_module_key (line 152) | def _choose_module_key(self, sd): method get_module (line 160) | def get_module(self, sd): method set_module (line 168) | def set_module(self, sd, module): method check_ckpt_list (line 177) | def check_ckpt_list(self): method merge_state_dict (line 190) | def merge_state_dict(self, method split_state_dict (line 200) | def split_state_dict(self, method sanity_check (line 210) | def sanity_check(self, ckpt_file_name): class MegatronSDLoader (line 214) | class MegatronSDLoader(SDLoaderBase): method __init__ (line 215) | def __init__(self, ckpt_list, version, checkpoint_engine): method merge_query_key_value (line 243) | def merge_query_key_value(self, param_list, ckpt_ver): method split_query_key_value (line 281) | def split_query_key_value(self, param, num_to_split, offset, ckpt_ver): method merge_state_dict (line 324) | def merge_state_dict(self, method split_state_dict (line 386) | def split_state_dict(self, method sanity_check (line 444) | def sanity_check(self, ckpt_file_name): method get_checkpoint_version (line 470) | def get_checkpoint_version(self, state_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/aio_config.py function get_aio_config (line 18) | def get_aio_config(param_dict): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/async_swapper.py class AsyncTensorSwapper (line 17) | class AsyncTensorSwapper(object): method __init__ (line 18) | def __init__(self, aio_handle, numel_alignment, timers): method has_buffers (line 33) | def has_buffers(self): method add_buffers (line 36) | def add_buffers(self, buffer_list): method get_timer_names (line 48) | def get_timer_names(self): method release_buffers (line 51) | def release_buffers(self): method swap_out_tensors (line 65) | def swap_out_tensors(self, tensor_list, path_list): method _report_statistics (line 69) | def _report_statistics(self, message): method _swap_out_tensor (line 77) | def _swap_out_tensor(self, tensor, swap_path): method _make_swap_space (line 89) | def _make_swap_space(self, numel): method _io_aligned_numel (line 101) | def _io_aligned_numel(self, numel): method _allocate_buffer (line 105) | def _allocate_buffer(self): method _flush_ready_buffers (line 112) | def _flush_ready_buffers(self): method _flush_buffers_until_complete (line 119) | def _flush_buffers_until_complete(self): method _swap_out_ready_buffers (line 127) | def _swap_out_ready_buffers(self): method _wait_for_swap_complete (line 138) | def _wait_for_swap_complete(self): method _get_buffer (line 157) | def _get_buffer(self, index): method _get_current_buffer (line 161) | def _get_current_buffer(self): method _start_timer (line 164) | def _start_timer(self, name): method _stop_timer (line 168) | def _stop_timer(self, name): method _log_timers (line 172) | def _log_timers(self, name_list, force=False): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/optimizer_utils.py class FlattenedTensorSwapInfo (line 19) | class FlattenedTensorSwapInfo(object): method __init__ (line 20) | def __init__(self, path, length, offset): class OptimizerStateSwapInfo (line 26) | class OptimizerStateSwapInfo(object): method __init__ (line 27) | def __init__(self, parameter, numel, base_folder): method numel (line 40) | def numel(self): method has_gradients (line 43) | def has_gradients(self): method _add_tensors (line 46) | def _add_tensors(self, tensor_list): method add_state_tensors (line 51) | def add_state_tensors(self, tensor_list): method device (line 55) | def device(self): method dtype (line 58) | def dtype(self): method release_memory (line 61) | def release_memory(self): method get_or_create_gradient_paths (line 65) | def get_or_create_gradient_paths(self, offsets, lengths): method set_swap_buffers (line 81) | def set_swap_buffers(self, buffers): method get_swap_gradient_buffers (line 87) | def get_swap_gradient_buffers(self, swap_buffer): method get_swap_gradient_paths (line 95) | def get_swap_gradient_paths(self): method get_unpinned_state_tensors (line 98) | def get_unpinned_state_tensors(self): method read_unswapped_gradients (line 101) | def read_unswapped_gradients(self, dest_buffer): method release_unswapped_gradients (line 110) | def release_unswapped_gradients(self): class OptimizerSwapper (line 118) | class OptimizerSwapper(object): method __init__ (line 119) | def __init__(self, method swappable_tensor (line 166) | def swappable_tensor(self, param=None, numel=None): method init_timers (line 172) | def init_timers(self): method log_timers (line 175) | def log_timers(self): method pre_backward (line 179) | def pre_backward(self): method post_backward (line 182) | def post_backward(self): method _flush_gradient_swapper (line 185) | def _flush_gradient_swapper(self, gradient_swapper): method _swap_out_gradients (line 194) | def _swap_out_gradients(self, method _initialize_from_swapped_fp16_params (line 241) | def _initialize_from_swapped_fp16_params(self, method _swap_in_fp16_params (line 294) | def _swap_in_fp16_params(self, method _swap_out_fp16_params (line 333) | def _swap_out_fp16_params(self, method _initialize_parameters (line 359) | def _initialize_parameters(self, parameters, src_tensors, aio_handle): method _get_swap_paths (line 389) | def _get_swap_paths(self, parameters, num_elems): method _swap_out_unpinned_tensors (line 400) | def _swap_out_unpinned_tensors(self, method _adjust_for_misaligned_lengths (line 427) | def _adjust_for_misaligned_lengths(self, tensors, offsets): method _retrieve_unswapped_grad_partitions (line 455) | def _retrieve_unswapped_grad_partitions(self, swap_info, dest_buffer): method _get_state_tensors (line 471) | def _get_state_tensors(self, parameter): method _update_param_state_info (line 482) | def _update_param_state_info(self, swap_info, parameter): method _create_param_swap_info (line 488) | def _create_param_swap_info(self, parameter, numel): method _get_param_swap_info (line 502) | def _get_param_swap_info(self, parameter): method _start_timer (line 511) | def _start_timer(self, name): method _stop_timer (line 515) | def _stop_timer(self, name): method _log_timers (line 519) | def _log_timers(self, name_list, force=False): method _io_aligned_numel (line 523) | def _io_aligned_numel(self, numel): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py class PartitionedOptimizerSwapper (line 27) | class PartitionedOptimizerSwapper(OptimizerSwapper): method __init__ (line 28) | def __init__(self, method initialize_parameters (line 70) | def initialize_parameters(self, parameters, src_tensors): method initialize_from_swapped_fp16_params (line 75) | def initialize_from_swapped_fp16_params(self, method flush_gradients (line 87) | def flush_gradients(self): method swap_in_optimizer_state (line 90) | def swap_in_optimizer_state(self, parameter, async_parameter=None): method swap_out_optimizer_state (line 120) | def swap_out_optimizer_state(self, parameter, async_swap=False): method swap_out_gradients (line 166) | def swap_out_gradients(self, parameter, gradient_offsets, gradient_ten... method _swap_in_parameter (line 172) | def _swap_in_parameter(self, aio_handle, parameter, dest_buffers): method _separate_pinned_tensors (line 206) | def _separate_pinned_tensors(self, swap_info): method _swap_in_pinned_gradients (line 223) | def _swap_in_pinned_gradients(self, aio_handle, parameter, gradient_te... method _swap_in_gradients (line 245) | def _swap_in_gradients(self, aio_handle, parameter, dest_buffer): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/partitioned_param_swapper.py function print_rank_0 (line 19) | def print_rank_0(message, debug=False, force=False): class PartitionedParamStatus (line 24) | class PartitionedParamStatus(Enum): class AsyncPartitionedParameterSwapper (line 35) | class AsyncPartitionedParameterSwapper(object): method __init__ (line 36) | def __init__(self, ds_config, model_dtype): method available_swap_in_buffers (line 81) | def available_swap_in_buffers(self): method _configure_aio (line 84) | def _configure_aio(self, ds_config): method swappable_tensor (line 131) | def swappable_tensor(self, param=None, numel=None): method get_path (line 139) | def get_path(self, param, must_exist=False): method _get_swap_paths (line 143) | def _get_swap_paths(self, params, must_exist=False): method _get_swap_buffers (line 159) | def _get_swap_buffers(self, params): method _track_numel (line 169) | def _track_numel(self, params): method _allocate_and_return_buffers_for_swap_in (line 174) | def _allocate_and_return_buffers_for_swap_in(self, params): method synchronize_writes (line 202) | def synchronize_writes(self): method synchronize_reads (line 211) | def synchronize_reads(self): method remove_partition_and_release_buffers (line 236) | def remove_partition_and_release_buffers(self, params): method _swap_out (line 259) | def _swap_out(self, params, async_op=True): method swap_out_and_release (line 274) | def swap_out_and_release(self, params, async_op=False, force_buffer_re... method _update_inflight_swap_in (line 280) | def _update_inflight_swap_in(self, params, swap_in_buffers, inflight_n... method swap_in (line 291) | def swap_in(self, params, async_op=True, swap_in_buffers=None): method swap_into_buffer (line 323) | def swap_into_buffer(self, param, dest_buffer): method get_buffer (line 349) | def get_buffer(self, param, numel): method reserve_available_buffers (line 369) | def reserve_available_buffers(self): method release_reserved_buffers (line 381) | def release_reserved_buffers(self): method _io_aligned_numel (line 386) | def _io_aligned_numel(self, numel): method _is_io_aligned (line 390) | def _is_io_aligned(self, numel): method reserve_partitioned_swap_space (line 393) | def reserve_partitioned_swap_space(self, partition_num_elems): method swap_out_partitioned_params (line 401) | def swap_out_partitioned_params(self, dst_fp16_params, src_fp32_params): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py class OptimizerSwapOp (line 18) | class OptimizerSwapOp(object): method __init__ (line 19) | def __init__(self, method is_parameter (line 34) | def is_parameter(self, parameter): method wait (line 37) | def wait(self): class PipelinedOptimizerSwapper (line 55) | class PipelinedOptimizerSwapper(OptimizerSwapper): method __init__ (line 56) | def __init__(self, method initialize_parameters (line 116) | def initialize_parameters(self, parameters, src_tensors): method initialize_from_swapped_fp16_params (line 121) | def initialize_from_swapped_fp16_params(self, method flush_gradients (line 133) | def flush_gradients(self): method swap_in_optimizer_state (line 136) | def swap_in_optimizer_state(self, parameter, async_parameter): method swap_out_optimizer_state (line 165) | def swap_out_optimizer_state(self, parameter, async_swap): method swap_out_gradients (line 190) | def swap_out_gradients(self, parameter, gradient_offsets, gradient_ten... method _complete_swap_out (line 196) | def _complete_swap_out(self, swap_out_type): method _swap_out_optimizer_state (line 201) | def _swap_out_optimizer_state(self, aio_handle, parameter, swap_in_op): method _swap_in_optimizer_state (line 239) | def _swap_in_optimizer_state(self, aio_handle, parameter): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/swap_tensor/utils.py function swap_in_tensors (line 17) | def swap_in_tensors(swap_handle, tensor_buffers, swap_paths): function swap_out_tensors (line 22) | def swap_out_tensors(swap_handle, tensor_buffers, swap_paths): function print_object (line 27) | def print_object(obj, name, exclude_list=[]): class SwapBuffer (line 35) | class SwapBuffer(object): method __init__ (line 36) | def __init__(self, buffer): method reset (line 40) | def reset(self): method insert_tensor (line 47) | def insert_tensor(self, tensor, swap_path, aligned_numel): method allocate_tensor (line 52) | def allocate_tensor(self, swap_path, numel, aligned_numel): method has_space (line 68) | def has_space(self, numel): method get_swap_tensors (line 71) | def get_swap_tensors(self): method get_swap_paths (line 74) | def get_swap_paths(self): method get_compute_tensors (line 77) | def get_compute_tensors(self): method get_num_elem (line 80) | def get_num_elem(self): method get_swap_tensor (line 83) | def get_swap_tensor(self, offset): method get_compute_tensor (line 86) | def get_compute_tensor(self, offset): method get_swap_path (line 89) | def get_swap_path(self, offset): class SwapBufferPool (line 93) | class SwapBufferPool(object): method __init__ (line 94) | def __init__(self, buffers): method reset (line 99) | def reset(self): method allocate_tensor (line 104) | def allocate_tensor(self, numel, swap_path, aligned_numel): method insert_tensor (line 111) | def insert_tensor(self, tensor, swap_path, aligned_numel): method get_swap_tensors (line 118) | def get_swap_tensors(self): method get_swap_paths (line 125) | def get_swap_paths(self): method get_compute_tensors (line 132) | def get_compute_tensors(self): method has_space (line 139) | def has_space(self, numel): method swap_out (line 149) | def swap_out(self, aio_handle, async_op=False): method swap_in (line 159) | def swap_in(self, aio_handle, async_op=False): method _get_current_buffer (line 169) | def _get_current_buffer(self): method _get_used_buffers (line 172) | def _get_used_buffers(self): class SwapBufferManager (line 176) | class SwapBufferManager(object): method __init__ (line 177) | def __init__(self, num_elems, count, dtype): method allocate (line 195) | def allocate(self, num_elems, count, dtype): method allocate_all (line 211) | def allocate_all(self, num_elems, dtype): method free (line 216) | def free(self, buffers): function get_sized_buffer (line 228) | def get_sized_buffer(buffer, num_elems): function get_sized_buffers (line 234) | def get_sized_buffers(buffer_list, num_elems_list): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/utils.py class DummyOptim (line 37) | class DummyOptim(): method __init__ (line 42) | def __init__(self, params): function noop_decorator (line 47) | def noop_decorator(func): function ensure_directory_exists (line 51) | def ensure_directory_exists(filename): function set_random_seed (line 61) | def set_random_seed(seed): function is_model_parallel_parameter (line 74) | def is_model_parallel_parameter(p) -> bool: function bwc_tensor_model_parallel_rank (line 84) | def bwc_tensor_model_parallel_rank(mpu=None): function copy_to_device (line 122) | def copy_to_device(item, device, criterion_func): function move_to_device (line 146) | def move_to_device(item, device, criterion_func): class CheckOverflow (line 172) | class CheckOverflow(object): method __init__ (line 174) | def __init__(self, method check_using_norm (line 191) | def check_using_norm(self, norm_group, reduce_overflow=True): method check (line 214) | def check(self, param_groups=None): method has_overflow_serial (line 233) | def has_overflow_serial(self, params): method has_overflow (line 239) | def has_overflow(self, params, has_moe_params=None): method _has_inf_or_nan (line 283) | def _has_inf_or_nan(x, i): function _handle_overflow (line 304) | def _handle_overflow(cpu_sum, x, i): function get_global_norm (line 318) | def get_global_norm(norm_list): function clip_grad_norm_ (line 327) | def clip_grad_norm_(parameters, max_norm, norm_type=2, mpu=None): function get_grad_norm (line 397) | def get_grad_norm(parameters, norm_type=2, mpu=None): function get_grad_zeros (line 459) | def get_grad_zeros(parameters, mpu=None): function get_weight_norm (line 501) | def get_weight_norm(parameters, norm_type=2, mpu=None): function prefix_sum_inc (line 562) | def prefix_sum_inc(weights): function partition_uniform (line 575) | def partition_uniform(num_items, num_parts): function _lprobe (line 590) | def _lprobe(weights, num_parts, bottleneck): function _rb_partition_balanced (line 625) | def _rb_partition_balanced(weights, num_parts, eps): function partition_balanced (line 641) | def partition_balanced(weights, num_parts, eps=1e-3): class PartitionedTensor (line 659) | class PartitionedTensor: method __init__ (line 660) | def __init__(self, tensor, group, partition_meta=None): method from_meta (line 672) | def from_meta(cls, meta, local_part, group, device='cuda'): method _partition_tensor (line 697) | def _partition_tensor(self, tensor): method full (line 708) | def full(self, device=None): method to_meta (line 738) | def to_meta(self): method data (line 755) | def data(self): method local_size (line 758) | def local_size(self): method full_size (line 761) | def full_size(self): function memory_status (line 769) | def memory_status(msg, print_rank=-1, reset_max=False): function get_ma_status (line 811) | def get_ma_status(): function see_memory_usage (line 817) | def see_memory_usage(message, force=False): function call_to_str (line 844) | def call_to_str(base, *args, **kwargs): function get_only_unique_item (line 866) | def get_only_unique_item(items): function clip_gradients (line 875) | def clip_gradients(parameters, max_norm=1.0, global_grad_norm=None, mpu=... function get_global_norm_of_tensors (line 894) | def get_global_norm_of_tensors(input_tensors, norm_type=2, mpu=None): function clip_tensors_by_global_norm (line 938) | def clip_tensors_by_global_norm(input_tensors, function align_dense_tensors (line 964) | def align_dense_tensors(tensor_list, alignment): function all_gather_dp_groups (line 980) | def all_gather_dp_groups(partitioned_param_groups, FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/weight_quantizer.py class WeightQuantization (line 5) | class WeightQuantization(object): method __init__ (line 6) | def __init__(self, mlp_extra_grouping=True, mp_size=1): method quantize_data (line 14) | def quantize_data(self, data, quantize_bits, groups, key=None): method is_mlp (line 28) | def is_mlp(self, data, merge_count=1): method is_qkv (line 32) | def is_qkv(self, data): method Quantize (line 36) | def Quantize(self, value_list, quantize_bits, groups, key, merge_dim=0): method merge_layer_scales (line 60) | def merge_layer_scales(self, layer_scales): method merge_scales (line 71) | def merge_scales(self): method merge_scales_split (line 82) | def merge_scales_split(self, split_count): method sd_quantize_megatron (line 106) | def sd_quantize_megatron(self, sd, quantize_bits, groups): method model_quantize (line 118) | def model_quantize(self, model, quantize_policy, quantize_bits, groups): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/config.py function read_zero_config_deprecated (line 45) | def read_zero_config_deprecated(param_dict): function get_zero_config (line 59) | def get_zero_config(param_dict): class ZeroStageEnum (line 69) | class ZeroStageEnum(int, Enum): class DeepSpeedZeroConfig (line 78) | class DeepSpeedZeroConfig(DeepSpeedConfigModel): method overlap_comm_valid (line 270) | def overlap_comm_valid(cls, field_value, values): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/contiguous_memory_allocator.py function print_rank_0 (line 6) | def print_rank_0(message): class ContiguousMemoryAllocator (line 11) | class ContiguousMemoryAllocator(object): method __init__ (line 12) | def __init__(self, size, dtype, device): method allocate_tensor (line 45) | def allocate_tensor(self, size): method assign_to_param (line 77) | def assign_to_param(self, tensor, param, numel, shape): method release_tensor (line 91) | def release_tensor(self, tensor): method release_tensor_with_id (line 103) | def release_tensor_with_id(self, tensor_id): method print_allocation (line 117) | def print_allocation(self, resolution=200): method max_allocated (line 129) | def max_allocated(self): method _reset_param_data (line 134) | def _reset_param_data(self): method _unassign_params (line 141) | def _unassign_params(self, tensor_id): method _release_tensor (line 145) | def _release_tensor(self, tensor_id): method _consolidate_address (line 159) | def _consolidate_address(self, address, contiguous_size): method _defragment_memory (line 177) | def _defragment_memory(self): method _replace_old_address_with_new (line 230) | def _replace_old_address_with_new(self, tensor_id, new_address): method _get_new_tensor_address (line 244) | def _get_new_tensor_address(self, size): method _get_new_tensor (line 254) | def _get_new_tensor(self, address, size): method _largest_contiguous (line 272) | def _largest_contiguous(self): method _mark_as_occupied (line 278) | def _mark_as_occupied(self, address, size): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/linear.py function print_rank_0 (line 26) | def print_rank_0(message, debug=False, force=False): class LinearFunctionForZeroStage3 (line 39) | class LinearFunctionForZeroStage3(torch.autograd.Function): method forward (line 45) | def forward(ctx, input, weight, bias=None): method backward (line 71) | def backward(ctx, grad_output): function zero3_linear_wrap (line 114) | def zero3_linear_wrap(input, weight, bias=None): class LinearModuleForZeroStage3 (line 121) | class LinearModuleForZeroStage3(Module): method __init__ (line 161) | def __init__(self, in_features: int, out_features: int, bias: bool = T... method reset_parameters (line 173) | def reset_parameters(self) -> None: method forward (line 180) | def forward(self, input: Tensor) -> Tensor: method extra_repr (line 183) | def extra_repr(self) -> str: FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/offload_config.py class OffloadDeviceEnum (line 12) | class OffloadDeviceEnum(str, Enum): class DeepSpeedZeroOffloadParamConfig (line 19) | class DeepSpeedZeroOffloadParamConfig(DeepSpeedConfigModel): class DeepSpeedZeroOffloadOptimizerConfig (line 50) | class DeepSpeedZeroOffloadOptimizerConfig(DeepSpeedConfigModel): method set_pipeline (line 91) | def set_pipeline(cls, field_value, values): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/parameter_offload.py function is_builtin_type (line 20) | def is_builtin_type(obj): function _apply_to_tensors_only (line 30) | def _apply_to_tensors_only(module, functional, backward_function, outputs): function _apply_forward_and_backward_to_tensors_only (line 64) | def _apply_forward_and_backward_to_tensors_only(module, class ZeROOrderedDict (line 87) | class ZeROOrderedDict(OrderedDict): method __init__ (line 88) | def __init__(self, parent_module, *args, **kwargs): method __getitem__ (line 99) | def __getitem__(self, key): function _inject_parameters (line 117) | def _inject_parameters(module, cls): class PreBackwardFunction (line 129) | class PreBackwardFunction(torch.autograd.Function): method forward (line 131) | def forward(ctx, module, pre_backward_function, outputs): method backward (line 142) | def backward(ctx, *args): class PostBackwardFunction (line 148) | class PostBackwardFunction(torch.autograd.Function): method forward (line 150) | def forward(ctx, module, pre_backward_function, output): method backward (line 167) | def backward(ctx, *args): class DeepSpeedZeRoOffload (line 175) | class DeepSpeedZeRoOffload(object): method __init__ (line 176) | def __init__(self, method partition_all_parameters (line 233) | def partition_all_parameters(self): method get_param_coordinator (line 243) | def get_param_coordinator(self, training): method _convert_to_zero_parameters (line 256) | def _convert_to_zero_parameters(self, ds_config, module, mpu): method destroy (line 275) | def destroy(self): method _remove_module_hooks (line 278) | def _remove_module_hooks(self): method setup_zero_stage3_hooks (line 292) | def setup_zero_stage3_hooks(self): method mark_persistent_parameters (line 310) | def mark_persistent_parameters(self, param_threshold, model_threshold): method _register_hooks_recursively (line 330) | def _register_hooks_recursively(self, module, count=[0]): method pre_sub_module_forward_function (line 454) | def pre_sub_module_forward_function(self, sub_module): method post_sub_module_forward_function (line 472) | def post_sub_module_forward_function(self, sub_module): method pre_sub_module_backward_function (line 485) | def pre_sub_module_backward_function(self, sub_module): method post_sub_module_backward_function (line 493) | def post_sub_module_backward_function(self, sub_module): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/partition_parameters.py function _dist_allgather_fn (line 41) | def _dist_allgather_fn(input_tensor: Tensor, output_tensor: Tensor, grou... function print_rank_0 (line 48) | def print_rank_0(message, debug=False, force=False): function debug_rank0 (line 59) | def debug_rank0(msg: str) -> None: function is_zero_param (line 64) | def is_zero_param(parameter): function _init_external_params (line 70) | def _init_external_params(module): function register_external_parameter (line 86) | def register_external_parameter(module, parameter): function unregister_external_parameter (line 138) | def unregister_external_parameter(module, parameter): class ZeroParamType (line 160) | class ZeroParamType(Enum): class ZeroParamStatus (line 173) | class ZeroParamStatus(Enum): function zero_wrapper_for_fp_tensor_constructor (line 190) | def zero_wrapper_for_fp_tensor_constructor(fn: Callable, function get_new_tensor_fn_for_dtype (line 204) | def get_new_tensor_fn_for_dtype(dtype: torch.dtype) -> Callable: function get_all_subclasses (line 217) | def get_all_subclasses(cls): function free_param (line 231) | def free_param(param: Parameter) -> None: class InsertPostInitMethodToModuleSubClasses (line 250) | class InsertPostInitMethodToModuleSubClasses(object): method __init__ (line 251) | def __init__(self, method __enter__ (line 261) | def __enter__(self): method __exit__ (line 406) | def __exit__(self, exc_type, exc_value, traceback): method _post_init_method (line 421) | def _post_init_method(self, module): method _set_dtype (line 424) | def _set_dtype(self, ds_config, dtype): function shutdown_init_context (line 439) | def shutdown_init_context(): class AllGatherHandle (line 471) | class AllGatherHandle: method __init__ (line 472) | def __init__(self, handle, param: Parameter) -> None: method wait (line 479) | def wait(self) -> None: class AllGatherCoalescedHandle (line 484) | class AllGatherCoalescedHandle: method __init__ (line 485) | def __init__( method wait (line 504) | def wait(self) -> None: class Init (line 537) | class Init(InsertPostInitMethodToModuleSubClasses): method __init__ (line 540) | def __init__(self, method _convert_to_zero_parameters (line 712) | def _convert_to_zero_parameters(self, param_list): method _validate_remote_device (line 719) | def _validate_remote_device(self, remote_device, ds_config): method _post_init_method (line 734) | def _post_init_method(self, module): method _convert_to_deepspeed_param (line 762) | def _convert_to_deepspeed_param(self, param): method _aligned_size (line 973) | def _aligned_size(self, param): method _padding_size (line 976) | def _padding_size(self, param): method _partition_numel (line 980) | def _partition_numel(self, param): method _ensure_availability_of_partitioned_params (line 983) | def _ensure_availability_of_partitioned_params(self, params): method _all_gather (line 999) | def _all_gather(self, param_list, async_op=False, hierarchy=None): method _partition (line 1029) | def _partition(self, param_list, force=False, has_been_updated=False): method _partition_param (line 1042) | def _partition_param(self, param, buffer=None, has_been_updated=False): method _param_status (line 1166) | def _param_status(self, param): method _allgather_param (line 1176) | def _allgather_param(self, param, async_op=False, hierarchy=0): method _allgather_params_coalesced (line 1235) | def _allgather_params_coalesced(self, param_list, hierarchy=0): method _allgather_params (line 1304) | def _allgather_params(self, param_list, hierarchy=0): method _reduce_scatter_gradients (line 1366) | def _reduce_scatter_gradients(self, param_list): method _reduce_scatter_gradient (line 1397) | def _reduce_scatter_gradient(self, param): method _partition_gradients (line 1437) | def _partition_gradients(self, param_list, partition_buffers=None, acc... method _partition_gradient (line 1446) | def _partition_gradient(self, param, partition_buffer=None, accumulate... class GatheredParameters (line 1512) | class GatheredParameters: method __init__ (line 1513) | def __init__(self, params, modifier_rank=None, fwd_module=None, enable... method __enter__ (line 1624) | def __enter__(self): method __exit__ (line 1629) | def __exit__(self, *exc): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/partitioned_param_coordinator.py function debug_rank0 (line 20) | def debug_rank0(message: str) -> None: function get_all_parameters (line 26) | def get_all_parameters(sub_module, recurse=False): function iter_params (line 31) | def iter_params(module: Module, recurse=False) -> Iterable[Parameter]: class ZeRoTraceMode (line 35) | class ZeRoTraceMode(Enum): class PartitionedParameterCoordinator (line 44) | class PartitionedParameterCoordinator: class __InflightParamRegistry (line 46) | class __InflightParamRegistry(UserDict): method __setitem__ (line 48) | def __setitem__(self, class __ParamInTrace (line 60) | class __ParamInTrace: method __init__ (line 64) | def __init__( method _clear_trace_structures (line 122) | def _clear_trace_structures(self) -> None: method is_complete_trace (line 129) | def is_complete_trace(self) -> bool: method is_invalid_trace (line 132) | def is_invalid_trace(self) -> bool: method is_record_trace (line 135) | def is_record_trace(self) -> bool: method _invalidate_trace (line 138) | def _invalidate_trace(self) -> None: method trace_prologue (line 144) | def trace_prologue(self, sub_module: Module) -> None: method record_module (line 155) | def record_module(self, sub_module: Module) -> None: method record_parameters (line 164) | def record_parameters(self, sub_module: Module) -> None: method construct_parameter_trace_from_module_trace (line 176) | def construct_parameter_trace_from_module_trace(self): method reset_step (line 182) | def reset_step(self) -> None: method _dump_params (line 220) | def _dump_params(self, tag, sub_module, params, step_id=None): method _dump_param_ids (line 228) | def _dump_param_ids(self, tag, mod_id, p_ids, step_id=None): method fetch_sub_module (line 239) | def fetch_sub_module(self, current_submodule: Module) -> None: method release_sub_module (line 358) | def release_sub_module(self, submodule: Module) -> None: method release_and_reset_all (line 372) | def release_and_reset_all(self, module: Module) -> None: method __all_gather_params (line 388) | def __all_gather_params(self, params: Set[Parameter]) -> None: method __release_param (line 416) | def __release_param(self, param: Parameter) -> None: method __params_to_release (line 424) | def __params_to_release(self, method __prefetch_nvme_param_partitions (line 458) | def __prefetch_nvme_param_partitions(self) -> None: FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/stage3.py function print_rank_0 (line 34) | def print_rank_0(message, debug=False, force=False): function input (line 45) | def input(msg): function isclose (line 49) | def isclose(a, b, rtol=1e-09, atol=0.0): function lcm (line 53) | def lcm(x, y): function move_to_cpu (line 58) | def move_to_cpu(tensor_list): class DeepSpeedZeroOptimizer_Stage3 (line 66) | class DeepSpeedZeroOptimizer_Stage3(ZeROOptimizer): method __init__ (line 77) | def __init__(self, method destroy (line 350) | def destroy(self): method _setup_for_real_optimizer (line 353) | def _setup_for_real_optimizer(self): method set_lr (line 398) | def set_lr(self, lr): method get_lr (line 403) | def get_lr(self): method defragment (line 409) | def defragment(tensors: List[Tensor]) -> Tensor: method _get_param_coordinator (line 445) | def _get_param_coordinator(self, training): method _configure_offloading (line 448) | def _configure_offloading(self, offload_optimizer_config, offload_para... method _configure_tensor_swapping (line 466) | def _configure_tensor_swapping(self, offload_optimizer_config, aio_con... method elements_in_ipg_bucket (line 486) | def elements_in_ipg_bucket(self): method _move_to_flat_buffer (line 489) | def _move_to_flat_buffer(self, param_list, flat_buffer, avoid_copy=Fal... method _create_param_groups_fp16_flat_cpu_memory (line 522) | def _create_param_groups_fp16_flat_cpu_memory(self): method _create_fp16_partitions_with_defragmentation (line 555) | def _create_fp16_partitions_with_defragmentation(self): method _swap_in_sub_group_to_flat_buffer (line 656) | def _swap_in_sub_group_to_flat_buffer(self, flat_buffer, sub_group_id): method _create_next_swappable_fp32_groups (line 675) | def _create_next_swappable_fp32_groups(self): method _get_sub_group_partitions (line 689) | def _get_sub_group_partitions(self, sub_group_id): method _create_fp32_partitions (line 704) | def _create_fp32_partitions(self): method _create_fp16_sub_groups (line 809) | def _create_fp16_sub_groups(self, params_group): method _release_ipg_buffers (line 835) | def _release_ipg_buffers(self): method _optimizer_step (line 839) | def _optimizer_step(self, sub_group_id): method _swappable_optimizer_subgroup (line 847) | def _swappable_optimizer_subgroup(self, sub_group_id): method _partitioned_params_swap_out (line 855) | def _partitioned_params_swap_out(self, i): method initialize_optimizer_states (line 877) | def initialize_optimizer_states(self): method get_first_param_index (line 953) | def get_first_param_index(self, group_id, param_group, partition_id): method initialize_gradient_partitioning_data_structures (line 960) | def initialize_gradient_partitioning_data_structures(self): method independent_gradient_partition_epilogue (line 988) | def independent_gradient_partition_epilogue(self): method overlapping_partition_gradients_reduce_epilogue (line 1022) | def overlapping_partition_gradients_reduce_epilogue(self): method create_reduce_and_remove_grad_hooks (line 1025) | def create_reduce_and_remove_grad_hooks(self): method get_param_id (line 1055) | def get_param_id(self, param): method report_ipg_memory_usage (line 1059) | def report_ipg_memory_usage(self, tag, param_elems): method reduce_independent_p_g_buckets_and_remove_grads (line 1067) | def reduce_independent_p_g_buckets_and_remove_grads(self, param, i): method __add_grad_to_ipg_bucket (line 1091) | def __add_grad_to_ipg_bucket(self, param: Parameter) -> None: method __reduce_and_partition_ipg_grads (line 1111) | def __reduce_and_partition_ipg_grads(self, safe_mode: bool = False) ->... method __avg_scatter_grads (line 1146) | def __avg_scatter_grads(self, params_to_reduce: List[Parameter]) -> Li... method set_grad_positions (line 1173) | def set_grad_positions(self): method _constant_buffered_norm2 (line 1189) | def _constant_buffered_norm2(self, input, buffer_size=250000000): method set_norm_for_param_grad_in_gpu (line 1198) | def set_norm_for_param_grad_in_gpu(self, param): method async_inplace_copy_grad_to_fp32_buffer_from_gpu (line 1204) | def async_inplace_copy_grad_to_fp32_buffer_from_gpu(self, param, fp32_... method complete_grad_norm_calculation_for_cpu_offload (line 1212) | def complete_grad_norm_calculation_for_cpu_offload(self, params): method __partition_grads (line 1240) | def __partition_grads(self, method reduce_ready_partitions_and_remove_grads (line 1316) | def reduce_ready_partitions_and_remove_grads(self, param, i): method zero_reduced_gradients (line 1320) | def zero_reduced_gradients(self, partition_id, i): method flatten_and_print (line 1331) | def flatten_and_print(self, message, tensors, start=0, n=5): method get_grads_to_reduce (line 1339) | def get_grads_to_reduce(self, i, partition_id): method sequential_execution (line 1370) | def sequential_execution(self, function, message, group=None): method set_none_gradients_to_zero (line 1380) | def set_none_gradients_to_zero(self, i, partition_id): method allreduce_bucket (line 1388) | def allreduce_bucket(self, bucket, rank=None, log=None): method allreduce_and_copy (line 1418) | def allreduce_and_copy(self, small_bucket, rank=None, log=None): method allreduce_no_retain (line 1425) | def allreduce_no_retain(self, method get_data_parallel_partitions (line 1447) | def get_data_parallel_partitions(self, tensor): method get_partition_info (line 1467) | def get_partition_info(self, tensor_list, partition_size, partition_id): method zero_grad (line 1499) | def zero_grad(self, set_grads_to_None=True): method _model_parallel_all_reduce (line 1518) | def _model_parallel_all_reduce(self, tensor, op): method get_grad_norm_direct (line 1527) | def get_grad_norm_direct(self, gradients, params, norm_type=2): method get_flat_partition (line 1583) | def get_flat_partition(self, method free_grad_in_param_list (line 1631) | def free_grad_in_param_list(self, param_list): method reset_cpu_buffers (line 1635) | def reset_cpu_buffers(self): method log_timers (line 1639) | def log_timers(self, timer_names): method start_timers (line 1645) | def start_timers(self, timer_names): method stop_timers (line 1652) | def stop_timers(self, timer_names): method _pre_step (line 1659) | def _pre_step(self): method _get_norm_groups (line 1671) | def _get_norm_groups(self): method _prepare_fp32_grad_for_sub_group (line 1685) | def _prepare_fp32_grad_for_sub_group(self, sub_group_id): method _prepare_sub_group (line 1706) | def _prepare_sub_group(self, sub_group_id, timer_names=set()): method _optimizer_states_and_gradient_swap_in (line 1716) | def _optimizer_states_and_gradient_swap_in(self, sub_group_id, timer_n... method _release_sub_group (line 1737) | def _release_sub_group(self, sub_group_id, timer_names=set()): method flatten_dense_tensors_aligned (line 1751) | def flatten_dense_tensors_aligned(self, tensor_list, alignment): method _optimizer_states_and_gradient_swap_out (line 1771) | def _optimizer_states_and_gradient_swap_out(self, sub_group_id, timer_... method _unflatten_partitioned_parameters (line 1797) | def _unflatten_partitioned_parameters(self, sub_group_id): method _overflow_clean_up (line 1804) | def _overflow_clean_up(self, prev_scale): method _overflow_check_and_loss_scale_update (line 1823) | def _overflow_check_and_loss_scale_update(self): method _post_step (line 1838) | def _post_step(self, timer_names=set()): method _reassign_or_swap_out_partitioned_parameters (line 1855) | def _reassign_or_swap_out_partitioned_parameters(self, sub_group_id): method override_loss_scale (line 1865) | def override_loss_scale(self, loss_scale): method step (line 1874) | def step(self, closure=None): method dump_pre_step_gradients (line 1937) | def dump_pre_step_gradients(self, debug_fp32_grads): method dump_post_step_gradients (line 1949) | def dump_post_step_gradients(self): method unscale_and_clip_grads (line 1971) | def unscale_and_clip_grads(self, sub_group_id, total_norm): method _check_overflow (line 1982) | def _check_overflow(self, partition_gradients=True): method has_overflow_serial (line 1986) | def has_overflow_serial(self, params, is_grad_list=False): method has_overflow_partitioned_grads_serial (line 1993) | def has_overflow_partitioned_grads_serial(self): method has_overflow (line 2001) | def has_overflow(self, partition_gradients=True): method _has_inf_or_nan (line 2032) | def _has_inf_or_nan(x, j=None): method backward (line 2053) | def backward(self, loss, retain_graph=False): method get_fp32_grad_partitions (line 2077) | def get_fp32_grad_partitions(self) -> Dict[int, Dict[int, Tensor]]: method _partition_all_parameters (line 2100) | def _partition_all_parameters(self): method check_overflow (line 2103) | def check_overflow(self, partition_gradients=True): method _update_scale (line 2106) | def _update_scale(self, has_overflow=False): method _get_state (line 2110) | def _get_state(self): method _set_state (line 2113) | def _set_state(self, value): method _get_param_groups (line 2120) | def _get_param_groups(self): method _set_param_groups (line 2123) | def _set_param_groups(self, value): method _get_loss_scale (line 2129) | def _get_loss_scale(self): method _set_loss_scale (line 2135) | def _set_loss_scale(self, value): method _get_lean_tensors (line 2141) | def _get_lean_tensors(self, padded_flattened_tensor, group_tensors, pa... method get_lean_optimizer_state (line 2150) | def get_lean_optimizer_state(self): method get_groups_without_padding (line 2173) | def get_groups_without_padding(self, groups_with_padding): method _set_fp32_optimizer_param_groups (line 2184) | def _set_fp32_optimizer_param_groups(self): method _clear_fp32_optimizer_param_groups (line 2190) | def _clear_fp32_optimizer_param_groups(self): method _rigid_state_dict (line 2194) | def _rigid_state_dict(self): method state_dict (line 2209) | def state_dict(self): method _restore_from_fp32_weights (line 2238) | def _restore_from_fp32_weights(self, all_state_dict): method _restore_from_bit16_weights (line 2249) | def _restore_from_bit16_weights(self): method refresh_fp32_params (line 2254) | def refresh_fp32_params(self): method _get_flattened_partition (line 2258) | def _get_flattened_partition(self, all_partition_states): method _restore_base_optimizer_state (line 2285) | def _restore_base_optimizer_state(self, all_state_dict): method _rigid_load_state_dict (line 2308) | def _rigid_load_state_dict(self, state_dict, load_optimizer_states=True): method load_state_dict (line 2339) | def load_state_dict(self, method checkpoint_event_prologue (line 2387) | def checkpoint_event_prologue(self): method checkpoint_event_epilogue (line 2390) | def checkpoint_event_epilogue(self): function _handle_overflow (line 2395) | def _handle_overflow(cpu_sum, x, i): function estimate_zero3_model_states_mem_needs (line 2409) | def estimate_zero3_model_states_mem_needs(total_params, function model_to_params (line 2450) | def model_to_params(model): function estimate_zero3_model_states_mem_needs_all_live (line 2465) | def estimate_zero3_model_states_mem_needs_all_live(model, function estimate_zero3_model_states_mem_needs_all_cold (line 2497) | def estimate_zero3_model_states_mem_needs_all_cold(total_params, FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/stage_1_and_2.py function input (line 46) | def input(msg): function split_half_float_double (line 50) | def split_half_float_double(tensors): function isclose (line 65) | def isclose(a, b, rtol=1e-09, atol=0.0): function lcm (line 69) | def lcm(x, y): function get_alignment_padding (line 74) | def get_alignment_padding(tensor_list, alignment): function move_to_cpu (line 80) | def move_to_cpu(tensor_list): function print_rank_msg (line 85) | def print_rank_msg(msg): function _get_padded_tensor (line 89) | def _get_padded_tensor(src_tensor, size): class DeepSpeedZeroOptimizer (line 98) | class DeepSpeedZeroOptimizer(ZeROOptimizer): method __init__ (line 109) | def __init__(self, method _enable_universal_checkpoint (line 534) | def _enable_universal_checkpoint(self): method _create_param_mapping (line 538) | def _create_param_mapping(self): method _link_all_hp_params (line 551) | def _link_all_hp_params(self): method is_moe_group (line 566) | def is_moe_group(self, group): method _configure_moe_settings (line 569) | def _configure_moe_settings(self): method _update_model_bit16_weights (line 596) | def _update_model_bit16_weights(self, group_index): method _round_robin_reorder (line 607) | def _round_robin_reorder(self, tensor_list, num_partitions): method _release_ipg_buffers (line 630) | def _release_ipg_buffers(self): method initialize_optimizer_states (line 636) | def initialize_optimizer_states(self): method reduce_gradients (line 658) | def reduce_gradients(self, pipeline_parallel=False): method get_first_param_index (line 683) | def get_first_param_index(self, group_id, param_group, partition_id): method initialize_gradient_partitioning_data_structures (line 690) | def initialize_gradient_partitioning_data_structures(self): method independent_gradient_partition_epilogue (line 717) | def independent_gradient_partition_epilogue(self): method reset_partition_gradient_structures (line 765) | def reset_partition_gradient_structures(self): method initialize_gradient_partition (line 776) | def initialize_gradient_partition(self, i, param_group, partition_id): method overlapping_partition_gradients_reduce_epilogue (line 831) | def overlapping_partition_gradients_reduce_epilogue(self): method create_reduce_and_remove_grad_hooks (line 834) | def create_reduce_and_remove_grad_hooks(self): method get_param_id (line 852) | def get_param_id(self, param): method report_ipg_memory_usage (line 856) | def report_ipg_memory_usage(self, tag, param_elems): method flatten_dense_tensors_aligned (line 864) | def flatten_dense_tensors_aligned(self, tensor_list, alignment): method reduce_independent_p_g_buckets_and_remove_grads (line 868) | def reduce_independent_p_g_buckets_and_remove_grads(self, param, i): method print_rank_0 (line 910) | def print_rank_0(self, message): method gradient_reduction_w_predivide (line 914) | def gradient_reduction_w_predivide(self, tensor): method average_tensor (line 940) | def average_tensor(self, tensor): method get_grad_position (line 1041) | def get_grad_position(self, group_id, tensor_list, first_offset, parti... method update_overflow_tracker_for_param_grad (line 1068) | def update_overflow_tracker_for_param_grad(self, param): method async_accumulate_grad_in_cpu_via_gpu (line 1072) | def async_accumulate_grad_in_cpu_via_gpu(self, param): method set_norm_for_param_grad (line 1137) | def set_norm_for_param_grad(self, param): method set_norm_for_param_grad_in_gpu (line 1149) | def set_norm_for_param_grad_in_gpu(self, param): method async_inplace_copy_grad_to_fp32_buffer_from_gpu (line 1160) | def async_inplace_copy_grad_to_fp32_buffer_from_gpu(self, param): method complete_grad_norm_calculation_for_cpu_offload (line 1177) | def complete_grad_norm_calculation_for_cpu_offload(self, params): method copy_grads_in_partition (line 1223) | def copy_grads_in_partition(self, param): method reduce_ipg_grads (line 1261) | def reduce_ipg_grads(self): method reduce_ready_partitions_and_remove_grads (line 1321) | def reduce_ready_partitions_and_remove_grads(self, param, i): method zero_reduced_gradients (line 1325) | def zero_reduced_gradients(self, partition_id, i): method flatten_and_print (line 1336) | def flatten_and_print(self, message, tensors, start=0, n=5): method get_grads_to_reduce (line 1344) | def get_grads_to_reduce(self, i, partition_id): method sequential_execution (line 1375) | def sequential_execution(self, function, message, group=None): method set_none_gradients_to_zero (line 1385) | def set_none_gradients_to_zero(self, i, partition_id): method allreduce_bucket (line 1392) | def allreduce_bucket(self, bucket, rank=None, log=None): method _clear_previous_reduced_grads (line 1421) | def _clear_previous_reduced_grads(self): method allreduce_and_copy (line 1428) | def allreduce_and_copy(self, small_bucket, rank=None, log=None): method allreduce_no_retain (line 1443) | def allreduce_no_retain(self, method buffered_reduce_fallback (line 1462) | def buffered_reduce_fallback(self, method get_data_parallel_partitions (line 1481) | def get_data_parallel_partitions(self, tensor, group_id): method get_partition_info (line 1501) | def get_partition_info(self, tensor_list, partition_size, partition_id): method zero_grad (line 1532) | def zero_grad(self, set_grads_to_None=True): method _model_parallel_all_reduce (line 1547) | def _model_parallel_all_reduce(self, tensor, op): method get_grad_norm_direct (line 1555) | def get_grad_norm_direct(self, gradients, params, norm_type=2): method get_flat_partition (line 1613) | def get_flat_partition(self, method free_grad_in_param_list (line 1663) | def free_grad_in_param_list(self, param_list): method reset_cpu_buffers (line 1667) | def reset_cpu_buffers(self): method log_timers (line 1671) | def log_timers(self, timer_names): method start_timers (line 1677) | def start_timers(self, timer_names): method stop_timers (line 1684) | def stop_timers(self, timer_names): method set_lr (line 1691) | def set_lr(self, lr): method get_lr (line 1696) | def get_lr(self): method override_loss_scale (line 1700) | def override_loss_scale(self, loss_scale): method scaled_global_norm (line 1708) | def scaled_global_norm(self, norm_type=2): method get_bit16_param_group (line 1729) | def get_bit16_param_group(self, group_no): method _optimizer_step (line 1736) | def _optimizer_step(self, group_no): method step (line 1746) | def step(self, closure=None): method update_lp_params (line 1875) | def update_lp_params(self): method _average_expert_grad_norms (line 1889) | def _average_expert_grad_norms(self, norm_groups): method unscale_and_clip_grads (line 1900) | def unscale_and_clip_grads(self, grad_groups_flat, total_norm): method _check_overflow (line 1917) | def _check_overflow(self, partition_gradients=True): method has_overflow_serial (line 1921) | def has_overflow_serial(self, params, is_grad_list=False): method has_overflow_partitioned_grads_serial (line 1928) | def has_overflow_partitioned_grads_serial(self): method has_overflow (line 1935) | def has_overflow(self, partition_gradients=True): method _has_inf_or_nan (line 1964) | def _has_inf_or_nan(x, j=None): method backward (line 1984) | def backward(self, loss, retain_graph=False): method check_overflow (line 2015) | def check_overflow(self, partition_gradients=True): method _update_scale (line 2018) | def _update_scale(self, has_overflow=False): method _get_state (line 2022) | def _get_state(self): method _set_state (line 2025) | def _set_state(self, value): method _get_param_groups (line 2032) | def _get_param_groups(self): method _set_param_groups (line 2035) | def _set_param_groups(self, value): method _get_loss_scale (line 2041) | def _get_loss_scale(self): method _set_loss_scale (line 2047) | def _set_loss_scale(self, value): method _get_groups_without_padding (line 2055) | def _get_groups_without_padding(self, groups_with_padding): method _get_state_without_padding (line 2064) | def _get_state_without_padding(self, state_with_padding, padding): method _get_base_optimizer_state (line 2077) | def _get_base_optimizer_state(self): method state_dict (line 2088) | def state_dict(self): method _restore_from_elastic_fp32_weights (line 2129) | def _restore_from_elastic_fp32_weights(self, all_state_dict): method _restore_from_bit16_weights (line 2152) | def _restore_from_bit16_weights(self): method refresh_fp32_params (line 2158) | def refresh_fp32_params(self): method _partition_base_optimizer_state (line 2162) | def _partition_base_optimizer_state(self, state_key, all_partition_sta... method _restore_base_optimizer_state (line 2176) | def _restore_base_optimizer_state(self, base_optimizer_group_states): method get_ep_ranks (line 2189) | def get_ep_ranks(self, rank=0, group_name=None): method _restore_elastic_base_optimizer_state (line 2201) | def _restore_elastic_base_optimizer_state(self, all_state_dict): method load_state_dict (line 2228) | def load_state_dict(self, method _load_universal_checkpoint (line 2242) | def _load_universal_checkpoint(self, method param_groups (line 2249) | def param_groups(self): method _load_hp_checkpoint_state (line 2253) | def _load_hp_checkpoint_state(self, checkpoint_dir): method _load_legacy_checkpoint (line 2268) | def _load_legacy_checkpoint(self, function _handle_overflow (line 2376) | def _handle_overflow(cpu_sum, x, i): function estimate_zero2_model_states_mem_needs (line 2390) | def estimate_zero2_model_states_mem_needs(total_params, function model_to_params (line 2408) | def model_to_params(model): function estimate_zero2_model_states_mem_needs_all_live (line 2416) | def estimate_zero2_model_states_mem_needs_all_live(model, function estimate_zero2_model_states_mem_needs_all_cold (line 2447) | def estimate_zero2_model_states_mem_needs_all_cold(total_params, FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/test.py function test1 (line 5) | def test1(): function test2 (line 39) | def test2(): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/tiling.py function split_tensor_along_last_dim (line 6) | def split_tensor_along_last_dim(tensor, partitions, contiguous_split_chu... class TiledLinear (line 27) | class TiledLinear(torch.nn.Module): method __init__ (line 28) | def __init__(self, method forward (line 125) | def forward(self, input_): method _split_global_input (line 154) | def _split_global_input(self, input, split_sizes): method _reduce_local_output (line 168) | def _reduce_local_output(self, in_id, out_id, current_out, new_out): method _combine_output_splits (line 193) | def _combine_output_splits(self, outputs): method copy_params_from (line 206) | def copy_params_from(self, other): class TiledLinearReturnBias (line 257) | class TiledLinearReturnBias(TiledLinear): method _reduce_local_output (line 261) | def _reduce_local_output(self, in_id, out_id, current_out, new_out): method _combine_output_splits (line 284) | def _combine_output_splits(self, outputs): FILE: benchmark/third_party/DeepSpeed/deepspeed/runtime/zero/utils.py function _initialize_parameter_parallel_groups (line 12) | def _initialize_parameter_parallel_groups(parameter_parallel_size=None): class ZeRORuntimeException (line 30) | class ZeRORuntimeException(Exception): function is_zero_supported_optimizer (line 50) | def is_zero_supported_optimizer(optimizer): function get_lst_from_rank0 (line 58) | def get_lst_from_rank0(lst: List[int]) -> None: function assert_ints_same_as_other_ranks (line 76) | def assert_ints_same_as_other_ranks(ints: List[int]) -> None: FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/comms_logging.py function get_caller_func (line 5) | def get_caller_func(frame=3): function convert_size (line 11) | def convert_size(size_bytes): function calc_bw_log (line 23) | def calc_bw_log(comm_op, size, duration): class CommsLogger (line 56) | class CommsLogger: method __init__ (line 57) | def __init__(self): method configure (line 66) | def configure(self, comms_config): method start_profiling_comms (line 78) | def start_profiling_comms(self): method stop_profiling_comms (line 81) | def stop_profiling_comms(self): method start_profiling_op (line 85) | def start_profiling_op(self, op_name_list): method stop_profiling_op (line 88) | def stop_profiling_op(self, op_name_list): method append (line 92) | def append(self, raw_name, record_name, latency, msg_size): method log_all (line 120) | def log_all(self): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/debug.py function debug_extract_module_and_param_names (line 11) | def debug_extract_module_and_param_names(model): function debug_module2name (line 20) | def debug_module2name(module): function debug_module2name_id (line 27) | def debug_module2name_id(module): function debug_module2name_class (line 31) | def debug_module2name_class(module): function debug_param2name (line 35) | def debug_param2name(param): function debug_param2name_id (line 42) | def debug_param2name_id(param): function debug_param2name_id_shape (line 46) | def debug_param2name_id_shape(param): function debug_param2name_id_shape_device (line 50) | def debug_param2name_id_shape_device(param): function debug_param2name_id_numel (line 54) | def debug_param2name_id_numel(param): function debug_param2name_id_shape_status (line 58) | def debug_param2name_id_shape_status(param): function printflock (line 62) | def printflock(*msgs): function log_rank_file (line 97) | def log_rank_file(rank, *msgs): function print_backward_tensors (line 129) | def print_backward_tensors(tensor): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/exceptions.py class DeprecatedException (line 6) | class DeprecatedException(Exception): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/groups.py function initialize (line 45) | def initialize(ep_size=1, mpu=None): function _ensure_divisibility (line 52) | def _ensure_divisibility(numerator, denominator): function _create_model_parallel (line 59) | def _create_model_parallel(model_parallel_size_): function _create_expert_and_data_parallel (line 109) | def _create_expert_and_data_parallel(expert_parallel_size_): function _get_expert_parallel_ranks (line 163) | def _get_expert_parallel_ranks(world_size, model_parallel_size_, expert_... function _create_expert_data_and_model_parallel (line 209) | def _create_expert_data_and_model_parallel(expert_parallel_size_, mpu): function _get_max_expert_size (line 266) | def _get_max_expert_size(): function _get_max_expert_size_name (line 277) | def _get_max_expert_size_name(): function _get_max_expert_parallel_group (line 282) | def _get_max_expert_parallel_group(): function _get_expert_parallel_group (line 287) | def _get_expert_parallel_group(group_name): function _get_expert_parallel_group_dict (line 294) | def _get_expert_parallel_group_dict(): function _get_expert_data_parallel_group (line 299) | def _get_expert_data_parallel_group(group_name): function _get_expert_data_parallel_group_dict (line 306) | def _get_expert_data_parallel_group_dict(): function _clone_world_group (line 311) | def _clone_world_group(): function _get_data_parallel_group (line 326) | def _get_data_parallel_group(): function _get_broadcast_src_rank (line 337) | def _get_broadcast_src_rank(): function _get_expert_broadcast_src_rank (line 341) | def _get_expert_broadcast_src_rank(group_name): function _get_expert_parallel_world_size (line 345) | def _get_expert_parallel_world_size(group_name): function _get_expert_data_parallel_world_size (line 350) | def _get_expert_data_parallel_world_size(group_name): function _get_expert_parallel_rank (line 355) | def _get_expert_parallel_rank(group_name): function _get_expert_parallel_src_rank (line 360) | def _get_expert_parallel_src_rank(group_name): function _get_expert_data_parallel_rank (line 368) | def _get_expert_data_parallel_rank(group_name): function _get_data_parallel_world_size (line 373) | def _get_data_parallel_world_size(): function _get_model_parallel_world_size (line 381) | def _get_model_parallel_world_size(): function _get_data_parallel_rank (line 389) | def _get_data_parallel_rank(): function _get_expert_model_parallel_world_size (line 397) | def _get_expert_model_parallel_world_size(): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/init_on_device.py class OnDevice (line 10) | class OnDevice(object): method __init__ (line 31) | def __init__(self, dtype, device="meta", enabled=True): method fp_tensor_constructor (line 42) | def fp_tensor_constructor(self, method get_new_tensor_fn_for_dtype (line 55) | def get_new_tensor_fn_for_dtype(self, dtype: torch.dtype) -> Callable: method __enter__ (line 64) | def __enter__(self): method __exit__ (line 74) | def __exit__(self, exc_type, exc_value, traceback): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/logging.py class LoggerFactory (line 14) | class LoggerFactory: method create_logger (line 16) | def create_logger(name=None, level=logging.INFO): function log_dist (line 47) | def log_dist(message, ranks=None, level=logging.INFO): function print_json_dist (line 71) | def print_json_dist(message, ranks=None, path=None): function get_current_level (line 98) | def get_current_level(): function should_log_le (line 105) | def should_log_le(max_log_level_str): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/mixed_precision_linkage.py function link_hp_params (line 8) | def link_hp_params(lp_param_list, function _init_lp_to_hp_mapping (line 28) | def _init_lp_to_hp_mapping(lp_param_list, partition_start, partition_siz... FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/nvtx.py function instrument_w_nvtx (line 4) | def instrument_w_nvtx(func): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/tensor_fragment.py class fragment_address (line 11) | class fragment_address: class tensor_fragment (line 17) | class tensor_fragment: method update_hp (line 24) | def update_hp(self): method update_lp (line 27) | def update_lp(self): method get_optim_state_fragment (line 30) | def get_optim_state_fragment(self, key): method get_hp_fragment_address (line 36) | def get_hp_fragment_address(self): method get_optim_state_keys (line 39) | def get_optim_state_keys(self): function get_full_hp_param (line 43) | def get_full_hp_param(self, optim_state_key=None): function get_hp_fragment_mapping (line 61) | def get_hp_fragment_mapping(lp_param, FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/timer.py class CudaEventTimer (line 20) | class CudaEventTimer(object): method __init__ (line 21) | def __init__(self, start_event: torch.cuda.Event, end_event: torch.cud... method get_elapsed_msec (line 25) | def get_elapsed_msec(self): class SynchronizedWallClockTimer (line 31) | class SynchronizedWallClockTimer: class Timer (line 33) | class Timer: method __init__ (line 35) | def __init__(self, name): method start (line 42) | def start(self): method stop (line 49) | def stop(self, reset=False, record=False): method _get_elapsed_msec (line 58) | def _get_elapsed_msec(self): method reset (line 63) | def reset(self): method elapsed (line 70) | def elapsed(self, reset=True): method mean (line 86) | def mean(self): method __init__ (line 90) | def __init__(self): method get_timers (line 93) | def get_timers(self): method __call__ (line 96) | def __call__(self, name): method memory_usage (line 102) | def memory_usage(): method log (line 113) | def log(self, names, normalizer=1.0, reset=True, memory_breakdown=Fals... method get_mean (line 124) | def get_mean(self, names, normalizer=1.0, reset=True): class ThroughputTimer (line 135) | class ThroughputTimer: method __init__ (line 136) | def __init__( method update_epoch_count (line 168) | def update_epoch_count(self): method _init_timer (line 172) | def _init_timer(self): method start (line 175) | def start(self): method stop (line 182) | def stop(self, report_speed=True): method avg_samples_per_sec (line 219) | def avg_samples_per_sec(self): function trim_mean (line 229) | def trim_mean(data, trim_percent): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/types.py class ActivationFuncType (line 4) | class ActivationFuncType(IntEnum): FILE: benchmark/third_party/DeepSpeed/deepspeed/utils/zero_to_fp32.py function atoi (line 36) | def atoi(text): function natural_keys (line 40) | def natural_keys(text): function get_model_state_file (line 49) | def get_model_state_file(checkpoint_dir, zero_stage): function get_optim_files (line 65) | def get_optim_files(checkpoint_dir): function parse_model_state (line 78) | def parse_model_state(file): function parse_optim_states (line 100) | def parse_optim_states(files, ds_checkpoint_dir): function _get_fp32_state_dict_from_zero_checkpoint (line 153) | def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir): function _get_fp32_state_dict_from_zero2_checkpoint (line 184) | def _get_fp32_state_dict_from_zero2_checkpoint(world_size, function zero3_partitioned_param_info (line 280) | def zero3_partitioned_param_info(unpartitioned_numel, world_size): function _get_fp32_state_dict_from_zero3_checkpoint (line 287) | def _get_fp32_state_dict_from_zero3_checkpoint(world_size, function get_fp32_state_dict_from_zero_checkpoint (line 360) | def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None): function convert_zero_checkpoint_to_fp32_state_dict (line 409) | def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_fi... function load_state_dict_from_zero_checkpoint (line 425) | def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None): FILE: benchmark/third_party/DeepSpeed/op_builder/async_io.py class AsyncIOBuilder (line 10) | class AsyncIOBuilder(OpBuilder): method __init__ (line 14) | def __init__(self): method absolute_name (line 17) | def absolute_name(self): method sources (line 20) | def sources(self): method include_paths (line 32) | def include_paths(self): method cxx_args (line 35) | def cxx_args(self): method extra_ldflags (line 53) | def extra_ldflags(self): method check_for_libaio_pkg (line 56) | def check_for_libaio_pkg(self): method is_compatible (line 87) | def is_compatible(self, verbose=True): FILE: benchmark/third_party/DeepSpeed/op_builder/builder.py function installed_cuda_version (line 38) | def installed_cuda_version(): function get_default_compute_capabilities (line 55) | def get_default_compute_capabilities(): function assert_no_cuda_mismatch (line 88) | def assert_no_cuda_mismatch(): class OpBuilder (line 107) | class OpBuilder(ABC): method __init__ (line 111) | def __init__(self, name): method absolute_name (line 117) | def absolute_name(self): method sources (line 125) | def sources(self): method hipify_extension (line 131) | def hipify_extension(self): method assert_torch_info (line 135) | def assert_torch_info(torch_info): method is_rocm_pytorch (line 165) | def is_rocm_pytorch(): method installed_rocm_version (line 185) | def installed_rocm_version(): method include_paths (line 207) | def include_paths(self): method nvcc_args (line 213) | def nvcc_args(self): method cxx_args (line 219) | def cxx_args(self): method is_compatible (line 225) | def is_compatible(self, verbose=True): method extra_ldflags (line 231) | def extra_ldflags(self): method libraries_installed (line 234) | def libraries_installed(self, libraries): method has_function (line 245) | def has_function(self, funcname, libraries, verbose=False): method strip_empty_entries (line 331) | def strip_empty_entries(self, args): method cpu_arch (line 337) | def cpu_arch(self): method _backup_cpuinfo (line 360) | def _backup_cpuinfo(self): method simd_width (line 386) | def simd_width(self): method command_exists (line 411) | def command_exists(self, cmd): method warning (line 431) | def warning(self, msg): method deepspeed_src_path (line 435) | def deepspeed_src_path(self, code_path): method builder (line 441) | def builder(self): method load (line 450) | def load(self, verbose=True): method jit_load (line 462) | def jit_load(self, verbose=True): class CUDAOpBuilder (line 514) | class CUDAOpBuilder(OpBuilder): method compute_capability_args (line 515) | def compute_capability_args(self, cross_compile_archs=None): method filter_ccs (line 573) | def filter_ccs(self, ccs: List[str]): method version_dependent_macros (line 580) | def version_dependent_macros(self): method is_compatible (line 593) | def is_compatible(self, verbose=True): method builder (line 596) | def builder(self): method hipify_extension (line 619) | def hipify_extension(self): method cxx_args (line 634) | def cxx_args(self): method nvcc_args (line 640) | def nvcc_args(self): method libraries_args (line 666) | def libraries_args(self): class TorchCPUOpBuilder (line 673) | class TorchCPUOpBuilder(CUDAOpBuilder): method extra_ldflags (line 674) | def extra_ldflags(self): method cxx_args (line 680) | def cxx_args(self): FILE: benchmark/third_party/DeepSpeed/op_builder/cpu_adagrad.py class CPUAdagradBuilder (line 8) | class CPUAdagradBuilder(TorchCPUOpBuilder): method __init__ (line 12) | def __init__(self): method absolute_name (line 15) | def absolute_name(self): method sources (line 18) | def sources(self): method include_paths (line 21) | def include_paths(self): FILE: benchmark/third_party/DeepSpeed/op_builder/cpu_adam.py class CPUAdamBuilder (line 8) | class CPUAdamBuilder(TorchCPUOpBuilder): method __init__ (line 12) | def __init__(self): method absolute_name (line 15) | def absolute_name(self): method sources (line 18) | def sources(self): method libraries_args (line 21) | def libraries_args(self): method include_paths (line 27) | def include_paths(self): FILE: benchmark/third_party/DeepSpeed/op_builder/fused_adam.py class FusedAdamBuilder (line 9) | class FusedAdamBuilder(CUDAOpBuilder): method __init__ (line 13) | def __init__(self): method absolute_name (line 16) | def absolute_name(self): method sources (line 19) | def sources(self): method include_paths (line 22) | def include_paths(self): method cxx_args (line 25) | def cxx_args(self): method nvcc_args (line 29) | def nvcc_args(self): FILE: benchmark/third_party/DeepSpeed/op_builder/fused_lamb.py class FusedLambBuilder (line 9) | class FusedLambBuilder(CUDAOpBuilder): method __init__ (line 13) | def __init__(self): method absolute_name (line 16) | def absolute_name(self): method sources (line 19) | def sources(self): method include_paths (line 22) | def include_paths(self): method cxx_args (line 25) | def cxx_args(self): method nvcc_args (line 29) | def nvcc_args(self): FILE: benchmark/third_party/DeepSpeed/op_builder/quantizer.py class QuantizerBuilder (line 4) | class QuantizerBuilder(CUDAOpBuilder): method __init__ (line 8) | def __init__(self, name=None): method absolute_name (line 12) | def absolute_name(self): method sources (line 15) | def sources(self): method include_paths (line 23) | def include_paths(self): method extra_ldflags (line 26) | def extra_ldflags(self): FILE: benchmark/third_party/DeepSpeed/op_builder/sparse_attn.py class SparseAttnBuilder (line 12) | class SparseAttnBuilder(OpBuilder): method __init__ (line 16) | def __init__(self): method absolute_name (line 19) | def absolute_name(self): method sources (line 22) | def sources(self): method cxx_args (line 25) | def cxx_args(self): method is_compatible (line 28) | def is_compatible(self, verbose=True): FILE: benchmark/third_party/DeepSpeed/op_builder/spatial_inference.py class SpatialInferenceBuilder (line 7) | class SpatialInferenceBuilder(CUDAOpBuilder): method __init__ (line 11) | def __init__(self, name=None): method absolute_name (line 15) | def absolute_name(self): method is_compatible (line 18) | def is_compatible(self, verbose=True): method sources (line 38) | def sources(self): method include_paths (line 44) | def include_paths(self): FILE: benchmark/third_party/DeepSpeed/op_builder/stochastic_transformer.py class StochasticTransformerBuilder (line 7) | class StochasticTransformerBuilder(TransformerBuilder): method __init__ (line 11) | def __init__(self): method absolute_name (line 14) | def absolute_name(self): method nvcc_args (line 17) | def nvcc_args(self): FILE: benchmark/third_party/DeepSpeed/op_builder/transformer.py class TransformerBuilder (line 7) | class TransformerBuilder(CUDAOpBuilder): method __init__ (line 11) | def __init__(self, name=None): method absolute_name (line 15) | def absolute_name(self): method extra_ldflags (line 18) | def extra_ldflags(self): method sources (line 24) | def sources(self): method include_paths (line 36) | def include_paths(self): FILE: benchmark/third_party/DeepSpeed/op_builder/transformer_inference.py class InferenceBuilder (line 4) | class InferenceBuilder(CUDAOpBuilder): method __init__ (line 8) | def __init__(self, name=None): method absolute_name (line 12) | def absolute_name(self): method is_compatible (line 15) | def is_compatible(self, verbose=True): method filter_ccs (line 40) | def filter_ccs(self, ccs): method sources (line 52) | def sources(self): method extra_ldflags (line 64) | def extra_ldflags(self): method include_paths (line 70) | def include_paths(self): FILE: benchmark/third_party/DeepSpeed/op_builder/utils.py class UtilsBuilder (line 7) | class UtilsBuilder(OpBuilder): method __init__ (line 11) | def __init__(self): method absolute_name (line 14) | def absolute_name(self): method sources (line 17) | def sources(self): FILE: benchmark/third_party/DeepSpeed/scripts/check-torchdist.py function err (line 12) | def err(s: str) -> None: FILE: benchmark/third_party/DeepSpeed/setup.py function abort (line 46) | def abort(msg): function fetch_requirements (line 51) | def fetch_requirements(path): function command_exists (line 123) | def command_exists(cmd): function op_envvar (line 132) | def op_envvar(op_name): function op_enabled (line 138) | def op_enabled(op_name): function create_dir_symlink (line 185) | def create_dir_symlink(src, dest): FILE: benchmark/third_party/DeepSpeed/tests/benchmarks/flatten_bench.py function py (line 47) | def py(): function cpp (line 52) | def cpp(): function apex (line 57) | def apex(): function cprofileme (line 67) | def cprofileme(): function timeme (line 88) | def timeme(): function line_profileme (line 107) | def line_profileme(): FILE: benchmark/third_party/DeepSpeed/tests/benchmarks/unflatten_bench.py function py (line 56) | def py(): function cpp (line 61) | def cpp(): function apex (line 66) | def apex(): function cprofileme (line 76) | def cprofileme(): function timeme (line 97) | def timeme(): function line_profileme (line 116) | def line_profileme(): FILE: benchmark/third_party/DeepSpeed/tests/conftest.py function pytest_addoption (line 19) | def pytest_addoption(parser): function validate_version (line 24) | def validate_version(expected, found): function check_environment (line 31) | def check_environment(pytestconfig): function pytest_runtest_call (line 55) | def pytest_runtest_call(item): function pytest_fixture_setup (line 64) | def pytest_fixture_setup(fixturedef, request): FILE: benchmark/third_party/DeepSpeed/tests/lightning/test_simple.py class RandomDataset (line 7) | class RandomDataset(Dataset): method __init__ (line 8) | def __init__(self, size, length): method __getitem__ (line 12) | def __getitem__(self, index): method __len__ (line 15) | def __len__(self): class BoringModel (line 19) | class BoringModel(LightningModule): method __init__ (line 20) | def __init__(self): method forward (line 24) | def forward(self, x): method training_step (line 27) | def training_step(self, batch, batch_idx): method validation_step (line 32) | def validation_step(self, batch, batch_idx): method test_step (line 36) | def test_step(self, batch, batch_idx): method configure_optimizers (line 40) | def configure_optimizers(self): method train_dataloader (line 43) | def train_dataloader(self): method val_dataloader (line 46) | def val_dataloader(self): function test_lightning_model (line 50) | def test_lightning_model(): FILE: benchmark/third_party/DeepSpeed/tests/model/BingBertSquad/BingBertSquad_run_func_test.py function grep_loss_from_file (line 11) | def grep_loss_from_file(file_name): class BingBertSquadFuncTestCase (line 30) | class BingBertSquadFuncTestCase(BaseTestCase): method __init__ (line 31) | def __init__(self, methodName="DeepSpeed function test on BingBertSqua... method setUp (line 34) | def setUp(self): method tearDown (line 40) | def tearDown(self): method test_gpu4_fp16 (line 43) | def test_gpu4_fp16(self): method test_gpu4_fp16_zero2 (line 56) | def test_gpu4_fp16_zero2(self): method test_gpu1_fp16 (line 69) | def test_gpu1_fp16(self): method test_gpu4_fp32 (line 82) | def test_gpu4_fp32(self): method test_gpu1_fp32 (line 95) | def test_gpu1_fp32(self): method run_test (line 108) | def run_test(self, test_config, r_tol): method has_loss_data (line 137) | def has_loss_data(self, file_name): method check_parity (line 146) | def check_parity(self, base_file, test_file, r_tol): function suite (line 161) | def suite(): FILE: benchmark/third_party/DeepSpeed/tests/model/BingBertSquad/BingBertSquad_test_common.py class BaseTestCase (line 10) | class BaseTestCase(unittest.TestCase): method __init__ (line 11) | def __init__(self, methodName="DeepSpeed performance test"): method gen_output_name (line 17) | def gen_output_name(self, test_config, prefix): method ensure_directory_exists (line 37) | def ensure_directory_exists(self, filename): method clean_test_env (line 42) | def clean_test_env(self): method run_BingBertSquad_test (line 48) | def run_BingBertSquad_test(self, test_config, output): FILE: benchmark/third_party/DeepSpeed/tests/model/BingBertSquad/test_e2e_squad.py function create_config_file (line 25) | def create_config_file(tmpdir, zeroenabled=False): function test_e2e_squad_deepspeed_base (line 51) | def test_e2e_squad_deepspeed_base(tmpdir): function test_e2e_squad_deepspeed_zero (line 98) | def test_e2e_squad_deepspeed_zero(tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/model/Megatron_GPT2/run_checkpoint_test.py function remove_file (line 16) | def remove_file(test_id, filename): function grep_loss_from_file (line 22) | def grep_loss_from_file(file_name): class GPT2CheckpointTestCase (line 41) | class GPT2CheckpointTestCase(BaseTestCase): method __init__ (line 42) | def __init__(self, methodName="DeepSpeed function test on GPT2 model"): method setUp (line 45) | def setUp(self): method tearDown (line 51) | def tearDown(self): method test_mp2_gpu4_node1_with_zero1 (line 54) | def test_mp2_gpu4_node1_with_zero1(self): method test_mp2_gpu4_node1_with_zero2 (line 76) | def test_mp2_gpu4_node1_with_zero2(self): method test_mp2_gpu4_node1_with_zero2_offload (line 98) | def test_mp2_gpu4_node1_with_zero2_offload(self): method test_mp1_gpu2_load_gpu1_node1_with_zero1 (line 121) | def test_mp1_gpu2_load_gpu1_node1_with_zero1(self): method test_mp1_gpu2_load_gpu4_node1_with_zero1 (line 144) | def test_mp1_gpu2_load_gpu4_node1_with_zero1(self): method test_mp1_gpu2_load_gpu1_node1_with_zero2 (line 167) | def test_mp1_gpu2_load_gpu1_node1_with_zero2(self): method test_mp1_gpu2_load_gpu1_node1_with_zero2_offload (line 190) | def test_mp1_gpu2_load_gpu1_node1_with_zero2_offload(self): method test_mp1_gpu2_load_gpu4_node1_with_zero2 (line 214) | def test_mp1_gpu2_load_gpu4_node1_with_zero2(self): method test_mp1_gpu2_load_gpu4_node1_with_zero2_offload (line 237) | def test_mp1_gpu2_load_gpu4_node1_with_zero2_offload(self): method test_mp2_gpu4_load_gpu2_node1_with_zero1 (line 261) | def test_mp2_gpu4_load_gpu2_node1_with_zero1(self): method test_mp2_gpu2_load_gpu4_node1_with_zero1 (line 284) | def test_mp2_gpu2_load_gpu4_node1_with_zero1(self): method test_mp2_gpu4_load_gpu2_node1_with_zero2 (line 307) | def test_mp2_gpu4_load_gpu2_node1_with_zero2(self): method test_mp2_gpu4_load_gpu2_node1_with_zero2_offload (line 330) | def test_mp2_gpu4_load_gpu2_node1_with_zero2_offload(self): method test_mp2_gpu2_load_gpu4_node1_with_zero2 (line 354) | def test_mp2_gpu2_load_gpu4_node1_with_zero2(self): method test_mp2_gpu2_load_gpu4_node1_with_zero2_offload (line 377) | def test_mp2_gpu2_load_gpu4_node1_with_zero2_offload(self): method test_mp2_gpu4_node1_without_zero (line 401) | def test_mp2_gpu4_node1_without_zero(self): method gen_name (line 423) | def gen_name(self, test_config, prefix): method run_test (line 430) | def run_test(self, test_config, r_tol): method has_loss_data (line 512) | def has_loss_data(self, file_name): method check_parity (line 521) | def check_parity(self, base_file, test_file, r_tol): function checkpoint_suite (line 536) | def checkpoint_suite(): FILE: benchmark/third_party/DeepSpeed/tests/model/Megatron_GPT2/run_func_test.py function grep_loss_from_file (line 17) | def grep_loss_from_file(file_name): class GPT2FuncTestCase (line 36) | class GPT2FuncTestCase(BaseTestCase): method __init__ (line 37) | def __init__(self, methodName="DeepSpeed function test on GPT2 model"): method setUp (line 40) | def setUp(self): method tearDown (line 46) | def tearDown(self): method test_mp1_gpu2_node1_fp16 (line 49) | def test_mp1_gpu2_node1_fp16(self): method test_mp1_gpu1_node1_zero1 (line 67) | def test_mp1_gpu1_node1_zero1(self): method test_mp1_gpu2_node1_zero1 (line 85) | def test_mp1_gpu2_node1_zero1(self): method test_mp2_gpu4_node1_zero1 (line 103) | def test_mp2_gpu4_node1_zero1(self): method test_mp4_gpu4_node1_zero1 (line 121) | def test_mp4_gpu4_node1_zero1(self): method test_mp1_gpu1_node1_zero2 (line 139) | def test_mp1_gpu1_node1_zero2(self): method test_mp1_gpu2_node1_zero2 (line 157) | def test_mp1_gpu2_node1_zero2(self): method test_mp2_gpu4_node1_zero2 (line 175) | def test_mp2_gpu4_node1_zero2(self): method test_mp4_gpu4_node1_zero2 (line 198) | def test_mp4_gpu4_node1_zero2(self): method test_mp1_gpu1_node1_zero2_ds_offload (line 221) | def test_mp1_gpu1_node1_zero2_ds_offload(self): method test_mp1_gpu2_node1_zero2_ds_offload (line 239) | def test_mp1_gpu2_node1_zero2_ds_offload(self): method test_mp2_gpu4_node1_zero2_gas (line 257) | def test_mp2_gpu4_node1_zero2_gas(self): method test_mp2_gpu4_node1_zero2_ds_offload (line 279) | def test_mp2_gpu4_node1_zero2_ds_offload(self): method test_mp4_gpu4_node1_zero2_ds_offload (line 303) | def test_mp4_gpu4_node1_zero2_ds_offload(self): method test_mp1_gpu1_node1_zero2_torch_offload (line 327) | def test_mp1_gpu1_node1_zero2_torch_offload(self): method test_mp1_gpu2_node1_zero2_torch_offload (line 347) | def test_mp1_gpu2_node1_zero2_torch_offload(self): method test_mp2_gpu4_node1_zero2_torch_offload (line 367) | def test_mp2_gpu4_node1_zero2_torch_offload(self): method test_mp4_gpu4_node1_zero2_torch_offload (line 392) | def test_mp4_gpu4_node1_zero2_torch_offload(self): method test_optimizer_scheduler (line 416) | def test_optimizer_scheduler(self): method run_partition_activations_test (line 435) | def run_partition_activations_test(self, test_config, r_tol): method run_test (line 481) | def run_test(self, test_config, r_tol): method has_loss_data (line 527) | def has_loss_data(self, file_name): method check_parity (line 536) | def check_parity(self, base_file, test_file, r_tol): method gen_cpu_optimizer_flag (line 550) | def gen_cpu_optimizer_flag(self, test_config, is_baseline): function suite (line 565) | def suite(): FILE: benchmark/third_party/DeepSpeed/tests/model/Megatron_GPT2/run_perf_baseline.py class GPT2PerfBaselineTestCase (line 10) | class GPT2PerfBaselineTestCase(BaseTestCase): method __init__ (line 11) | def __init__(self, methodName="DeepSpeed performance test on GPT2 mode... method test_perf_1_5B (line 14) | def test_perf_1_5B(self): method test_perf_4B (line 30) | def test_perf_4B(self): method test_perf_8B (line 46) | def test_perf_8B(self): method test_perf_20B (line 62) | def test_perf_20B(self): method run_test (line 79) | def run_test(self, test_config): method grep_latency_from_file (line 95) | def grep_latency_from_file(self, file_name): function suite (line 118) | def suite(): FILE: benchmark/third_party/DeepSpeed/tests/model/Megatron_GPT2/run_perf_test.py class GPT2PerfTestCase (line 10) | class GPT2PerfTestCase(BaseTestCase): method __init__ (line 11) | def __init__(self, methodName="DeepSpeed performance test on GPT2 mode... method test_perf_1_5B (line 14) | def test_perf_1_5B(self): method test_perf_4B (line 31) | def test_perf_4B(self): method test_perf_8B (line 48) | def test_perf_8B(self): method test_perf_20B (line 65) | def test_perf_20B(self): method run_test (line 83) | def run_test(self, test_config): method grep_latency_from_file (line 99) | def grep_latency_from_file(self, file_name): function suite (line 122) | def suite(): FILE: benchmark/third_party/DeepSpeed/tests/model/Megatron_GPT2/test_common.py class BaseTestCase (line 10) | class BaseTestCase(unittest.TestCase): method __init__ (line 11) | def __init__(self, methodName="DeepSpeed performance test"): method gen_output_name (line 17) | def gen_output_name(self, test_config, prefix, baseline_config=False): method ensure_directory_exists (line 56) | def ensure_directory_exists(self, filename): method clean_test_env (line 61) | def clean_test_env(self): method run_gpt2_test (line 67) | def run_gpt2_test(self, test_config, output): FILE: benchmark/third_party/DeepSpeed/tests/model/run_sanity_check.py function pytest_hack (line 16) | def pytest_hack(runner_result): function test_megatron (line 29) | def test_megatron(): function test_megatron_checkpoint (line 34) | def test_megatron_checkpoint(): function test_squad (line 39) | def test_squad(): FILE: benchmark/third_party/DeepSpeed/tests/onebit/test_mpi_backend.py function torch_sim (line 22) | def torch_sim(a): FILE: benchmark/third_party/DeepSpeed/tests/onebit/test_nccl_backend.py function torch_sim (line 28) | def torch_sim(a): FILE: benchmark/third_party/DeepSpeed/tests/small_model_debugging/stage3_test.py class VerboseLinear (line 10) | class VerboseLinear(torch.nn.Linear): method __init__ (line 11) | def __init__(self, **kwargs): class LinearStack (line 17) | class LinearStack(torch.nn.Module): method __init__ (line 18) | def __init__(self, input_dim=2, hidden_dim=4, output_dim=4, num_layers... method forward (line 35) | def forward(self, x): function test_driver (line 49) | def test_driver(): FILE: benchmark/third_party/DeepSpeed/tests/small_model_debugging/test.py function see_memory_usage (line 6) | def see_memory_usage(message): FILE: benchmark/third_party/DeepSpeed/tests/small_model_debugging/test_model.py class SimpleModel (line 10) | class SimpleModel(torch.nn.Module): method __init__ (line 11) | def __init__(self, hidden_dim, empty_grad=False): method forward (line 18) | def forward(self, x, y): function create_config_from_dict (line 24) | def create_config_from_dict(tmpdir, config_dict): function get_data_loader (line 31) | def get_data_loader(model, total_samples, hidden_dim, device): function get_args (line 45) | def get_args(tmpdir, config_dict): function print0 (line 59) | def print0(msg): function print_params (line 98) | def print_params(tag, model): FILE: benchmark/third_party/DeepSpeed/tests/unit/alexnet_model.py class AlexNet (line 11) | class AlexNet(nn.Module): method __init__ (line 12) | def __init__(self, num_classes=10): method forward (line 51) | def forward(self, x, y): class AlexNetPipe (line 58) | class AlexNetPipe(AlexNet): method to_layers (line 59) | def to_layers(self): class AlexNetPipeSpec (line 64) | class AlexNetPipeSpec(PipelineModule): method __init__ (line 65) | def __init__(self, num_classes=10, **kwargs): function cast_to_half (line 89) | def cast_to_half(x): function cifar_trainset (line 93) | def cifar_trainset(fp16=False): function train_cifar (line 126) | def train_cifar(model, FILE: benchmark/third_party/DeepSpeed/tests/unit/autotuning/test_autotuning.py function test_command_line (line 12) | def test_command_line(): function test_resource_manager_arg_mappings (line 43) | def test_resource_manager_arg_mappings(arg_mappings): function test_autotuner_resources (line 65) | def test_autotuner_resources(tmpdir, active_resources): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/common.py function compare_deepspeed_states (line 14) | def compare_deepspeed_states(saved_model, loaded_model): function compare_model_states (line 23) | def compare_model_states(saved_model, function compare_state_dicts (line 74) | def compare_state_dicts(state0, state1, expected_mismatch_keys=[]): function compare_optimizer_states (line 86) | def compare_optimizer_states(saved_model, loaded_model, hidden_dim, fp16... function compare_lr_scheduler_states (line 95) | def compare_lr_scheduler_states(saved_model, loaded_model): function create_moe_param_groups (line 119) | def create_moe_param_groups(model): function create_deepspeed_model (line 126) | def create_deepspeed_model(config_dict, model, base_optimizer): function checkpoint_correctness_verification (line 134) | def checkpoint_correctness_verification(config_dict, FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_latest_checkpoint.py class TestLatestCheckpoint (line 9) | class TestLatestCheckpoint(DistributedTest): method test_existing_latest (line 12) | def test_existing_latest(self, tmpdir): method test_missing_latest (line 34) | def test_missing_latest(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_lr_scheduler.py class TestLRSchedulerCheckpoint (line 25) | class TestLRSchedulerCheckpoint(DistributedTest): method test_checkpoint_lr_scheduler (line 28) | def test_checkpoint_lr_scheduler(self, tmpdir, zero_stage, use_cpu_off... method test_checkpoint_no_lr_scheduler (line 78) | def test_checkpoint_no_lr_scheduler(self, tmpdir, zero_stage, use_cpu_... FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_moe_checkpoint.py class TestMoECheckpoint (line 12) | class TestMoECheckpoint(DistributedTest): method test_checkpoint_moe (line 16) | def test_checkpoint_moe(self, tmpdir, ep_size): method test_checkpoint_moe_and_zero (line 55) | def test_checkpoint_moe_and_zero(self, tmpdir, ep_size, load_optim_sta... FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_other_optimizer.py class TestOtherOptimizerCheckpoint (line 12) | class TestOtherOptimizerCheckpoint(DistributedTest): method test_checkpoint_unfused_optimizer (line 17) | def test_checkpoint_unfused_optimizer(self, tmpdir): method test_checkpoint_fused_optimizer (line 67) | def test_checkpoint_fused_optimizer(self, tmpdir): method test_checkpoint_fp32_optimizer (line 104) | def test_checkpoint_fp32_optimizer(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_pipeline.py class TestPipelineCheckpoint (line 10) | class TestPipelineCheckpoint(DistributedTest): method test_checkpoint_pipe_engine (line 14) | def test_checkpoint_pipe_engine(self, zero_stage, tmpdir): method test_checkpoint_pipe_module (line 75) | def test_checkpoint_pipe_module(self, base_topo, test_topo, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_reshape_checkpoint.py function _do_reshape (line 4) | def _do_reshape(src_3d, tgt_3d): function test_reshape_222_to_111 (line 17) | def test_reshape_222_to_111(): function test_reshape_222_to_121 (line 26) | def test_reshape_222_to_121(): function test_reshape_222_to_122 (line 36) | def test_reshape_222_to_122(): function test_reshape_222_to_211 (line 48) | def test_reshape_222_to_211(): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_sparse.py class TestSparseCheckpoint (line 9) | class TestSparseCheckpoint(DistributedTest): method test_non_strict_load_sparse (line 32) | def test_non_strict_load_sparse(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_tag_validation.py class TestCheckpointValidationTag (line 9) | class TestCheckpointValidationTag(DistributedTest): method test_checkpoint_unique_tag (line 13) | def test_checkpoint_unique_tag(self, tmpdir, valid_mode): method test_checkpoint_unknown_tag_validation (line 39) | def test_checkpoint_unknown_tag_validation(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/checkpoint/test_zero_optimizer.py class TestZeROCheckpoint (line 13) | class TestZeROCheckpoint(DistributedTest): method test_load_optimizer_state (line 32) | def test_load_optimizer_state(self, method test_not_load_optimizer_state (line 93) | def test_not_load_optimizer_state(self, method test_hybrid_optimizer_state (line 139) | def test_hybrid_optimizer_state(self, tmpdir, zero_stage): method test_load_module_only (line 165) | def test_load_module_only(self, tmpdir, zero_stage): class ws4_model_checkpoint (line 194) | class ws4_model_checkpoint(DistributedFixture): method run (line 197) | def run(self, class_tmpdir, elastic_save, load_optim): class TestZeROElasticCheckpoint (line 237) | class TestZeROElasticCheckpoint(DistributedTest): method test_elastic_checkpoint_fixed_dp (line 240) | def test_elastic_checkpoint_fixed_dp(self, method test_elastic_checkpoint_change_dp (line 307) | def test_elastic_checkpoint_change_dp(self, class TestZeROSaveLoadEdgeCase (line 341) | class TestZeROSaveLoadEdgeCase(DistributedTest): method test_immediate_save_load (line 345) | def test_immediate_save_load(self, tmpdir, zero_stage): method test_load_immediate_save (line 372) | def test_load_immediate_save(self, tmpdir, zero_stage): method test_save_before_accum_grad_is_done (line 416) | def test_save_before_accum_grad_is_done(self, tmpdir, zero_stage): FILE: benchmark/third_party/DeepSpeed/tests/unit/comm/test_dist.py class TestInit (line 12) | class TestInit(DistributedTest): method test (line 15) | def test(self): function greeting (line 23) | def greeting(request): class TestDistArgs (line 28) | class TestDistArgs(DistributedTest): method test (line 32) | def test(self, number, color, shape, greeting): class TestGroupedDistTest (line 43) | class TestGroupedDistTest(DistributedTest): method test_one (line 46) | def test_one(self, number): method test_two (line 50) | def test_two(self, number, color="purple"): class TestWorldSizeOverrideDistTest (line 57) | class TestWorldSizeOverrideDistTest(DistributedTest): method test_world_size_2 (line 60) | def test_world_size_2(self): method test_world_size_1 (line 64) | def test_world_size_1(self): function val1 (line 70) | def val1(request): function val2 (line 75) | def val2(request): class distributed_fixture (line 79) | class distributed_fixture(DistributedFixture): method run (line 82) | def run(self, class_tmpdir, val1, val2): class TestDistributedFixture (line 90) | class TestDistributedFixture(DistributedTest): method test (line 93) | def test(self, distributed_fixture, class_tmpdir, val1, val2): class TestDistAllReduce (line 102) | class TestDistAllReduce(DistributedTest): method test (line 105) | def test(self): class TestDistInit (line 114) | class TestDistInit(DistributedTest): method test_already_init (line 117) | def test_already_init(self, dist_init_required): method test_no_init (line 121) | def test_no_init(self, dist_init_required): class TestDistInitNoEnv (line 130) | class TestDistInitNoEnv(DistributedTest): method test (line 135) | def test(self): class TestDistInitWithModel (line 146) | class TestDistInitWithModel(DistributedTest): method test_already_init (line 149) | def test_already_init(self, dist_init_required): method test_no_init (line 166) | def test_no_init(self, dist_init_required): FILE: benchmark/third_party/DeepSpeed/tests/unit/common.py function get_xdist_worker_id (line 21) | def get_xdist_worker_id(): function get_master_port (line 29) | def get_master_port(): function set_cuda_visibile (line 37) | def set_cuda_visibile(): class DistributedExec (line 66) | class DistributedExec(ABC): method run (line 77) | def run(self): method __call__ (line 80) | def __call__(self, request=None): method _get_fixture_kwargs (line 89) | def _get_fixture_kwargs(self, request, func): method _launch_procs (line 103) | def _launch_procs(self, num_procs): method _dist_init (line 143) | def _dist_init(self, local_rank, num_procs, skip_msg): class DistributedFixture (line 180) | class DistributedFixture(DistributedExec): method __init__ (line 236) | def __init__(self): class DistributedTest (line 244) | class DistributedTest(DistributedExec): method class_tmpdir (line 293) | def class_tmpdir(self, tmpdir_factory): method run (line 297) | def run(self, **fixture_kwargs): method __call__ (line 300) | def __call__(self, request): method _get_current_test_func (line 318) | def _get_current_test_func(self, request): function get_test_path (line 324) | def get_test_path(filename): FILE: benchmark/third_party/DeepSpeed/tests/unit/compression/test_compression.py function reset_random (line 19) | def reset_random(seed=1234): function create_bert_model (line 26) | def create_bert_model(): class Conv1D (line 64) | class Conv1D(torch.nn.Module): method __init__ (line 72) | def __init__(self, nf, nx): method forward (line 79) | def forward(self, x): function create_conv1d_model (line 86) | def create_conv1d_model(): class TestCompression (line 93) | class TestCompression: method setup_method (line 94) | def setup_method(self, method): method get_ds_config (line 97) | def get_ds_config(self): method test_linear_layer_compress (line 215) | def test_linear_layer_compress(self, tmpdir): method test_mpu_compress (line 226) | def test_mpu_compress(self, tmpdir): method test_conv1d_convertion (line 254) | def test_conv1d_convertion(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/elasticity/test_elastic.py function ds_config (line 10) | def ds_config(): function test_basic_10k (line 28) | def test_basic_10k(ds_config): function test_old_version (line 48) | def test_old_version(ds_config): function test_disabled (line 55) | def test_disabled(ds_config): function test_valid_world_size (line 63) | def test_valid_world_size(ds_config): function test_invalid_world_size (line 71) | def test_invalid_world_size(ds_config): function test_future_elastic_version (line 79) | def test_future_elastic_version(ds_config): function test_missing_max_batch (line 86) | def test_missing_max_batch(ds_config): function test_missing_micro_batch (line 93) | def test_missing_micro_batch(ds_config): function test_empty_config (line 100) | def test_empty_config(): function test_model_parallel_v1_invalid (line 107) | def test_model_parallel_v1_invalid(ds_config): function test_model_parallel_v2_invalid (line 117) | def test_model_parallel_v2_invalid(ds_config): function test_model_parallel_v2_valid (line 128) | def test_model_parallel_v2_valid(ds_config): function test_invalid_config_values (line 160) | def test_invalid_config_values(key, value, ds_config): function test_proper_mbsz (line 167) | def test_proper_mbsz(ds_config): class TestNonElasticBatchParams (line 178) | class TestNonElasticBatchParams(DistributedTest): method test (line 181) | def test(self): class TestNonElasticBatchParamsWithOverride (line 215) | class TestNonElasticBatchParamsWithOverride(DistributedTest): method test (line 218) | def test(self): class TestElasticConfigChanged (line 251) | class TestElasticConfigChanged(DistributedTest): method test (line 254) | def test(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/inference/test_checkpoint_sharding.py function check_dtype (line 10) | def check_dtype(model, expected_dtype): function model_name (line 33) | def model_name(request): function dtype (line 38) | def dtype(request): class save_shard (line 42) | class save_shard(DistributedFixture): method run (line 45) | def run(self, model_name, class_tmpdir): class TestCheckpointShard (line 68) | class TestCheckpointShard(DistributedTest): method test (line 71) | def test(self, model_name, dtype, class_tmpdir, save_shard): FILE: benchmark/third_party/DeepSpeed/tests/unit/inference/test_inference.py function _valid_model_task (line 70) | def _valid_model_task(model_task): function model_w_task (line 83) | def model_w_task(request): function dtype (line 88) | def dtype(request): function enable_cuda_graph (line 93) | def enable_cuda_graph(request): function invalid_model_task_config (line 103) | def invalid_model_task_config(model_w_task, dtype, enable_cuda_graph): function query (line 138) | def query(model_w_task): function inf_kwargs (line 163) | def inf_kwargs(model_w_task): function fill_mask_assert (line 174) | def fill_mask_assert(x, y): function question_answering_assert (line 178) | def question_answering_assert(x, y): function text_classification_assert (line 182) | def text_classification_assert(x, y): function token_classification_assert (line 186) | def token_classification_assert(x, y): function text_generation_assert (line 190) | def text_generation_assert(x, y): function text2text_generation_assert (line 195) | def text2text_generation_assert(x, y): function assert_fn (line 201) | def assert_fn(model_w_task): class TestModelTask (line 223) | class TestModelTask(DistributedTest): method test (line 226) | def test( class TestMPSize (line 303) | class TestMPSize(DistributedTest): method test (line 306) | def test( class TestInjectionPolicy (line 362) | class TestInjectionPolicy(DistributedTest): method test (line 365) | def test( class TestLMCorrectness (line 414) | class TestLMCorrectness(DistributedTest): method test (line 417) | def test(self, model_family, model_name, task): FILE: benchmark/third_party/DeepSpeed/tests/unit/inference/test_inference_config.py class TestInferenceConfig (line 9) | class TestInferenceConfig(DistributedTest): method test_overlap_kwargs (line 12) | def test_overlap_kwargs(self): method test_overlap_kwargs_conflict (line 19) | def test_overlap_kwargs_conflict(self): method test_kwargs_and_config (line 26) | def test_kwargs_and_config(self): method test_json_config (line 34) | def test_json_config(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/inference/test_model_profiling.py function query (line 11) | def query(model, task): function inf_kwargs (line 24) | def inf_kwargs(task): class TestModelProfiling (line 47) | class TestModelProfiling(DistributedTest): method test (line 50) | def test(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/launcher/test_ds_arguments.py function basic_parser (line 6) | def basic_parser(): function test_no_ds_arguments_no_ds_parser (line 12) | def test_no_ds_arguments_no_ds_parser(): function test_no_ds_arguments (line 24) | def test_no_ds_arguments(): function test_no_ds_enable_argument (line 40) | def test_no_ds_enable_argument(): function test_no_ds_config_argument (line 57) | def test_no_ds_config_argument(): function test_no_ds_parser (line 74) | def test_no_ds_parser(): function test_core_deepscale_arguments (line 80) | def test_core_deepscale_arguments(): FILE: benchmark/third_party/DeepSpeed/tests/unit/launcher/test_multinode_runner.py function runner_info (line 9) | def runner_info(): function test_pdsh_runner (line 17) | def test_pdsh_runner(runner_info): function test_openmpi_runner (line 25) | def test_openmpi_runner(runner_info): function test_slurm_runner (line 32) | def test_slurm_runner(runner_info): function test_mvapich_runner (line 39) | def test_mvapich_runner(runner_info): FILE: benchmark/third_party/DeepSpeed/tests/unit/launcher/test_run.py function test_parser_mutual_exclusive (line 6) | def test_parser_mutual_exclusive(): function test_parser_local (line 14) | def test_parser_local(): function test_parser_multinode (line 51) | def test_parser_multinode(): function test_parser_errors (line 70) | def test_parser_errors(): function test_num_plus_parser (line 91) | def test_num_plus_parser(): FILE: benchmark/third_party/DeepSpeed/tests/unit/megatron_model.py function get_megatron_version (line 10) | def get_megatron_version(): function get_gpt2_model (line 18) | def get_gpt2_model(args_others, mp_size=1): class MockGPT2ModelPipe (line 52) | class MockGPT2ModelPipe(PipelineModule): method __init__ (line 53) | def __init__(self, num_layers, mp_size, args_others, topo, **kwargs): method gpt2_attention_mask_func (line 97) | def gpt2_attention_mask_func(self, attention_scores, ltor_mask): method init_method_normal (line 101) | def init_method_normal(self, sigma): method scaled_init_method_normal (line 108) | def scaled_init_method_normal(self, sigma, num_layers): FILE: benchmark/third_party/DeepSpeed/tests/unit/model_parallelism/test_configurable_parallel_mp.py function get_deepspeed_model (line 18) | def get_deepspeed_model(model): class ConfigurableMP (line 37) | class ConfigurableMP(DistributedTest): method reset_random (line 39) | def reset_random(self, seed=1234): method inputs (line 46) | def inputs(self, bs=1, seq_len=20): class TestConfigurableMP (line 57) | class TestConfigurableMP(ConfigurableMP): method test_gpt2_basic (line 59) | def test_gpt2_basic(self, tmpdir, inputs): method test_gpt2_mp2_no_resize (line 87) | def test_gpt2_mp2_no_resize(self, tmpdir, inputs): class baseline_mp2 (line 117) | class baseline_mp2(DistributedFixture): method run (line 120) | def run(self, inputs, class_tmpdir): class TestConfigurableResizeMP (line 144) | class TestConfigurableResizeMP(ConfigurableMP): method test (line 147) | def test(self, baseline_mp2, inputs, class_tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/model_parallelism/test_configurable_parallel_pp.py function get_deepspeed_model (line 20) | def get_deepspeed_model(model): function get_topology (line 37) | def get_topology(mp, pp, world_size): class ConfigurablePP (line 47) | class ConfigurablePP(DistributedTest): method reset_random (line 49) | def reset_random(self, seed=1234): method inputs (line 56) | def inputs(self, bs=1, seq_len=1, hidden_size=128): class TestConfigurablePP (line 66) | class TestConfigurablePP(ConfigurablePP): method test_pp_basic (line 71) | def test_pp_basic(self, inputs, tmpdir): class _baseline (line 128) | class _baseline(DistributedFixture): method run (line 131) | def run(self, inputs, class_tmpdir, mp_size, pp_size): class baseline_ws1 (line 176) | class baseline_ws1(_baseline): class baseline_ws2 (line 180) | class baseline_ws2(_baseline): class baseline_ws4 (line 184) | class baseline_ws4(_baseline): class TestConfigurableResizePP (line 188) | class TestConfigurableResizePP(ConfigurablePP): method _test (line 189) | def _test(self, inputs, class_tmpdir, mp_size, pp_size, mp_resize, pp_... method test_world_size_2to1 (line 233) | def test_world_size_2to1(self, method test_world_size_4to1 (line 245) | def test_world_size_4to1(self, method test_world_size_4to2 (line 257) | def test_world_size_4to2(self, method test_world_size_1to4 (line 269) | def test_world_size_1to4(self, method test_world_size_2to4 (line 289) | def test_world_size_2to4(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/modeling.py function load_tf_weights_in_bert (line 70) | def load_tf_weights_in_bert(model, tf_checkpoint_path): function f_gelu (line 147) | def f_gelu(x): function bias_gelu (line 154) | def bias_gelu(bias, y): function bias_tanh (line 161) | def bias_tanh(bias, y): function gelu (line 168) | def gelu(x): function swish (line 177) | def swish(x): class GPUTimer (line 184) | class GPUTimer: method __init__ (line 185) | def __init__(self): method record (line 190) | def record(self): method elapsed (line 193) | def elapsed(self): class LinearActivation (line 199) | class LinearActivation(Module): method __init__ (line 204) | def __init__(self, method reset_parameters (line 234) | def reset_parameters(self): method forward (line 241) | def forward(self, input): method extra_repr (line 257) | def extra_repr(self): class BertConfig (line 264) | class BertConfig(object): method __init__ (line 267) | def __init__(self, method from_dict (line 329) | def from_dict(cls, json_object): method from_json_file (line 337) | def from_json_file(cls, json_file): method __repr__ (line 343) | def __repr__(self): method to_dict (line 346) | def to_dict(self): method to_json_string (line 351) | def to_json_string(self): class BertLayerNorm (line 367) | class BertLayerNorm(nn.Module): method __init__ (line 368) | def __init__(self, hidden_size, eps=1e-12): method forward (line 376) | def forward(self, x): class BertEmbeddings (line 383) | class BertEmbeddings(nn.Module): method __init__ (line 386) | def __init__(self, config): method forward (line 399) | def forward(self, input_ids, token_type_ids=None): class BertSelfAttention (line 418) | class BertSelfAttention(nn.Module): method __init__ (line 419) | def __init__(self, i, config, weights, biases): method transpose_for_scores (line 452) | def transpose_for_scores(self, x): method transpose_key_for_scores (line 458) | def transpose_key_for_scores(self, x): method forward (line 464) | def forward(self, hidden_states, attention_mask, grads=None): class BertSelfOutput (line 495) | class BertSelfOutput(nn.Module): method __init__ (line 496) | def __init__(self, config, weights, biases): method forward (line 504) | def forward(self, hidden_states, input_tensor): method get_w (line 510) | def get_w(self): class BertAttention (line 514) | class BertAttention(nn.Module): method __init__ (line 515) | def __init__(self, i, config, weights, biases): method forward (line 520) | def forward(self, input_tensor, attention_mask): method get_w (line 525) | def get_w(self): class BertIntermediate (line 529) | class BertIntermediate(nn.Module): method __init__ (line 530) | def __init__(self, config, weights, biases): method forward (line 538) | def forward(self, hidden_states): class BertOutput (line 543) | class BertOutput(nn.Module): method __init__ (line 544) | def __init__(self, config, weights, biases): method forward (line 552) | def forward(self, hidden_states, input_tensor): class BertLayer (line 559) | class BertLayer(nn.Module): method __init__ (line 560) | def __init__(self, i, config, weights, biases): method forward (line 568) | def forward(self, hidden_states, attention_mask, grads, collect_all_gr... method get_w (line 605) | def get_w(self): class BertEncoder (line 609) | class BertEncoder(nn.Module): method __init__ (line 610) | def __init__(self, config, weights, biases): method get_grads (line 624) | def get_grads(self): method get_modules (line 637) | def get_modules(self, big_node, input): method forward (line 642) | def forward(self, class BertPooler (line 708) | class BertPooler(nn.Module): method __init__ (line 709) | def __init__(self, config): method forward (line 715) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 723) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 724) | def __init__(self, config): method forward (line 731) | def forward(self, hidden_states): class BertLMPredictionHead (line 737) | class BertLMPredictionHead(nn.Module): method __init__ (line 738) | def __init__(self, config, bert_model_embedding_weights): method forward (line 750) | def forward(self, hidden_states): class BertOnlyMLMHead (line 761) | class BertOnlyMLMHead(nn.Module): method __init__ (line 762) | def __init__(self, config, bert_model_embedding_weights): method forward (line 766) | def forward(self, sequence_output): class BertOnlyNSPHead (line 771) | class BertOnlyNSPHead(nn.Module): method __init__ (line 772) | def __init__(self, config): method forward (line 776) | def forward(self, pooled_output): class BertPreTrainingHeads (line 781) | class BertPreTrainingHeads(nn.Module): method __init__ (line 782) | def __init__(self, config, bert_model_embedding_weights): method forward (line 787) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 793) | class BertPreTrainedModel(nn.Module): method __init__ (line 797) | def __init__(self, config, *inputs, **kwargs): method init_bert_weights (line 808) | def init_bert_weights(self, module): method from_pretrained (line 822) | def from_pretrained(cls, class BertModel (line 952) | class BertModel(BertPreTrainedModel): method __init__ (line 996) | def __init__(self, config): method forward (line 1003) | def forward(self, class BertForPreTraining (line 1043) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 1093) | def __init__(self, config, args): method log_summary_writer (line 1105) | def log_summary_writer(self, logs: dict, base='Train'): method forward (line 1114) | def forward(self, batch, log=True): class BertForMaskedLM (line 1144) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1186) | def __init__(self, config): method forward (line 1192) | def forward(self, class BertForNextSentencePrediction (line 1212) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1255) | def __init__(self, config): method forward (line 1261) | def forward(self, class BertForSequenceClassification (line 1281) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1326) | def __init__(self, config, num_labels): method forward (line 1334) | def forward(self, class BertForMultipleChoice (line 1352) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1396) | def __init__(self, config, num_choices): method forward (line 1404) | def forward(self, class BertForTokenClassification (line 1426) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1471) | def __init__(self, config, num_labels): method forward (line 1479) | def forward(self, class BertForQuestionAnswering (line 1504) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1551) | def __init__(self, config): method forward (line 1559) | def forward(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/modelingpreln.py function load_tf_weights_in_bert (line 70) | def load_tf_weights_in_bert(model, tf_checkpoint_path): function f_gelu (line 147) | def f_gelu(x): function bias_gelu (line 154) | def bias_gelu(bias, y): function bias_tanh (line 161) | def bias_tanh(bias, y): function gelu (line 168) | def gelu(x): function swish (line 177) | def swish(x): class GPUTimer (line 184) | class GPUTimer: method __init__ (line 185) | def __init__(self): method record (line 190) | def record(self): method elapsed (line 193) | def elapsed(self): class LinearActivation (line 199) | class LinearActivation(Module): method __init__ (line 204) | def __init__(self, method reset_parameters (line 234) | def reset_parameters(self): method forward (line 241) | def forward(self, input): method extra_repr (line 257) | def extra_repr(self): class BertConfig (line 264) | class BertConfig(object): method __init__ (line 267) | def __init__(self, method from_dict (line 329) | def from_dict(cls, json_object): method from_json_file (line 337) | def from_json_file(cls, json_file): method __repr__ (line 343) | def __repr__(self): method to_dict (line 346) | def to_dict(self): method to_json_string (line 351) | def to_json_string(self): class BertLayerNorm (line 367) | class BertLayerNorm(nn.Module): method __init__ (line 368) | def __init__(self, hidden_size, eps=1e-12): method forward (line 376) | def forward(self, x): class BertEmbeddings (line 391) | class BertEmbeddings(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 407) | def forward(self, input_ids, token_type_ids=None): class BertSelfAttention (line 426) | class BertSelfAttention(nn.Module): method __init__ (line 427) | def __init__(self, i, config, weights, biases): method transpose_for_scores (line 460) | def transpose_for_scores(self, x): method transpose_key_for_scores (line 466) | def transpose_key_for_scores(self, x): method forward (line 472) | def forward(self, hidden_states, attention_mask, grads=None): class BertSelfOutput (line 560) | class BertSelfOutput(nn.Module): method __init__ (line 561) | def __init__(self, config, weights, biases): method forward (line 569) | def forward(self, hidden_states, input_tensor): method get_w (line 583) | def get_w(self): class BertAttention (line 587) | class BertAttention(nn.Module): method __init__ (line 588) | def __init__(self, i, config, weights, biases): method forward (line 593) | def forward(self, input_tensor, attention_mask): method get_w (line 598) | def get_w(self): class BertIntermediate (line 602) | class BertIntermediate(nn.Module): method __init__ (line 603) | def __init__(self, config, weights, biases): method forward (line 611) | def forward(self, hidden_states): class BertOutput (line 616) | class BertOutput(nn.Module): method __init__ (line 617) | def __init__(self, config, weights, biases): method forward (line 625) | def forward(self, hidden_states, input_tensor): class BertLayer (line 642) | class BertLayer(nn.Module): method __init__ (line 643) | def __init__(self, i, config, weights, biases): method forward (line 653) | def forward(self, hidden_states, attention_mask, grads, collect_all_gr... method get_w (line 699) | def get_w(self): class BertEncoder (line 703) | class BertEncoder(nn.Module): method __init__ (line 704) | def __init__(self, config, weights, biases): method get_grads (line 718) | def get_grads(self): method get_modules (line 731) | def get_modules(self, big_node, input): method forward (line 736) | def forward(self, class BertPooler (line 803) | class BertPooler(nn.Module): method __init__ (line 804) | def __init__(self, config): method forward (line 810) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 818) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 819) | def __init__(self, config): method forward (line 826) | def forward(self, hidden_states): class BertLMPredictionHead (line 832) | class BertLMPredictionHead(nn.Module): method __init__ (line 833) | def __init__(self, config, bert_model_embedding_weights): method forward (line 845) | def forward(self, hidden_states): class BertOnlyMLMHead (line 856) | class BertOnlyMLMHead(nn.Module): method __init__ (line 857) | def __init__(self, config, bert_model_embedding_weights): method forward (line 861) | def forward(self, sequence_output): class BertOnlyNSPHead (line 866) | class BertOnlyNSPHead(nn.Module): method __init__ (line 867) | def __init__(self, config): method forward (line 871) | def forward(self, pooled_output): class BertPreTrainingHeads (line 876) | class BertPreTrainingHeads(nn.Module): method __init__ (line 877) | def __init__(self, config, bert_model_embedding_weights): method forward (line 882) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 888) | class BertPreTrainedModel(nn.Module): method __init__ (line 892) | def __init__(self, config, *inputs, **kwargs): method init_bert_weights (line 903) | def init_bert_weights(self, module): method from_pretrained (line 917) | def from_pretrained(cls, class BertModel (line 1047) | class BertModel(BertPreTrainedModel): method __init__ (line 1091) | def __init__(self, config): method forward (line 1098) | def forward(self, class BertForPreTraining (line 1138) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 1188) | def __init__(self, config, args): method log_summary_writer (line 1200) | def log_summary_writer(self, logs: dict, base='Train'): method forward (line 1209) | def forward(self, batch, log=True): class BertForMaskedLM (line 1239) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1281) | def __init__(self, config): method forward (line 1287) | def forward(self, class BertForNextSentencePrediction (line 1307) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1350) | def __init__(self, config): method forward (line 1356) | def forward(self, class BertForSequenceClassification (line 1376) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1421) | def __init__(self, config, num_labels): method forward (line 1429) | def forward(self, class BertForMultipleChoice (line 1447) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1491) | def __init__(self, config, num_choices): method forward (line 1499) | def forward(self, class BertForTokenClassification (line 1521) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1566) | def __init__(self, config, num_labels): method forward (line 1574) | def forward(self, class BertForQuestionAnswering (line 1599) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1646) | def __init__(self, config): method forward (line 1654) | def forward(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/moe/test_moe.py class TestMoE (line 11) | class TestMoE(DistributedTest): method test (line 14) | def test(self, ep_size, use_residual): class TestPRMoE (line 49) | class TestPRMoE(DistributedTest): method test (line 52) | def test(self, ep_size, use_residual): FILE: benchmark/third_party/DeepSpeed/tests/unit/moe/test_moe_tp.py class MPU (line 9) | class MPU(): method __init__ (line 10) | def __init__(self, tp_world_size): method get_model_parallel_rank (line 27) | def get_model_parallel_rank(self): method get_model_parallel_world_size (line 30) | def get_model_parallel_world_size(self): method get_data_parallel_rank (line 33) | def get_data_parallel_rank(self): method get_data_parallel_world_size (line 36) | def get_data_parallel_world_size(self): method get_data_parallel_group (line 39) | def get_data_parallel_group(self): method get_model_parallel_group (line 42) | def get_model_parallel_group(self): class TestMOETensorParallel (line 49) | class TestMOETensorParallel(DistributedTest): method test (line 52) | def test(self, ep_size, tp_size, enable_expert_tp, use_residual): FILE: benchmark/third_party/DeepSpeed/tests/unit/monitor/test_monitor.py class TestTensorBoard (line 11) | class TestTensorBoard(DistributedTest): method test_tensorboard (line 14) | def test_tensorboard(self): method test_empty_tensorboard (line 29) | def test_empty_tensorboard(self): class TestWandB (line 38) | class TestWandB(DistributedTest): method test_wandb (line 41) | def test_wandb(self): method test_empty_wandb (line 58) | def test_empty_wandb(self): class TestCSVMonitor (line 68) | class TestCSVMonitor(DistributedTest): method test_csv_monitor (line 71) | def test_csv_monitor(self): method test_empty_csv_monitor (line 86) | def test_empty_csv_monitor(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/multi_output_model.py class MultiOutputModel (line 4) | class MultiOutputModel(torch.nn.Module): method __init__ (line 5) | def __init__(self, hidden_dim, weight_value): method forward (line 11) | def forward(self, inputs, targets): function multi_output_dataloader (line 20) | def multi_output_dataloader(model, total_samples, hidden_dim, device, in... FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/adagrad/test_cpu_adagrad.py function check_equal (line 13) | def check_equal(first, second, atol=1e-2, verbose=False): function test_cpu_adagrad_opt (line 33) | def test_cpu_adagrad_opt(model_size): function test_cpu_adagrad_opt_sparse_embedding (line 61) | def test_cpu_adagrad_opt_sparse_embedding(model_size, vocabulary_size, d... function test_cpu_adam_gpu_error (line 128) | def test_cpu_adam_gpu_error(): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/adam/test_adamw.py class TestAdamConfigs (line 32) | class TestAdamConfigs(DistributedTest): method test (line 35) | def test(self, FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/adam/test_cpu_adam.py function check_equal (line 16) | def check_equal(first, second, atol=1e-2, verbose=False): function test_cpu_adam_opt (line 37) | def test_cpu_adam_opt(dtype, model_size): function test_cpu_adam_gpu_error (line 78) | def test_cpu_adam_gpu_error(): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/aio/test_aio.py function _do_ref_write (line 20) | def _do_ref_write(tmpdir, index=0): function _get_test_file_and_buffer (line 30) | def _get_test_file_and_buffer(tmpdir, ref_buffer, cuda_device, index=0): function _validate_handle_state (line 41) | def _validate_handle_state(handle, single_submit, overlap_events): class TestRead (line 51) | class TestRead(DistributedTest): method test_parallel_read (line 54) | def test_parallel_read(self, tmpdir, single_submit, overlap_events): method test_async_read (line 74) | def test_async_read(self, tmpdir, single_submit, overlap_events, cuda_... class TestWrite (line 105) | class TestWrite(DistributedTest): method test_parallel_write (line 108) | def test_parallel_write(self, tmpdir, single_submit, overlap_events): method test_async_write (line 129) | def test_async_write(self, tmpdir, single_submit, overlap_events, cuda... class TestAsyncQueue (line 154) | class TestAsyncQueue(DistributedTest): method test_read (line 158) | def test_read(self, tmpdir, async_queue, cuda_device): method test_write (line 195) | def test_write(self, tmpdir, async_queue, cuda_device): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/cuda/test_cuda_backward.py function check_equal (line 18) | def check_equal(first, second, atol=1e-2, verbose=False): function zero_grad (line 79) | def zero_grad(variables): class DSEncoder (line 89) | class DSEncoder(nn.Module): method __init__ (line 90) | def __init__(self, config, weights, biases): method forward (line 102) | def forward(self, method get_grads (line 149) | def get_grads(self): function create_models (line 153) | def create_models(ds_config): function set_seed (line 216) | def set_seed(seed): function run_backward (line 222) | def run_backward(ds_config, seq_len, atol=1e-2, verbose=False): function test_backward (line 276) | def test_backward(batch_size, FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/cuda/test_cuda_forward.py function check_equal (line 13) | def check_equal(first, second, atol=1e-2, verbose=False): function zero_grad (line 26) | def zero_grad(variables): class DSEncoder (line 36) | class DSEncoder(nn.Module): method __init__ (line 37) | def __init__(self, config, weights, biases): method forward (line 49) | def forward(self, function create_models (line 91) | def create_models(ds_config): function set_seed (line 156) | def set_seed(seed): function run_forward (line 162) | def run_forward(ds_config, seq_len, atol=1e-2, verbose=False, test_bsz=N... function test_forward (line 230) | def test_forward(batch_size, function test_forward_with_small_bsz (line 265) | def test_forward_with_small_bsz(batch_size, function test_forward_stochastic (line 300) | def test_forward_stochastic(batch_size, FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/quantizer/test_dequantize.py function int4x2to2xint4 (line 12) | def int4x2to2xint4(int4X2tensor): function run_quantize (line 18) | def run_quantize(data, num_groups, q_bits, is_symmetric_quant): function run_dequantize (line 30) | def run_dequantize(quantized_data, params, num_groups, q_bits, is_symmet... function run_ref_dequantize (line 43) | def run_ref_dequantize(quantized_data, params, num_groups, q_bits, is_sy... function test_dequantize (line 73) | def test_dequantize(num_elems, num_groups, is_symmetric_quant, q_bits): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/quantizer/test_fake_quantization.py function allclose (line 8) | def allclose(x, y): function quantize_dequantize_ref (line 14) | def quantize_dequantize_ref(inputs, bit, num_groups=1): function run_quant_dequant (line 29) | def run_quant_dequant(inputs, groups, bits): function test_fake_quant_dequant (line 43) | def test_fake_quant_dequant(tensor_shape, groups): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/quantizer/test_quantize.py function run_quantize_ds (line 12) | def run_quantize_ds(activations, num_groups, q_bits, is_symmetric_quant): function get_q_props (line 25) | def get_q_props(q_bits): function get_scale_zero_point (line 35) | def get_scale_zero_point(q_bits, function int4x2to2xint4 (line 60) | def int4x2to2xint4(int4X2tensor): function run_float_quantize (line 66) | def run_float_quantize(q_bits, is_symmetric_quant, activations_ref, num_... function test_float_quantize (line 118) | def test_float_quantize(num_elems, function run_integer_quantize_ds (line 162) | def run_integer_quantize_ds(activations, num_groups, q_bits): function run_integer_quantize (line 173) | def run_integer_quantize(q_bits, activations_ref, num_groups): function test_integer_quantize (line 205) | def test_integer_quantize(num_elems, num_groups, q_bits): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/sparse_attention/test_sparse_attention.py function dense_to_sparse (line 16) | def dense_to_sparse(w, mask, block): function sparse_to_dense (line 29) | def sparse_to_dense(w, mask, block, zero=0): function allclose (line 43) | def allclose(x, y): function make_layout (line 49) | def make_layout(rho, shape): function run_softmax_reference (line 56) | def run_softmax_reference(x, scale, dx, kp_mask, attn_mask, layout, block): function run_softmax_sparse (line 72) | def run_softmax_sparse(x, scale, dx, kp_mask, attn_mask, layout, block): function init_softmax_inputs (line 91) | def init_softmax_inputs(Z, H, M, N, scale, rho, block, dtype, dense_x=Tr... function _skip_on_cuda_compatability (line 124) | def _skip_on_cuda_compatability(): function test_softmax (line 138) | def test_softmax(block, width, dtype): function run_matmul_reference (line 153) | def run_matmul_reference(x, w, mode, trans_a, trans_b, layout, block, dy): function run_matmul_sparse (line 173) | def run_matmul_sparse(x, w, mode, trans_a, trans_b, layout, block, dy): function init_matmul_inputs (line 189) | def init_matmul_inputs(Z, H, M, N, K, rho, mode, trans_a, trans_b, block... function test_matmul (line 233) | def test_matmul(block, dtype, mode, trans_a, trans_b): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/spatial/test_nhwc_bias_add.py function allclose (line 10) | def allclose(x, y): function ref_bias_add (line 16) | def ref_bias_add(activations, bias): function test_bias_add (line 42) | def test_bias_add(batch, image_size, channels): function ref_bias_add_add (line 57) | def ref_bias_add_add(activations, bias, other): function test_bias_add_add (line 65) | def test_bias_add_add(batch, image_size, channels): function ref_bias_add_bias_add (line 86) | def ref_bias_add_bias_add(activations, bias, other, other_bias): function test_bias_add_bias_add (line 100) | def test_bias_add_bias_add(batch, image_size, channels): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_bias_add.py function allclose (line 14) | def allclose(x, y): function run_bias_add_reference (line 20) | def run_bias_add_reference(activations, bias): function run_bias_add_ds (line 24) | def run_bias_add_ds(activations, bias): function test_bias_add (line 39) | def test_bias_add(batch, sequence, channels, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_bias_geglu.py function allclose (line 18) | def allclose(x, y): function run_bias_geglu_reference (line 24) | def run_bias_geglu_reference(activations, bias): function run_bias_geglu_ds (line 33) | def run_bias_geglu_ds(activation, bias): function test_bias_geglu (line 45) | def test_bias_geglu(batch, sequence, channels, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_bias_gelu.py function allclose (line 18) | def allclose(x, y): function version_appropriate_gelu (line 24) | def version_appropriate_gelu(activations): function run_bias_gelu_reference (line 35) | def run_bias_gelu_reference(activations, bias): function run_bias_gelu_ds (line 41) | def run_bias_gelu_ds(activations, bias): function test_bias_gelu (line 56) | def test_bias_gelu(batch, sequence, channels, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_bias_relu.py function allclose (line 18) | def allclose(x, y): function run_bias_relu_reference (line 24) | def run_bias_relu_reference(activations, bias): function run_bias_relu_ds (line 30) | def run_bias_relu_ds(activations, bias): function test_bias_relu (line 45) | def test_bias_relu(batch, sequence, channels, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_layer_norm.py function allclose (line 17) | def allclose(x, y): function ref_implementation (line 23) | def ref_implementation(vals, gamma, beta, espilon, channels, dtype): function ds_implementation (line 34) | def ds_implementation(vals, gamma, beta, epsilon): function test_layer_norm (line 46) | def test_layer_norm(batch, seq_len, channels, dtype): function residual_ref_implementation (line 62) | def residual_ref_implementation(vals, bias, res, gamma, beta, espilon, c... function residual_ds_implementation (line 75) | def residual_ds_implementation(vals, bias, res, gamma, beta, epsilon): function test_layer_norm_residual (line 87) | def test_layer_norm_residual(batch, seq_len, channels, dtype): function residual_store_ref_implementation (line 116) | def residual_store_ref_implementation(vals, function residual_store_ds_implementation (line 138) | def residual_store_ds_implementation(vals, bias, res, gamma, beta, epsil... function test_layer_norm_residual_store (line 155) | def test_layer_norm_residual_store(batch, seq_len, channels, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_moe_res_matmult.py function allclose (line 17) | def allclose(x, y): function run_moe_res_matmul_reference (line 23) | def run_moe_res_matmul_reference(residual, coef1, coef2, output): function run_moe_res_matmul_ds (line 27) | def run_moe_res_matmul_ds(residual, coef, output): function test_moe_residual_matmul (line 39) | def test_moe_residual_matmul(hidden_dim, c, dtype): FILE: benchmark/third_party/DeepSpeed/tests/unit/ops/transformer/inference/test_residual_add.py function allclose (line 15) | def allclose(x, y): function inference_module (line 22) | def inference_module(): function res_add_bias_ref (line 26) | def res_add_bias_ref(hidden_state, function res_add_bias_ref_gptj (line 40) | def res_add_bias_ref_gptj(hidden_state, function run_residual_add_reference (line 53) | def run_residual_add_reference(hidden_state, function test_residual_add (line 89) | def test_residual_add(inference_module, FILE: benchmark/third_party/DeepSpeed/tests/unit/pipe/test_pipe_module.py function sequential_model (line 20) | def sequential_model(): function simple_config (line 31) | def simple_config(): function batch_input (line 54) | def batch_input(): class TestPipeModuleSequential (line 58) | class TestPipeModuleSequential(DistributedTest): method test (line 61) | def test(self, sequential_model, simple_config, batch_input): FILE: benchmark/third_party/DeepSpeed/tests/unit/profiling/flops_profiler/test_flops_profiler.py function within_range (line 15) | def within_range(val, target, tolerance): class TestFlopsProfilerInDSTraining (line 22) | class TestFlopsProfilerInDSTraining(DistributedTest): method test (line 25) | def test(self): class LeNet5 (line 69) | class LeNet5(torch.nn.Module): method __init__ (line 70) | def __init__(self, n_classes): method forward (line 101) | def forward(self, x): function test_flops_profiler_in_inference (line 109) | def test_flops_profiler_in_inference(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py function _compute (line 12) | def _compute(module, *inputs, do_checkpoint=False): function _prep_inputs (line 33) | def _prep_inputs(*inputs): function _match_outputs (line 45) | def _match_outputs(ref, tgt): function _test_activation_checkpoint (line 58) | def _test_activation_checkpoint(module, *inputs): function _test_activation_checkpoint_ordering (line 78) | def _test_activation_checkpoint_ordering(module, expected_ordering, *inp... class MaskedLinear (line 105) | class MaskedLinear(torch.nn.Linear): method forward (line 106) | def forward(self, x, mask): class MaskedLinearSeq (line 116) | class MaskedLinearSeq(MaskedLinear): method forward (line 118) | def forward(self, x, mask): class MaskedLinearSeqDup (line 122) | class MaskedLinearSeqDup(MaskedLinearSeq): method forward (line 124) | def forward(self, x, mask): class DropMaskLinear (line 130) | class DropMaskLinear(torch.nn.Linear): method forward (line 131) | def forward(self, x, mask): class LinearNonTensorInput (line 135) | class LinearNonTensorInput(torch.nn.Linear): method forward (line 136) | def forward(self, x, non_tensor_input): class LinearNonTensorOutput (line 140) | class LinearNonTensorOutput(torch.nn.Linear): method __init__ (line 141) | def __init__(self, non_tensor_output): method forward (line 145) | def forward(self, x): function _mixed_mask (line 153) | def _mixed_mask(size=HIDDEN_DIM): function _bool_to_float (line 160) | def _bool_to_float(btensor, dtype=torch.float32): class TestActivationCheckpoint (line 178) | class TestActivationCheckpoint(DistributedTest): method test_ckpt_inputs1_outputs1 (line 181) | def test_ckpt_inputs1_outputs1(self, mask): method test_ckpt_inputs2_outputs1 (line 187) | def test_ckpt_inputs2_outputs1(self, mask): method test_ckpt_inputs2_outputs2 (line 193) | def test_ckpt_inputs2_outputs2(self, mask): method test_ckpt_inputs2_outputs3 (line 199) | def test_ckpt_inputs2_outputs3(self, mask): method test_ckpt_arg_none (line 205) | def test_ckpt_arg_none(self, mask): class TestCheckpointNonTensor (line 222) | class TestCheckpointNonTensor(DistributedTest): method test_ckpt_non_tensor_input (line 225) | def test_ckpt_non_tensor_input(self, non_tensor): method test_ckpt_non_tensor_output (line 231) | def test_ckpt_non_tensor_output(self, non_tensor): class TestCheckpointNonTensorOutputOrdering (line 250) | class TestCheckpointNonTensorOutputOrdering(DistributedTest): method test_ckpt_non_tensor_output_ordering (line 253) | def test_ckpt_non_tensor_output_ordering(self, non_tensor_output): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/comm/test_coalesced_collectives.py class TestReduceScatterCoalesced (line 10) | class TestReduceScatterCoalesced(DistributedTest): method test_single_input (line 13) | def test_single_input(self): method test_two_inputs (line 25) | def test_two_inputs(self): class TestReduceScatterCoalescedTensorSmallerThanWorldSize (line 50) | class TestReduceScatterCoalescedTensorSmallerThanWorldSize(DistributedTe... method test (line 53) | def test(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/half_precision/onebit/test_onebit.py class TestOneBitAdamBasic (line 35) | class TestOneBitAdamBasic(DistributedTest): method test (line 38) | def test(self, dtype): class TestOneBitAdamExpAvgMask (line 78) | class TestOneBitAdamExpAvgMask(DistributedTest): method test (line 81) | def test(self): class TestOneBitAdamCheckpointing (line 145) | class TestOneBitAdamCheckpointing(DistributedTest): method test (line 148) | def test(self, tmpdir): method test_overflow (line 304) | def test_overflow(self, tmpdir): class TestOneBitAdamFP16Pipeline (line 364) | class TestOneBitAdamFP16Pipeline(DistributedTest): method test (line 367) | def test(self, topo_config): class TestZeroOneAdamBasic (line 420) | class TestZeroOneAdamBasic(DistributedTest): method test (line 423) | def test(self, dtype): class TestZeroOneAdamExpAvgMask (line 466) | class TestZeroOneAdamExpAvgMask(DistributedTest): method test (line 469) | def test(self): class TestZeroOneAdamCheckpointing (line 536) | class TestZeroOneAdamCheckpointing(DistributedTest): method test (line 539) | def test(self, tmpdir): method test_overflow (line 694) | def test_overflow(self, tmpdir): class TestZeroOneAdamFP16Pipeline (line 757) | class TestZeroOneAdamFP16Pipeline(DistributedTest): method test (line 760) | def test(self, topo_config): class TestOneBitLambBasic (line 816) | class TestOneBitLambBasic(DistributedTest): method test (line 819) | def test(self, dtype): class TestOneBitLampExpAvgMask (line 865) | class TestOneBitLampExpAvgMask(DistributedTest): method test (line 868) | def test(self): class TestOneBitLambCheckpointing (line 937) | class TestOneBitLambCheckpointing(DistributedTest): method test (line 940) | def test(self, tmpdir): method test_overflow (line 1115) | def test_overflow(self, tmpdir): class TestOneBitLambFP16Pipeline (line 1181) | class TestOneBitLambFP16Pipeline(DistributedTest): method test (line 1184) | def test(self, topo_config): class TestCompressedAllReduceBasic (line 1237) | class TestCompressedAllReduceBasic(DistributedTest): method test (line 1240) | def test(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/half_precision/test_bf16.py class TestAdamBF16ZeroOneCycleCompatibility (line 12) | class TestAdamBF16ZeroOneCycleCompatibility(DistributedTest): method test (line 15) | def test(self, zero_stage=2, use_cpu_offload=False): class TestZeroAllowUntestedOptimizer (line 74) | class TestZeroAllowUntestedOptimizer(DistributedTest): method test (line 77) | def test(self, zero_stage=2, use_cpu_offload=False): class TestZeroEmptyPartition (line 112) | class TestZeroEmptyPartition(DistributedTest): method test (line 115) | def test(self, zero_stage=2, use_cpu_offload=False): class TestZeroSupportedClientOptimizer (line 172) | class TestZeroSupportedClientOptimizer(DistributedTest): method test (line 175) | def test(self, optimizer_constructor, zero_stage=2): class TestZero2ReduceScatterOff (line 203) | class TestZero2ReduceScatterOff(DistributedTest): method test (line 206) | def test(self): class TestZeroEmptyGrad (line 254) | class TestZeroEmptyGrad(DistributedTest): method test (line 257) | def test(self, stage=2): class TestZeroDtypeCocktail (line 306) | class TestZeroDtypeCocktail(DistributedTest): method test (line 309) | def test(self, comp_type, comm_type): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/half_precision/test_dynamic_loss_scale.py function run_model_step (line 8) | def run_model_step(model, gradient_list): class TestFused (line 16) | class TestFused(DistributedTest): method test_no_overflow (line 19) | def test_no_overflow(self): method test_all_overflow (line 56) | def test_all_overflow(self): method test_some_overflow (line 91) | def test_some_overflow(self): class TestUnfused (line 147) | class TestUnfused(DistributedTest): method test_no_overflow (line 150) | def test_no_overflow(self): method test_all_overflow (line 186) | def test_all_overflow(self): method test_some_overflow (line 224) | def test_some_overflow(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/half_precision/test_fp16.py class TestLambFP32GradClip (line 20) | class TestLambFP32GradClip(DistributedTest): method test (line 23) | def test(self): class TestLambFP16 (line 52) | class TestLambFP16(DistributedTest): method test__basic (line 55) | def test__basic(self): method test_empty_grad (line 85) | def test_empty_grad(self): class TestAdamFP32EmptyGrad (line 116) | class TestAdamFP32EmptyGrad(DistributedTest): method test (line 119) | def test(self): class TestAdamwFP16Basic (line 151) | class TestAdamwFP16Basic(DistributedTest): method test (line 154) | def test(self): class TestFP16OptimizerForMoE (line 179) | class TestFP16OptimizerForMoE(DistributedTest): method test_unfused_gradnorm (line 182) | def test_unfused_gradnorm(self, monkeypatch): method test_fused_gradnorm (line 223) | def test_fused_gradnorm(self, monkeypatch): method test_lamb_gradnorm (line 266) | def test_lamb_gradnorm(self, monkeypatch, fused_lamb_legacy: bool): class TestAdamwFP16EmptyGrad (line 314) | class TestAdamwFP16EmptyGrad(DistributedTest): method test (line 317) | def test(self): class TestAdamFP16ZeroOneCycleCompatibility (line 344) | class TestAdamFP16ZeroOneCycleCompatibility(DistributedTest): method test (line 347) | def test(self, zero_stage, use_cpu_offload): class TestZeroStaticScale (line 401) | class TestZeroStaticScale(DistributedTest): method test (line 404) | def test(self, zero_stage, use_cpu_offload, hidden_dim): class TestZeroAllowUntestedOptimizer (line 449) | class TestZeroAllowUntestedOptimizer(DistributedTest): method test (line 452) | def test(self, zero_stage, use_cpu_offload): class TestZeroEmptyPartition (line 481) | class TestZeroEmptyPartition(DistributedTest): method test (line 484) | def test(self, zero_stage, use_cpu_offload): class TestAmp (line 532) | class TestAmp(DistributedTest): method test_adam_basic (line 535) | def test_adam_basic(self): method test_lamb_basic (line 559) | def test_lamb_basic(self): method test_adam_O2 (line 589) | def test_adam_O2(self): method test_adam_O2_empty_grad (line 620) | def test_adam_O2_empty_grad(tmpdir): class TestZeroSupportedClientOptimizer (line 654) | class TestZeroSupportedClientOptimizer(DistributedTest): method test (line 657) | def test(self, zero_stage, optimizer_constructor): class TestZero2ReduceScatterOff (line 677) | class TestZero2ReduceScatterOff(DistributedTest): method test (line 680) | def test(self): class TestFP16AdamTypes (line 721) | class TestFP16AdamTypes(DistributedTest): method test (line 724) | def test(self, adam_type, torch_impl): class TestZero3LazyScatter (line 758) | class TestZero3LazyScatter(DistributedTest): method test (line 761) | def test(self): class TestZeroEmptyGrad (line 798) | class TestZeroEmptyGrad(DistributedTest): method test (line 801) | def test(self, stage): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/pipe/test_pipe.py function rel_diff (line 14) | def rel_diff(A, B): class TestPipeCifar10 (line 33) | class TestPipeCifar10(DistributedTest): method test (line 36) | def test(self, topo_config): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/pipe/test_pipe_schedule.py function _count_type (line 5) | def _count_type(cmds, classtype): function test_pipe_inference_schedule_singlestage (line 9) | def test_pipe_inference_schedule_singlestage(): function test_pipe_train_schedule_singlestage (line 21) | def test_pipe_train_schedule_singlestage(): function test_pipe_inference_schedule_firststage (line 38) | def test_pipe_inference_schedule_firststage(micro_batches, stages=3): function test_pipe_inference_schedule_midstage (line 73) | def test_pipe_inference_schedule_midstage(micro_batches, stages=3): function test_pipe_inference_schedule_laststage (line 99) | def test_pipe_inference_schedule_laststage(micro_batches, stages=3): function test_pipe_schedule_firststage (line 115) | def test_pipe_schedule_firststage(): function test_pipe_schedule_laststage (line 125) | def test_pipe_schedule_laststage(): function test_pipe_stagequery (line 133) | def test_pipe_stagequery(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/pipe/test_topology.py function test_topology_2d (line 13) | def test_topology_2d(): function test_topology_dims (line 29) | def test_topology_dims(): function test_topology_match (line 37) | def test_topology_match(): function test_topology_rank_repr (line 44) | def test_topology_rank_repr(): function test_topology_3d (line 83) | def test_topology_3d(): function test_topology_comm_list (line 119) | def test_topology_comm_list(): class TestDistributedTopology (line 160) | class TestDistributedTopology(DistributedTest): method test_grid_pipe_data (line 163) | def test_grid_pipe_data(self): method test_stage_to_global (line 187) | def test_stage_to_global(self): function test_primes (line 207) | def test_primes(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/sparse_tensor/test_averaging_sparse_gradients.py class Model (line 6) | class Model(torch.nn.Module): method __init__ (line 7) | def __init__(self): method forward (line 12) | def forward(self, x, offsets): class Adam (line 16) | class Adam(torch.optim.Optimizer): method __init__ (line 17) | def __init__(self, dense_params, sparse_params): method step (line 23) | def step(self, closure=None): function get_model_optimizer (line 32) | def get_model_optimizer(): function get_data (line 39) | def get_data(device): class TestSparseAdam (line 46) | class TestSparseAdam(DistributedTest): method test (line 49) | def test(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/sparse_tensor/test_csr.py function test_csr_addition_self (line 6) | def test_csr_addition_self(): function test_csr_addition_different (line 25) | def test_csr_addition_different(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/sparse_tensor/test_sparse_grads.py class Model (line 8) | class Model(torch.nn.Module): method __init__ (line 9) | def __init__(self): method forward (line 14) | def forward(self, x, offsets): class Adam (line 18) | class Adam(torch.optim.Optimizer): method __init__ (line 19) | def __init__(self, dense_params, sparse_params): method step (line 25) | def step(self, closure=None): class TestSparseAdam (line 34) | class TestSparseAdam(DistributedTest): method test (line 37) | def test(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_autocast.py function test_missing_amp_autocast (line 7) | def test_missing_amp_autocast(tmpdir, half_op): function test_disable_autocast_linear (line 21) | def test_disable_autocast_linear(tmpdir, half_op): function test_autocast_linear (line 46) | def test_autocast_linear(tmpdir, half_input, half_weight): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_curriculum_learning.py class TestCurriculumScheduler (line 6) | class TestCurriculumScheduler(DistributedTest): method test_fixed_discrete (line 9) | def test_fixed_discrete(self): method test_fixed_linear (line 65) | def test_fixed_linear(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_data.py function test_repeating_loader (line 9) | def test_repeating_loader(): class TestDataLoaderDropLast (line 28) | class TestDataLoaderDropLast(DistributedTest): method test (line 31) | def test(self, train_batch_size, drop_last): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_ds_config_dict.py function base_config (line 19) | def base_config(): function test_cuda (line 35) | def test_cuda(): function test_check_version (line 39) | def test_check_version(): function _run_batch_config (line 48) | def _run_batch_config(ds_config, train_batch=None, micro_batch=None, gas... function _batch_assert (line 60) | def _batch_assert(status, ds_config, batch, micro_batch, gas, success): class TestBatchConfig (line 79) | class TestBatchConfig(DistributedTest): method test (line 82) | def test(self, num_ranks, batch, micro_batch, gas, success): function test_temp_config_json (line 126) | def test_temp_config_json(tmpdir): function test_gather_16bit_params_on_model_save (line 140) | def test_gather_16bit_params_on_model_save(gather_weights_key): function test_get_bfloat16_enabled (line 150) | def test_get_bfloat16_enabled(bf16_key): class TestDeprecatedDeepScaleConfig (line 159) | class TestDeprecatedDeepScaleConfig(DistributedTest): method test (line 162) | def test(self, base_config, tmpdir): class TestDistInit (line 186) | class TestDistInit(DistributedTest): method test (line 189) | def test(self, base_config): class TestInitNoOptimizer (line 207) | class TestInitNoOptimizer(DistributedTest): method test (line 210) | def test(self, base_config): class TestArgs (line 229) | class TestArgs(DistributedTest): method test_none_args (line 232) | def test_none_args(self, base_config): method test_no_args (line 242) | def test_no_args(self, base_config): class TestNoModel (line 253) | class TestNoModel(DistributedTest): method test (line 256) | def test(self, base_config): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_ds_config_model.py class SimpleConf (line 10) | class SimpleConf(DeepSpeedConfigModel): function test_only_required_fields (line 20) | def test_only_required_fields(tmpdir): function test_config_duplicate_key (line 35) | def test_config_duplicate_key(tmpdir): function test_config_base (line 51) | def test_config_base(): function test_config_base_deprecatedfield (line 56) | def test_config_base_deprecatedfield(): function test_config_base_aliasfield (line 61) | def test_config_base_aliasfield(): function test_config_base_literalfail (line 79) | def test_config_base_literalfail(config_dict): function test_config_base_deprecatedfail (line 84) | def test_config_base_deprecatedfail(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_ds_initialize.py class TestNoOptim (line 19) | class TestNoOptim(DistributedTest): method test (line 22) | def test(self, zero_stage): class TestClientOptimizer (line 58) | class TestClientOptimizer(DistributedTest): method test (line 61) | def test(self, optimizer_type): class TestConfigOptimizer (line 90) | class TestConfigOptimizer(DistributedTest): method test (line 93) | def test(self, client_parameters): class TestOptimizerImplementation (line 122) | class TestOptimizerImplementation(DistributedTest): method test (line 125) | def test(self, optimizer_extension, model_dtype, grad_accum_dtype): class TestClientLrScheduler (line 204) | class TestClientLrScheduler(DistributedTest): method test (line 207) | def test(self, scheduler_type, optimizer_type): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_lr_schedulers.py function _verify_continuous_decrease (line 13) | def _verify_continuous_decrease(values): function _verify_continuous_increase (line 18) | def _verify_continuous_increase(values): function _verify_staircase_increase (line 23) | def _verify_staircase_increase(values, step_size): class TestGetLrBeforeTrain (line 45) | class TestGetLrBeforeTrain(DistributedTest): method test (line 48) | def test(self, scheduler_type, params): class TestLrSchedule (line 85) | class TestLrSchedule(DistributedTest): method test_lr_warmup_schedule (line 88) | def test_lr_warmup_schedule(self, warmup_num_steps, warmup_type): method test_lr_warmup_decay_schedule (line 141) | def test_lr_warmup_decay_schedule(self, warmup_num_steps, warmup_type): class TestSchedulerOptimizerParity (line 219) | class TestSchedulerOptimizerParity(DistributedTest): method test (line 222) | def test(self, scheduler_type, params): class TestLrRange (line 264) | class TestLrRange(DistributedTest): method test (line 267) | def test(self, min_lr, step_rate, step_size, staircase): class TestOneCycle (line 319) | class TestOneCycle(DistributedTest): method test_lr (line 330) | def test_lr(self, min_lr, max_lr, decay_rate, cycle_step_size, decay_s... method test_mom (line 395) | def test_mom(self, min_mom, max_mom, decay_rate, step_size): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_multi_output_model.py class TestTwoOutputModel (line 8) | class TestTwoOutputModel(DistributedTest): method test (line 11) | def test(self, tmpdir): class TestThreeOutputModel (line 70) | class TestThreeOutputModel(DistributedTest): method test (line 73) | def test(self, tmpdir): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_pld.py function test_pld_schedule (line 11) | def test_pld_schedule(tmpdir, theta): class TestPLDModel (line 23) | class TestPLDModel(DistributedTest): method test_pld_model (line 26) | def test_pld_model(self, theta): class TestNonPLDModel (line 68) | class TestNonPLDModel(DistributedTest): method test_non_pld_model (line 71) | def test_non_pld_model(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/test_runtime_utils.py function test_call_to_str (line 12) | def test_call_to_str(): class TestClibGradNorm (line 23) | class TestClibGradNorm(DistributedTest): method test (line 26) | def test(self): class TestCheckOverflow (line 50) | class TestCheckOverflow(DistributedTest): method test (line 53) | def test(self, check_using_norm): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/utils/test_partition.py class TestPartitionedTensor (line 14) | class TestPartitionedTensor(DistributedTest): method test (line 17) | def test(self): class TestPartitionedTensorMeta (line 37) | class TestPartitionedTensorMeta(DistributedTest): method test (line 40) | def test(self): function assert_valid_partition (line 57) | def assert_valid_partition(weights, parts, P): function get_partition_weights (line 66) | def get_partition_weights(weights, parts): function test_prefix_sum (line 77) | def test_prefix_sum(): function test_valid_partition (line 83) | def test_valid_partition(): function test_short_partition_uniform (line 91) | def test_short_partition_uniform(): function test_short_partition (line 99) | def test_short_partition(): function test_easy_balance_uniform (line 107) | def test_easy_balance_uniform(): function test_easy_balance_balanced (line 116) | def test_easy_balance_balanced(): function test_int_balanced (line 125) | def test_int_balanced(): function test_float_balanced (line 136) | def test_float_balanced(): function test_float_lastheavy (line 145) | def test_float_lastheavy(): function test_float_midheavy (line 153) | def test_float_midheavy(): function test_balance_bert (line 161) | def test_balance_bert(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/zero/test_ignore_unused_parameters.py class TestStage2IgnoreUnusedParameters (line 10) | class TestStage2IgnoreUnusedParameters(DistributedTest): method test (line 13) | def test(self, ignore_unused_parameters): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/zero/test_zero.py function run_unbalanced_gradients (line 21) | def run_unbalanced_gradients(model, data_loader): function dump_state_dict (line 39) | def dump_state_dict(model): class TestZeroUnbalancedGradients (line 47) | class TestZeroUnbalancedGradients(DistributedTest): method test (line 50) | def test(self, zero_stage): class TestZero3RepeatForwardLoop (line 84) | class TestZero3RepeatForwardLoop(DistributedTest): method test (line 87) | def test(self, zero_stage=3): class TestZeroToFP32 (line 141) | class TestZeroToFP32(DistributedTest): method test_1_param_group (line 144) | def test_1_param_group(self, tmpdir, zero_stage): method test_2_param_groups (line 234) | def test_2_param_groups(self, tmpdir, zero_stage): class TestIncorectAllgatherBucketSize (line 335) | class TestIncorectAllgatherBucketSize(DistributedTest): method test (line 338) | def test(self, allgather_bucket_size, zero_stage=2): class TestPartitionNcclAlignment (line 374) | class TestPartitionNcclAlignment(DistributedTest): method test (line 377) | def test(self, zero_stage=2): function _ds_initialize_for_param_partitioning_testing (line 414) | def _ds_initialize_for_param_partitioning_testing(model: Module, function _assert_partition_status (line 425) | def _assert_partition_status(model: Module, function _assert_fully_available (line 431) | def _assert_fully_available(model: Module) -> None: class EltwiseMultiplicationModule (line 436) | class EltwiseMultiplicationModule(Module): method __init__ (line 437) | def __init__(self, weight: Parameter) -> None: method forward (line 441) | def forward(self, x: Tensor) -> Tensor: class EltwiseMultiplicationTestNetwork (line 448) | class EltwiseMultiplicationTestNetwork(Module): method __init__ (line 450) | def __init__( method forward (line 463) | def forward(self, class TestZero3ParamPartitioningBase (line 524) | class TestZero3ParamPartitioningBase(DistributedTest): method test (line 527) | def test( class TestZero3ParamPartitioningLargeParam (line 733) | class TestZero3ParamPartitioningLargeParam(DistributedTest): method test (line 736) | def test(self, init_context_manager: bool, param_sz: int = 8100) -> None: class TestZero3ParamPartitioningManyParams (line 810) | class TestZero3ParamPartitioningManyParams(DistributedTest): method test (line 813) | def test(self, param_sz: int, n_layers: int, init_context_manager: boo... class TestZero3InitForParentWeightInitialization (line 904) | class TestZero3InitForParentWeightInitialization(DistributedTest): method test (line 907) | def test(self): class TestZero3ParamPartitioningBaseBF16 (line 958) | class TestZero3ParamPartitioningBaseBF16(DistributedTest): method test (line 961) | def test( class TestZeroOffloadStage1 (line 1157) | class TestZeroOffloadStage1(DistributedTest): method test (line 1160) | def test(self): class TestZero3DictFwd (line 1199) | class TestZero3DictFwd(DistributedTest): method test (line 1202) | def test(self, return_type): class TestZeroAdamOptimizerStepCount (line 1262) | class TestZeroAdamOptimizerStepCount(DistributedTest): method test (line 1265) | def test(self, zero_stage): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/zero/test_zero_config.py function test_zero_config_deprecatedfields (line 4) | def test_zero_config_deprecatedfields(): function test_zero_config_aliasfields (line 15) | def test_zero_config_aliasfields(): function test_zero_config_overlapcomm (line 29) | def test_zero_config_overlapcomm(): function test_zero_config_offload_configs (line 38) | def test_zero_config_offload_configs(): function test_zero_offload_optimizer_config_pipeline (line 52) | def test_zero_offload_optimizer_config_pipeline(): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/zero/test_zero_context.py function setup_serial_env (line 14) | def setup_serial_env(): function test_scattered_init_dist (line 23) | def test_scattered_init_dist(): class TestScatterGather (line 30) | class TestScatterGather(DistributedTest): method test (line 33) | def test(self): class TestGatherUpdate (line 49) | class TestGatherUpdate(DistributedTest): method test (line 52) | def test(self): function test_ext_param_getattr (line 92) | def test_ext_param_getattr(): function test_scatter_halftype (line 127) | def test_scatter_halftype(): class DanglingBias (line 138) | class DanglingBias(torch.nn.Linear): method forward (line 139) | def forward(self, *inputs): class DataClass (line 145) | class DataClass: method __init__ (line 147) | def __init__(self, out=None, bias=None): class DanglingBiasClass (line 152) | class DanglingBiasClass(DanglingBias): method forward (line 153) | def forward(self, *inputs): class DanglingAttention (line 158) | class DanglingAttention(torch.nn.Linear): method __init__ (line 159) | def __init__(self, dim=16, return_obj=False): method forward (line 168) | def forward(self, input): class ModelContainer (line 181) | class ModelContainer(torch.nn.Module): method __init__ (line 182) | def __init__(self, dim=16, return_obj=False): method forward (line 188) | def forward(self, input): class DanglingExt (line 196) | class DanglingExt(torch.nn.Module): method __init__ (line 197) | def __init__(self, dim=16): method forward (line 202) | def forward(self, input): function test_ext_param_return (line 212) | def test_ext_param_return(): function test_ext_param_returnobj (line 231) | def test_ext_param_returnobj(): class ModelContainerVariableOutputType (line 252) | class ModelContainerVariableOutputType(ModelContainer): method __init__ (line 253) | def __init__(self, dim=16, output_type=dict): method forward (line 259) | def forward(self, input): function test_stage_3_output_type (line 268) | def test_stage_3_output_type(output_type): class ConvX (line 291) | class ConvX(torch.nn.Conv1d): method __init__ (line 292) | def __init__(self, *args): method forward (line 297) | def forward(self, x): class ConvNet (line 301) | class ConvNet(torch.nn.Module): method __init__ (line 302) | def __init__(self): method forward (line 307) | def forward(self, x): function test_subclass_param (line 311) | def test_subclass_param(): class GrandPa (line 322) | class GrandPa(torch.nn.Module): method __init__ (line 323) | def __init__(self, *args): class Pa (line 330) | class Pa(GrandPa): method __init__ (line 331) | def __init__(self, *args): class Son (line 340) | class Son(Pa): method __init__ (line 341) | def __init__(self): function test_subclass_param_init (line 351) | def test_subclass_param_init(): class TestDSInitWZinit (line 369) | class TestDSInitWZinit(DistributedTest): method test (line 372) | def test(self): FILE: benchmark/third_party/DeepSpeed/tests/unit/runtime/zero/test_zero_tiled.py function test_tiled_init (line 10) | def test_tiled_init(in_splits, out_splits): function test_tiled_baddim (line 49) | def test_tiled_baddim(in_splits, out_splits): function test_tiled_forward (line 59) | def test_tiled_forward(in_splits, out_splits, bias, in_f, out_f): function test_tiled_backward (line 80) | def test_tiled_backward(in_splits, out_splits, bias, in_f, out_f): class LinearWrapper (line 116) | class LinearWrapper(torch.nn.Linear): method forward (line 121) | def forward(self, input): function test_tiled_returnbias_backward (line 130) | def test_tiled_returnbias_backward(in_splits, out_splits, bias, in_f, ou... FILE: benchmark/third_party/DeepSpeed/tests/unit/simple_model.py class SimpleModel (line 12) | class SimpleModel(torch.nn.Module): method __init__ (line 13) | def __init__(self, hidden_dim, empty_grad=False, nlayers=1): method forward (line 23) | def forward(self, x, y): class Curriculum_SimpleModel (line 32) | class Curriculum_SimpleModel(SimpleModel): method __init__ (line 33) | def __init__(self, hidden_dim, empty_grad=False): method forward (line 36) | def forward(self, x, y, **kwargs): class SimpleMoEModel (line 42) | class SimpleMoEModel(torch.nn.Module): method __init__ (line 43) | def __init__(self, hidden_dim, num_experts=4, ep_size=1, use_residual=... method forward (line 62) | def forward(self, x, y): class SimplePRMoEModel (line 71) | class SimplePRMoEModel(torch.nn.Module): method __init__ (line 72) | def __init__(self, hidden_dim, num_experts=2, ep_size=1, use_residual=... method forward (line 91) | def forward(self, x, y): class UnusedParametersModel (line 101) | class UnusedParametersModel(SimpleModel): method __init__ (line 102) | def __init__(self, hidden_dim, empty_grad=False): class LinearStack (line 108) | class LinearStack(torch.nn.Module): method __init__ (line 109) | def __init__(self, input_dim=128, hidden_dim=128, output_dim=128, num_... method forward (line 127) | def forward(self, x, y): class LinearStackPipe (line 135) | class LinearStackPipe(PipelineModule): method __init__ (line 136) | def __init__(self, class SimpleOptimizer (line 161) | class SimpleOptimizer(torch.optim.Optimizer): method __init__ (line 162) | def __init__(self, params, lr=0.11072018): method __setstate__ (line 166) | def __setstate__(self, state): method step (line 169) | def step(self, closure=None): class HybridStateOptimizer (line 184) | class HybridStateOptimizer(torch.optim.Optimizer): method __init__ (line 185) | def __init__(self, params, lr=0.11072018): method __setstate__ (line 189) | def __setstate__(self, state): method step (line 192) | def step(self, closure=None): class PLD_SimpleModel (line 215) | class PLD_SimpleModel(SimpleModel): method __init__ (line 216) | def __init__(self, hidden_dim, empty_grad=False): method forward (line 219) | def forward(self, x, y, **kwargs): function random_dataset (line 226) | def random_dataset(total_samples, hidden_dim, device, dtype=torch.half): function random_dataloader (line 235) | def random_dataloader(model, total_samples, hidden_dim, device, dtype=to... function sequence_dataloader (line 242) | def sequence_dataloader(model, function create_config_from_dict (line 262) | def create_config_from_dict(tmpdir, config_dict): function create_deepspeed_args (line 269) | def create_deepspeed_args(): function args_from_dict (line 280) | def args_from_dict(tmpdir, config_dict): FILE: benchmark/third_party/DeepSpeed/tests/unit/util.py function required_torch_version (line 5) | def required_torch_version(): function bf16_required_version_check (line 15) | def bf16_required_version_check(): function required_minimum_torch_version (line 30) | def required_minimum_torch_version(major_version, minor_version): function required_maximum_torch_version (line 40) | def required_maximum_torch_version(major_version, minor_version): function required_amp_check (line 50) | def required_amp_check(): FILE: benchmark/third_party/DeepSpeed/tests/unit/utils/test_get_optim_files.py function test_get_optim_files (line 7) | def test_get_optim_files(tmpdir, num_checkpoints): FILE: benchmark/third_party/DeepSpeed/tests/unit/utils/test_groups.py function test_get_expert_parallel_ranks (line 4) | def test_get_expert_parallel_ranks(): FILE: benchmark/third_party/DeepSpeed/tests/unit/utils/test_init_on_device.py function test_on_device (line 9) | def test_on_device(device): FILE: benchmark/third_party/pagecache-mangagement/trunk/fadv.c function main (line 16) | int main(int argc, char *argv[]) FILE: benchmark/third_party/pagecache-mangagement/trunk/pagecache-management.c type fd_state (line 39) | enum fd_state { type fd_status (line 46) | struct fd_status { function do_nothing (line 56) | static int do_nothing() { function lazy_next (line 92) | static int lazy_next(int x) { function lazy_i (line 100) | static int lazy_i(int i) { function lazy_last (line 106) | static int lazy_last() { type fd_status (line 111) | struct fd_status type fd_status (line 113) | struct fd_status function grown_pagecache (line 129) | static void grown_pagecache(int fd, size_t count, unsigned long *pagecac... function grown_pagecache_write (line 141) | static void grown_pagecache_write(int fd, size_t count) function grown_pagecache_read (line 149) | static void grown_pagecache_read(int fd, size_t count) function inspect_fd (line 158) | static void inspect_fd(int fd, struct fd_status *fds) function write_was_called (line 173) | static void write_was_called(int fd, size_t count) function read_was_called (line 206) | static void read_was_called(int fd, size_t count) function close_was_called (line 223) | static void close_was_called(int fd) function parse_env (line 249) | static void parse_env(void) function __load_symbols (line 300) | static void __load_symbols(void) function load_symbols (line 344) | static inline void load_symbols(void) function write (line 350) | ssize_t write(int fd, const void *buf, size_t count) function pwrite (line 359) | ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset) function read (line 367) | ssize_t read(int fd, void *buf, size_t count) function pread (line 374) | ssize_t pread(int fd, void *buf, size_t count, off_t offset) function real_close (line 382) | static int real_close(int fd) { function lazy_purge_first (line 389) | static void lazy_purge_first() { function lazy_purge (line 396) | static void lazy_purge() { function lazy_close (line 414) | static int lazy_close(int fd) { function close (line 471) | int close(int fd) function dup2 (line 485) | int dup2(int oldfd, int newfd) FILE: benchmark/third_party/pagecache-mangagement/trunk/sfr.c function main (line 22) | int main(int argc, char *argv[]) FILE: benchmark/third_party/pagecache-mangagement/trunk/sync_file_range.h function sync_file_range (line 19) | static inline int sync_file_range(int fd, off_t offset, off_t nbytes, in... FILE: benchmark/third_party/pagecache-mangagement/trunk/test.c function main (line 17) | int FILE: benchmark/third_party/transformers/.circleci/create_circleci_config.py class CircleCIJob (line 32) | class CircleCIJob: method __post_init__ (line 47) | def __post_init__(self): method to_dict (line 63) | def to_dict(self): method job_name (line 115) | def job_name(self): function create_circleci_config (line 355) | def create_circleci_config(folder=None): FILE: benchmark/third_party/transformers/conftest.py function pytest_configure (line 34) | def pytest_configure(config): function pytest_addoption (line 44) | def pytest_addoption(parser): function pytest_terminal_summary (line 50) | def pytest_terminal_summary(terminalreporter): function pytest_sessionfinish (line 58) | def pytest_sessionfinish(session, exitstatus): class CustomOutputChecker (line 70) | class CustomOutputChecker(OutputChecker): method check_output (line 71) | def check_output(self, want, got, optionflags): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/flax/image-captioning/create_model_from_encoder_decoder_models.py class ModelArguments (line 35) | class ModelArguments: function main (line 67) | def main(): FILE: benchmark/third_party/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 197) | class DataTrainingArguments: method __post_init__ (line 295) | def __post_init__(self): class TrainState (line 314) | class TrainState(train_state.TrainState): method replicate (line 317) | def replicate(self): function data_loader (line 321) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_metric (line 348) | def write_metric(summary_writer, metrics, train_time, step, metric_key_p... function create_learning_rate_fn (line 363) | def create_learning_rate_fn( function main (line 377) | def main(): FILE: benchmark/third_party/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 239) | def __post_init__(self): class FlaxDataCollatorForBartDenoisingLM (line 252) | class FlaxDataCollatorForBartDenoisingLM: method __post_init__ (line 278) | def __post_init__(self): method __call__ (line 285) | def __call__(self, examples: List[Dict[str, List[int]]]) -> BatchEncod... method permute_sentences (line 311) | def permute_sentences(self, input_ids): method span_mask_tokens (line 347) | def span_mask_tokens(self, input_ids, labels, do_permute): function generate_batch_splits (line 422) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 438) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 448) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 453) | def main(): FILE: benchmark/third_party/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 184) | class DataTrainingArguments: method __post_init__ (line 248) | def __post_init__(self): class TrainState (line 260) | class TrainState(train_state.TrainState): method replicate (line 263) | def replicate(self): function data_loader (line 267) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_train_metric (line 293) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 303) | def write_eval_metric(summary_writer, eval_metrics, step): function create_learning_rate_fn (line 308) | def create_learning_rate_fn( function main (line 322) | def main(): FILE: benchmark/third_party/transformers/examples/flax/language-modeling/run_mlm_flax.py class TrainingArguments (line 70) | class TrainingArguments: method __post_init__ (line 117) | def __post_init__(self): method to_dict (line 121) | def to_dict(self): class ModelArguments (line 138) | class ModelArguments: class DataTrainingArguments (line 189) | class DataTrainingArguments: method __post_init__ (line 252) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 265) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 287) | def __post_init__(self): method __call__ (line 294) | def __call__(self, examples: List[Dict[str, np.ndarray]], pad_to_multi... method mask_tokens (line 306) | def mask_tokens( function generate_batch_splits (line 336) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 352) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 362) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 367) | def main(): FILE: benchmark/third_party/transformers/examples/flax/language-modeling/run_t5_mlm_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 237) | def __post_init__(self): function compute_input_and_target_lengths (line 249) | def compute_input_and_target_lengths(inputs_length, noise_density, mean_... class FlaxDataCollatorForT5MLM (line 297) | class FlaxDataCollatorForT5MLM: method __call__ (line 330) | def __call__(self, examples: List[Dict[str, np.ndarray]]) -> BatchEnco... method create_sentinel_ids (line 367) | def create_sentinel_ids(self, mask_indices): method filter_input_ids (line 382) | def filter_input_ids(self, input_ids, sentinel_ids): method random_spans_noise_mask (line 398) | def random_spans_noise_mask(self, length): function generate_batch_splits (line 462) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int, drop... function write_train_metric (line 478) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 488) | def write_eval_metric(summary_writer, eval_metrics, step): function main (line 493) | def main(): FILE: benchmark/third_party/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 69) | def train( method train_from_iterator (line 89) | def train_from_iterator( method add_unk_id (line 107) | def add_unk_id(self): FILE: benchmark/third_party/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 179) | class DataTrainingArguments: method __post_init__ (line 282) | def __post_init__(self): function create_train_state (line 305) | def create_train_state( function create_learning_rate_fn (line 374) | def create_learning_rate_fn( function train_data_collator (line 391) | def train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size: int): function eval_data_collator (line 409) | def eval_data_collator(dataset: Dataset, batch_size: int): function main (line 426) | def main(): FILE: benchmark/third_party/transformers/examples/flax/question-answering/utils_qa.py function postprocess_qa_predictions (line 31) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 252) | def postprocess_qa_predictions_with_beam_search( FILE: benchmark/third_party/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 203) | class DataTrainingArguments: method __post_init__ (line 310) | def __post_init__(self): class TrainState (line 339) | class TrainState(train_state.TrainState): method replicate (line 342) | def replicate(self): function data_loader (line 346) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_metric (line 372) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 385) | def create_learning_rate_fn( function main (line 399) | def main(): FILE: benchmark/third_party/transformers/examples/flax/test_flax_examples.py function get_setup_file (line 55) | def get_setup_file(): function get_results (line 62) | def get_results(output_dir, split="eval"): class ExamplesTests (line 77) | class ExamplesTests(TestCasePlus): method test_run_glue (line 78) | def test_run_glue(self): method test_run_clm (line 101) | def test_run_clm(self): method test_run_summarization (line 125) | def test_run_summarization(self): method test_run_mlm (line 155) | def test_run_mlm(self): method test_run_t5_mlm (line 179) | def test_run_t5_mlm(self): method test_run_ner (line 203) | def test_run_ner(self): method test_run_qa (line 233) | def test_run_qa(self): FILE: benchmark/third_party/transformers/examples/flax/text-classification/run_flax_glue.py class ModelArguments (line 78) | class ModelArguments: class DataTrainingArguments (line 116) | class DataTrainingArguments: method __post_init__ (line 188) | def __post_init__(self): function create_train_state (line 201) | def create_train_state( function create_learning_rate_fn (line 274) | def create_learning_rate_fn( function glue_train_data_collator (line 288) | def glue_train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size:... function glue_eval_data_collator (line 303) | def glue_eval_data_collator(dataset: Dataset, batch_size: int): function main (line 317) | def main(): FILE: benchmark/third_party/transformers/examples/flax/token-classification/run_flax_ner.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 164) | class DataTrainingArguments: method __post_init__ (line 250) | def __post_init__(self): function create_train_state (line 263) | def create_train_state( function create_learning_rate_fn (line 326) | def create_learning_rate_fn( function train_data_collator (line 340) | def train_data_collator(rng: PRNGKey, dataset: Dataset, batch_size: int): function eval_data_collator (line 355) | def eval_data_collator(dataset: Dataset, batch_size: int): function main (line 369) | def main(): FILE: benchmark/third_party/transformers/examples/flax/vision/run_image_classification.py class TrainingArguments (line 67) | class TrainingArguments: method __post_init__ (line 108) | def __post_init__(self): method to_dict (line 112) | def to_dict(self): class ModelArguments (line 129) | class ModelArguments: class DataTrainingArguments (line 173) | class DataTrainingArguments: class TrainState (line 212) | class TrainState(train_state.TrainState): method replicate (line 215) | def replicate(self): function write_metric (line 219) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 232) | def create_learning_rate_fn( function main (line 246) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/multiple_choice/run_multiple_choice.py function simple_accuracy (line 45) | def simple_accuracy(preds, labels): class ModelArguments (line 50) | class ModelArguments: class DataTrainingArguments (line 71) | class DataTrainingArguments: function main (line 92) | def main(): function _mp_fn (line 239) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/legacy/multiple_choice/utils_multiple_choice.py class InputExample (line 38) | class InputExample: class InputFeatures (line 59) | class InputFeatures: class Split (line 72) | class Split(Enum): class MultipleChoiceDataset (line 82) | class MultipleChoiceDataset(Dataset): method __init__ (line 90) | def __init__( method __len__ (line 138) | def __len__(self): method __getitem__ (line 141) | def __getitem__(self, i) -> InputFeatures: class TFMultipleChoiceDataset (line 148) | class TFMultipleChoiceDataset: method __init__ (line 156) | def __init__( method get_dataset (line 221) | def get_dataset(self): method __len__ (line 226) | def __len__(self): method __getitem__ (line 229) | def __getitem__(self, i) -> InputFeatures: class DataProcessor (line 233) | class DataProcessor: method get_train_examples (line 236) | def get_train_examples(self, data_dir): method get_dev_examples (line 240) | def get_dev_examples(self, data_dir): method get_test_examples (line 244) | def get_test_examples(self, data_dir): method get_labels (line 248) | def get_labels(self): class RaceProcessor (line 253) | class RaceProcessor(DataProcessor): method get_train_examples (line 256) | def get_train_examples(self, data_dir): method get_dev_examples (line 265) | def get_dev_examples(self, data_dir): method get_test_examples (line 274) | def get_test_examples(self, data_dir): method get_labels (line 283) | def get_labels(self): method _read_txt (line 287) | def _read_txt(self, input_dir): method _create_examples (line 297) | def _create_examples(self, lines, set_type): class SynonymProcessor (line 320) | class SynonymProcessor(DataProcessor): method get_train_examples (line 323) | def get_train_examples(self, data_dir): method get_dev_examples (line 328) | def get_dev_examples(self, data_dir): method get_test_examples (line 333) | def get_test_examples(self, data_dir): method get_labels (line 339) | def get_labels(self): method _read_csv (line 343) | def _read_csv(self, input_file): method _create_examples (line 347) | def _create_examples(self, lines: List[List[str]], type: str): class SwagProcessor (line 366) | class SwagProcessor(DataProcessor): method get_train_examples (line 369) | def get_train_examples(self, data_dir): method get_dev_examples (line 374) | def get_dev_examples(self, data_dir): method get_test_examples (line 379) | def get_test_examples(self, data_dir): method get_labels (line 388) | def get_labels(self): method _read_csv (line 392) | def _read_csv(self, input_file): method _create_examples (line 396) | def _create_examples(self, lines: List[List[str]], type: str): class ArcProcessor (line 417) | class ArcProcessor(DataProcessor): method get_train_examples (line 420) | def get_train_examples(self, data_dir): method get_dev_examples (line 425) | def get_dev_examples(self, data_dir): method get_test_examples (line 430) | def get_test_examples(self, data_dir): method get_labels (line 434) | def get_labels(self): method _read_json (line 438) | def _read_json(self, input_file): method _create_examples (line 443) | def _create_examples(self, lines, type): function convert_examples_to_features (line 508) | def convert_examples_to_features( FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/pytorch-lightning/run_glue.py class GLUETransformer (line 23) | class GLUETransformer(BaseTransformer): method __init__ (line 27) | def __init__(self, hparams): method forward (line 35) | def forward(self, **inputs): method training_step (line 38) | def training_step(self, batch, batch_idx): method prepare_data (line 51) | def prepare_data(self): method get_dataloader (line 78) | def get_dataloader(self, mode: str, batch_size: int, shuffle: bool = F... method validation_step (line 101) | def validation_step(self, batch, batch_idx): method _eval_end (line 114) | def _eval_end(self, outputs) -> tuple: method validation_epoch_end (line 133) | def validation_epoch_end(self, outputs: list) -> dict: method test_epoch_end (line 138) | def test_epoch_end(self, outputs) -> dict: method add_model_specific_args (line 145) | def add_model_specific_args(parser, root_dir): function main (line 178) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/pytorch-lightning/run_ner.py class NERTransformer (line 21) | class NERTransformer(BaseTransformer): method __init__ (line 28) | def __init__(self, hparams): method forward (line 44) | def forward(self, **inputs): method training_step (line 47) | def training_step(self, batch, batch_num): method prepare_data (line 60) | def prepare_data(self): method get_dataloader (line 89) | def get_dataloader(self, mode: int, batch_size: int, shuffle: bool = F... method validation_step (line 106) | def validation_step(self, batch, batch_nb): method _eval_end (line 119) | def _eval_end(self, outputs): method validation_epoch_end (line 148) | def validation_epoch_end(self, outputs): method test_epoch_end (line 154) | def test_epoch_end(self, outputs): method add_model_specific_args (line 166) | def add_model_specific_args(parser, root_dir): FILE: benchmark/third_party/transformers/examples/legacy/question-answering/run_squad.py function set_seed (line 64) | def set_seed(args): function to_list (line 72) | def to_list(tensor): function train (line 76) | def train(args, train_dataset, model, tokenizer): function evaluate (line 270) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 404) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 474) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/run_camembert.py function fill_mask (line 7) | def fill_mask(masked_input, model, tokenizer, topk=5): FILE: benchmark/third_party/transformers/examples/legacy/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 117) | def main(args): FILE: benchmark/third_party/transformers/examples/legacy/run_language_modeling.py class ModelArguments (line 63) | class ModelArguments: class DataTrainingArguments (line 94) | class DataTrainingArguments: function get_dataset (line 163) | def get_dataset( function main (line 199) | def main(): function _mp_fn (line 369) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/legacy/run_openai_gpt.py function accuracy (line 58) | def accuracy(out, labels): function load_rocstories_dataset (line 63) | def load_rocstories_dataset(dataset_path): function pre_process_datasets (line 74) | def pre_process_datasets(encoded_datasets, input_len, cap_length, start_... function main (line 105) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/run_swag.py class SwagExample (line 56) | class SwagExample(object): method __init__ (line 59) | def __init__(self, swag_id, context_sentence, start_ending, ending_0, ... method __str__ (line 71) | def __str__(self): method __repr__ (line 74) | def __repr__(self): class InputFeatures (line 91) | class InputFeatures(object): method __init__ (line 92) | def __init__(self, example_id, choices_features, label): function read_swag_examples (line 101) | def read_swag_examples(input_file, is_training=True): function convert_examples_to_features (line 127) | def convert_examples_to_features(examples, tokenizer, max_seq_length, is... function _truncate_seq_pair (line 199) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function accuracy (line 216) | def accuracy(out, labels): function select_field (line 221) | def select_field(features, field): function set_seed (line 225) | def set_seed(args): function load_and_cache_examples (line 233) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function train (line 278) | def train(args, train_dataset, model, tokenizer): function evaluate (line 416) | def evaluate(args, model, tokenizer, prefix=""): function main (line 476) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/run_transfo_xl.py function main (line 41) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/seq2seq/finetune_trainer.py class ModelArguments (line 55) | class ModelArguments: class DataTrainingArguments (line 78) | class DataTrainingArguments: function handle_metrics (line 140) | def handle_metrics(split, metrics, output_dir): function main (line 156) | def main(): function _mp_fn (line 369) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/legacy/seq2seq/minify_dataset.py function minify (line 21) | def minify(src_dir: str, dest_dir: str, n: int): FILE: benchmark/third_party/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 103) | def test_rouge_cli(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/seq2seq/old_test_fsmt_bleu_score.py class ModelEvalTester (line 32) | class ModelEvalTester(unittest.TestCase): method get_tokenizer (line 33) | def get_tokenizer(self, mname): method get_model (line 36) | def get_model(self, mname): method test_bleu_scores (line 51) | def test_bleu_scores(self, pair, min_bleu_score): FILE: benchmark/third_party/transformers/examples/legacy/seq2seq/old_test_seq2seq_examples.py function _dump_articles (line 32) | def _dump_articles(path: Path, articles: list): class TestTheRest (line 46) | class TestTheRest(TestCasePlus): method run_eval_tester (line 47) | def run_eval_tester(self, model): method test_run_eval (line 74) | def test_run_eval(self): method test_run_eval_slow (line 80) | def test_run_eval_slow(self, model): method test_run_eval_search (line 86) | def test_run_eval_search(self, model): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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 59) | def pack_data_dir(tok, data_dir: Path, max_tokens, save_path): function packer_cli (line 76) | def packer_cli(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/seq2seq/run_eval_search.py function parse_search_arg (line 34) | def parse_search_arg(search): function run_search (line 43) | def run_search(): FILE: benchmark/third_party/transformers/examples/legacy/seq2seq/save_len_file.py function save_len_file (line 24) | def save_len_file( FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/seq2seq/seq2seq_trainer.py class Seq2SeqTrainer (line 55) | class Seq2SeqTrainer(Trainer): method __init__ (line 56) | def __init__(self, config=None, data_args=None, *args, **kwargs): method create_optimizer_and_scheduler (line 91) | def create_optimizer_and_scheduler(self, num_training_steps: int): method _get_lr_scheduler (line 135) | def _get_lr_scheduler(self, num_training_steps): method _get_train_sampler (line 147) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method _compute_loss (line 165) | def _compute_loss(self, model, inputs, labels): method compute_loss (line 181) | def compute_loss(self, model, inputs): method prediction_step (line 186) | def prediction_step( method _pad_tensors_to_max_len (line 248) | def _pad_tensors_to_max_len(self, tensor, max_length): FILE: benchmark/third_party/transformers/examples/legacy/seq2seq/seq2seq_training_args.py class Seq2SeqTrainingArguments (line 27) | class Seq2SeqTrainingArguments(TrainingArguments): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/legacy/seq2seq/xla_spawn.py function parse_args (line 35) | def parse_args(): function main (line 67) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/text-classification/run_tf_text_classification.py function get_tfds (line 46) | def get_tfds( class DataTrainingArguments (line 155) | class DataTrainingArguments: class ModelArguments (line 183) | class ModelArguments: function main (line 206) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/token-classification/run_ner.py class ModelArguments (line 48) | class ModelArguments: class DataTrainingArguments (line 75) | class DataTrainingArguments: function main (line 101) | def main(): function _mp_fn (line 318) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/legacy/token-classification/run_tf_ner.py class ModelArguments (line 50) | class ModelArguments: class DataTrainingArguments (line 77) | class DataTrainingArguments: function main (line 102) | def main(): FILE: benchmark/third_party/transformers/examples/legacy/token-classification/tasks.py class NER (line 13) | class NER(TokenClassificationTask): method __init__ (line 14) | def __init__(self, label_idx=-1): method read_examples_from_file (line 18) | def read_examples_from_file(self, data_dir, mode: Union[Split, str]) -... method write_predictions_to_file (line 46) | def write_predictions_to_file(self, writer: TextIO, test_input_reader:... method get_labels (line 59) | def get_labels(self, path: str) -> List[str]: class Chunk (line 70) | class Chunk(NER): method __init__ (line 71) | def __init__(self): method get_labels (line 75) | def get_labels(self, path: str) -> List[str]: class POS (line 108) | class POS(TokenClassificationTask): method read_examples_from_file (line 109) | def read_examples_from_file(self, data_dir, mode: Union[Split, str]) -... method write_predictions_to_file (line 129) | def write_predictions_to_file(self, writer: TextIO, test_input_reader:... method get_labels (line 140) | def get_labels(self, path: str) -> List[str]: FILE: benchmark/third_party/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 271) | def __len__(self): method __getitem__ (line 274) | def __getitem__(self, i) -> InputFeatures: class TFTokenClassificationDataset (line 281) | class TFTokenClassificationDataset: method __init__ (line 292) | def __init__( method get_dataset (line 363) | def get_dataset(self): method __len__ (line 368) | def __len__(self): method __getitem__ (line 371) | def __getitem__(self, i) -> InputFeatures: FILE: benchmark/third_party/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 172) | def __post_init__(self): function main (line 188) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/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: benchmark/third_party/transformers/examples/pytorch/benchmarking/run_benchmark.py function main (line 22) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/pytorch/contrastive-image-text/run_clip.py class ModelArguments (line 63) | class ModelArguments: class DataTrainingArguments (line 107) | class DataTrainingArguments: method __post_init__ (line 169) | def __post_init__(self): class Transform (line 191) | class Transform(torch.nn.Module): method __init__ (line 192) | def __init__(self, image_size, mean, std): method forward (line 201) | def forward(self, x: Image) -> torch.Tensor: function collate_fn (line 207) | def collate_fn(examples): function main (line 219) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/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 113) | def __post_init__(self): class ModelArguments (line 121) | class ModelArguments: function collate_fn (line 160) | def collate_fn(examples): function main (line 166) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/image-classification/run_image_classification_no_trainer.py function parse_args (line 63) | def parse_args(): function main (line 205) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/image-pretraining/run_mae.py class DataTrainingArguments (line 52) | class DataTrainingArguments: method __post_init__ (line 93) | def __post_init__(self): class ModelArguments (line 103) | class ModelArguments: class CustomTrainingArguments (line 154) | class CustomTrainingArguments(TrainingArguments): function collate_fn (line 160) | def collate_fn(examples): function main (line 165) | def main(): FILE: benchmark/third_party/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 187) | class MaskGenerator: method __init__ (line 195) | def __init__(self, input_size=192, mask_patch_size=32, model_patch_siz... method __call__ (line 212) | def __call__(self): function collate_fn (line 223) | def collate_fn(examples): function main (line 229) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/language-modeling/run_clm.py class ModelArguments (line 69) | class ModelArguments: method __post_init__ (line 123) | def __post_init__(self): class DataTrainingArguments (line 131) | class DataTrainingArguments: method __post_init__ (line 193) | def __post_init__(self): function main (line 205) | def main(): function _mp_fn (line 574) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/language-modeling/run_clm_no_trainer.py function parse_args (line 70) | def parse_args(): function main (line 242) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/language-modeling/run_mlm.py class ModelArguments (line 66) | class ModelArguments: method __post_init__ (line 120) | def __post_init__(self): class DataTrainingArguments (line 128) | class DataTrainingArguments: method __post_init__ (line 201) | def __post_init__(self): function main (line 215) | def main(): function _mp_fn (line 607) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/language-modeling/run_mlm_no_trainer.py function parse_args (line 68) | def parse_args(): function main (line 251) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/language-modeling/run_plm.py class ModelArguments (line 58) | class ModelArguments: method __post_init__ (line 108) | def __post_init__(self): class DataTrainingArguments (line 116) | class DataTrainingArguments: method __post_init__ (line 198) | def __post_init__(self): function main (line 210) | def main(): function _mp_fn (line 547) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/multiple-choice/run_swag.py class ModelArguments (line 56) | class ModelArguments: class DataTrainingArguments (line 94) | class DataTrainingArguments: method __post_init__ (line 149) | def __post_init__(self): class DataCollatorForMultipleChoice (line 159) | class DataCollatorForMultipleChoice: method __call__ (line 190) | def __call__(self, features): function main (line 215) | def main(): function _mp_fn (line 474) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/multiple-choice/run_swag_no_trainer.py function parse_args (line 67) | def parse_args(): class DataCollatorForMultipleChoice (line 221) | class DataCollatorForMultipleChoice: method __call__ (line 252) | def __call__(self, features): function main (line 277) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/question-answering/run_qa.py class ModelArguments (line 60) | class ModelArguments: class DataTrainingArguments (line 94) | class DataTrainingArguments: method __post_init__ (line 197) | def __post_init__(self): function main (line 217) | def main(): function _mp_fn (line 675) | def _mp_fn(index): FILE: benchmark/third_party/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 196) | def __post_init__(self): function main (line 216) | def main(): function _mp_fn (line 708) | def _mp_fn(index): FILE: benchmark/third_party/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 292) | def main(): FILE: benchmark/third_party/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 330) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/question-answering/run_seq2seq_qa.py class ModelArguments (line 56) | class ModelArguments: class DataTrainingArguments (line 94) | class DataTrainingArguments: method __post_init__ (line 235) | def __post_init__(self): function main (line 262) | def main(): function _mp_fn (line 710) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/question-answering/trainer_qa.py class QuestionAnsweringTrainer (line 28) | class QuestionAnsweringTrainer(Trainer): method __init__ (line 29) | def __init__(self, *args, eval_examples=None, post_process_function=No... method evaluate (line 34) | def evaluate(self, eval_dataset=None, eval_examples=None, ignore_keys=... method predict (line 78) | def predict(self, predict_dataset, predict_examples, ignore_keys=None,... FILE: benchmark/third_party/transformers/examples/pytorch/question-answering/trainer_seq2seq_qa.py class QuestionAnsweringSeq2SeqTrainer (line 33) | class QuestionAnsweringSeq2SeqTrainer(Seq2SeqTrainer): method __init__ (line 34) | def __init__(self, *args, eval_examples=None, post_process_function=No... method evaluate (line 40) | def evaluate( method predict (line 112) | def predict( FILE: benchmark/third_party/transformers/examples/pytorch/question-answering/utils_qa.py function postprocess_qa_predictions (line 31) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 252) | def postprocess_qa_predictions_with_beam_search( FILE: benchmark/third_party/transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation.py function pad_if_smaller (line 59) | def pad_if_smaller(img, size, fill=0): class Compose (line 69) | class Compose: method __init__ (line 70) | def __init__(self, transforms): method __call__ (line 73) | def __call__(self, image, target): class Identity (line 79) | class Identity: method __init__ (line 80) | def __init__(self): method __call__ (line 83) | def __call__(self, image, target): class Resize (line 87) | class Resize: method __init__ (line 88) | def __init__(self, size): method __call__ (line 91) | def __call__(self, image, target): class RandomResize (line 97) | class RandomResize: method __init__ (line 98) | def __init__(self, min_size, max_size=None): method __call__ (line 104) | def __call__(self, image, target): class RandomCrop (line 111) | class RandomCrop: method __init__ (line 112) | def __init__(self, size): method __call__ (line 115) | def __call__(self, image, target): class RandomHorizontalFlip (line 124) | class RandomHorizontalFlip: method __init__ (line 125) | def __init__(self, flip_prob): method __call__ (line 128) | def __call__(self, image, target): class PILToTensor (line 135) | class PILToTensor: method __call__ (line 136) | def __call__(self, image, target): class ConvertImageDtype (line 142) | class ConvertImageDtype: method __init__ (line 143) | def __init__(self, dtype): method __call__ (line 146) | def __call__(self, image, target): class Normalize (line 151) | class Normalize: method __init__ (line 152) | def __init__(self, mean, std): method __call__ (line 156) | def __call__(self, image, target): class ReduceLabels (line 161) | class ReduceLabels: method __call__ (line 162) | def __call__(self, image, target): class DataTrainingArguments (line 175) | class DataTrainingArguments: method __post_init__ (line 217) | def __post_init__(self): class ModelArguments (line 225) | class ModelArguments: function main (line 256) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py function pad_if_smaller (line 60) | def pad_if_smaller(img, size, fill=0): class Compose (line 70) | class Compose: method __init__ (line 71) | def __init__(self, transforms): method __call__ (line 74) | def __call__(self, image, target): class Identity (line 80) | class Identity: method __init__ (line 81) | def __init__(self): method __call__ (line 84) | def __call__(self, image, target): class Resize (line 88) | class Resize: method __init__ (line 89) | def __init__(self, size): method __call__ (line 92) | def __call__(self, image, target): class RandomResize (line 98) | class RandomResize: method __init__ (line 99) | def __init__(self, min_size, max_size=None): method __call__ (line 105) | def __call__(self, image, target): class RandomCrop (line 112) | class RandomCrop: method __init__ (line 113) | def __init__(self, size): method __call__ (line 116) | def __call__(self, image, target): class RandomHorizontalFlip (line 125) | class RandomHorizontalFlip: method __init__ (line 126) | def __init__(self, flip_prob): method __call__ (line 129) | def __call__(self, image, target): class PILToTensor (line 136) | class PILToTensor: method __call__ (line 137) | def __call__(self, image, target): class ConvertImageDtype (line 143) | class ConvertImageDtype: method __init__ (line 144) | def __init__(self, dtype): method __call__ (line 147) | def __call__(self, image, target): class Normalize (line 152) | class Normalize: method __init__ (line 153) | def __init__(self, mean, std): method __call__ (line 157) | def __call__(self, image, target): class ReduceLabels (line 162) | class ReduceLabels: method __call__ (line 163) | def __call__(self, image, target): function parse_args (line 175) | def parse_args(): function main (line 319) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/speech-pretraining/run_wav2vec2_pretraining_no_trainer.py function parse_args (line 52) | def parse_args(): class DataCollatorForWav2Vec2Pretraining (line 262) | class DataCollatorForWav2Vec2Pretraining: method __call__ (line 295) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function multiply_grads (line 340) | def multiply_grads(params, c): function get_grad_norm (line 349) | def get_grad_norm(params, scale=1): function main (line 360) | def main(): FILE: benchmark/third_party/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 137) | class DataTrainingArguments: class DataCollatorCTCWithPadding (line 266) | class DataCollatorCTCWithPadding: method __call__ (line 296) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 326) | def create_vocabulary_from_data( function main (line 368) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py class ModelArguments (line 59) | class ModelArguments: class DataTrainingArguments (line 103) | class DataTrainingArguments: class DataCollatorSpeechSeq2SeqWithPadding (line 193) | class DataCollatorSpeechSeq2SeqWithPadding: method __call__ (line 206) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function main (line 229) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/summarization/run_summarization.py class ModelArguments (line 76) | class ModelArguments: class DataTrainingArguments (line 123) | class DataTrainingArguments: method __post_init__ (line 264) | def __post_init__(self): function main (line 294) | def main(): function _mp_fn (line 726) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/summarization/run_summarization_no_trainer.py function parse_args (line 93) | def parse_args(): function main (line 324) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/test_accelerate_examples.py function get_setup_file (line 38) | def get_setup_file(): function get_results (line 45) | def get_results(output_dir): function is_cuda_and_apex_available (line 56) | def is_cuda_and_apex_available(): 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 105) | 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 181) | 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 287) | def test_run_semantic_segmentation_no_trainer(self): method test_run_image_classification_no_trainer (line 309) | def test_run_image_classification_no_trainer(self): FILE: benchmark/third_party/transformers/examples/pytorch/test_pytorch_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_and_apex_available (line 96) | def is_cuda_and_apex_available(): class ExamplesTests (line 105) | class ExamplesTests(TestCasePlus): method test_run_glue (line 106) | def test_run_glue(self): method test_run_clm (line 134) | def test_run_clm(self): method test_run_clm_config_overrides (line 163) | def test_run_clm_config_overrides(self): method test_run_mlm (line 188) | def test_run_mlm(self): method test_run_ner (line 211) | def test_run_ner(self): method test_run_squad (line 242) | def test_run_squad(self): method test_run_squad_seq2seq (line 267) | def test_run_squad_seq2seq(self): method test_run_swag (line 296) | def test_run_swag(self): method test_generation (line 319) | def test_generation(self): method test_run_summarization (line 334) | def test_run_summarization(self): method test_run_translation (line 362) | def test_run_translation(self): method test_run_image_classification (line 390) | def test_run_image_classification(self): method test_run_speech_recognition_ctc (line 419) | def test_run_speech_recognition_ctc(self): method test_run_speech_recognition_seq2seq (line 449) | def test_run_speech_recognition_seq2seq(self): method test_run_audio_classification (line 479) | def test_run_audio_classification(self): method test_run_wav2vec2_pretraining (line 511) | def test_run_wav2vec2_pretraining(self): method test_run_vit_mae_pretraining (line 537) | def test_run_vit_mae_pretraining(self): method test_run_semantic_segmentation (line 565) | def test_run_semantic_segmentation(self): FILE: benchmark/third_party/transformers/examples/pytorch/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: benchmark/third_party/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 206) | def main(): function _mp_fn (line 616) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/text-classification/run_glue_no_trainer.py function parse_args (line 70) | def parse_args(): function main (line 210) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/text-classification/run_xnli.py class DataTrainingArguments (line 59) | class DataTrainingArguments: class ModelArguments (line 119) | class ModelArguments: function main (line 170) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/text-generation/run_generation.py function set_seed (line 76) | def set_seed(args): function prepare_ctrl_input (line 88) | def prepare_ctrl_input(args, _, tokenizer, prompt_text): function prepare_xlm_input (line 98) | def prepare_xlm_input(args, model, tokenizer, prompt_text): function prepare_xlnet_input (line 124) | def prepare_xlnet_input(args, _, tokenizer, prompt_text): function prepare_transfoxl_input (line 130) | def prepare_transfoxl_input(args, _, tokenizer, prompt_text): function adjust_length_to_model (line 144) | def adjust_length_to_model(length, max_sequence_length): function main (line 154) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/text-generation/run_generation_contrastive_search.py function set_seed (line 40) | def set_seed(args): function main (line 47) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/token-classification/run_ner.py class ModelArguments (line 60) | class ModelArguments: class DataTrainingArguments (line 98) | class DataTrainingArguments: method __post_init__ (line 194) | def __post_init__(self): function main (line 207) | def main(): function _mp_fn (line 624) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/token-classification/run_ner_no_trainer.py function parse_args (line 68) | def parse_args(): function main (line 263) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/translation/run_translation.py class ModelArguments (line 66) | class ModelArguments: class DataTrainingArguments (line 104) | class DataTrainingArguments: method __post_init__ (line 231) | def __post_init__(self): function main (line 251) | def main(): function _mp_fn (line 650) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/pytorch/translation/run_translation_no_trainer.py function parse_args (line 71) | def parse_args(): function main (line 308) | def main(): FILE: benchmark/third_party/transformers/examples/pytorch/xla_spawn.py function parse_args (line 35) | def parse_args(): function main (line 67) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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 153) | def __len__(self): method __getitem__ (line 156) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 159) | def get_labels(self): class TFHansDataset (line 166) | class TFHansDataset: method __init__ (line 174) | def __init__( method get_dataset (line 236) | def get_dataset(self): method __len__ (line 239) | def __len__(self): method __getitem__ (line 242) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 245) | def get_labels(self): class HansProcessor (line 249) | class HansProcessor(DataProcessor): method get_train_examples (line 252) | def get_train_examples(self, data_dir): method get_dev_examples (line 256) | def get_dev_examples(self, data_dir): method get_labels (line 260) | def get_labels(self): method _create_examples (line 268) | def _create_examples(self, lines, set_type): function hans_convert_examples_to_features (line 283) | def hans_convert_examples_to_features( FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/bert-loses-patience/pabee/modeling_pabee_bert.py class BertEncoderWithPabee (line 38) | class BertEncoderWithPabee(BertEncoder): method adaptive_forward (line 39) | def adaptive_forward(self, hidden_states, current_layer, attention_mas... class BertModelWithPabee (line 51) | class BertModelWithPabee(BertModel): method __init__ (line 68) | def __init__(self, config): method set_regression_threshold (line 80) | def set_regression_threshold(self, threshold): method set_patience (line 83) | def set_patience(self, patience): method reset_stats (line 86) | def reset_stats(self): method log_stats (line 90) | def log_stats(self): method forward (line 99) | def forward( class BertForSequenceClassificationWithPabee (line 247) | class BertForSequenceClassificationWithPabee(BertPreTrainedModel): method __init__ (line 248) | def __init__(self, config): method forward (line 261) | def forward( FILE: benchmark/third_party/transformers/examples/research_projects/bert-loses-patience/run_glue_with_pabee.py function set_seed (line 66) | def set_seed(args): function train (line 74) | def train(args, train_dataset, model, tokenizer): function evaluate (line 265) | def evaluate(args, model, tokenizer, prefix="", patience=0): function load_and_cache_examples (line 356) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 411) | def main(): FILE: benchmark/third_party/transformers/examples/research_projects/bert-loses-patience/test_run_glue_with_pabee.py function get_setup_file (line 15) | def get_setup_file(): class PabeeTests (line 22) | class PabeeTests(TestCasePlus): method test_run_glue (line 23) | def test_run_glue(self): FILE: benchmark/third_party/transformers/examples/research_projects/bertabs/configuration_bertabs.py class BertAbsConfig (line 30) | class BertAbsConfig(PretrainedConfig): method __init__ (line 66) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/bertabs/modeling_bertabs.py class BertAbsPreTrainedModel (line 41) | class BertAbsPreTrainedModel(PreTrainedModel): class BertAbs (line 47) | class BertAbs(BertAbsPreTrainedModel): method __init__ (line 48) | def __init__(self, args, checkpoint=None, bert_extractive_checkpoint=N... method init_weights (line 92) | def init_weights(self): method forward (line 107) | def forward( class Bert (line 126) | class Bert(nn.Module): method __init__ (line 129) | def __init__(self): method forward (line 134) | def forward(self, input_ids, attention_mask=None, token_type_ids=None,... class TransformerDecoder (line 143) | class TransformerDecoder(nn.Module): method __init__ (line 158) | def __init__(self, num_layers, d_model, heads, d_ff, dropout, embeddin... method forward (line 177) | def forward( method init_decoder_state (line 253) | def init_decoder_state(self, src, memory_bank, with_cache=False): class PositionalEncoding (line 261) | class PositionalEncoding(nn.Module): method __init__ (line 262) | def __init__(self, dropout, dim, max_len=5000): method forward (line 274) | def forward(self, emb, step=None): method get_emb (line 284) | def get_emb(self, emb): class TransformerDecoderLayer (line 288) | class TransformerDecoderLayer(nn.Module): method __init__ (line 300) | def __init__(self, d_model, heads, d_ff, dropout): method forward (line 315) | def forward( method _get_attn_subsequent_mask (line 372) | def _get_attn_subsequent_mask(self, size): class MultiHeadedAttention (line 390) | class MultiHeadedAttention(nn.Module): method __init__ (line 432) | def __init__(self, head_count, model_dim, dropout=0.1, use_final_linea... method forward (line 449) | def forward( class DecoderState (line 564) | class DecoderState(object): method detach (line 573) | def detach(self): method beam_update (line 578) | def beam_update(self, idx, positions, beam_size): method map_batch_fn (line 590) | def map_batch_fn(self, fn): class TransformerDecoderState (line 594) | class TransformerDecoderState(DecoderState): method __init__ (line 597) | def __init__(self, src): method _all (line 609) | def _all(self): method detach (line 618) | def detach(self): method update_state (line 625) | def update_state(self, new_input, previous_layer_inputs): method _init_cache (line 631) | def _init_cache(self, memory_bank, num_layers): method repeat_beam_size_times (line 640) | def repeat_beam_size_times(self, beam_size): method map_batch_fn (line 644) | def map_batch_fn(self, fn): function gelu (line 658) | def gelu(x): class PositionwiseFeedForward (line 662) | class PositionwiseFeedForward(nn.Module): method __init__ (line 672) | def __init__(self, d_model, d_ff, dropout=0.1): method forward (line 681) | def forward(self, x): function build_predictor (line 694) | def build_predictor(args, tokenizer, symbols, model, logger=None): class GNMTGlobalScorer (line 701) | class GNMTGlobalScorer(object): method __init__ (line 711) | def __init__(self, alpha, length_penalty): method score (line 716) | def score(self, beam, logprobs): class PenaltyBuilder (line 724) | class PenaltyBuilder(object): method __init__ (line 733) | def __init__(self, length_pen): method length_penalty (line 736) | def length_penalty(self): method length_wu (line 748) | def length_wu(self, beam, logprobs, alpha=0.0): method length_average (line 757) | def length_average(self, beam, logprobs, alpha=0.0): method length_none (line 763) | def length_none(self, beam, logprobs, alpha=0.0, beta=0.0): class Translator (line 770) | class Translator(object): method __init__ (line 788) | def __init__(self, args, model, vocab, symbols, global_scorer=None, lo... method translate (line 804) | def translate(self, batch, step, attn_debug=False): method translate_batch (line 812) | def translate_batch(self, batch, fast=False): method _fast_translate_batch (line 827) | def _fast_translate_batch(self, batch, max_length, min_length=0): method from_batch (line 960) | def from_batch(self, translation_batch): function tile (line 986) | def tile(x, count, dim=0): class BertSumOptimizer (line 1009) | class BertSumOptimizer(object): method __init__ (line 1020) | def __init__(self, model, lr, warmup_steps, beta_1=0.99, beta_2=0.999,... method _update_rate (line 1044) | def _update_rate(self, stack): method zero_grad (line 1047) | def zero_grad(self): method step (line 1051) | def step(self): FILE: benchmark/third_party/transformers/examples/research_projects/bertabs/run_summarization.py function evaluate (line 31) | def evaluate(args): function save_summaries (line 101) | def save_summaries(summaries, path, original_document_name): function format_summary (line 127) | def format_summary(translation): function format_rouge_scores (line 146) | def format_rouge_scores(scores): function save_rouge_scores (line 176) | def save_rouge_scores(str_scores): function build_data_iterator (line 186) | def build_data_iterator(args, tokenizer): function load_and_cache_examples (line 203) | def load_and_cache_examples(args, tokenizer): function collate (line 208) | def collate(data, tokenizer, block_size, device): function decode_summary (line 238) | def decode_summary(summary_tokens, tokenizer): function main (line 249) | def main(): function documents_dir_is_valid (line 336) | def documents_dir_is_valid(path): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/bertology/run_bertology.py function entropy (line 52) | def entropy(p): function print_2d_tensor (line 59) | def print_2d_tensor(tensor): function compute_heads_importance (line 69) | def compute_heads_importance( function mask_heads (line 155) | def mask_heads(args, model, eval_dataloader): function prune_heads (line 206) | def prune_heads(args, model, eval_dataloader, head_mask): function main (line 253) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/codeparrot/scripts/bpe_training.py function batch_iterator (line 10) | def batch_iterator(batch_size=10): FILE: benchmark/third_party/transformers/examples/research_projects/codeparrot/scripts/codeparrot_training.py class ConstantLengthDataset (line 22) | class ConstantLengthDataset(IterableDataset): method __init__ (line 35) | def __init__( method __iter__ (line 61) | def __iter__(self): method shuffle (line 93) | def shuffle(self, buffer_size=1000): function setup_logging (line 97) | def setup_logging(args): function create_dataloaders (line 123) | def create_dataloaders(args): function get_grouped_params (line 140) | def get_grouped_params(model, args, no_decay=["bias", "ln_1.weight", "ln... function log_metrics (line 153) | def log_metrics(step, metrics): function compute_tflops (line 159) | def compute_tflops(elapsed_time, accelerator, args): function evaluate (line 174) | def evaluate(args): function get_lr (line 237) | def get_lr(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/codeparrot/scripts/minhash_deduplication.py function get_min_hash (line 21) | def get_min_hash(tokens: List[str]) -> Optional[MinHash]: function get_tokens (line 31) | def get_tokens(code: str) -> Set[str]: class DuplicationIndex (line 36) | class DuplicationIndex: method __init__ (line 37) | def __init__( method add (line 48) | def add(self, code_key: Tuple, min_hash: MinHash) -> None: method get_duplicate_clusters (line 73) | def get_duplicate_clusters(self) -> List[List[Dict]]: method save (line 90) | def save(self, filepath) -> None: function _compute_min_hash (line 96) | def _compute_min_hash(element): function minhash_iter (line 103) | def minhash_iter(dataset_iterator: Type[Dataset]): function make_duplicate_clusters (line 114) | def make_duplicate_clusters(dataset_iterator: Type[Dataset], jaccard_thr... function jaccard_similarity (line 130) | def jaccard_similarity(code1: str, code2: str) -> float: function _find_cluster_extremes_shared (line 140) | def _find_cluster_extremes_shared(cluster, jaccard_threshold): function find_extremes (line 174) | def find_extremes(cluster_list, dataset, jaccard_threshold): function deduplicate_dataset (line 210) | def deduplicate_dataset( FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/codeparrot/scripts/pretokenizing.py function tokenize (line 10) | def tokenize(example): FILE: benchmark/third_party/transformers/examples/research_projects/codeparrot/scripts/tests/test_deduplicate.py function get_dataset (line 8) | def get_dataset(): class MakeDuplicateClustersTest (line 18) | class MakeDuplicateClustersTest(TestCase): method test_make_duplicate_clusters (line 19) | def test_make_duplicate_clusters(self): method test_deduplicate_dataset (line 24) | def test_deduplicate_dataset(self): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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 238) | class HighwayException(Exception): method __init__ (line 239) | def __init__(self, message, exit_layer): class BertHighway (line 244) | class BertHighway(nn.Module): method __init__ (line 249) | def __init__(self, config): method forward (line 255) | def forward(self, encoder_outputs): class DeeBertForSequenceClassification (line 279) | class DeeBertForSequenceClassification(BertPreTrainedModel): method __init__ (line 280) | def __init__(self, config): method forward (line 292) | def forward( FILE: benchmark/third_party/transformers/examples/research_projects/deebert/src/modeling_highway_roberta.py class DeeRobertaModel (line 21) | class DeeRobertaModel(DeeBertModel): method __init__ (line 26) | def __init__(self, config): class DeeRobertaForSequenceClassification (line 38) | class DeeRobertaForSequenceClassification(BertPreTrainedModel): method __init__ (line 43) | def __init__(self, config): method forward (line 53) | def forward( FILE: benchmark/third_party/transformers/examples/research_projects/deebert/test_glue_deebert.py function get_setup_file (line 15) | def get_setup_file(): class DeeBertTests (line 22) | class DeeBertTests(TestCasePlus): method setup (line 23) | def setup(self) -> None: method run_and_check (line 27) | def run_and_check(self, args): method test_glue_deebert_train (line 47) | def test_glue_deebert_train(self): FILE: benchmark/third_party/transformers/examples/research_projects/distillation/distiller.py class Distiller (line 42) | class Distiller: method __init__ (line 43) | def __init__( method prepare_batch_mlm (line 188) | def prepare_batch_mlm(self, batch): method prepare_batch_clm (line 253) | def prepare_batch_clm(self, batch): method round_batch (line 282) | def round_batch(self, x: torch.tensor, lengths: torch.tensor): method train (line 329) | def train(self): method step (line 371) | def step(self, input_ids: torch.tensor, attention_mask: torch.tensor, ... method optimize (line 465) | def optimize(self, loss): method iter (line 499) | def iter(self): method log_tensorboard (line 512) | def log_tensorboard(self): method end_epoch (line 573) | def end_epoch(self): method save_checkpoint (line 591) | def save_checkpoint(self, checkpoint_name: str = "checkpoint.pth"): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/distillation/lm_seqs_dataset.py class LmSeqsDataset (line 25) | class LmSeqsDataset(Dataset): method __init__ (line 36) | def __init__(self, params, data): method __getitem__ (line 49) | def __getitem__(self, index): method __len__ (line 52) | def __len__(self): method check (line 55) | def check(self): method remove_long_sequences (line 62) | def remove_long_sequences(self): method remove_empty_sequences (line 102) | def remove_empty_sequences(self): method remove_unknown_sequences (line 113) | def remove_unknown_sequences(self): method print_statistics (line 129) | def print_statistics(self): method batch_sequences (line 144) | def batch_sequences(self, batch): FILE: benchmark/third_party/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 309) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 428) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 490) | def main(): FILE: benchmark/third_party/transformers/examples/research_projects/distillation/scripts/binarized_data.py function main (line 35) | def main(): FILE: benchmark/third_party/transformers/examples/research_projects/distillation/train.py function sanity_checks (line 55) | def sanity_checks(args): function freeze_pos_embeddings (line 85) | def freeze_pos_embeddings(student, args): function freeze_token_type_embeddings (line 92) | def freeze_token_type_embeddings(student, args): function main (line 97) | def main(): FILE: benchmark/third_party/transformers/examples/research_projects/distillation/utils.py function git_log (line 36) | def git_log(folder_path: str): function init_gpu_params (line 51) | def init_gpu_params(params): function set_seed (line 126) | def set_seed(args): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/fsner/src/fsner/tokenizer_utils.py class FSNERTokenizerUtils (line 6) | class FSNERTokenizerUtils(object): 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: benchmark/third_party/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="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 144) | def collect_objective_set( function generate_datasets (line 224) | def generate_datasets( function train_secondary_learner (line 271) | def train_secondary_learner( class SecondaryLearner (line 367) | class SecondaryLearner(nn.Module): method __init__ (line 372) | def __init__(self, model): method forward (line 386) | def forward(self, context): method from_pretrained (line 402) | def from_pretrained(cls, state_path, model): FILE: benchmark/third_party/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 101) | def training_secondary_learner( function finetune (line 146) | def finetune( function main (line 269) | def main(): FILE: benchmark/third_party/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 105) | def __call__(self, batch): method collate_fn (line 110) | def collate_fn(self, features): method fetch_inputs (line 121) | def fetch_inputs(self, input_ids: list): method _fetch_inputs (line 125) | def _fetch_inputs(self, input_ids: list): function get_batched_dataset (line 133) | def get_batched_dataset(dataset, batch_size, seed=None): function train_step (line 142) | def train_step(state, drp_rng, **model_inputs): function val_step (line 171) | def val_step(state, **model_inputs): class TrainState (line 184) | class TrainState(train_state.TrainState): class Trainer (line 189) | class Trainer: method create_state (line 198) | def create_state(self, model, tx, num_train_steps, ckpt_dir=None): method train (line 230) | def train(self, state, tr_dataset, val_dataset): method evaluate (line 260) | def evaluate(self, state, dataset): method save_checkpoint (line 272) | def save_checkpoint(self, save_dir, state): function restore_checkpoint (line 285) | def restore_checkpoint(save_dir, state): function scheduler_fn (line 304) | def scheduler_fn(lr, init_lr, warmup_steps, num_train_steps): function build_tx (line 312) | def build_tx(lr, init_lr, warmup_steps, num_train_steps, weight_decay): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/jax-projects/big_bird/prepare_natural_questions.py function _get_single_answer (line 16) | def _get_single_answer(example): function get_context_and_ans (line 60) | def get_context_and_ans(example, assertion=False): function get_strided_contexts_and_ans (line 138) | def get_strided_contexts_and_ans(example, tokenizer, doc_stride=2048, ma... function prepare_inputs (line 271) | def prepare_inputs(example, tokenizer, doc_stride=2048, max_length=4096,... function save_to_disk (line 283) | def save_to_disk(hf_data, file_name): FILE: benchmark/third_party/transformers/examples/research_projects/jax-projects/dataset-streaming/run_mlm_flax_stream.py class ModelArguments (line 70) | class ModelArguments: class DataTrainingArguments (line 112) | class DataTrainingArguments: method __post_init__ (line 183) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 196) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 218) | def __post_init__(self): method __call__ (line 225) | def __call__(self, examples: List[Dict[str, np.ndarray]]) -> Dict[str,... method mask_tokens (line 237) | def mask_tokens( function generate_batch_splits (line 267) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int) -> n... function advance_iter_and_group_samples (line 278) | def advance_iter_and_group_samples(train_iterator, num_samples, max_seq_... function write_train_metric (line 309) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 319) | def write_eval_metric(summary_writer, eval_metrics, step): function tokenize_function (line 409) | def tokenize_function(examples): function decay_mask_fn (line 474) | def decay_mask_fn(params): function train_step (line 493) | def train_step(state, batch, dropout_rng): function eval_step (line 525) | def eval_step(params, batch): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/jax-projects/hybrid_clip/modeling_hybrid_clip.py class FlaxHybridCLIPModule (line 32) | class FlaxHybridCLIPModule(nn.Module): method setup (line 36) | def setup(self): method __call__ (line 64) | def __call__( class FlaxHybridCLIP (line 125) | class FlaxHybridCLIP(FlaxPreTrainedModel): method __init__ (line 129) | def __init__( method init_weights (line 143) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 157) | def __call__( method get_text_features (line 205) | def get_text_features( method get_image_features (line 268) | def get_image_features( method from_text_vision_pretrained (line 303) | def from_text_vision_pretrained( FILE: benchmark/third_party/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 174) | def __post_init__(self): class Transform (line 188) | class Transform(torch.nn.Module): method __init__ (line 189) | def __init__(self, image_size): method forward (line 198) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ImageTextDataset (line 204) | class ImageTextDataset(VisionDataset): method __init__ (line 222) | def __init__( method _load_image (line 244) | def _load_image(self, idx: int): method _load_target (line 248) | def _load_target(self, idx): method __getitem__ (line 251) | def __getitem__(self, index: int): method __len__ (line 260) | def __len__(self) -> int: class TrainState (line 264) | class TrainState(train_state.TrainState): method replicate (line 267) | def replicate(self): function write_metric (line 271) | def write_metric(summary_writer, train_metrics, eval_metrics, train_time... function create_learning_rate_fn (line 284) | def create_learning_rate_fn( function main (line 298) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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 167) | def __post_init__(self): function data_loader (line 179) | def data_loader(rng: jax.random.PRNGKey, dataset: Dataset, batch_size: i... function write_train_metric (line 200) | def write_train_metric(summary_writer, train_metrics, train_time, step): function write_eval_metric (line 210) | def write_eval_metric(summary_writer, eval_metrics, step): function create_learning_rate_fn (line 215) | def create_learning_rate_fn( function main (line 229) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/luke/run_luke_ner_no_trainer.py function parse_args (line 56) | def parse_args(): function main (line 230) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/lxmert/modeling_frcnn.py function norm_box (line 36) | def norm_box(boxes, raw_sizes): function pad_list_tensors (line 46) | def pad_list_tensors( function do_nms (line 115) | def do_nms(boxes, scores, image_shape, score_thresh, nms_thresh, mind, m... function _clip_box (line 142) | def _clip_box(tensor, box_size: Tuple[int, int]): function _nonempty_boxes (line 151) | def _nonempty_boxes(box, threshold: float = 0.0) -> torch.Tensor: function get_norm (line 158) | def get_norm(norm, out_channels): function _create_grid_offsets (line 171) | 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 404) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 406) | def forward(ctx, x, new_shape): method backward (line 411) | def backward(ctx, grad): class ShapeSpec (line 416) | class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width",... method __new__ (line 417) | def __new__(cls, *, channels=None, height=None, width=None, stride=None): class Box2BoxTransform (line 421) | class Box2BoxTransform(object): method __init__ (line 428) | def __init__(self, weights: Tuple[float, float, float, float], scale_c... method get_deltas (line 450) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 484) | def apply_deltas(self, deltas, boxes): class Matcher (line 523) | class Matcher(object): method __init__ (line 537) | def __init__( method __call__ (line 566) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 604) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): class RPNOutputs (line 626) | class RPNOutputs(object): method __init__ (line 627) | def __init__( method _get_ground_truth (line 669) | def _get_ground_truth(self): method predict_proposals (line 672) | def predict_proposals(self): method predict_objectness_logits (line 689) | def predict_objectness_logits(self): class Conv2d (line 703) | class Conv2d(nn.Conv2d): method __init__ (line 704) | def __init__(self, *args, **kwargs): method forward (line 712) | def forward(self, x): class LastLevelMaxPool (line 743) | class LastLevelMaxPool(nn.Module): method __init__ (line 748) | def __init__(self): method forward (line 753) | def forward(self, x): class LastLevelP6P7 (line 757) | class LastLevelP6P7(nn.Module): method __init__ (line 762) | def __init__(self, in_channels, out_channels): method forward (line 769) | def forward(self, c5): class BasicStem (line 775) | class BasicStem(nn.Module): method __init__ (line 776) | def __init__(self, in_channels=3, out_channels=64, norm="BN", caffe_ma... method forward (line 790) | def forward(self, x): method out_channels (line 800) | def out_channels(self): method stride (line 804) | def stride(self): class ResNetBlockBase (line 808) | class ResNetBlockBase(nn.Module): method __init__ (line 809) | def __init__(self, in_channels, out_channels, stride): method freeze (line 815) | def freeze(self): class BottleneckBlock (line 821) | class BottleneckBlock(ResNetBlockBase): method __init__ (line 822) | def __init__( method forward (line 881) | def forward(self, x): class Backbone (line 900) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 901) | def __init__(self): method forward (line 905) | def forward(self): method size_divisibility (line 909) | def size_divisibility(self): method output_shape (line 917) | def output_shape(self): method out_features (line 927) | def out_features(self): method out_feature_strides (line 932) | def out_feature_strides(self): method out_feature_channels (line 937) | def out_feature_channels(self): class ResNet (line 942) | class ResNet(Backbone): method __init__ (line 943) | def __init__(self, stem, stages, num_classes=None, out_features=None): method forward (line 992) | def forward(self, x): method output_shape (line 1008) | def output_shape(self): method make_stage (line 1018) | def make_stage( class ROIPooler (line 1055) | class ROIPooler(nn.Module): method __init__ (line 1061) | def __init__( method forward (line 1092) | def forward(self, feature_maps, boxes): class ROIOutputs (line 1136) | class ROIOutputs(object): method __init__ (line 1137) | def __init__(self, cfg, training=False): method _predict_boxes (line 1150) | def _predict_boxes(self, proposals, box_deltas, preds_per_image): method _predict_objs (line 1160) | def _predict_objs(self, obj_logits, preds_per_image): method _predict_attrs (line 1165) | def _predict_attrs(self, attr_logits, preds_per_image): method inference (line 1171) | def inference( method training (line 1224) | def training(self, obj_logits, attr_logits, box_deltas, pred_boxes, fe... method __call__ (line 1227) | def __call__( class Res5ROIHeads (line 1250) | class Res5ROIHeads(nn.Module): method __init__ (line 1257) | def __init__(self, cfg, input_shape): method _build_res5_block (line 1310) | def _build_res5_block(self, cfg): method _shared_roi_transform (line 1332) | def _shared_roi_transform(self, features, boxes): method forward (line 1336) | def forward(self, features, proposal_boxes, gt_boxes=None): class AnchorGenerator (line 1351) | class AnchorGenerator(nn.Module): method __init__ (line 1356) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 1376) | def _calculate_anchors(self, sizes, aspect_ratios): method box_dim (line 1391) | def box_dim(self): method num_cell_anchors (line 1395) | def num_cell_anchors(self): method grid_anchors (line 1402) | def grid_anchors(self, grid_sizes): method generate_cell_anchors (line 1412) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 1430) | def forward(self, features): class RPNHead (line 1444) | class RPNHead(nn.Module): method __init__ (line 1452) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method forward (line 1484) | def forward(self, features): class RPN (line 1498) | class RPN(nn.Module): method __init__ (line 1503) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method training (line 1533) | def training(self, images, image_shapes, features, gt_boxes): method inference (line 1536) | def inference(self, outputs, images, image_shapes, features, gt_boxes=... method forward (line 1559) | def forward(self, images, image_shapes, features, gt_boxes=None): class FastRCNNOutputLayers (line 1592) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 1599) | def __init__( method forward (line 1642) | def forward(self, roi_features): class GeneralizedRCNN (line 1659) | class GeneralizedRCNN(nn.Module): method __init__ (line 1660) | def __init__(self, cfg): method from_pretrained (line 1671) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method forward (line 1833) | def forward( method inference (line 1859) | def inference( FILE: benchmark/third_party/transformers/examples/research_projects/lxmert/processing_image.py class ResizeShortestEdge (line 30) | class ResizeShortestEdge: method __init__ (line 31) | def __init__(self, short_edge_length, max_size=sys.maxsize): method __call__ (line 41) | def __call__(self, imgs): class Preprocess (line 75) | class Preprocess: method __init__ (line 76) | def __init__(self, cfg): method pad (line 87) | def pad(self, images): method __call__ (line 101) | def __call__(self, images, single_image=False): function _scale_box (line 138) | def _scale_box(boxes, scale_yx): function _clip_box (line 144) | def _clip_box(tensor, box_size: Tuple[int, int]): FILE: benchmark/third_party/transformers/examples/research_projects/lxmert/utils.py function load_labels (line 80) | def load_labels(objs=OBJECTS, attrs=ATTRIBUTES): function load_checkpoint (line 93) | def load_checkpoint(ckp): class Config (line 107) | class Config: method __init__ (line 110) | def __init__(self, dictionary: dict, name: str = "root", level=0): method __repr__ (line 126) | def __repr__(self): method __setattr__ (line 129) | def __setattr__(self, key, val): method to_dict (line 144) | def to_dict(self): method dump_yaml (line 147) | def dump_yaml(self, data, file_name): method dump_json (line 151) | def dump_json(self, data, file_name): method load_yaml (line 156) | def load_yaml(config): method __str__ (line 161) | def __str__(self): method from_pretrained (line 178) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs): method get_config_dict (line 183) | def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs): function compare (line 227) | def compare(in_tensor): function is_remote_url (line 243) | def is_remote_url(url_or_filename): function hf_bucket_url (line 248) | def hf_bucket_url(model_id: str, filename: str, use_cdn=True) -> str: function http_get (line 257) | def http_get( function get_from_cache (line 293) | def get_from_cache( function url_to_filename (line 408) | def url_to_filename(url, etag=None): function cached_path (line 425) | def cached_path( function get_data (line 498) | def get_data(query, delim=","): function get_image_from_url (line 518) | def get_image_from_url(url): function load_frcnn_pkl_from_url (line 525) | def load_frcnn_pkl_from_url(url): function get_demo_path (line 542) | def get_demo_path(): function img_tensorize (line 546) | def img_tensorize(im, input_format="RGB"): function chunk (line 559) | def chunk(images, batch=1): FILE: benchmark/third_party/transformers/examples/research_projects/lxmert/visualizing_image.py class SingleImageViz (line 35) | class SingleImageViz: method __init__ (line 36) | def __init__( method add_box (line 88) | def add_box(self, box, color=None): method draw_boxes (line 107) | def draw_boxes(self, boxes, obj_ids=None, obj_scores=None, attr_ids=No... method draw_labels (line 140) | def draw_labels(self, label, box, color): method draw_text (line 162) | def draw_text( method save (line 194) | def save(self, saveas=None): method _create_text_labels_attr (line 205) | def _create_text_labels_attr(self, classes, scores, attr_classes, attr... method _create_text_labels (line 214) | def _create_text_labels(self, classes, scores): method _random_color (line 223) | def _random_color(self, maximum=255): method _get_buffer (line 230) | def _get_buffer(self): method _change_color_brightness (line 258) | def _change_color_brightness(self, color, brightness_factor): FILE: benchmark/third_party/transformers/examples/research_projects/mlm_wwm/run_chinese_ref.py function _is_chinese_char (line 9) | def _is_chinese_char(cp): function is_chinese (line 34) | def is_chinese(word: str): function get_chinese_word (line 43) | def get_chinese_word(tokens: List[str]): function add_sub_symbol (line 54) | def add_sub_symbol(bert_tokens: List[str], chinese_word_set: set()): function prepare_ref (line 78) | def prepare_ref(lines: List[str], ltp_tokenizer: LTP, bert_tokenizer: Be... function main (line 115) | def main(args): FILE: benchmark/third_party/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 428) | def _mp_fn(index): FILE: benchmark/third_party/transformers/examples/research_projects/mm-imdb/run_mmimdb.py function set_seed (line 58) | def set_seed(args): function train (line 66) | def train(args, train_dataset, model, tokenizer, criterion): function evaluate (line 235) | def evaluate(args, model, tokenizer, criterion, prefix=""): function load_examples (line 305) | def load_examples(args, tokenizer, evaluate=False): function main (line 313) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/movement-pruning/bertarize.py function main (line 29) | def main(args): FILE: benchmark/third_party/transformers/examples/research_projects/movement-pruning/counts_parameters.py function main (line 26) | def main(args): FILE: benchmark/third_party/transformers/examples/research_projects/movement-pruning/emmental/configuration_bert_masked.py class MaskedBertConfig (line 28) | class MaskedBertConfig(PretrainedConfig): method __init__ (line 35) | def __init__( FILE: benchmark/third_party/transformers/examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py class BertEmbeddings (line 39) | class BertEmbeddings(nn.Module): method __init__ (line 42) | def __init__(self, config): method forward (line 53) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class BertSelfAttention (line 78) | class BertSelfAttention(nn.Module): method __init__ (line 79) | def __init__(self, config): method transpose_for_scores (line 116) | def transpose_for_scores(self, x): method forward (line 121) | def forward( class BertSelfOutput (line 175) | class BertSelfOutput(nn.Module): method __init__ (line 176) | def __init__(self, config): method forward (line 188) | def forward(self, hidden_states, input_tensor, threshold): class BertAttention (line 195) | class BertAttention(nn.Module): method __init__ (line 196) | def __init__(self, config): method prune_heads (line 202) | def prune_heads(self, heads): method forward (line 225) | def forward( class BertIntermediate (line 247) | class BertIntermediate(nn.Module): method __init__ (line 248) | def __init__(self, config): method forward (line 262) | def forward(self, hidden_states, threshold): class BertOutput (line 268) | class BertOutput(nn.Module): method __init__ (line 269) | def __init__(self, config): method forward (line 281) | def forward(self, hidden_states, input_tensor, threshold): class BertLayer (line 288) | class BertLayer(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 298) | def forward( class BertEncoder (line 324) | class BertEncoder(nn.Module): method __init__ (line 325) | def __init__(self, config): method forward (line 331) | def forward( class BertPooler (line 371) | class BertPooler(nn.Module): method __init__ (line 372) | def __init__(self, config): method forward (line 377) | def forward(self, hidden_states): class MaskedBertPreTrainedModel (line 386) | class MaskedBertPreTrainedModel(PreTrainedModel): method _init_weights (line 395) | def _init_weights(self, module): class MaskedBertModel (line 469) | class MaskedBertModel(MaskedBertPreTrainedModel): method __init__ (line 476) | def __init__(self, config): method get_input_embeddings (line 487) | def get_input_embeddings(self): method set_input_embeddings (line 490) | def set_input_embeddings(self, value): method _prune_heads (line 493) | def _prune_heads(self, heads_to_prune): method forward (line 502) | 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: benchmark/third_party/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(object): method apply (line 121) | def apply(inputs: torch.tensor, threshold: float): FILE: benchmark/third_party/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: benchmark/third_party/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 417) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 508) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 563) | def main(): FILE: benchmark/third_party/transformers/examples/research_projects/movement-pruning/masked_run_squad.py function set_seed (line 65) | def set_seed(args): function schedule_threshold (line 73) | def schedule_threshold( function regularization (line 96) | def regularization(model: nn.Module, mode: str): function to_list (line 110) | def to_list(tensor): function train (line 114) | def train(args, train_dataset, model, tokenizer, teacher=None): function evaluate (line 438) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 585) | def load_and_cache_examples(args, tokenizer, evaluate=False, output_exam... function main (line 660) | def main(): FILE: benchmark/third_party/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 300) | def _prepare_decoder_input_ids_for_generation( method forward (line 313) | def forward(self, input_ids, attention_mask, max_length, decoder_start... class BeamSearchScorerTS (line 342) | class BeamSearchScorerTS(torch.nn.Module): method __init__ (line 343) | def __init__(self): method is_done (line 360) | def is_done(self) -> torch.Tensor: method init (line 363) | def init( method hypo_len (line 405) | def hypo_len(self, hypo_idx: int): method hypo_add (line 411) | def hypo_add(self, hyp: torch.Tensor, sum_logprobs: float, hypo_idx: i... method hypo_is_done (line 436) | def hypo_is_done(self, hypo_idx: int, best_sum_logprobs: float, cur_le... method process (line 450) | def process( method finalize (line 525) | def finalize( class BARTBeamSearchGenerator (line 588) | class BARTBeamSearchGenerator(BARTGenerator): method __init__ (line 589) | def __init__(self, model): method _expand_inputs_for_generation (line 595) | def _expand_inputs_for_generation( method adjust_logits_during_generation (line 611) | def adjust_logits_during_generation(self, logits, cur_len: int, max_le... method _force_token_id_to_be_generated (line 619) | def _force_token_id_to_be_generated(scores, token_id: int): method _reorder_cache (line 625) | def _reorder_cache(self, past: List[torch.Tensor], beam_idx): method beam_search (line 633) | def beam_search( method forward (line 709) | def forward(self, input_ids, attention_mask, num_beams, max_length, de... FILE: benchmark/third_party/transformers/examples/research_projects/onnx/summarization/bart_onnx/reduce_onnx_size.py function _is_equal_tensor_proto (line 12) | def _is_equal_tensor_proto(a, b): function _node_replace_input_with (line 27) | def _node_replace_input_with(node_proto, name, new_name): function _graph_replace_input_with (line 40) | def _graph_replace_input_with(graph_proto, name, new_name): function _remove_dup_initializers_from_model (line 45) | def _remove_dup_initializers_from_model(model, model_without_ext, ind_to... function remove_dup_initializers (line 62) | def remove_dup_initializers(onnx_file_path): FILE: benchmark/third_party/transformers/examples/research_projects/onnx/summarization/run_onnx_exporter.py function parse_args (line 47) | def parse_args(): function load_model_tokenizer (line 92) | def load_model_tokenizer(model_name, device="cpu"): function export_and_validate_model (line 104) | def export_and_validate_model(model, tokenizer, onnx_file_path, num_beam... function main (line 167) | def main(): FILE: benchmark/third_party/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 421) | def __init__( method module (line 440) | def module(self) -> nn.Module: method __call__ (line 443) | def __call__( class FlaxPerformerForMaskedLM (line 466) | class FlaxPerformerForMaskedLM(FlaxBertPreTrainedModel): method __init__ (line 467) | def __init__( method __call__ (line 485) | def __call__( class FlaxPerformerForMaskedLMModule (line 515) | class FlaxPerformerForMaskedLMModule(nn.Module): method __call__ (line 529) | def __call__( FILE: benchmark/third_party/transformers/examples/research_projects/performer/modeling_flax_performer_utils.py function nonnegative_softmax_kernel_feature_creator (line 41) | def nonnegative_softmax_kernel_feature_creator( function sincos_softmax_kernel_feature_creator (line 95) | def sincos_softmax_kernel_feature_creator( function generalized_kernel_feature_creator (line 145) | def generalized_kernel_feature_creator( function make_fast_softmax_attention (line 183) | def make_fast_softmax_attention( function make_fast_generalized_attention (line 244) | def make_fast_generalized_attention( class RandomMatrix (line 288) | class RandomMatrix(object): method get_2d_array (line 297) | def get_2d_array(self): class GaussianUnstructuredRandomMatrix (line 301) | class GaussianUnstructuredRandomMatrix(RandomMatrix): method __init__ (line 302) | def __init__(self, nb_rows, nb_columns, key): method get_2d_array (line 307) | def get_2d_array(self): class GaussianOrthogonalRandomMatrix (line 311) | class GaussianOrthogonalRandomMatrix(RandomMatrix): method __init__ (line 317) | def __init__(self, nb_rows, nb_columns, key, scaling=0): method get_2d_array (line 323) | def get_2d_array(self): class FastAttention (line 352) | class FastAttention(object): method dot_product_attention (line 361) | def dot_product_attention( function _numerator (line 404) | def _numerator(z_slice_shape, precision, unroll=1): function _denominator (line 443) | def _denominator(t_slice_shape, precision, unroll=1): class FastAttentionviaLowRankDecomposition (line 479) | class FastAttentionviaLowRankDecomposition(FastAttention): method __init__ (line 486) | def __init__( method draw_weights (line 506) | def draw_weights(self, key): method dot_product_attention (line 513) | def dot_product_attention( function _invert_perm (line 656) | def _invert_perm(perm): FILE: benchmark/third_party/transformers/examples/research_projects/performer/run_mlm_performer.py class WandbArguments (line 77) | class WandbArguments: class ModelArguments (line 93) | class ModelArguments: class DataTrainingArguments (line 127) | class DataTrainingArguments: method __post_init__ (line 186) | def __post_init__(self): class FlaxDataCollatorForLanguageModeling (line 201) | class FlaxDataCollatorForLanguageModeling: method __post_init__ (line 228) | def __post_init__(self): method __call__ (line 235) | def __call__(self, examples: List[Dict[str, np.ndarray]], pad_to_multi... method mask_tokens (line 252) | def mask_tokens( function create_learning_rate_scheduler (line 282) | def create_learning_rate_scheduler( function compute_metrics (line 336) | def compute_metrics(logits, labels, weights, label_smoothing=0.0): function accuracy (line 345) | def accuracy(logits, targets, weights=None): function cross_entropy (line 365) | def cross_entropy(logits, targets, weights=None, label_smoothing=0.0): function training_step (line 400) | def training_step(optimizer, batch, dropout_rng): function eval_step (line 423) | def eval_step(params, batch): function generate_batch_splits (line 436) | def generate_batch_splits(samples_idx: np.ndarray, batch_size: int) -> n... function tokenize_function (line 575) | def tokenize_function(examples): FILE: benchmark/third_party/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: benchmark/third_party/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 256) | def get_classifier( function get_bag_of_words_indices (line 297) | def get_bag_of_words_indices(bag_of_words_ids_or_paths: List[str], token... function build_bows_one_hot_vectors (line 310) | def build_bows_one_hot_vectors(bow_indices, tokenizer, device="cuda"): function full_text_generation (line 325) | def full_text_generation( function generate_text_pplm (line 425) | def generate_text_pplm( function set_generic_model_params (line 579) | def set_generic_model_params(discrim_weights, discrim_meta): function run_pplm_example (line 591) | def run_pplm_example( FILE: benchmark/third_party/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="gpt2-medium", cached_... 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: benchmark/third_party/transformers/examples/research_projects/quantization-qdqbert/evaluate-hf-trt-qa.py function model_infer (line 212) | def model_infer(inputs, context, d_inputs, h_output0, h_output1, d_outpu... function prepare_validation_features (line 299) | def prepare_validation_features(examples): function post_processing_function (line 366) | def post_processing_function(examples, features, predictions, stage="eva... function binding_nbytes (line 404) | def binding_nbytes(binding): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/quantization-qdqbert/utils_qa.py function postprocess_qa_predictions (line 31) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 248) | def postprocess_qa_predictions_with_beam_search( FILE: benchmark/third_party/transformers/examples/research_projects/rag-end2end-retriever/callbacks_rag.py function count_trainable_parameters (line 13) | def count_trainable_parameters(model): function get_checkpoint_callback (line 22) | def get_checkpoint_callback(output_dir, metric): function get_early_stopping_callback (line 50) | def get_early_stopping_callback(metric, patience): class Seq2SeqLoggingCallback (line 59) | class Seq2SeqLoggingCallback(pl.Callback): method on_batch_end (line 60) | def on_batch_end(self, trainer, pl_module): method _write_logs (line 65) | def _write_logs( method on_train_start (line 101) | def on_train_start(self, trainer, pl_module): method on_test_end (line 112) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... method on_validation_end (line 117) | def on_validation_end(self, trainer: pl.Trainer, pl_module): FILE: benchmark/third_party/transformers/examples/research_projects/rag-end2end-retriever/distributed_ray_retriever.py class RayRetriever (line 12) | class RayRetriever: method __init__ (line 13) | def __init__(self): method create_rag_retriever (line 16) | def create_rag_retriever(self, config, question_encoder_tokenizer, gen... method init_retrieval (line 27) | def init_retrieval(self): method clear_object (line 30) | def clear_object(self): method retrieve (line 35) | def retrieve(self, question_hidden_states, n_docs): class RagRayDistributedRetriever (line 41) | class RagRayDistributedRetriever(RagRetriever): method __init__ (line 69) | def __init__(self, config, question_encoder_tokenizer, generator_token... method init_retrieval (line 97) | def init_retrieval(self): method retrieve (line 112) | def retrieve(self, question_hidden_states, n_docs): method get_tokenizers (line 144) | def get_tokenizers(cls, retriever_name_or_path, indexed_dataset=None, ... method from_pretrained (line 148) | def from_pretrained(cls, retriever_name_or_path, actor_handles, indexe... method re_load (line 168) | def re_load(self): FILE: benchmark/third_party/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: benchmark/third_party/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 386) | def validation_step(self, batch, batch_idx) -> Dict: method validation_epoch_end (line 389) | def validation_epoch_end(self, outputs, prefix="val") -> Dict: method save_metrics (line 419) | def save_metrics(self, latest_metrics, type_path) -> None: method calc_generative_metrics (line 423) | def calc_generative_metrics(self, preds, target) -> Dict: method _generative_step (line 426) | def _generative_step(self, batch: dict) -> dict: method test_step (line 449) | def test_step(self, batch, batch_idx): method test_epoch_end (line 452) | def test_epoch_end(self, outputs): method get_dataset (line 455) | def get_dataset(self, type_path) -> Seq2SeqDataset: method get_dataloader (line 467) | def get_dataloader(self, type_path: str, batch_size: int, shuffle: boo... method train_dataloader (line 479) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 483) | def val_dataloader(self) -> DataLoader: method test_dataloader (line 486) | def test_dataloader(self) -> DataLoader: method on_save_checkpoint (line 490) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method add_model_specific_args (line 509) | def add_model_specific_args(parser, root_dir): method add_retriever_specific_args (line 615) | def add_retriever_specific_args(parser): method add_ray_specific_args (line 671) | def add_ray_specific_args(parser): function main (line 697) | def main(args=None, model=None) -> GenerativeQAModule: FILE: benchmark/third_party/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 68) | def add_index(shard_dir, index_path): FILE: benchmark/third_party/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: benchmark/third_party/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 108) | class RagExampleArguments: class ProcessingArguments (line 137) | class ProcessingArguments: class IndexHnswArguments (line 153) | class IndexHnswArguments: FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/rag/_test_finetune_rag.py class RagFinetuneExampleTests (line 25) | class RagFinetuneExampleTests(TestCasePlus): method _create_dummy_data (line 26) | def _create_dummy_data(self, data_dir): method _run_finetune (line 36) | def _run_finetune(self, gpus: int, distributed_retriever: str = "pytor... method test_finetune_gpu (line 91) | def test_finetune_gpu(self): method test_finetune_multigpu (line 96) | def test_finetune_multigpu(self): method test_finetune_gpu_ray_retrieval (line 102) | def test_finetune_gpu_ray_retrieval(self): method test_finetune_multigpu_ray_retrieval (line 108) | def test_finetune_multigpu_ray_retrieval(self): FILE: benchmark/third_party/transformers/examples/research_projects/rag/callbacks_rag.py function count_trainable_parameters (line 13) | def count_trainable_parameters(model): function get_checkpoint_callback (line 22) | def get_checkpoint_callback(output_dir, metric): function get_early_stopping_callback (line 47) | def get_early_stopping_callback(metric, patience): class Seq2SeqLoggingCallback (line 56) | class Seq2SeqLoggingCallback(pl.Callback): method on_batch_end (line 57) | def on_batch_end(self, trainer, pl_module): method _write_logs (line 62) | def _write_logs( method on_train_start (line 98) | def on_train_start(self, trainer, pl_module): method on_test_end (line 109) | def on_test_end(self, trainer: pl.Trainer, pl_module: pl.LightningModu... method on_validation_end (line 114) | def on_validation_end(self, trainer: pl.Trainer, pl_module): FILE: benchmark/third_party/transformers/examples/research_projects/rag/consolidate_rag_checkpoint.py function consolidate (line 11) | def consolidate( FILE: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/rag/distributed_ray_retriever.py class RayRetriever (line 12) | class RayRetriever: method __init__ (line 13) | def __init__(self): method create_rag_retriever (line 16) | def create_rag_retriever(self, config, question_encoder_tokenizer, gen... method init_retrieval (line 27) | def init_retrieval(self): method retrieve (line 30) | def retrieve(self, question_hidden_states, n_docs): class RagRayDistributedRetriever (line 35) | class RagRayDistributedRetriever(RagRetriever): method __init__ (line 63) | def __init__(self, config, question_encoder_tokenizer, generator_token... method init_retrieval (line 87) | def init_retrieval(self): method retrieve (line 102) | def retrieve(self, question_hidden_states, n_docs): method get_tokenizers (line 131) | def get_tokenizers(cls, retriever_name_or_path, indexed_dataset=None, ... method from_pretrained (line 135) | def from_pretrained(cls, retriever_name_or_path, actor_handles, indexe... FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/rag/parse_dpr_relevance_data.py function main (line 13) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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 141) | class RagExampleArguments: class ProcessingArguments (line 170) | class ProcessingArguments: class IndexHnswArguments (line 186) | class IndexHnswArguments: FILE: benchmark/third_party/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: benchmark/third_party/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 50) | def normalize_text(text: str) -> str: function main (line 67) | def main(args): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/seq2seq-distillation/_test_make_student.py class MakeStudentTester (line 15) | class MakeStudentTester(unittest.TestCase): method teacher_config (line 17) | def teacher_config(self): method test_valid_t5 (line 20) | def test_valid_t5(self): method test_asymmetric_t5 (line 24) | def test_asymmetric_t5(self): method test_same_decoder_small_encoder (line 27) | def test_same_decoder_small_encoder(self): method test_small_enc_small_dec (line 32) | def test_small_enc_small_dec(self): method test_raises_assert (line 37) | def test_raises_assert(self): FILE: benchmark/third_party/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: benchmark/third_party/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 111) | def _test_distiller_cli_fork(self, updates, check_contents=True): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/research_projects/visual_bert/modeling_frcnn.py function norm_box (line 36) | def norm_box(boxes, raw_sizes): function pad_list_tensors (line 46) | def pad_list_tensors( function do_nms (line 115) | def do_nms(boxes, scores, image_shape, score_thresh, nms_thresh, mind, m... function _clip_box (line 142) | def _clip_box(tensor, box_size: Tuple[int, int]): function _nonempty_boxes (line 151) | def _nonempty_boxes(box, threshold: float = 0.0) -> torch.Tensor: function get_norm (line 158) | def get_norm(norm, out_channels): function _create_grid_offsets (line 171) | 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 404) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 406) | def forward(ctx, x, new_shape): method backward (line 411) | def backward(ctx, grad): class ShapeSpec (line 416) | class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width",... method __new__ (line 417) | def __new__(cls, *, channels=None, height=None, width=None, stride=None): class Box2BoxTransform (line 421) | class Box2BoxTransform(object): method __init__ (line 428) | def __init__(self, weights: Tuple[float, float, float, float], scale_c... method get_deltas (line 450) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 484) | def apply_deltas(self, deltas, boxes): class Matcher (line 523) | class Matcher(object): method __init__ (line 537) | def __init__( method __call__ (line 566) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 604) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): class RPNOutputs (line 626) | class RPNOutputs(object): method __init__ (line 627) | def __init__( method _get_ground_truth (line 669) | def _get_ground_truth(self): method predict_proposals (line 672) | def predict_proposals(self): method predict_objectness_logits (line 689) | def predict_objectness_logits(self): class Conv2d (line 703) | class Conv2d(nn.Conv2d): method __init__ (line 704) | def __init__(self, *args, **kwargs): method forward (line 712) | def forward(self, x): class LastLevelMaxPool (line 743) | class LastLevelMaxPool(nn.Module): method __init__ (line 748) | def __init__(self): method forward (line 753) | def forward(self, x): class LastLevelP6P7 (line 757) | class LastLevelP6P7(nn.Module): method __init__ (line 762) | def __init__(self, in_channels, out_channels): method forward (line 769) | def forward(self, c5): class BasicStem (line 775) | class BasicStem(nn.Module): method __init__ (line 776) | def __init__(self, in_channels=3, out_channels=64, norm="BN", caffe_ma... method forward (line 790) | def forward(self, x): method out_channels (line 800) | def out_channels(self): method stride (line 804) | def stride(self): class ResNetBlockBase (line 808) | class ResNetBlockBase(nn.Module): method __init__ (line 809) | def __init__(self, in_channels, out_channels, stride): method freeze (line 815) | def freeze(self): class BottleneckBlock (line 821) | class BottleneckBlock(ResNetBlockBase): method __init__ (line 822) | def __init__( method forward (line 881) | def forward(self, x): class Backbone (line 900) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 901) | def __init__(self): method forward (line 905) | def forward(self): method size_divisibility (line 909) | def size_divisibility(self): method output_shape (line 917) | def output_shape(self): method out_features (line 927) | def out_features(self): method out_feature_strides (line 932) | def out_feature_strides(self): method out_feature_channels (line 937) | def out_feature_channels(self): class ResNet (line 942) | class ResNet(Backbone): method __init__ (line 943) | def __init__(self, stem, stages, num_classes=None, out_features=None): method forward (line 992) | def forward(self, x): method output_shape (line 1008) | def output_shape(self): method make_stage (line 1018) | def make_stage( class ROIPooler (line 1055) | class ROIPooler(nn.Module): method __init__ (line 1061) | def __init__( method forward (line 1092) | def forward(self, feature_maps, boxes): class ROIOutputs (line 1136) | class ROIOutputs(object): method __init__ (line 1137) | def __init__(self, cfg, training=False): method _predict_boxes (line 1150) | def _predict_boxes(self, proposals, box_deltas, preds_per_image): method _predict_objs (line 1160) | def _predict_objs(self, obj_logits, preds_per_image): method _predict_attrs (line 1165) | def _predict_attrs(self, attr_logits, preds_per_image): method inference (line 1171) | def inference( method training (line 1224) | def training(self, obj_logits, attr_logits, box_deltas, pred_boxes, fe... method __call__ (line 1227) | def __call__( class Res5ROIHeads (line 1250) | class Res5ROIHeads(nn.Module): method __init__ (line 1257) | def __init__(self, cfg, input_shape): method _build_res5_block (line 1310) | def _build_res5_block(self, cfg): method _shared_roi_transform (line 1332) | def _shared_roi_transform(self, features, boxes): method forward (line 1336) | def forward(self, features, proposal_boxes, gt_boxes=None): class AnchorGenerator (line 1351) | class AnchorGenerator(nn.Module): method __init__ (line 1356) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 1376) | def _calculate_anchors(self, sizes, aspect_ratios): method box_dim (line 1391) | def box_dim(self): method num_cell_anchors (line 1395) | def num_cell_anchors(self): method grid_anchors (line 1402) | def grid_anchors(self, grid_sizes): method generate_cell_anchors (line 1412) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 1430) | def forward(self, features): class RPNHead (line 1444) | class RPNHead(nn.Module): method __init__ (line 1452) | def __init__(self, cfg, input_shape: List[ShapeSpec]): method forward (line 1484) | def forward(self, features): class RPN (line 1498) | class RPN(nn.Module): method __init__ (line 1503) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method training (line 1533) | def training(self, images, image_shapes, features, gt_boxes): method inference (line 1536) | def inference(self, outputs, images, image_shapes, features, gt_boxes=... method forward (line 1559) | def forward(self, images, image_shapes, features, gt_boxes=None): class FastRCNNOutputLayers (line 1592) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 1599) | def __init__( method forward (line 1642) | def forward(self, roi_features): class GeneralizedRCNN (line 1659) | class GeneralizedRCNN(nn.Module): method __init__ (line 1660) | def __init__(self, cfg): method from_pretrained (line 1671) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method forward (line 1833) | def forward( method inference (line 1859) | def inference( FILE: benchmark/third_party/transformers/examples/research_projects/visual_bert/processing_image.py class ResizeShortestEdge (line 30) | class ResizeShortestEdge: method __init__ (line 31) | def __init__(self, short_edge_length, max_size=sys.maxsize): method __call__ (line 41) | def __call__(self, imgs): class Preprocess (line 75) | class Preprocess: method __init__ (line 76) | def __init__(self, cfg): method pad (line 87) | def pad(self, images): method __call__ (line 101) | def __call__(self, images, single_image=False): function _scale_box (line 138) | def _scale_box(boxes, scale_yx): function _clip_box (line 144) | def _clip_box(tensor, box_size: Tuple[int, int]): FILE: benchmark/third_party/transformers/examples/research_projects/visual_bert/utils.py function load_labels (line 80) | def load_labels(objs=OBJECTS, attrs=ATTRIBUTES): function load_checkpoint (line 93) | def load_checkpoint(ckp): class Config (line 107) | class Config: method __init__ (line 110) | def __init__(self, dictionary: dict, name: str = "root", level=0): method __repr__ (line 126) | def __repr__(self): method __setattr__ (line 129) | def __setattr__(self, key, val): method to_dict (line 144) | def to_dict(self): method dump_yaml (line 147) | def dump_yaml(self, data, file_name): method dump_json (line 151) | def dump_json(self, data, file_name): method load_yaml (line 156) | def load_yaml(config): method __str__ (line 161) | def __str__(self): method from_pretrained (line 178) | def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs): method get_config_dict (line 183) | def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs): function compare (line 227) | def compare(in_tensor): function is_remote_url (line 243) | def is_remote_url(url_or_filename): function hf_bucket_url (line 248) | def hf_bucket_url(model_id: str, filename: str, use_cdn=True) -> str: function http_get (line 257) | def http_get( function get_from_cache (line 293) | def get_from_cache( function url_to_filename (line 408) | def url_to_filename(url, etag=None): function cached_path (line 425) | def cached_path( function get_data (line 498) | def get_data(query, delim=","): function get_image_from_url (line 518) | def get_image_from_url(url): function load_frcnn_pkl_from_url (line 525) | def load_frcnn_pkl_from_url(url): function get_demo_path (line 542) | def get_demo_path(): function img_tensorize (line 546) | def img_tensorize(im, input_format="RGB"): function chunk (line 559) | def chunk(images, batch=1): FILE: benchmark/third_party/transformers/examples/research_projects/visual_bert/visualizing_image.py class SingleImageViz (line 35) | class SingleImageViz: method __init__ (line 36) | def __init__( method add_box (line 88) | def add_box(self, box, color=None): method draw_boxes (line 107) | def draw_boxes(self, boxes, obj_ids=None, obj_scores=None, attr_ids=No... method draw_labels (line 140) | def draw_labels(self, label, box, color): method draw_text (line 162) | def draw_text( method save (line 194) | def save(self, saveas=None): method _create_text_labels_attr (line 205) | def _create_text_labels_attr(self, classes, scores, attr_classes, attr... method _create_text_labels (line 214) | def _create_text_labels(self, classes, scores): method _random_color (line 223) | def _random_color(self, maximum=255): method _get_buffer (line 230) | def _get_buffer(self): method _change_color_brightness (line 258) | def _change_color_brightness(self, color, brightness_factor): FILE: benchmark/third_party/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 203) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/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 145) | def run_trainer( method get_launcher (line 195) | def get_launcher(self, distributed=False): FILE: benchmark/third_party/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 338) | def __call__(self, features: List[Dict[str, Union[List[int], torch.Ten... function create_vocabulary_from_data (line 377) | def create_vocabulary_from_data( function main (line 421) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/examples/tensorflow/benchmarking/run_benchmark_tf.py function main (line 22) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/language-modeling/run_clm.py class ModelArguments (line 71) | class ModelArguments: method __post_init__ (line 125) | def __post_init__(self): class DataTrainingArguments (line 133) | class DataTrainingArguments: method __post_init__ (line 198) | def __post_init__(self): function main (line 213) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/language-modeling/run_mlm.py class ModelArguments (line 69) | class ModelArguments: method __post_init__ (line 123) | def __post_init__(self): class DataTrainingArguments (line 131) | class DataTrainingArguments: method __post_init__ (line 204) | def __post_init__(self): function main (line 219) | def main(): FILE: benchmark/third_party/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 122) | class ModelArguments: class DataTrainingArguments (line 160) | class DataTrainingArguments: method __post_init__ (line 215) | def __post_init__(self): function main (line 227) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/question-answering/run_qa.py class ModelArguments (line 58) | class ModelArguments: class DataTrainingArguments (line 92) | class DataTrainingArguments: method __post_init__ (line 195) | def __post_init__(self): class SavePretrainedCallback (line 218) | class SavePretrainedCallback(tf.keras.callbacks.Callback): method __init__ (line 222) | def __init__(self, output_dir, **kwargs): method on_epoch_end (line 226) | def on_epoch_end(self, epoch, logs=None): function main (line 233) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/question-answering/utils_qa.py function postprocess_qa_predictions (line 31) | def postprocess_qa_predictions( function postprocess_qa_predictions_with_beam_search (line 252) | def postprocess_qa_predictions_with_beam_search( FILE: benchmark/third_party/transformers/examples/tensorflow/summarization/run_summarization.py class ModelArguments (line 76) | class ModelArguments: class DataTrainingArguments (line 114) | class DataTrainingArguments: method __post_init__ (line 242) | def __post_init__(self): function main (line 276) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/test_tensorflow_examples.py function get_setup_file (line 62) | def get_setup_file(): function get_results (line 69) | def get_results(output_dir): function is_cuda_available (line 80) | def is_cuda_available(): class ExamplesTests (line 88) | class ExamplesTests(TestCasePlus): method test_run_text_classification (line 90) | def test_run_text_classification(self): method test_run_clm (line 120) | def test_run_clm(self): method test_run_mlm (line 146) | def test_run_mlm(self): method test_run_ner (line 168) | def test_run_ner(self): method test_run_squad (line 195) | def test_run_squad(self): method test_run_swag (line 220) | def test_run_swag(self): method test_run_summarization (line 244) | def test_run_summarization(self): method test_run_translation (line 271) | def test_run_translation(self): FILE: benchmark/third_party/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 181) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/text-classification/run_text_classification.py class SavePretrainedCallback (line 52) | class SavePretrainedCallback(tf.keras.callbacks.Callback): method __init__ (line 56) | def __init__(self, output_dir, **kwargs): method on_epoch_end (line 60) | def on_epoch_end(self, epoch, logs=None): class DataTrainingArguments (line 69) | class DataTrainingArguments: method __post_init__ (line 136) | def __post_init__(self): class ModelArguments (line 151) | class ModelArguments: function main (line 187) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/token-classification/run_ner.py class ModelArguments (line 57) | class ModelArguments: class DataTrainingArguments (line 91) | class DataTrainingArguments: method __post_init__ (line 179) | def __post_init__(self): function main (line 195) | def main(): FILE: benchmark/third_party/transformers/examples/tensorflow/translation/run_translation.py class ModelArguments (line 70) | class ModelArguments: class DataTrainingArguments (line 108) | class DataTrainingArguments: method __post_init__ (line 240) | def __post_init__(self): function main (line 257) | def main(): FILE: benchmark/third_party/transformers/hubconf.py function config (line 38) | def config(*args, **kwargs): function tokenizer (line 58) | def tokenizer(*args, **kwargs): function model (line 72) | def model(*args, **kwargs): function modelForCausalLM (line 91) | def modelForCausalLM(*args, **kwargs): function modelForMaskedLM (line 109) | def modelForMaskedLM(*args, **kwargs): function modelForSequenceClassification (line 128) | def modelForSequenceClassification(*args, **kwargs): function modelForQuestionAnswering (line 147) | def modelForQuestionAnswering(*args, **kwargs): FILE: benchmark/third_party/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: benchmark/third_party/transformers/scripts/check_tokenizers.py function check_diff (line 22) | def check_diff(spm_diff, tok_diff, slow, fast): function check_LTR_mark (line 43) | def check_LTR_mark(line, idx, fast): function check_details (line 53) | def check_details(line, spm_ids, tok_ids, slow, fast): function test_string (line 112) | def test_string(slow, fast, text): function test_tokenizer (line 144) | def test_tokenizer(slow, fast): FILE: benchmark/third_party/transformers/scripts/distributed/torch-distributed-gpu-test.py function printflock (line 53) | def printflock(*msgs): FILE: benchmark/third_party/transformers/scripts/fsmt/gen-card-allenai-wmt16.py function write_model_card (line 22) | def write_model_card(model_card_dir, src_lang, tgt_lang, model_name): FILE: benchmark/third_party/transformers/scripts/fsmt/gen-card-allenai-wmt19.py function write_model_card (line 22) | def write_model_card(model_card_dir, src_lang, tgt_lang, model_name): FILE: benchmark/third_party/transformers/scripts/fsmt/gen-card-facebook-wmt19.py function write_model_card (line 22) | def write_model_card(model_card_dir, src_lang, tgt_lang): FILE: benchmark/third_party/transformers/scripts/stale.py function main (line 34) | def main(): FILE: benchmark/third_party/transformers/setup.py function deps_list (line 205) | def deps_list(*pkgs): class DepsTableUpdateCommand (line 209) | class DepsTableUpdateCommand(Command): method initialize_options (line 221) | def initialize_options(self): method finalize_options (line 224) | def finalize_options(self): method run (line 227) | def run(self): FILE: benchmark/third_party/transformers/src/transformers/activations.py class NewGELUActivation (line 28) | class NewGELUActivation(nn.Module): method forward (line 34) | def forward(self, input: Tensor) -> Tensor: class GELUActivation (line 38) | class GELUActivation(nn.Module): method __init__ (line 46) | def __init__(self, use_gelu_python: bool = False): method _gelu_python (line 53) | def _gelu_python(self, input: Tensor) -> Tensor: method forward (line 56) | def forward(self, input: Tensor) -> Tensor: class FastGELUActivation (line 60) | class FastGELUActivation(nn.Module): method forward (line 65) | def forward(self, input: Tensor) -> Tensor: class QuickGELUActivation (line 69) | class QuickGELUActivation(nn.Module): method forward (line 74) | def forward(self, input: Tensor) -> Tensor: class ClippedGELUActivation (line 78) | class ClippedGELUActivation(nn.Module): method __init__ (line 91) | def __init__(self, min: float, max: float): method forward (line 99) | def forward(self, x: Tensor) -> Tensor: class SiLUActivation (line 103) | class SiLUActivation(nn.Module): method forward (line 112) | def forward(self, input: Tensor) -> Tensor: class MishActivation (line 116) | class MishActivation(nn.Module): method __init__ (line 122) | def __init__(self): method _mish_python (line 129) | def _mish_python(self, input: Tensor) -> Tensor: method forward (line 132) | def forward(self, input: Tensor) -> Tensor: class LinearActivation (line 136) | class LinearActivation(nn.Module): method forward (line 141) | def forward(self, input: Tensor) -> Tensor: class ClassInstantier (line 145) | class ClassInstantier(OrderedDict): method __getitem__ (line 146) | def __getitem__(self, key): function get_activation (line 170) | def get_activation(activation_string): FILE: benchmark/third_party/transformers/src/transformers/activations_tf.py function _gelu (line 21) | def _gelu(x): function _gelu_new (line 34) | def _gelu_new(x): function mish (line 52) | def mish(x): function gelu_fast (line 58) | def gelu_fast(x): function quick_gelu (line 66) | def quick_gelu(x): function gelu_10 (line 72) | def gelu_10(x): function glu (line 86) | def glu(x, axis=-1): function approximate_gelu_wrap (line 104) | def approximate_gelu_wrap(x): function get_tf_activation (line 130) | def get_tf_activation(activation_string): FILE: benchmark/third_party/transformers/src/transformers/benchmark/benchmark.py class PyTorchBenchmark (line 50) | class PyTorchBenchmark(Benchmark): method framework_version (line 57) | def framework_version(self): method _inference_speed (line 60) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _inference_memory (line 64) | def _inference_memory( method _train_speed (line 70) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _train_memory (line 74) | def _train_memory( method _prepare_inference_func (line 80) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 139) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 199) | def _measure_speed(self, func) -> float: method _measure_memory (line 227) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: benchmark/third_party/transformers/src/transformers/benchmark/benchmark_args.py class PyTorchBenchmarkArguments (line 35) | class PyTorchBenchmarkArguments(BenchmarkArguments): method __init__ (line 47) | def __init__(self, **kwargs): method _setup_devices (line 80) | def _setup_devices(self) -> Tuple["torch.device", int]: method is_tpu (line 94) | def is_tpu(self): method device_idx (line 99) | def device_idx(self) -> int: method device (line 105) | def device(self) -> "torch.device": method n_gpu (line 110) | def n_gpu(self): method is_gpu (line 114) | def is_gpu(self): FILE: benchmark/third_party/transformers/src/transformers/benchmark/benchmark_args_tf.py class TensorFlowBenchmarkArguments (line 32) | class TensorFlowBenchmarkArguments(BenchmarkArguments): method __init__ (line 44) | def __init__(self, **kwargs): method _setup_tpu (line 81) | def _setup_tpu(self) -> Tuple["tf.distribute.cluster_resolver.TPUClust... method _setup_strategy (line 95) | def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", "tf.distr... method is_tpu (line 115) | def is_tpu(self) -> bool: method strategy (line 120) | def strategy(self) -> "tf.distribute.Strategy": method gpu_list (line 125) | def gpu_list(self): method n_gpu (line 130) | def n_gpu(self) -> int: method is_gpu (line 136) | def is_gpu(self) -> bool: FILE: benchmark/third_party/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): method do_multi_processing (line 158) | def do_multi_processing(self): FILE: benchmark/third_party/transformers/src/transformers/benchmark/benchmark_tf.py function run_with_tf_optimizations (line 51) | def run_with_tf_optimizations(do_eager_mode: bool, use_xla: bool): function random_input_ids (line 73) | def random_input_ids(batch_size: int, sequence_length: int, vocab_size: ... class TensorFlowBenchmark (line 79) | class TensorFlowBenchmark(Benchmark): method framework_version (line 86) | def framework_version(self): method _inference_speed (line 89) | 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 102) | def _inference_memory( method _train_memory (line 113) | def _train_memory( method _prepare_inference_func (line 124) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 165) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 214) | def _measure_speed(self, func) -> float: method _measure_memory (line 233) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: benchmark/third_party/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 323) | def start_memory_tracing( function stop_memory_tracing (line 475) | def stop_memory_tracing( function bytes_to_mega_bytes (line 591) | def bytes_to_mega_bytes(memory_amount: int) -> int: class Benchmark (line 596) | class Benchmark(ABC): method __init__ (line 606) | def __init__(self, args: BenchmarkArguments = None, configs: Pretraine... method print_fn (line 633) | def print_fn(self): method framework_version (line 649) | def framework_version(self): method _inference_speed (line 653) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _train_speed (line 657) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _inference_memory (line 661) | def _inference_memory( method _train_memory (line 667) | def _train_memory( method inference_speed (line 672) | def inference_speed(self, *args, **kwargs) -> float: method train_speed (line 675) | def train_speed(self, *args, **kwargs) -> float: method inference_memory (line 678) | def inference_memory(self, *args, **kwargs) -> [Memory, Optional[Memor... method train_memory (line 681) | def train_memory(self, *args, **kwargs) -> [Memory, Optional[MemorySum... method run (line 684) | def run(self): method environment_info (line 784) | def environment_info(self): method print_results (line 842) | def print_results(self, result_dict, type_label): method print_memory_trace_statistics (line 864) | def print_memory_trace_statistics(self, summary: MemorySummary): method save_to_csv (line 888) | def save_to_csv(self, result_dict, filename): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/commands/add_new_model.py function add_new_model_command_factory (line 37) | def add_new_model_command_factory(args: Namespace): class AddNewModelCommand (line 41) | class AddNewModelCommand(BaseTransformersCLICommand): method register_subcommand (line 43) | def register_subcommand(parser: ArgumentParser): method __init__ (line 52) | def __init__(self, testing: bool, testing_file: str, path=None, *args): method run (line 57) | def run(self): FILE: benchmark/third_party/transformers/src/transformers/commands/add_new_model_like.py class ModelPatterns (line 42) | class ModelPatterns: method __post_init__ (line 83) | def __post_init__(self): function is_empty_line (line 115) | def is_empty_line(line: str) -> bool: function find_indent (line 122) | def find_indent(line: str) -> int: function parse_module_content (line 132) | def parse_module_content(content: str) -> List[str]: function add_content_to_text (line 172) | def add_content_to_text( function add_content_to_file (line 230) | def add_content_to_file( function replace_model_patterns (line 268) | def replace_model_patterns( function simplify_replacements (line 334) | def simplify_replacements(replacements): function get_module_from_file (line 371) | def get_module_from_file(module_file: Union[str, os.PathLike]) -> str: function duplicate_module (line 400) | def duplicate_module( function filter_framework_files (line 493) | def filter_framework_files( function get_model_files (line 526) | def get_model_files(model_type: str, frameworks: Optional[List[str]] = N... function find_base_model_checkpoint (line 570) | def find_base_model_checkpoint( function get_default_frameworks (line 604) | def get_default_frameworks(): function retrieve_model_classes (line 621) | def retrieve_model_classes(model_type: str, frameworks: Optional[List[st... function retrieve_info_for_model (line 662) | def retrieve_info_for_model(model_type, frameworks: Optional[List[str]] ... function clean_frameworks_in_init (line 745) | def clean_frameworks_in_init( function add_model_to_main_init (line 822) | def add_model_to_main_init( function insert_tokenizer_in_auto_module (line 910) | def insert_tokenizer_in_auto_module(old_model_patterns: ModelPatterns, n... function add_model_to_auto_classes (line 971) | def add_model_to_auto_classes( function duplicate_doc_file (line 1056) | def duplicate_doc_file( function create_new_model_like (line 1150) | def create_new_model_like( function add_new_model_like_command_factory (line 1319) | def add_new_model_like_command_factory(args: Namespace): class AddNewModelLikeCommand (line 1323) | class AddNewModelLikeCommand(BaseTransformersCLICommand): method register_subcommand (line 1325) | def register_subcommand(parser: ArgumentParser): method __init__ (line 1335) | def __init__(self, config_file=None, path_to_repo=None, *args): method run (line 1355) | def run(self): function get_user_field (line 1373) | def get_user_field( function convert_to_bool (line 1425) | def convert_to_bool(x: str) -> bool: function get_user_input (line 1436) | def get_user_input(): FILE: benchmark/third_party/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: benchmark/third_party/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 37) | def __init__(self, model: str, cache: str, force: bool): method run (line 42) | def run(self): FILE: benchmark/third_party/transformers/src/transformers/commands/env.py function info_command_factory (line 25) | def info_command_factory(_): class EnvironmentCommand (line 29) | class EnvironmentCommand(BaseTransformersCLICommand): method register_subcommand (line 31) | def register_subcommand(parser: ArgumentParser): method run (line 35) | def run(self): method format_dict (line 91) | def format_dict(d): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/commands/pt_to_tf.py function convert_command_factory (line 56) | def convert_command_factory(args: Namespace): class PTtoTFCommand (line 73) | class PTtoTFCommand(BaseTransformersCLICommand): method register_subcommand (line 75) | def register_subcommand(parser: ArgumentParser): method find_pt_tf_differences (line 131) | def find_pt_tf_differences(pt_outputs, tf_outputs): method __init__ (line 169) | def __init__( method get_inputs (line 189) | def get_inputs(self, pt_model, config): method run (line 253) | def run(self): FILE: benchmark/third_party/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: benchmark/third_party/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 174) | def run(self): method model_info (line 177) | def model_info(self): method tokenize (line 180) | def tokenize(self, text_input: str = Body(None, embed=True), return_id... method detokenize (line 198) | def detokenize( method forward (line 215) | async def forward(self, inputs=Body(None, embed=True)): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/commands/transformers_cli.py function main (line 30) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/configuration_utils.py class PretrainedConfig (line 48) | class PretrainedConfig(PushToHubMixin): method __setattr__ (line 246) | def __setattr__(self, key, value): method __getattribute__ (line 251) | def __getattribute__(self, key): method __init__ (line 256) | def __init__(self, **kwargs): method name_or_path (line 384) | def name_or_path(self) -> str: method name_or_path (line 388) | def name_or_path(self, value): method use_return_dict (line 392) | def use_return_dict(self) -> bool: method num_labels (line 400) | def num_labels(self) -> int: method num_labels (line 407) | def num_labels(self, num_labels: int): method save_pretrained (line 412) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method from_pretrained (line 455) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method get_config_dict (line 542) | def get_config_dict( method _get_config_dict (line 573) | def _get_config_dict( method from_dict (line 659) | def from_dict(cls, config_dict: Dict[str, Any], **kwargs) -> "Pretrain... method from_json_file (line 713) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> "Pretra... method _dict_from_json_file (line 729) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __eq__ (line 734) | def __eq__(self, other): method __repr__ (line 737) | def __repr__(self): method to_diff_dict (line 740) | def to_diff_dict(self) -> Dict[str, Any]: method to_dict (line 772) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 794) | def to_json_string(self, use_diff: bool = True) -> str: method to_json_file (line 812) | def to_json_file(self, json_file_path: Union[str, os.PathLike], use_di... method update (line 826) | def update(self, config_dict: Dict[str, Any]): method update_from_string (line 836) | def update_from_string(self, update_str: str): method dict_torch_dtype_to_str (line 874) | def dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method register_for_auto_class (line 887) | def register_for_auto_class(cls, auto_class="AutoConfig"): function get_configuration_file (line 913) | def get_configuration_file(configuration_files: List[str]) -> str: FILE: benchmark/third_party/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 312) | def convert_tensorflow(nlp: Pipeline, opset: int, output: Path): function convert (line 353) | def convert( function optimize (line 403) | def optimize(onnx_model_path: Path) -> Path: function quantize (line 428) | def quantize(onnx_model_path: Path) -> Path: function verify (line 503) | def verify(path: Path): FILE: benchmark/third_party/transformers/src/transformers/convert_pytorch_checkpoint_to_tf2.py function convert_pt_checkpoint_to_tf (line 302) | def convert_pt_checkpoint_to_tf( function convert_all_pt_checkpoints_to_tf (line 349) | def convert_all_pt_checkpoints_to_tf( FILE: benchmark/third_party/transformers/src/transformers/convert_slow_tokenizer.py class SentencePieceExtractor (line 31) | class SentencePieceExtractor: method __init__ (line 36) | def __init__(self, model: str): method extract (line 43) | def extract(self) -> Tuple[Dict[str, int], List[Tuple]]: function check_number_comma (line 61) | def check_number_comma(piece: str) -> bool: class Converter (line 65) | class Converter: method __init__ (line 66) | def __init__(self, original_tokenizer): method converted (line 69) | def converted(self) -> Tokenizer: class BertConverter (line 73) | class BertConverter(Converter): method converted (line 74) | def converted(self) -> Tokenizer: class SplinterConverter (line 112) | class SplinterConverter(Converter): method converted (line 113) | def converted(self) -> Tokenizer: class FunnelConverter (line 162) | class FunnelConverter(Converter): method converted (line 163) | def converted(self) -> Tokenizer: class MPNetConverter (line 201) | class MPNetConverter(Converter): method converted (line 202) | def converted(self) -> Tokenizer: class OpenAIGPTConverter (line 240) | class OpenAIGPTConverter(Converter): method converted (line 241) | def converted(self) -> Tokenizer: class GPT2Converter (line 267) | class GPT2Converter(Converter): method converted (line 268) | def converted(self) -> Tokenizer: class HerbertConverter (line 302) | class HerbertConverter(Converter): method converted (line 303) | def converted(self) -> Tokenizer: class RobertaConverter (line 333) | class RobertaConverter(Converter): method converted (line 334) | def converted(self) -> Tokenizer: class RoFormerConverter (line 362) | class RoFormerConverter(Converter): method converted (line 363) | def converted(self) -> Tokenizer: class DebertaConverter (line 401) | class DebertaConverter(Converter): method converted (line 402) | def converted(self) -> Tokenizer: class SpmConverter (line 432) | class SpmConverter(Converter): method __init__ (line 433) | def __init__(self, *args): method vocab (line 453) | def vocab(self, proto): method unk_id (line 456) | def unk_id(self, proto): method tokenizer (line 459) | def tokenizer(self, proto): method normalizer (line 484) | def normalizer(self, proto): method pre_tokenizer (line 493) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 496) | def post_processor(self): method converted (line 499) | def converted(self) -> Tokenizer: class AlbertConverter (line 516) | class AlbertConverter(SpmConverter): method vocab (line 517) | def vocab(self, proto): method normalizer (line 523) | def normalizer(self, proto): method post_processor (line 539) | def post_processor(self): class BarthezConverter (line 550) | class BarthezConverter(SpmConverter): method unk_id (line 551) | def unk_id(self, proto): method post_processor (line 555) | def post_processor(self): class CamembertConverter (line 566) | class CamembertConverter(SpmConverter): method vocab (line 567) | def vocab(self, proto): method unk_id (line 580) | def unk_id(self, proto): method post_processor (line 584) | def post_processor(self): class DebertaV2Converter (line 595) | class DebertaV2Converter(SpmConverter): method pre_tokenizer (line 596) | def pre_tokenizer(self, replacement, add_prefix_space): method normalizer (line 603) | def normalizer(self, proto): method post_processor (line 616) | def post_processor(self): class MBartConverter (line 627) | class MBartConverter(SpmConverter): method vocab (line 628) | def vocab(self, proto): method unk_id (line 666) | def unk_id(self, proto): method post_processor (line 669) | def post_processor(self): class MBart50Converter (line 680) | class MBart50Converter(SpmConverter): method vocab (line 681) | def vocab(self, proto): method unk_id (line 695) | def unk_id(self, proto): method post_processor (line 698) | def post_processor(self): class NllbConverter (line 709) | class NllbConverter(SpmConverter): method vocab (line 710) | def vocab(self, proto): method unk_id (line 726) | def unk_id(self, proto): method post_processor (line 729) | def post_processor(self): class XLMRobertaConverter (line 740) | class XLMRobertaConverter(SpmConverter): method vocab (line 741) | def vocab(self, proto): method unk_id (line 752) | def unk_id(self, proto): method post_processor (line 756) | def post_processor(self): class XLNetConverter (line 767) | class XLNetConverter(SpmConverter): method vocab (line 768) | def vocab(self, proto): method normalizer (line 774) | def normalizer(self, proto): method post_processor (line 790) | def post_processor(self): class ReformerConverter (line 801) | class ReformerConverter(SpmConverter): class RemBertConverter (line 805) | class RemBertConverter(SpmConverter): method normalizer (line 807) | def normalizer(self, proto): method post_processor (line 823) | def post_processor(self): class BertGenerationConverter (line 834) | class BertGenerationConverter(SpmConverter): class PegasusConverter (line 838) | class PegasusConverter(SpmConverter): method vocab (line 839) | def vocab(self, proto): method unk_id (line 858) | def unk_id(self, proto): method pre_tokenizer (line 861) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 869) | def post_processor(self): class T5Converter (line 877) | class T5Converter(SpmConverter): method vocab (line 878) | def vocab(self, proto): method post_processor (line 884) | def post_processor(self): class BigBirdConverter (line 894) | class BigBirdConverter(SpmConverter): method post_processor (line 895) | def post_processor(self): class CLIPConverter (line 906) | class CLIPConverter(Converter): method converted (line 907) | def converted(self) -> Tokenizer: class LayoutLMv2Converter (line 949) | class LayoutLMv2Converter(Converter): method converted (line 950) | def converted(self) -> Tokenizer: class BlenderbotConverter (line 988) | class BlenderbotConverter(Converter): method converted (line 989) | def converted(self) -> Tokenizer: class XGLMConverter (line 1017) | class XGLMConverter(SpmConverter): method vocab (line 1018) | def vocab(self, proto): method unk_id (line 1031) | def unk_id(self, proto): method post_processor (line 1035) | def post_processor(self): class MarkupLMConverter (line 1046) | class MarkupLMConverter(Converter): method converted (line 1047) | def converted(self) -> Tokenizer: function convert_slow_tokenizer (line 1137) | def convert_slow_tokenizer(transformer_tokenizer) -> Tokenizer: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 33) | def convert_tf_checkpoint_to_pytorch(tf_hub_path, pytorch_dump_path, is_... FILE: benchmark/third_party/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 default_data_collator (line 52) | def default_data_collator(features: List[InputDataClass], return_tensors... class DefaultDataCollator (line 78) | class DefaultDataCollator(DataCollatorMixin): method __call__ (line 99) | def __call__(self, features: List[Dict[str, Any]], return_tensors=None... function torch_default_data_collator (line 105) | def torch_default_data_collator(features: List[InputDataClass]) -> Dict[... function tf_default_data_collator (line 141) | def tf_default_data_collator(features: List[InputDataClass]) -> Dict[str... function numpy_default_data_collator (line 182) | def numpy_default_data_collator(features: List[InputDataClass]) -> Dict[... class DataCollatorWithPadding (line 215) | class DataCollatorWithPadding: method __call__ (line 248) | def __call__(self, features: List[Dict[str, Any]]) -> Dict[str, Any]: class DataCollatorForTokenClassification (line 266) | class DataCollatorForTokenClassification(DataCollatorMixin): method torch_call (line 303) | def torch_call(self, features): method tf_call (line 334) | def tf_call(self, features): method numpy_call (line 365) | def numpy_call(self, features): function _torch_collate_batch (line 395) | def _torch_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function _tf_collate_batch (line 431) | def _tf_collate_batch(examples, tokenizer, pad_to_multiple_of: Optional[... function _numpy_collate_batch (line 469) | def _numpy_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function tolist (line 501) | def tolist(x): class DataCollatorForSeq2Seq (line 510) | class DataCollatorForSeq2Seq: method __call__ (line 553) | def __call__(self, features, return_tensors=None): class DataCollatorForLanguageModeling (line 601) | class DataCollatorForLanguageModeling(DataCollatorMixin): method __post_init__ (line 635) | def __post_init__(self): method tf_bernoulli (line 647) | def tf_bernoulli(shape, probability): method tf_mask_tokens (line 653) | def tf_mask_tokens( method tf_call (line 681) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method torch_call (line 720) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 742) | def torch_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... method numpy_call (line 775) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method numpy_mask_tokens (line 797) | def numpy_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... class DataCollatorForWholeWordMask (line 836) | class DataCollatorForWholeWordMask(DataCollatorForLanguageModeling): method torch_call (line 851) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 879) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 907) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method _whole_word_mask (line 935) | def _whole_word_mask(self, input_tokens: List[str], max_predictions=512): method torch_mask_tokens (line 982) | def torch_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... method tf_mask_tokens (line 1022) | def tf_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[Any, ... method numpy_mask_tokens (line 1064) | def numpy_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... class DataCollatorForSOP (line 1106) | class DataCollatorForSOP(DataCollatorForLanguageModeling): method __init__ (line 1114) | def __init__(self, *args, **kwargs): method __call__ (line 1121) | def __call__(self, examples: List[Dict[str, Any]]) -> Dict[str, Any]: method mask_tokens (line 1144) | def mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any]: class DataCollatorForPermutationLanguageModeling (line 1189) | class DataCollatorForPermutationLanguageModeling(DataCollatorMixin): method torch_call (line 1202) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 1209) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 1216) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 1223) | def torch_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method tf_mask_tokens (line 1322) | def tf_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method numpy_mask_tokens (line 1429) | def numpy_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: FILE: benchmark/third_party/transformers/src/transformers/data/datasets/glue.py class GlueDataTrainingArguments (line 37) | class GlueDataTrainingArguments: method __post_init__ (line 62) | def __post_init__(self): class Split (line 66) | class Split(Enum): class GlueDataset (line 72) | class GlueDataset(Dataset): method __init__ (line 81) | def __init__( method __len__ (line 156) | def __len__(self): method __getitem__ (line 159) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 162) | def get_labels(self): FILE: benchmark/third_party/transformers/src/transformers/data/datasets/language_modeling.py class TextDataset (line 41) | class TextDataset(Dataset): method __init__ (line 46) | def __init__( method __len__ (line 108) | def __len__(self): method __getitem__ (line 111) | def __getitem__(self, i) -> torch.Tensor: class LineByLineTextDataset (line 115) | class LineByLineTextDataset(Dataset): method __init__ (line 120) | def __init__(self, tokenizer: PreTrainedTokenizer, file_path: str, blo... method __len__ (line 141) | def __len__(self): method __getitem__ (line 144) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class LineByLineWithRefDataset (line 148) | class LineByLineWithRefDataset(Dataset): method __init__ (line 153) | def __init__(self, tokenizer: PreTrainedTokenizer, file_path: str, blo... method __len__ (line 189) | def __len__(self): method __getitem__ (line 192) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class LineByLineWithSOPTextDataset (line 196) | class LineByLineWithSOPTextDataset(Dataset): method __init__ (line 201) | def __init__(self, tokenizer: PreTrainedTokenizer, file_dir: str, bloc... method create_examples_from_document (line 242) | def create_examples_from_document(self, document, block_size, tokenize... method __len__ (line 341) | def __len__(self): method __getitem__ (line 344) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class TextDatasetForNextSentencePrediction (line 348) | class TextDatasetForNextSentencePrediction(Dataset): method __init__ (line 353) | def __init__( method create_examples_from_document (line 438) | def create_examples_from_document(self, document: List[List[int]], doc... method __len__ (line 528) | def __len__(self): method __getitem__ (line 531) | def __getitem__(self, i): FILE: benchmark/third_party/transformers/src/transformers/data/datasets/squad.py class SquadDataTrainingArguments (line 39) | class SquadDataTrainingArguments: class Split (line 105) | class Split(Enum): class SquadDataset (line 110) | class SquadDataset(Dataset): method __init__ (line 120) | def __init__( method __len__ (line 195) | def __len__(self): method __getitem__ (line 198) | def __getitem__(self, i) -> Dict[str, torch.Tensor]: FILE: benchmark/third_party/transformers/src/transformers/data/metrics/__init__.py function simple_accuracy (line 35) | def simple_accuracy(preds, labels): function acc_and_f1 (line 41) | def acc_and_f1(preds, labels): function pearson_and_spearman (line 53) | def pearson_and_spearman(preds, labels): function glue_compute_metrics (line 65) | def glue_compute_metrics(task_name, preds, labels): function xnli_compute_metrics (line 95) | def xnli_compute_metrics(task_name, preds, labels): FILE: benchmark/third_party/transformers/src/transformers/data/metrics/squad_metrics.py function normalize_answer (line 37) | def normalize_answer(s): function get_tokens (line 57) | def get_tokens(s): function compute_exact (line 63) | def compute_exact(a_gold, a_pred): function compute_f1 (line 67) | def compute_f1(a_gold, a_pred): function get_raw_scores (line 83) | def get_raw_scores(examples, preds): function apply_no_ans_threshold (line 109) | def apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thr... function make_eval_dict (line 120) | def make_eval_dict(exact_scores, f1_scores, qid_list=None): function merge_eval (line 141) | def merge_eval(main_eval, new_eval, prefix): function find_best_thresh_v2 (line 146) | def find_best_thresh_v2(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh_v2 (line 180) | def find_all_best_thresh_v2(main_eval, preds, exact_raw, f1_raw, na_prob... function find_best_thresh (line 191) | def find_best_thresh(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh (line 214) | def find_all_best_thresh(main_eval, preds, exact_raw, f1_raw, na_probs, ... function squad_evaluate (line 224) | def squad_evaluate(examples, preds, no_answer_probs=None, no_answer_prob... function get_final_text (line 255) | def get_final_text(pred_text, orig_text, do_lower_case, verbose_logging=... function _get_best_indexes (line 349) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 361) | def _compute_softmax(scores): function compute_predictions_logits (line 384) | def compute_predictions_logits( function compute_predictions_log_probs (line 589) | def compute_predictions_log_probs( FILE: benchmark/third_party/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: benchmark/third_party/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 312) | def squad_convert_example_to_features_init(tokenizer_for_convert: PreTra... function squad_convert_examples_to_features (line 317) | def squad_convert_examples_to_features( class SquadProcessor (line 542) | class SquadProcessor(DataProcessor): method _get_example_from_tensor_dict (line 551) | def _get_example_from_tensor_dict(self, tensor_dict, evaluate=False): method get_examples_from_dataset (line 575) | def get_examples_from_dataset(self, dataset, evaluate=False): method get_train_examples (line 608) | def get_train_examples(self, data_dir, filename=None): method get_dev_examples (line 630) | def get_dev_examples(self, data_dir, filename=None): method _create_examples (line 651) | def _create_examples(self, input_data, set_type): class SquadV1Processor (line 688) | class SquadV1Processor(SquadProcessor): class SquadV2Processor (line 693) | class SquadV2Processor(SquadProcessor): class SquadExample (line 698) | class SquadExample: method __init__ (line 713) | def __init__( class SquadFeatures (line 761) | class SquadFeatures: method __init__ (line 788) | def __init__( class SquadResult (line 828) | class SquadResult: method __init__ (line 838) | def __init__(self, unique_id, start_logits, end_logits, start_top_inde... FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/data/processors/xnli.py class XnliProcessor (line 28) | class XnliProcessor(DataProcessor): method __init__ (line 34) | def __init__(self, language, train_language=None): method get_train_examples (line 38) | def get_train_examples(self, data_dir): method get_test_examples (line 59) | def get_test_examples(self, data_dir): method get_labels (line 82) | def get_labels(self): FILE: benchmark/third_party/transformers/src/transformers/data/test_generation_utils.py class GenerationUtilsTest (line 31) | class GenerationUtilsTest(unittest.TestCase): method config (line 33) | def config(self): method model (line 38) | def model(self): method test_postprocess_next_token_scores (line 41) | def test_postprocess_next_token_scores(self): method test_postprocess_next_token_scores_large_bad_words_list (line 75) | def test_postprocess_next_token_scores_large_bad_words_list(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/deepspeed.py function is_deepspeed_available (line 33) | def is_deepspeed_available(): class HfDeepSpeedConfig (line 45) | class HfDeepSpeedConfig(DeepSpeedConfig): method __init__ (line 62) | def __init__(self, config_file_or_dict): class HfTrainerDeepSpeedConfig (line 70) | class HfTrainerDeepSpeedConfig(HfDeepSpeedConfig): method __init__ (line 76) | def __init__(self, config_file_or_dict): method dtype (line 81) | def dtype(self): method fill_match (line 86) | def fill_match(self, ds_key_long, hf_val, hf_key=None, must_match=True): method trainer_config_process (line 114) | def trainer_config_process(self, args): method trainer_config_finalize (line 167) | def trainer_config_finalize(self, args, model, num_training_steps): function set_hf_deepspeed_config (line 197) | def set_hf_deepspeed_config(hf_deepspeed_config_obj): function unset_hf_deepspeed_config (line 205) | def unset_hf_deepspeed_config(): function is_deepspeed_zero3_enabled (line 211) | def is_deepspeed_zero3_enabled(): function deepspeed_config (line 218) | def deepspeed_config(): function deepspeed_optim_sched (line 225) | def deepspeed_optim_sched(trainer, hf_deepspeed_config, args, num_traini... function deepspeed_init (line 280) | def deepspeed_init(trainer, num_training_steps, resume_from_checkpoint=N... FILE: benchmark/third_party/transformers/src/transformers/dependency_versions_check.py function dep_version_check (line 46) | def dep_version_check(pkg, hint=None): FILE: benchmark/third_party/transformers/src/transformers/dynamic_module_utils.py function init_hf_modules (line 33) | def init_hf_modules(): function create_dynamic_module (line 48) | def create_dynamic_module(name: Union[str, os.PathLike]): function get_relative_imports (line 63) | def get_relative_imports(module_file): function get_relative_import_files (line 81) | def get_relative_import_files(module_file): function check_imports (line 110) | def check_imports(filename): function get_class_in_module (line 142) | def get_class_in_module(class_name, module_path): function get_cached_module_file (line 151) | def get_cached_module_file( function get_class_from_dynamic_module (line 288) | def get_class_from_dynamic_module( function custom_object_save (line 377) | def custom_object_save(obj, folder, config=None): FILE: benchmark/third_party/transformers/src/transformers/feature_extraction_sequence_utils.py class SequenceFeatureExtractor (line 29) | class SequenceFeatureExtractor(FeatureExtractionMixin): method __init__ (line 42) | def __init__(self, feature_size: int, sampling_rate: int, padding_valu... method pad (line 52) | def pad( method _pad (line 226) | def _pad( method _truncate (line 295) | def _truncate( method _get_padding_strategies (line 336) | def _get_padding_strategies(self, padding=False, max_length=None): FILE: benchmark/third_party/transformers/src/transformers/feature_extraction_utils.py class BatchFeature (line 58) | class BatchFeature(UserDict): method __init__ (line 73) | def __init__(self, data: Optional[Dict[str, Any]] = None, tensor_type:... method __getitem__ (line 77) | def __getitem__(self, item: str) -> Union[Any]: method __getattr__ (line 87) | def __getattr__(self, item: str): method __getstate__ (line 93) | def __getstate__(self): method __setstate__ (line 96) | def __setstate__(self, state): method keys (line 101) | def keys(self): method values (line 105) | def values(self): method items (line 109) | def items(self): method convert_to_tensors (line 112) | def convert_to_tensors(self, tensor_type: Optional[Union[str, TensorTy... method to (line 179) | def to(self, device: Union[str, "torch.device"]) -> "BatchFeature": class FeatureExtractionMixin (line 200) | class FeatureExtractionMixin(PushToHubMixin): method __init__ (line 208) | def __init__(self, **kwargs): method _set_processor_class (line 220) | def _set_processor_class(self, processor_class: str): method from_pretrained (line 225) | def from_pretrained( method save_pretrained (line 310) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method get_feature_extractor_dict (line 355) | def get_feature_extractor_dict( method from_dict (line 448) | def from_dict(cls, feature_extractor_dict: Dict[str, Any], **kwargs) -... method to_dict (line 484) | def to_dict(self) -> Dict[str, Any]: method from_json_file (line 497) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> PreTrai... method to_json_string (line 515) | def to_json_string(self) -> str: method to_json_file (line 536) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 547) | def __repr__(self): method register_for_auto_class (line 551) | def register_for_auto_class(cls, auto_class="AutoFeatureExtractor"): FILE: benchmark/third_party/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 61) | def does_advance(self, token_id: int): method update (line 70) | def update(self, token_id: int): method reset (line 95) | def reset(self): method remaining (line 105) | def remaining(self): method copy (line 114) | def copy(self, stateful=False): class PhrasalConstraint (line 129) | class PhrasalConstraint(Constraint): method __init__ (line 138) | def __init__(self, token_ids: List[int]): method advance (line 152) | def advance(self): method does_advance (line 157) | def does_advance(self, token_id: int): method update (line 166) | def update(self, token_id: int): method reset (line 186) | def reset(self): method remaining (line 190) | def remaining(self): method copy (line 193) | def copy(self, stateful=False): class DisjunctiveTrie (line 204) | class DisjunctiveTrie: method __init__ (line 205) | def __init__(self, nested_token_ids: List[List[int]], no_subsets=True): method next_tokens (line 228) | def next_tokens(self, current_seq): method reached_leaf (line 241) | def reached_leaf(self, current_seq): method count_leaves (line 246) | def count_leaves(self, root): method has_subsets (line 253) | def has_subsets(self, trie, nested_token_ids): class DisjunctiveConstraint (line 261) | class DisjunctiveConstraint(Constraint): method __init__ (line 270) | def __init__(self, nested_token_ids: List[List[int]]): method advance (line 292) | def advance(self): method does_advance (line 300) | def does_advance(self, token_id: int): method update (line 308) | def update(self, token_id: int): method reset (line 328) | def reset(self): method remaining (line 332) | def remaining(self): method copy (line 339) | def copy(self, stateful=False): class ConstraintListState (line 350) | class ConstraintListState: method __init__ (line 359) | def __init__(self, constraints: List[Constraint]): method init_state (line 369) | def init_state(self): method get_bank (line 374) | def get_bank(self): method advance (line 382) | def advance(self): method reset (line 417) | def reset(self, token_ids: Optional[List[int]]): method add (line 432) | def add(self, token_id: int): method copy (line 508) | def copy(self, stateful=True): FILE: benchmark/third_party/transformers/src/transformers/generation_beam_search.py class BeamScorer (line 88) | class BeamScorer(ABC): method process (line 96) | def process( method finalize (line 108) | def finalize( class BeamSearchScorer (line 120) | class BeamSearchScorer(BeamScorer): method __init__ (line 155) | def __init__( method is_done (line 205) | def is_done(self) -> bool: method process (line 208) | def process( method finalize (line 302) | def finalize( class ConstrainedBeamSearchScorer (line 390) | class ConstrainedBeamSearchScorer(BeamScorer): method __init__ (line 423) | def __init__( method is_done (line 475) | def is_done(self) -> bool: method make_constraint_states (line 478) | def make_constraint_states(self, n): method check_completes_constraints (line 481) | def check_completes_constraints(self, sequence): method process (line 486) | def process( method step_sentence_constraint (line 627) | def step_sentence_constraint( method finalize (line 768) | def finalize( class BeamHypotheses (line 853) | class BeamHypotheses: method __init__ (line 854) | def __init__(self, num_beams: int, length_penalty: float, early_stoppi... method __len__ (line 864) | def __len__(self): method add (line 870) | def add(self, hyp: torch.LongTensor, sum_logprobs: float, beam_indices... method is_done (line 884) | def is_done(self, best_sum_logprobs: float, cur_len: int) -> bool: FILE: benchmark/third_party/transformers/src/transformers/generation_flax_logits_process.py class FlaxLogitsProcessor (line 50) | class FlaxLogitsProcessor: method __call__ (line 54) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsWarper (line 61) | class FlaxLogitsWarper: method __call__ (line 65) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsProcessorList (line 72) | class FlaxLogitsProcessorList(list): method __call__ (line 80) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTemperatureLogitsWarper (line 95) | class FlaxTemperatureLogitsWarper(FlaxLogitsWarper): method __init__ (line 104) | def __init__(self, temperature: float): method __call__ (line 110) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopPLogitsWarper (line 115) | class FlaxTopPLogitsWarper(FlaxLogitsWarper): method __init__ (line 129) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 137) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopKLogitsWarper (line 157) | class FlaxTopKLogitsWarper(FlaxLogitsWarper): method __init__ (line 170) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 178) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedBOSTokenLogitsProcessor (line 193) | class FlaxForcedBOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 202) | def __init__(self, bos_token_id: int): method __call__ (line 205) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedEOSTokenLogitsProcessor (line 215) | class FlaxForcedEOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 226) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 230) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxMinLengthLogitsProcessor (line 240) | class FlaxMinLengthLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 251) | def __init__(self, min_length: int, eos_token_id: int): method __call__ (line 261) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... FILE: benchmark/third_party/transformers/src/transformers/generation_flax_utils.py class FlaxGreedySearchOutput (line 51) | class FlaxGreedySearchOutput(ModelOutput): class FlaxSampleOutput (line 65) | class FlaxSampleOutput(ModelOutput): class FlaxBeamSearchOutput (line 79) | class FlaxBeamSearchOutput(ModelOutput): class GreedyState (line 96) | class GreedyState: class SampleState (line 105) | class SampleState: class BeamSearchState (line 115) | class BeamSearchState: class FlaxGenerationMixin (line 125) | class FlaxGenerationMixin: method _run_loop_in_debug (line 140) | def _run_loop_in_debug(cond_fn, body_fn, init_state): method _prepare_encoder_decoder_kwargs_for_generation (line 149) | def _prepare_encoder_decoder_kwargs_for_generation(self, input_ids, pa... method _expand_to_num_beams (line 159) | def _expand_to_num_beams(tensor, num_beams): method _adapt_logits_for_beam_search (line 162) | def _adapt_logits_for_beam_search(self, logits): method _validate_model_class (line 169) | def _validate_model_class(self): method _validate_model_kwargs (line 193) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 211) | def generate( method _get_logits_warper (line 447) | def _get_logits_warper( method _get_logits_processor (line 473) | def _get_logits_processor( method _greedy_search (line 510) | def _greedy_search( method _sample (line 596) | def _sample( method _beam_search (line 693) | def _beam_search( FILE: benchmark/third_party/transformers/src/transformers/generation_logits_process.py class LogitsProcessor (line 51) | class LogitsProcessor: method __call__ (line 55) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsWarper (line 62) | class LogitsWarper: method __call__ (line 66) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsProcessorList (line 73) | class LogitsProcessorList(list): method __call__ (line 81) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinLengthLogitsProcessor (line 96) | class MinLengthLogitsProcessor(LogitsProcessor): method __init__ (line 107) | def __init__(self, min_length: int, eos_token_id: int): method __call__ (line 117) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TemperatureLogitsWarper (line 124) | class TemperatureLogitsWarper(LogitsWarper): method __init__ (line 133) | def __init__(self, temperature: float): method __call__ (line 139) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class RepetitionPenaltyLogitsProcessor (line 144) | class RepetitionPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 154) | def __init__(self, penalty: float): method __call__ (line 160) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopPLogitsWarper (line 170) | class TopPLogitsWarper(LogitsWarper): method __init__ (line 184) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 193) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopKLogitsWarper (line 209) | class TopKLogitsWarper(LogitsWarper): method __init__ (line 222) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 230) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TypicalLogitsWarper (line 238) | class TypicalLogitsWarper(LogitsWarper): method __init__ (line 252) | def __init__(self, mass: float = 0.9, filter_value: float = -float("In... method __call__ (line 261) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function _get_ngrams (line 287) | def _get_ngrams(ngram_size: int, prev_input_ids: torch.Tensor, num_hypos... function _get_generated_ngrams (line 298) | def _get_generated_ngrams(banned_ngrams, prev_input_ids, ngram_size, cur... function _calc_banned_ngram_tokens (line 305) | def _calc_banned_ngram_tokens( class NoRepeatNGramLogitsProcessor (line 322) | class NoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 332) | def __init__(self, ngram_size: int): method __call__ (line 337) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EncoderNoRepeatNGramLogitsProcessor (line 348) | class EncoderNoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 360) | def __init__(self, encoder_ngram_size: int, encoder_input_ids: torch.L... method __call__ (line 371) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class NoBadWordsLogitsProcessor (line 389) | class NoBadWordsLogitsProcessor(LogitsProcessor): method __init__ (line 402) | def __init__(self, bad_words_ids: List[List[int]], eos_token_id: int): method __call__ (line 431) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method _calc_static_bad_word_mask (line 440) | def _calc_static_bad_word_mask(self, scores: torch.FloatTensor) -> tor... method _tokens_match (line 445) | def _tokens_match(self, prev_tokens: List[int], tokens: List[int]) -> ... method _calc_banned_bad_words_ids (line 455) | def _calc_banned_bad_words_ids(self, prev_input_ids: List[List[int]]) ... method _set_scores_to_inf_for_banned_tokens (line 467) | def _set_scores_to_inf_for_banned_tokens( class PrefixConstrainedLogitsProcessor (line 517) | class PrefixConstrainedLogitsProcessor(LogitsProcessor): method __init__ (line 530) | def __init__(self, prefix_allowed_tokens_fn: Callable[[int, torch.Tens... method __call__ (line 534) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class HammingDiversityLogitsProcessor (line 543) | class HammingDiversityLogitsProcessor(LogitsProcessor): method __init__ (line 561) | def __init__(self, diversity_penalty: float, num_beams: int, num_beam_... method __call__ (line 574) | def __call__( class ForcedBOSTokenLogitsProcessor (line 603) | class ForcedBOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 612) | def __init__(self, bos_token_id: int): method __call__ (line 615) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ForcedEOSTokenLogitsProcessor (line 624) | class ForcedEOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 635) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 639) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class InfNanRemoveLogitsProcessor (line 648) | class InfNanRemoveLogitsProcessor(LogitsProcessor): method __call__ (line 655) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ExponentialDecayLengthPenalty (line 665) | class ExponentialDecayLengthPenalty(LogitsProcessor): method __init__ (line 680) | def __init__(self, exponential_decay_length_penalty: Tuple, eos_token_... method __call__ (line 685) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class LogitNormalization (line 694) | class LogitNormalization(LogitsProcessor, LogitsWarper): method __call__ (line 702) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class SuppressTokensAtBeginLogitsProcessor (line 707) | class SuppressTokensAtBeginLogitsProcessor(LogitsProcessor): method __init__ (line 714) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 718) | def __call__(self, input_ids, scores): class SuppressTokensLogitsProcessor (line 725) | class SuppressTokensLogitsProcessor(LogitsProcessor): method __init__ (line 729) | def __init__(self, suppress_tokens): method __call__ (line 732) | def __call__(self, input_ids, scores): class ForceTokensLogitsProcessor (line 737) | class ForceTokensLogitsProcessor(LogitsProcessor): method __init__ (line 742) | def __init__(self, force_token_map: List[List[int]]): method __call__ (line 745) | def __call__(self, input_ids, scores): FILE: benchmark/third_party/transformers/src/transformers/generation_stopping_criteria.py class StoppingCriteria (line 33) | class StoppingCriteria(ABC): method __call__ (line 37) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxLengthCriteria (line 41) | class MaxLengthCriteria(StoppingCriteria): method __init__ (line 51) | def __init__(self, max_length: int): method __call__ (line 55) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxNewTokensCriteria (line 59) | class MaxNewTokensCriteria(StoppingCriteria): method __init__ (line 72) | def __init__(self, start_length: int, max_new_tokens: int): method __call__ (line 84) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxTimeCriteria (line 88) | class MaxTimeCriteria(StoppingCriteria): method __init__ (line 101) | def __init__(self, max_time: float, initial_timestamp: Optional[float]... method __call__ (line 106) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class StoppingCriteriaList (line 110) | class StoppingCriteriaList(list): method __call__ (line 112) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method max_length (line 116) | def max_length(self) -> Optional[int]: function validate_stopping_criteria (line 125) | def validate_stopping_criteria(stopping_criteria: StoppingCriteriaList, ... FILE: benchmark/third_party/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 139) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFTopPLogitsWarper (line 147) | class TFTopPLogitsWarper(TFLogitsWarper): method __init__ (line 161) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 169) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFMinLengthLogitsProcessor (line 201) | class TFMinLengthLogitsProcessor(TFLogitsProcessor): method __init__ (line 212) | def __init__(self, min_length: int, eos_token_id: int): method _apply_eos_token_mask (line 222) | def _apply_eos_token_mask(self, scores: tf.Tensor) -> tf.Tensor: method __call__ (line 227) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFRepetitionPenaltyLogitsProcessor (line 237) | class TFRepetitionPenaltyLogitsProcessor(TFLogitsProcessor): method __init__ (line 247) | def __init__(self, penalty: float): method _create_score_penalties (line 253) | def _create_score_penalties(self, input_ids: tf.Tensor, logits: tf.Ten... method __call__ (line 279) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoBadWordsLogitsProcessor (line 287) | class TFNoBadWordsLogitsProcessor(TFLogitsProcessor): method __init__ (line 299) | def __init__(self, bad_words_ids: List[List[int]], eos_token_id: int): method _calc_row_banned_bad_tokens (line 324) | def _calc_row_banned_bad_tokens(self, row_input_ids: tf.Tensor) -> tf.... method __call__ (line 364) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoRepeatNGramLogitsProcessor (line 385) | class TFNoRepeatNGramLogitsProcessor(TFLogitsProcessor): method __init__ (line 395) | def __init__(self, ngram_size: int): method calc_banned_ngram_tokens (line 400) | def calc_banned_ngram_tokens(self, input_ids, num_hypos, cur_len): method __call__ (line 424) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedBOSTokenLogitsProcessor (line 446) | class TFForcedBOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 455) | def __init__(self, bos_token_id: int): method __call__ (line 460) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedEOSTokenLogitsProcessor (line 476) | class TFForcedEOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 487) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 493) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensAtBeginLogitsProcessor (line 509) | class TFSuppressTokensAtBeginLogitsProcessor(TFLogitsProcessor): method __init__ (line 516) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 520) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensLogitsProcessor (line 533) | class TFSuppressTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 537) | def __init__(self, suppress_tokens): method __call__ (line 540) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForceTokensLogitsProcessor (line 549) | class TFForceTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 554) | def __init__(self, force_token_map: List[List[int]]): method __call__ (line 564) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... FILE: benchmark/third_party/transformers/src/transformers/generation_tf_utils.py class TFGreedySearchDecoderOnlyOutput (line 55) | class TFGreedySearchDecoderOnlyOutput(ModelOutput): class TFGreedySearchEncoderDecoderOutput (line 83) | class TFGreedySearchEncoderDecoderOutput(ModelOutput): class TFSampleDecoderOnlyOutput (line 125) | class TFSampleDecoderOnlyOutput(ModelOutput): class TFSampleEncoderDecoderOutput (line 153) | class TFSampleEncoderDecoderOutput(ModelOutput): class TFBeamSearchDecoderOnlyOutput (line 195) | class TFBeamSearchDecoderOnlyOutput(ModelOutput): class TFBeamSearchEncoderDecoderOutput (line 226) | class TFBeamSearchEncoderDecoderOutput(ModelOutput): class TFBeamSampleDecoderOnlyOutput (line 273) | class TFBeamSampleDecoderOnlyOutput(ModelOutput): class TFBeamSampleEncoderDecoderOutput (line 304) | class TFBeamSampleEncoderDecoderOutput(ModelOutput): class TFGenerationMixin (line 354) | class TFGenerationMixin: method seed_generator (line 362) | def seed_generator(self): method _use_cache (line 370) | def _use_cache(self, outputs, use_cache): method generate (line 379) | def generate( method _generate_beam_search (line 877) | def _generate_beam_search( method _reorder_cache (line 1295) | def _reorder_cache(past, beam_idx): method adjust_logits_during_generation (line 1298) | def adjust_logits_during_generation( method _validate_model_class (line 1319) | def _validate_model_class(self): method _validate_model_kwargs (line 1344) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method _generate (line 1367) | def _generate( method _expand_to_num_beams (line 1831) | def _expand_to_num_beams(tensor: tf.Tensor, num_beams: int) -> tf.Tensor: method _prepare_attention_mask_for_generation (line 1835) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 1851) | def _prepare_encoder_decoder_kwargs_for_generation(self, inputs_tensor... method _prepare_decoder_input_ids_for_generation (line 1871) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 1886) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_inputs_for_generation (line 1915) | def _expand_inputs_for_generation( method _prepare_model_inputs (line 1944) | def _prepare_model_inputs(self, inputs: Optional[tf.Tensor] = None, bo... method _update_model_kwargs_for_generation (line 1959) | def _update_model_kwargs_for_generation( method _update_model_kwargs_for_xla_generation (line 1982) | def _update_model_kwargs_for_xla_generation( method _get_logits_warper (line 2113) | def _get_logits_warper( method _get_logits_processor (line 2141) | def _get_logits_processor( method greedy_search (line 2200) | def greedy_search( method sample (line 2450) | def sample( method beam_search (line 2725) | def beam_search( function _create_next_token_logits_penalties (line 3196) | def _create_next_token_logits_penalties(input_ids, logits, repetition_pe... function calc_banned_ngram_tokens (line 3210) | def calc_banned_ngram_tokens(prev_input_ids, num_hypos, no_repeat_ngram_... function calc_banned_bad_words_ids (line 3233) | def calc_banned_bad_words_ids(prev_input_ids, bad_words_ids): function tf_top_k_top_p_filtering (line 3269) | def tf_top_k_top_p_filtering(logits, top_k=0, top_p=1.0, filter_value=-f... function scatter_values_on_batch_indices (line 3324) | def scatter_values_on_batch_indices(values, batch_indices): function sample_without_replacement (line 3334) | def sample_without_replacement(logits, num_samples): class BeamHypotheses (line 3344) | class BeamHypotheses(object): method __init__ (line 3345) | def __init__(self, num_beams, max_length, length_penalty, early_stoppi... method __len__ (line 3356) | def __len__(self): method add (line 3362) | def add(self, hyp, sum_logprobs): method is_done (line 3376) | def is_done(self, best_sum_logprobs, cur_len): FILE: benchmark/third_party/transformers/src/transformers/generation_utils.py class GreedySearchDecoderOnlyOutput (line 74) | class GreedySearchDecoderOnlyOutput(ModelOutput): class ContrastiveSearchEncoderDecoderOutput (line 102) | class ContrastiveSearchEncoderDecoderOutput(ModelOutput): class ContrastiveSearchDecoderOnlyOutput (line 127) | class ContrastiveSearchDecoderOnlyOutput(ModelOutput): class GreedySearchEncoderDecoderOutput (line 152) | class GreedySearchEncoderDecoderOutput(ModelOutput): class SampleDecoderOnlyOutput (line 194) | class SampleDecoderOnlyOutput(ModelOutput): class SampleEncoderDecoderOutput (line 223) | class SampleEncoderDecoderOutput(ModelOutput): class BeamSearchDecoderOnlyOutput (line 266) | class BeamSearchDecoderOnlyOutput(ModelOutput): class BeamSearchEncoderDecoderOutput (line 301) | class BeamSearchEncoderDecoderOutput(ModelOutput): class BeamSampleDecoderOnlyOutput (line 352) | class BeamSampleDecoderOnlyOutput(ModelOutput): class BeamSampleEncoderDecoderOutput (line 387) | class BeamSampleEncoderDecoderOutput(ModelOutput): class GenerationMixin (line 443) | class GenerationMixin: method _prepare_model_inputs (line 464) | def _prepare_model_inputs( method _can_retrieve_inputs_from_name (line 516) | def _can_retrieve_inputs_from_name( method adjust_logits_during_generation (line 532) | def adjust_logits_during_generation(self, logits: torch.FloatTensor, *... method _prepare_input_ids_for_generation (line 538) | def _prepare_input_ids_for_generation( method _prepare_attention_mask_for_generation (line 550) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 566) | def _prepare_encoder_decoder_kwargs_for_generation( method _prepare_decoder_input_ids_for_generation (line 588) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 604) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_inputs_for_generation (line 631) | def _expand_inputs_for_generation( method _update_model_kwargs_for_generation (line 661) | def _update_model_kwargs_for_generation( method _reorder_cache (line 689) | def _reorder_cache(self, past, beam_idx): method _get_logits_warper (line 695) | def _get_logits_warper( method _get_logits_processor (line 732) | def _get_logits_processor( method _get_stopping_criteria (line 849) | def _get_stopping_criteria( method _merge_criteria_processor_list (line 860) | def _merge_criteria_processor_list( method compute_transition_beam_scores (line 881) | def compute_transition_beam_scores( method _validate_model_class (line 921) | def _validate_model_class(self): method _validate_model_kwargs (line 947) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 971) | def generate( method contrastive_search (line 1760) | def contrastive_search( method greedy_search (line 2086) | def greedy_search( method sample (line 2320) | def sample( method beam_search (line 2571) | def beam_search( method beam_sample (line 2880) | def beam_sample( method group_beam_search (line 3196) | def group_beam_search( method constrained_beam_search (line 3558) | def constrained_beam_search( function top_k_top_p_filtering (line 3870) | def top_k_top_p_filtering( function _ranking_fast (line 3905) | def _ranking_fast( FILE: benchmark/third_party/transformers/src/transformers/hf_argparser.py function string_to_bool (line 33) | def string_to_bool(v): class HfArgumentParser (line 46) | class HfArgumentParser(ArgumentParser): method __init__ (line 57) | def __init__(self, dataclass_types: Union[DataClassType, Iterable[Data... method _parse_dataclass_field (line 76) | def _parse_dataclass_field(parser: ArgumentParser, field: dataclasses.... method _add_dataclass_arguments (line 159) | def _add_dataclass_arguments(self, dtype: DataClassType): method parse_args_into_dataclasses (line 180) | def parse_args_into_dataclasses( method parse_dict (line 239) | def parse_dict(self, args: Dict[str, Any], allow_extra_keys: bool = Fa... method parse_json_file (line 267) | def parse_json_file(self, json_file: str, allow_extra_keys: bool = Fal... method parse_yaml_file (line 289) | def parse_yaml_file(self, yaml_file: str, allow_extra_keys: bool = Fal... FILE: benchmark/third_party/transformers/src/transformers/image_processing_utils.py class BatchFeature (line 26) | class BatchFeature(BaseBatchFeature): class BaseImageProcessor (line 46) | class BaseImageProcessor(ImageProcessorMixin): method __init__ (line 47) | def __init__(self, **kwargs): method __call__ (line 50) | def __call__(self, images, **kwargs) -> BatchFeature: method preprocess (line 53) | def preprocess(self, images, **kwargs) -> BatchFeature: FILE: benchmark/third_party/transformers/src/transformers/image_transforms.py function to_channel_dimension_format (line 49) | def to_channel_dimension_format(image: np.ndarray, channel_dim: Union[Ch... function rescale (line 80) | def rescale( function to_pil_image (line 110) | def to_pil_image( function get_resize_output_image_size (line 150) | def get_resize_output_image_size( function resize (line 217) | def resize( function normalize (line 266) | def normalize( function center_crop (line 322) | def center_crop( FILE: benchmark/third_party/transformers/src/transformers/image_utils.py class ChannelDimension (line 60) | class ChannelDimension(ExplicitEnum): function is_valid_image (line 65) | def is_valid_image(img): function valid_images (line 74) | def valid_images(imgs): function is_batched (line 78) | def is_batched(img): function to_numpy_array (line 84) | def to_numpy_array(img) -> np.ndarray: function infer_channel_dimension_format (line 90) | def infer_channel_dimension_format(image: np.ndarray) -> ChannelDimension: function get_channel_dimension_axis (line 115) | def get_channel_dimension_axis(image: np.ndarray) -> int: function get_image_size (line 134) | def get_image_size(image: np.ndarray, channel_dim: ChannelDimension = No... function load_image (line 158) | def load_image(image: Union[str, "PIL.Image.Image"]) -> "PIL.Image.Image": class ImageFeatureExtractionMixin (line 192) | class ImageFeatureExtractionMixin: method _ensure_format_supported (line 197) | def _ensure_format_supported(self, image): method to_pil_image (line 204) | def to_pil_image(self, image, rescale=None): method convert_rgb (line 234) | def convert_rgb(self, image): method rescale (line 248) | def rescale(self, image: np.ndarray, scale: Union[float, int]) -> np.n... method to_numpy_array (line 255) | def to_numpy_array(self, image, rescale=None, channel_first=True): method expand_dims (line 287) | def expand_dims(self, image): method normalize (line 307) | def normalize(self, image, mean, std, rescale=False): method resize (line 353) | def resize(self, image, size, resample=None, default_to_square=True, m... method center_crop (line 420) | def center_crop(self, image, size): method flip_channel_order (line 495) | def flip_channel_order(self, image): method rotate (line 512) | def rotate(self, image, angle, resample=None, expand=0, center=None, t... FILE: benchmark/third_party/transformers/src/transformers/integrations.py function is_wandb_available (line 67) | def is_wandb_available(): function is_comet_available (line 78) | def is_comet_available(): function is_tensorboard_available (line 82) | def is_tensorboard_available(): function is_optuna_available (line 86) | def is_optuna_available(): function is_ray_available (line 90) | def is_ray_available(): function is_ray_tune_available (line 94) | def is_ray_tune_available(): function is_sigopt_available (line 100) | def is_sigopt_available(): function is_azureml_available (line 104) | def is_azureml_available(): function is_mlflow_available (line 112) | def is_mlflow_available(): function is_fairscale_available (line 118) | def is_fairscale_available(): function is_neptune_available (line 122) | def is_neptune_available(): function is_codecarbon_available (line 126) | def is_codecarbon_available(): function hp_params (line 130) | def hp_params(trial): function default_hp_search_backend (line 151) | def default_hp_search_backend(): function run_hp_search_optuna (line 160) | def run_hp_search_optuna(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_ray (line 211) | def run_hp_search_ray(trainer, n_trials: int, direction: str, **kwargs) ... function run_hp_search_sigopt (line 347) | def run_hp_search_sigopt(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_wandb (line 446) | def run_hp_search_wandb(trainer, n_trials: int, direction: str, **kwargs... function get_available_reporting_integrations (line 515) | def get_available_reporting_integrations(): function rewrite_logs (line 534) | def rewrite_logs(d): class TensorBoardCallback (line 550) | class TensorBoardCallback(TrainerCallback): method __init__ (line 559) | def __init__(self, tb_writer=None): method _init_summary_writer (line 582) | def _init_summary_writer(self, args, log_dir=None): method on_train_begin (line 587) | def on_train_begin(self, args, state, control, **kwargs): method on_log (line 612) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 633) | def on_train_end(self, args, state, control, **kwargs): class WandbCallback (line 639) | class WandbCallback(TrainerCallback): method __init__ (line 644) | def __init__(self): method setup (line 656) | def setup(self, args, state, model, **kwargs): method on_train_begin (line 716) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 727) | def on_train_end(self, args, state, control, model=None, tokenizer=Non... method on_log (line 755) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): class CometCallback (line 765) | class CometCallback(TrainerCallback): method __init__ (line 770) | def __init__(self): method setup (line 776) | def setup(self, args, state, model): method on_train_begin (line 818) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 822) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_train_end (line 830) | def on_train_end(self, args, state, control, **kwargs): class AzureMLCallback (line 842) | class AzureMLCallback(TrainerCallback): method __init__ (line 847) | def __init__(self, azureml_run=None): method on_init_end (line 852) | def on_init_end(self, args, state, control, **kwargs): method on_log (line 858) | def on_log(self, args, state, control, logs=None, **kwargs): class MLflowCallback (line 865) | class MLflowCallback(TrainerCallback): method __init__ (line 871) | def __init__(self): method setup (line 884) | def setup(self, args, state, model): method on_train_begin (line 955) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 959) | def on_log(self, args, state, control, logs, model=None, **kwargs): method on_train_end (line 974) | def on_train_end(self, args, state, control, **kwargs): method on_save (line 979) | def on_save(self, args, state, control, **kwargs): method __del__ (line 990) | def __del__(self): class NeptuneMissingConfiguration (line 1001) | class NeptuneMissingConfiguration(Exception): method __init__ (line 1002) | def __init__(self): class NeptuneCallback (line 1012) | class NeptuneCallback(TrainerCallback): method __init__ (line 1049) | def __init__( method _stop_run_if_exists (line 1104) | def _stop_run_if_exists(self): method _initialize_run (line 1110) | def _initialize_run(self, **additional_neptune_kwargs): method _use_initial_run (line 1122) | def _use_initial_run(self): method _ensure_run_with_monitoring (line 1128) | def _ensure_run_with_monitoring(self): method _ensure_at_least_run_without_monitoring (line 1142) | def _ensure_at_least_run_without_monitoring(self): method run (line 1157) | def run(self): method _metadata_namespace (line 1163) | def _metadata_namespace(self): method _log_integration_version (line 1166) | def _log_integration_version(self): method _log_trainer_parameters (line 1169) | def _log_trainer_parameters(self, args): method _log_model_parameters (line 1172) | def _log_model_parameters(self, model): method _log_hyper_param_search_parameters (line 1176) | def _log_hyper_param_search_parameters(self, state): method _log_model_checkpoint (line 1183) | def _log_model_checkpoint(self, source_directory: str, checkpoint: str): method on_init_end (line 1204) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1212) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1227) | def on_train_end(self, args, state, control, **kwargs): method __del__ (line 1230) | def __del__(self): method on_save (line 1236) | def on_save(self, args, state, control, **kwargs): method on_evaluate (line 1240) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method get_run (line 1253) | def get_run(cls, trainer): method on_log (line 1260) | def on_log(self, args, state, control, logs: Optional[Dict[str, float]... class CodeCarbonCallback (line 1273) | class CodeCarbonCallback(TrainerCallback): method __init__ (line 1278) | def __init__(self): method on_init_end (line 1288) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1293) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1297) | def on_train_end(self, args, state, control, **kwargs): function get_reporting_integration_callbacks (line 1313) | def get_reporting_integration_callbacks(report_to): FILE: benchmark/third_party/transformers/src/transformers/keras_callbacks.py class KerasMetricCallback (line 22) | class KerasMetricCallback(Callback): method __init__ (line 80) | def __init__( method _concatenate_batches (line 146) | def _concatenate_batches(batches, padding_index=-100): method _postprocess_predictions_or_labels (line 164) | def _postprocess_predictions_or_labels(self, inputs): method on_epoch_end (line 186) | def on_epoch_end(self, epoch, logs=None): class PushToHubCallback (line 267) | class PushToHubCallback(Callback): method __init__ (line 314) | def __init__( method on_train_begin (line 353) | def on_train_begin(self, logs=None): method on_train_batch_end (line 358) | def on_train_batch_end(self, batch, logs=None): method on_epoch_end (line 369) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 396) | def on_train_end(self, logs=None): FILE: benchmark/third_party/transformers/src/transformers/modelcard.py class ModelCard (line 78) | class ModelCard: method __init__ (line 89) | def __init__(self, **kwargs): method save_pretrained (line 112) | def save_pretrained(self, save_directory_or_file): method from_pretrained (line 124) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method from_dict (line 220) | def from_dict(cls, json_object): method from_json_file (line 225) | def from_json_file(cls, json_file): method __eq__ (line 232) | def __eq__(self, other): method __repr__ (line 235) | def __repr__(self): method to_dict (line 238) | def to_dict(self): method to_json_string (line 243) | def to_json_string(self): method to_json_file (line 247) | 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 466) | def to_model_card(self): method from_trainer (line 547) | def from_trainer( method from_keras (line 623) | def from_keras( function parse_keras_history (line 698) | def parse_keras_history(logs): function parse_log_history (line 733) | def parse_log_history(log_history): function extract_hyperparameters_from_keras (line 794) | def extract_hyperparameters_from_keras(model): function _maybe_round (line 807) | def _maybe_round(v, decimals=4): function _regular_table_line (line 813) | def _regular_table_line(values, col_widths): function _second_table_line (line 818) | def _second_table_line(col_widths): function make_markdown_table (line 823) | def make_markdown_table(lines): function extract_hyperparameters_from_trainer (line 850) | def extract_hyperparameters_from_trainer(trainer): FILE: benchmark/third_party/transformers/src/transformers/modeling_flax_outputs.py class FlaxBaseModelOutput (line 23) | class FlaxBaseModelOutput(ModelOutput): class FlaxBaseModelOutputWithPast (line 49) | class FlaxBaseModelOutputWithPast(ModelOutput): class FlaxBaseModelOutputWithPooling (line 79) | class FlaxBaseModelOutputWithPooling(ModelOutput): class FlaxBaseModelOutputWithPoolingAndCrossAttentions (line 110) | class FlaxBaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class FlaxBaseModelOutputWithPastAndCrossAttentions (line 159) | class FlaxBaseModelOutputWithPastAndCrossAttentions(ModelOutput): class FlaxSeq2SeqModelOutput (line 205) | class FlaxSeq2SeqModelOutput(ModelOutput): class FlaxCausalLMOutputWithCrossAttentions (line 266) | class FlaxCausalLMOutputWithCrossAttentions(ModelOutput): class FlaxMaskedLMOutput (line 307) | class FlaxMaskedLMOutput(ModelOutput): class FlaxSeq2SeqLMOutput (line 336) | class FlaxSeq2SeqLMOutput(ModelOutput): class FlaxNextSentencePredictorOutput (line 393) | class FlaxNextSentencePredictorOutput(ModelOutput): class FlaxSequenceClassifierOutput (line 420) | class FlaxSequenceClassifierOutput(ModelOutput): class FlaxSeq2SeqSequenceClassifierOutput (line 446) | class FlaxSeq2SeqSequenceClassifierOutput(ModelOutput): class FlaxMultipleChoiceModelOutput (line 503) | class FlaxMultipleChoiceModelOutput(ModelOutput): class FlaxTokenClassifierOutput (line 531) | class FlaxTokenClassifierOutput(ModelOutput): class FlaxQuestionAnsweringModelOutput (line 557) | class FlaxQuestionAnsweringModelOutput(ModelOutput): class FlaxSeq2SeqQuestionAnsweringModelOutput (line 586) | class FlaxSeq2SeqQuestionAnsweringModelOutput(ModelOutput): FILE: benchmark/third_party/transformers/src/transformers/modeling_flax_pytorch_utils.py function load_pytorch_checkpoint_in_flax_state_dict (line 41) | def load_pytorch_checkpoint_in_flax_state_dict( function rename_key_and_reshape_tensor (line 69) | def rename_key_and_reshape_tensor( function convert_pytorch_state_dict_to_flax (line 116) | def convert_pytorch_state_dict_to_flax(pt_state_dict, flax_model): function convert_pytorch_sharded_state_dict_to_flax (line 169) | def convert_pytorch_sharded_state_dict_to_flax(shard_filenames, flax_mod... function load_flax_checkpoint_in_pytorch_model (line 224) | def load_flax_checkpoint_in_pytorch_model(model, flax_checkpoint_path): function load_flax_weights_in_pytorch_model (line 242) | def load_flax_weights_in_pytorch_model(pt_model, flax_state): FILE: benchmark/third_party/transformers/src/transformers/modeling_flax_utils.py function quick_gelu (line 61) | def quick_gelu(x): function dtype_byte_size (line 75) | def dtype_byte_size(dtype): function flax_shard_checkpoint (line 92) | def flax_shard_checkpoint(params, max_shard_size="10GB"): class FlaxPreTrainedModel (line 157) | class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin): method __init__ (line 179) | def __init__( method init_weights (line 229) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method enable_gradient_checkpointing (line 232) | def enable_gradient_checkpointing(self): method _from_config (line 236) | def _from_config(cls, config, **kwargs): method framework (line 243) | def framework(self) -> str: method config (line 250) | def config(self) -> PretrainedConfig: method module (line 254) | def module(self) -> nn.Module: method params (line 258) | def params(self) -> Union[Dict, FrozenDict]: method required_params (line 268) | def required_params(self) -> Set: method params_shape_tree (line 272) | def params_shape_tree(self) -> Dict: method params (line 276) | def params(self, params: Union[Dict, FrozenDict]): method _cast_floating_to (line 294) | def _cast_floating_to(self, params: Union[Dict, FrozenDict], dtype: jn... method to_bf16 (line 318) | def to_bf16(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp32 (line 357) | def to_fp32(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp16 (line 384) | def to_fp16(self, params: Union[Dict, FrozenDict], mask: Any = None): method load_flax_sharded_weights (line 424) | def load_flax_sharded_weights(cls, shard_files): method from_pretrained (line 471) | def from_pretrained( method save_pretrained (line 950) | def save_pretrained( method register_for_auto_class (line 1048) | def register_for_auto_class(cls, auto_class="FlaxAutoModel"): function overwrite_call_docstring (line 1081) | def overwrite_call_docstring(model_class, docstring): function append_call_sample_docstring (line 1090) | def append_call_sample_docstring(model_class, tokenizer_class, checkpoin... function append_replace_return_docstrings (line 1101) | def append_replace_return_docstrings(model_class, output_type, config_cl... FILE: benchmark/third_party/transformers/src/transformers/modeling_outputs.py class BaseModelOutput (line 24) | class BaseModelOutput(ModelOutput): class BaseModelOutputWithNoAttention (line 50) | class BaseModelOutputWithNoAttention(ModelOutput): class BaseModelOutputWithPooling (line 69) | class BaseModelOutputWithPooling(ModelOutput): class BaseModelOutputWithPoolingAndNoAttention (line 101) | class BaseModelOutputWithPoolingAndNoAttention(ModelOutput): class BaseModelOutputWithPast (line 123) | class BaseModelOutputWithPast(ModelOutput): class BaseModelOutputWithCrossAttentions (line 162) | class BaseModelOutputWithCrossAttentions(ModelOutput): class BaseModelOutputWithPoolingAndCrossAttentions (line 195) | class BaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class BaseModelOutputWithPastAndCrossAttentions (line 244) | class BaseModelOutputWithPastAndCrossAttentions(ModelOutput): class Seq2SeqModelOutput (line 290) | class Seq2SeqModelOutput(ModelOutput): class CausalLMOutput (line 351) | class CausalLMOutput(ModelOutput): class CausalLMOutputWithPast (line 380) | class CausalLMOutputWithPast(ModelOutput): class CausalLMOutputWithCrossAttentions (line 416) | class CausalLMOutputWithCrossAttentions(ModelOutput): class SequenceClassifierOutputWithPast (line 460) | class SequenceClassifierOutputWithPast(ModelOutput): class MaskedLMOutput (line 496) | class MaskedLMOutput(ModelOutput): class Seq2SeqLMOutput (line 525) | class Seq2SeqLMOutput(ModelOutput): class NextSentencePredictorOutput (line 585) | class NextSentencePredictorOutput(ModelOutput): class SequenceClassifierOutput (line 615) | class SequenceClassifierOutput(ModelOutput): class Seq2SeqSequenceClassifierOutput (line 644) | class Seq2SeqSequenceClassifierOutput(ModelOutput): class MultipleChoiceModelOutput (line 704) | class MultipleChoiceModelOutput(ModelOutput): class TokenClassifierOutput (line 735) | class TokenClassifierOutput(ModelOutput): class QuestionAnsweringModelOutput (line 764) | class QuestionAnsweringModelOutput(ModelOutput): class Seq2SeqQuestionAnsweringModelOutput (line 796) | class Seq2SeqQuestionAnsweringModelOutput(ModelOutput): class SemanticSegmenterOutput (line 859) | class SemanticSegmenterOutput(ModelOutput): class ImageClassifierOutput (line 897) | class ImageClassifierOutput(ModelOutput): class ImageClassifierOutputWithNoAttention (line 925) | class ImageClassifierOutputWithNoAttention(ModelOutput): class DepthEstimatorOutput (line 946) | class DepthEstimatorOutput(ModelOutput): class Wav2Vec2BaseModelOutput (line 976) | class Wav2Vec2BaseModelOutput(ModelOutput): class XVectorOutput (line 1005) | class XVectorOutput(ModelOutput): FILE: benchmark/third_party/transformers/src/transformers/modeling_tf_outputs.py class TFBaseModelOutput (line 24) | class TFBaseModelOutput(ModelOutput): class TFBaseModelOutputWithNoAttention (line 50) | class TFBaseModelOutputWithNoAttention(ModelOutput): class TFBaseModelOutputWithPooling (line 69) | class TFBaseModelOutputWithPooling(ModelOutput): class TFBaseModelOutputWithPoolingAndNoAttention (line 103) | class TFBaseModelOutputWithPoolingAndNoAttention(ModelOutput): class TFBaseModelOutputWithPoolingAndCrossAttentions (line 125) | class TFBaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class TFBaseModelOutputWithPast (line 173) | class TFBaseModelOutputWithPast(ModelOutput): class TFBaseModelOutputWithCrossAttentions (line 209) | class TFBaseModelOutputWithCrossAttentions(ModelOutput): class TFBaseModelOutputWithPastAndCrossAttentions (line 242) | class TFBaseModelOutputWithPastAndCrossAttentions(ModelOutput): class TFSeq2SeqModelOutput (line 285) | class TFSeq2SeqModelOutput(ModelOutput): class TFCausalLMOutput (line 345) | class TFCausalLMOutput(ModelOutput): class TFCausalLMOutputWithPast (line 374) | class TFCausalLMOutputWithPast(ModelOutput): class TFCausalLMOutputWithCrossAttentions (line 410) | class TFCausalLMOutputWithCrossAttentions(ModelOutput): class TFMaskedLMOutput (line 453) | class TFMaskedLMOutput(ModelOutput): class TFSeq2SeqLMOutput (line 482) | class TFSeq2SeqLMOutput(ModelOutput): class TFNextSentencePredictorOutput (line 541) | class TFNextSentencePredictorOutput(ModelOutput): class TFSequenceClassifierOutput (line 571) | class TFSequenceClassifierOutput(ModelOutput): class TFSeq2SeqSequenceClassifierOutput (line 600) | class TFSeq2SeqSequenceClassifierOutput(ModelOutput): class TFSemanticSegmenterOutput (line 652) | class TFSemanticSegmenterOutput(ModelOutput): class TFSemanticSegmenterOutputWithNoAttention (line 689) | class TFSemanticSegmenterOutputWithNoAttention(ModelOutput): class TFImageClassifierOutput (line 720) | class TFImageClassifierOutput(ModelOutput): class TFMultipleChoiceModelOutput (line 747) | class TFMultipleChoiceModelOutput(ModelOutput): class TFTokenClassifierOutput (line 778) | class TFTokenClassifierOutput(ModelOutput): class TFQuestionAnsweringModelOutput (line 807) | class TFQuestionAnsweringModelOutput(ModelOutput): class TFSeq2SeqQuestionAnsweringModelOutput (line 839) | class TFSeq2SeqQuestionAnsweringModelOutput(ModelOutput): class TFSequenceClassifierOutputWithPast (line 894) | class TFSequenceClassifierOutputWithPast(ModelOutput): class TFImageClassifierOutputWithNoAttention (line 930) | class TFImageClassifierOutputWithNoAttention(ModelOutput): FILE: benchmark/third_party/transformers/src/transformers/modeling_tf_pytorch_utils.py class TransposeType (line 31) | class TransposeType(ExplicitEnum): function convert_tf_weight_name_to_pt_weight_name (line 42) | def convert_tf_weight_name_to_pt_weight_name(tf_name, start_prefix_to_re... function apply_transpose (line 104) | def apply_transpose(transpose: TransposeType, weight, match_shape=None, ... function load_pytorch_checkpoint_in_tf2_model (line 146) | def load_pytorch_checkpoint_in_tf2_model( function load_pytorch_model_in_tf2_model (line 182) | def load_pytorch_model_in_tf2_model(tf_model, pt_model, tf_inputs=None, ... function load_pytorch_weights_in_tf2_model (line 191) | def load_pytorch_weights_in_tf2_model( function load_pytorch_state_dict_in_tf2_model (line 215) | def load_pytorch_state_dict_in_tf2_model( function load_tf2_checkpoint_in_pytorch_model (line 334) | def load_tf2_checkpoint_in_pytorch_model( function load_tf2_model_in_pytorch_model (line 375) | def load_tf2_model_in_pytorch_model(pt_model, tf_model, allow_missing_ke... function load_tf2_weights_in_pytorch_model (line 384) | def load_tf2_weights_in_pytorch_model(pt_model, tf_weights, allow_missin... function load_tf2_state_dict_in_pytorch_model (line 402) | def load_tf2_state_dict_in_pytorch_model(pt_model, tf_state_dict, allow_... FILE: benchmark/third_party/transformers/src/transformers/modeling_tf_utils.py function dummy_loss (line 96) | def dummy_loss(y_true, y_pred): class TFModelUtilsMixin (line 100) | class TFModelUtilsMixin: method num_parameters (line 105) | def num_parameters(self, only_trainable: bool = False) -> int: function keras_serializable (line 122) | def keras_serializable(cls): class TFCausalLanguageModelingLoss (line 187) | class TFCausalLanguageModelingLoss: method hf_compute_loss (line 198) | def hf_compute_loss(self, labels, logits): class TFQuestionAnsweringLoss (line 218) | class TFQuestionAnsweringLoss: method hf_compute_loss (line 223) | def hf_compute_loss(self, labels, logits): class TFTokenClassificationLoss (line 233) | class TFTokenClassificationLoss: method hf_compute_loss (line 244) | def hf_compute_loss(self, labels, logits): class TFSequenceClassificationLoss (line 277) | class TFSequenceClassificationLoss: method hf_compute_loss (line 282) | def hf_compute_loss(self, labels, logits): class TFMultipleChoiceLoss (line 296) | class TFMultipleChoiceLoss: method hf_compute_loss (line 299) | def hf_compute_loss(self, labels, logits): class TFMaskedLanguageModelingLoss (line 306) | class TFMaskedLanguageModelingLoss(TFCausalLanguageModelingLoss): class TFNextSentencePredictionLoss (line 318) | class TFNextSentencePredictionLoss: method hf_compute_loss (line 329) | def hf_compute_loss(self, labels, logits): function booleans_processing (line 354) | def booleans_processing(config, **kwargs): function unpack_inputs (line 387) | def unpack_inputs(func): function input_processing (line 430) | def input_processing(func, config, **kwargs): function dtype_byte_size (line 603) | def dtype_byte_size(dtype): function format_weight_name (line 623) | def format_weight_name(name, _prefix=None): function tf_shard_checkpoint (line 631) | def tf_shard_checkpoint(weights, max_shard_size="10GB"): function load_tf_sharded_weights (line 697) | def load_tf_sharded_weights(model, shard_files, ignore_mismatched_sizes=... function load_tf_shard (line 761) | def load_tf_shard(model, model_layer_map, resolved_archive_file, ignore_... function load_tf_weights (line 851) | def load_tf_weights(model, resolved_archive_file, ignore_mismatched_size... function load_tf_weights_from_h5 (line 878) | def load_tf_weights_from_h5(model, resolved_archive_file, ignore_mismatc... function load_tf_weights_from_safetensors (line 982) | def load_tf_weights_from_safetensors(model, resolved_archive_file, ignor... function init_copy_embeddings (line 1023) | def init_copy_embeddings(old_embeddings, new_num_tokens): class TFPreTrainedModel (line 1063) | class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin, TFGenerationM... method dummy_inputs (line 1098) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method framework (line 1110) | def framework(self) -> str: method __init__ (line 1116) | def __init__(self, config, *inputs, **kwargs): method get_config (line 1130) | def get_config(self): method from_config (line 1134) | def from_config(cls, config, **kwargs): method _from_config (line 1140) | def _from_config(cls, config, **kwargs): method serving (line 1155) | def serving(self, inputs): method serving_output (line 1167) | def serving_output(output): method get_input_embeddings (line 1177) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _save_checkpoint (line 1191) | def _save_checkpoint(self, checkpoint_dir, epoch): method load_repo_checkpoint (line 1204) | def load_repo_checkpoint(self, repo_path_or_name): method prepare_tf_dataset (line 1258) | def prepare_tf_dataset( method compile (line 1357) | def compile( method compute_loss (line 1408) | def compute_loss(self, *args, **kwargs): method get_label_to_output_name_mapping (line 1422) | def get_label_to_output_name_mapping(self): method train_step (line 1437) | def train_step(self, data): method test_step (line 1545) | def test_step(self, data): method create_model_card (line 1648) | def create_model_card( method set_input_embeddings (line 1708) | def set_input_embeddings(self, value): method get_output_embeddings (line 1728) | def get_output_embeddings(self) -> Union[None, tf.keras.layers.Layer]: method set_output_embeddings (line 1748) | def set_output_embeddings(self, value): method get_output_layer_with_bias (line 1765) | def get_output_layer_with_bias(self) -> Union[None, tf.keras.layers.La... method get_prefix_bias_name (line 1778) | def get_prefix_bias_name(self) -> Union[None, str]: method get_bias (line 1788) | def get_bias(self) -> Union[None, Dict[str, tf.Variable]]: method set_bias (line 1805) | def set_bias(self, value): method get_lm_head (line 1821) | def get_lm_head(self) -> tf.keras.layers.Layer: method resize_token_embeddings (line 1830) | def resize_token_embeddings( method _v2_resized_token_embeddings (line 1863) | def _v2_resized_token_embeddings(self, new_num_tokens: Optional[int] =... method _get_word_embedding_weight (line 1886) | def _get_word_embedding_weight(model, embedding_layer): method _resize_token_embeddings (line 1917) | def _resize_token_embeddings(self, new_num_tokens): method _v2_resize_token_embeddings (line 1940) | def _v2_resize_token_embeddings(self, new_num_tokens): method _get_resized_lm_head_bias (line 1961) | def _get_resized_lm_head_bias(self, old_lm_head_bias, new_num_tokens): method _v2_get_resized_lm_head_bias (line 2014) | def _v2_get_resized_lm_head_bias( method _get_resized_lm_head_decoder (line 2048) | def _get_resized_lm_head_decoder(self, old_lm_head_decoder, new_num_to... method _get_resized_embeddings (line 2086) | def _get_resized_embeddings(self, old_embeddings, new_num_tokens=None)... method _v2_get_resized_embeddings (line 2121) | def _v2_get_resized_embeddings( method prune_heads (line 2168) | def prune_heads(self, heads_to_prune): method save_pretrained (line 2180) | def save_pretrained( method from_pretrained (line 2317) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method push_to_hub (line 2798) | def push_to_hub( method register_for_auto_class (line 2889) | def register_for_auto_class(cls, auto_class="TFAutoModel"): class TFConv1D (line 2915) | class TFConv1D(tf.keras.layers.Layer): method __init__ (line 2932) | def __init__(self, nf, nx, initializer_range=0.02, **kwargs): method build (line 2938) | def build(self, input_shape): method call (line 2944) | def call(self, x): class TFSharedEmbeddings (line 2955) | class TFSharedEmbeddings(tf.keras.layers.Layer): method __init__ (line 2975) | def __init__(self, vocab_size: int, hidden_size: int, initializer_rang... method build (line 2981) | def build(self, input_shape): method get_config (line 2991) | def get_config(self): method call (line 3001) | def call(self, inputs: tf.Tensor, mode: str = "embedding") -> tf.Tensor: method _embedding (line 3033) | def _embedding(self, input_ids): method _linear (line 3037) | def _linear(self, inputs): class TFSequenceSummary (line 3054) | class TFSequenceSummary(tf.keras.layers.Layer): method __init__ (line 3084) | def __init__(self, config: PretrainedConfig, initializer_range: float ... method call (line 3118) | def call(self, inputs, cls_index=None, training=False): function get_initializer (line 3170) | def get_initializer(initializer_range: float = 0.02) -> tf.initializers.... FILE: benchmark/third_party/transformers/src/transformers/modeling_utils.py function no_init_weights (line 113) | def no_init_weights(_enable=True): class Identity (line 133) | class Identity(nn.Module): method __init__ (line 136) | def __init__(self, *args, **kwargs): method forward (line 139) | def forward(self, input): function get_parameter_device (line 143) | def get_parameter_device(parameter: Union[nn.Module, GenerationMixin, "M... function get_first_parameter_dtype (line 158) | def get_first_parameter_dtype(parameter: Union[nn.Module, GenerationMixi... function get_parameter_dtype (line 176) | def get_parameter_dtype(parameter: Union[nn.Module, GenerationMixin, "Mo... function get_state_dict_float_dtype (line 207) | def get_state_dict_float_dtype(state_dict): function get_state_dict_dtype (line 218) | def get_state_dict_dtype(state_dict): function dtype_byte_size (line 231) | def dtype_byte_size(dtype): function shard_checkpoint (line 251) | def shard_checkpoint( function load_sharded_checkpoint (line 323) | def load_sharded_checkpoint(model, folder, strict=True): function load_state_dict (line 380) | def load_state_dict(checkpoint_file: Union[str, os.PathLike]): function _load_state_dict_into_model (line 422) | def _load_state_dict_into_model(model_to_load, state_dict, start_prefix): function find_submodule_and_param_name (line 483) | def find_submodule_and_param_name(model, long_key, start_prefix): function _move_model_to_meta (line 506) | def _move_model_to_meta(model, loaded_state_dict_keys, start_prefix): function _load_state_dict_into_meta_model (line 535) | def _load_state_dict_into_meta_model( class ModuleUtilsMixin (line 623) | class ModuleUtilsMixin: method _hook_rss_memory_pre_forward (line 629) | def _hook_rss_memory_pre_forward(module, *args, **kwargs): method _hook_rss_memory_post_forward (line 641) | def _hook_rss_memory_post_forward(module, *args, **kwargs): method add_memory_hooks (line 654) | def add_memory_hooks(self): method reset_memory_hooks_state (line 666) | def reset_memory_hooks_state(self): method device (line 676) | def device(self) -> device: method dtype (line 684) | def dtype(self) -> torch.dtype: method invert_attention_mask (line 690) | def invert_attention_mask(self, encoder_attention_mask: Tensor) -> Ten... method create_extended_attention_mask_for_decoder (line 715) | def create_extended_attention_mask_for_decoder(input_shape, attention_... method get_extended_attention_mask (line 742) | def get_extended_attention_mask( method get_head_mask (line 794) | def get_head_mask( method _convert_head_mask_to_5d (line 821) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): method num_parameters (line 832) | def num_parameters(self, only_trainable: bool = False, exclude_embeddi... method estimate_tokens (line 858) | def estimate_tokens(self, input_dict: Dict[str, Union[torch.Tensor, An... method floating_point_ops (line 879) | def floating_point_ops( class PreTrainedModel (line 906) | class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, Push... method dummy_inputs (line 954) | def dummy_inputs(self) -> Dict[str, torch.Tensor]: method framework (line 961) | def framework(self) -> str: method __init__ (line 967) | def __init__(self, config: PretrainedConfig, *inputs, **kwargs): method post_init (line 980) | def post_init(self): method _backward_compatibility_gradient_checkpointing (line 988) | def _backward_compatibility_gradient_checkpointing(self): method _from_config (line 995) | def _from_config(cls, config, **kwargs): method _set_default_torch_dtype (line 1028) | def _set_default_torch_dtype(cls, dtype: torch.dtype) -> torch.dtype: method base_model (line 1055) | def base_model(self) -> nn.Module: method get_input_embeddings (line 1061) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1074) | def set_input_embeddings(self, value: nn.Module): method get_output_embeddings (line 1087) | def get_output_embeddings(self) -> nn.Module: method _init_weights (line 1096) | def _init_weights(self, module): method tie_weights (line 1102) | def tie_weights(self): method _tie_encoder_decoder_weights (line 1124) | def _tie_encoder_decoder_weights(encoder: nn.Module, decoder: nn.Modul... method _tie_or_clone_weights (line 1198) | def _tie_or_clone_weights(self, output_embeddings, input_embeddings): method resize_token_embeddings (line 1218) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _resize_token_embeddings (line 1246) | def _resize_token_embeddings(self, new_num_tokens): method _get_resized_embeddings (line 1259) | def _get_resized_embeddings( method _get_resized_lm_head (line 1323) | def _get_resized_lm_head( method resize_position_embeddings (line 1415) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1421) | def get_position_embeddings(self) -> Union[nn.Embedding, Tuple[nn.Embe... method init_weights (line 1427) | def init_weights(self): method prune_heads (line 1443) | def prune_heads(self, heads_to_prune: Dict[int, List[int]]): method gradient_checkpointing_enable (line 1460) | def gradient_checkpointing_enable(self): method gradient_checkpointing_disable (line 1471) | def gradient_checkpointing_disable(self): method is_gradient_checkpointing (line 1482) | def is_gradient_checkpointing(self) -> bool: method save_pretrained (line 1491) | def save_pretrained( method get_memory_footprint (line 1643) | def get_memory_footprint(self, return_buffers=True): method from_pretrained (line 1662) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method _load_pretrained_model (line 2366) | def _load_pretrained_model( method retrieve_modules_from_names (line 2638) | def retrieve_modules_from_names(self, names, add_prefix=False, remove_... method _load_pretrained_model_low_mem (line 2659) | def _load_pretrained_model_low_mem(model, loaded_state_dict_keys, reso... method register_for_auto_class (line 2683) | def register_for_auto_class(cls, auto_class="AutoModel"): class PoolerStartLogits (line 2715) | class PoolerStartLogits(nn.Module): method __init__ (line 2724) | def __init__(self, config: PretrainedConfig): method forward (line 2728) | def forward( class PoolerEndLogits (line 2753) | class PoolerEndLogits(nn.Module): method __init__ (line 2763) | def __init__(self, config: PretrainedConfig): method forward (line 2770) | def forward( class PoolerAnswerClass (line 2822) | class PoolerAnswerClass(nn.Module): method __init__ (line 2831) | def __init__(self, config): method forward (line 2837) | def forward( class SquadHeadOutput (line 2888) | class SquadHeadOutput(ModelOutput): class SQuADHead (line 2918) | class SQuADHead(nn.Module): method __init__ (line 2928) | def __init__(self, config): method forward (line 2938) | def forward( class SequenceSummary (line 3035) | class SequenceSummary(nn.Module): method __init__ (line 3061) | def __init__(self, config: PretrainedConfig): method forward (line 3090) | def forward( function unwrap_model (line 3134) | def unwrap_model(model: nn.Module) -> nn.Module: FILE: benchmark/third_party/transformers/src/transformers/models/albert/configuration_albert.py class AlbertConfig (line 36) | class AlbertConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class AlbertOnnxConfig (line 159) | class AlbertOnnxConfig(OnnxConfig): method inputs (line 161) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/albert/convert_albert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, albert_config_f... FILE: benchmark/third_party/transformers/src/transformers/models/albert/modeling_albert.py function load_tf_weights_in_albert (line 69) | def load_tf_weights_in_albert(model, config, tf_checkpoint_path): class AlbertEmbeddings (line 195) | class AlbertEmbeddings(nn.Module): method __init__ (line 200) | def __init__(self, config: AlbertConfig): method forward (line 219) | def forward( class AlbertAttention (line 261) | class AlbertAttention(nn.Module): method __init__ (line 262) | def __init__(self, config: AlbertConfig): method transpose_for_scores (line 291) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method prune_heads (line 296) | def prune_heads(self, heads: List[int]) -> None: method forward (line 314) | def forward( class AlbertLayer (line 373) | class AlbertLayer(nn.Module): method __init__ (line 374) | def __init__(self, config: AlbertConfig): method forward (line 387) | def forward( method ff_chunk (line 407) | def ff_chunk(self, attention_output: torch.Tensor) -> torch.Tensor: class AlbertLayerGroup (line 414) | class AlbertLayerGroup(nn.Module): method __init__ (line 415) | def __init__(self, config: AlbertConfig): method forward (line 420) | def forward( class AlbertTransformer (line 449) | class AlbertTransformer(nn.Module): method __init__ (line 450) | def __init__(self, config: AlbertConfig): method forward (line 457) | def forward( class AlbertPreTrainedModel (line 502) | class AlbertPreTrainedModel(PreTrainedModel): method _init_weights (line 513) | def _init_weights(self, module): class AlbertForPreTrainingOutput (line 531) | class AlbertForPreTrainingOutput(ModelOutput): class AlbertModel (line 634) | class AlbertModel(AlbertPreTrainedModel): method __init__ (line 639) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 655) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 658) | def set_input_embeddings(self, value: nn.Embedding) -> None: method _prune_heads (line 661) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 685) | def forward( class AlbertForPreTraining (line 764) | class AlbertForPreTraining(AlbertPreTrainedModel): method __init__ (line 765) | def __init__(self, config: AlbertConfig): method get_output_embeddings (line 775) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 778) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 781) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 786) | def forward( class AlbertMLMHead (line 867) | class AlbertMLMHead(nn.Module): method __init__ (line 868) | def __init__(self, config: AlbertConfig): method forward (line 878) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method _tie_weights (line 888) | def _tie_weights(self) -> None: class AlbertSOPHead (line 893) | class AlbertSOPHead(nn.Module): method __init__ (line 894) | def __init__(self, config: AlbertConfig): method forward (line 900) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class AlbertForMaskedLM (line 910) | class AlbertForMaskedLM(AlbertPreTrainedModel): method __init__ (line 914) | def __init__(self, config): method get_output_embeddings (line 923) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 926) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 929) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 934) | def forward( class AlbertForSequenceClassification (line 1025) | class AlbertForSequenceClassification(AlbertPreTrainedModel): method __init__ (line 1026) | def __init__(self, config: AlbertConfig): method forward (line 1047) | def forward( class AlbertForTokenClassification (line 1127) | class AlbertForTokenClassification(AlbertPreTrainedModel): method __init__ (line 1131) | def __init__(self, config: AlbertConfig): method forward (line 1159) | def forward( class AlbertForQuestionAnswering (line 1219) | class AlbertForQuestionAnswering(AlbertPreTrainedModel): method __init__ (line 1223) | def __init__(self, config: AlbertConfig): method forward (line 1244) | def forward( class AlbertForMultipleChoice (line 1326) | class AlbertForMultipleChoice(AlbertPreTrainedModel): method __init__ (line 1327) | def __init__(self, config: AlbertConfig): method forward (line 1344) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/albert/modeling_flax_albert.py class FlaxAlbertForPreTrainingOutput (line 57) | class FlaxAlbertForPreTrainingOutput(ModelOutput): class FlaxAlbertEmbeddings (line 153) | class FlaxAlbertEmbeddings(nn.Module): method setup (line 159) | def setup(self): method __call__ (line 179) | def __call__(self, input_ids, token_type_ids, position_ids, determinis... class FlaxAlbertSelfAttention (line 194) | class FlaxAlbertSelfAttention(nn.Module): method setup (line 198) | def setup(self): method __call__ (line 228) | def __call__(self, hidden_states, attention_mask, deterministic=True, ... class FlaxAlbertLayer (line 279) | class FlaxAlbertLayer(nn.Module): method setup (line 283) | def setup(self): method __call__ (line 299) | def __call__( class FlaxAlbertLayerCollection (line 323) | class FlaxAlbertLayerCollection(nn.Module): method setup (line 327) | def setup(self): method __call__ (line 332) | def __call__( class FlaxAlbertLayerCollections (line 366) | class FlaxAlbertLayerCollections(nn.Module): method setup (line 371) | def setup(self): method __call__ (line 374) | def __call__( class FlaxAlbertLayerGroups (line 392) | class FlaxAlbertLayerGroups(nn.Module): method setup (line 396) | def setup(self): method __call__ (line 402) | def __call__( class FlaxAlbertEncoder (line 439) | class FlaxAlbertEncoder(nn.Module): method setup (line 443) | def setup(self): method __call__ (line 451) | def __call__( class FlaxAlbertOnlyMLMHead (line 470) | class FlaxAlbertOnlyMLMHead(nn.Module): method setup (line 475) | def setup(self): method __call__ (line 482) | def __call__(self, hidden_states, shared_embedding=None): class FlaxAlbertSOPHead (line 496) | class FlaxAlbertSOPHead(nn.Module): method setup (line 500) | def setup(self): method __call__ (line 504) | def __call__(self, pooled_output, deterministic=True): class FlaxAlbertPreTrainedModel (line 510) | class FlaxAlbertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 520) | def __init__( method init_weights (line 532) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 557) | def __call__( class FlaxAlbertModule (line 605) | class FlaxAlbertModule(nn.Module): method setup (line 610) | def setup(self): method __call__ (line 625) | def __call__( class FlaxAlbertModel (line 679) | class FlaxAlbertModel(FlaxAlbertPreTrainedModel): class FlaxAlbertForPreTrainingModule (line 688) | class FlaxAlbertForPreTrainingModule(nn.Module): method setup (line 692) | def setup(self): method __call__ (line 697) | def __call__( class FlaxAlbertForPreTraining (line 750) | class FlaxAlbertForPreTraining(FlaxAlbertPreTrainedModel): class FlaxAlbertForMaskedLMModule (line 782) | class FlaxAlbertForMaskedLMModule(nn.Module): method setup (line 786) | def setup(self): method __call__ (line 790) | def __call__( class FlaxAlbertForMaskedLM (line 833) | class FlaxAlbertForMaskedLM(FlaxAlbertPreTrainedModel): class FlaxAlbertForSequenceClassificationModule (line 842) | class FlaxAlbertForSequenceClassificationModule(nn.Module): method setup (line 846) | def setup(self): method __call__ (line 859) | def __call__( class FlaxAlbertForSequenceClassification (line 903) | class FlaxAlbertForSequenceClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForMultipleChoiceModule (line 916) | class FlaxAlbertForMultipleChoiceModule(nn.Module): method setup (line 920) | def setup(self): method __call__ (line 925) | def __call__( class FlaxAlbertForMultipleChoice (line 977) | class FlaxAlbertForMultipleChoice(FlaxAlbertPreTrainedModel): class FlaxAlbertForTokenClassificationModule (line 993) | class FlaxAlbertForTokenClassificationModule(nn.Module): method setup (line 997) | def setup(self): method __call__ (line 1007) | def __call__( class FlaxAlbertForTokenClassification (line 1051) | class FlaxAlbertForTokenClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForQuestionAnsweringModule (line 1064) | class FlaxAlbertForQuestionAnsweringModule(nn.Module): method setup (line 1068) | def setup(self): method __call__ (line 1072) | def __call__( class FlaxAlbertForQuestionAnswering (line 1120) | class FlaxAlbertForQuestionAnswering(FlaxAlbertPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/albert/modeling_tf_albert.py class TFAlbertPreTrainingLoss (line 79) | class TFAlbertPreTrainingLoss: method hf_compute_loss (line 85) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFAlbertEmbeddings (line 135) | class TFAlbertEmbeddings(tf.keras.layers.Layer): method __init__ (line 138) | def __init__(self, config: AlbertConfig, **kwargs): method build (line 149) | def build(self, input_shape: tf.TensorShape): method call (line 174) | def call( class TFAlbertAttention (line 224) | class TFAlbertAttention(tf.keras.layers.Layer): method __init__ (line 227) | def __init__(self, config: AlbertConfig, **kwargs): method transpose_for_scores (line 259) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 266) | def call( class TFAlbertLayer (line 320) | class TFAlbertLayer(tf.keras.layers.Layer): method __init__ (line 321) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 342) | def call( class TFAlbertLayerGroup (line 369) | class TFAlbertLayerGroup(tf.keras.layers.Layer): method __init__ (line 370) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 377) | def call( class TFAlbertTransformer (line 412) | class TFAlbertTransformer(tf.keras.layers.Layer): method __init__ (line 413) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 429) | def call( class TFAlbertPreTrainedModel (line 470) | class TFAlbertPreTrainedModel(TFPreTrainedModel): class TFAlbertMLMHead (line 480) | class TFAlbertMLMHead(tf.keras.layers.Layer): method __init__ (line 481) | def __init__(self, config: AlbertConfig, input_embeddings: tf.keras.la... method build (line 500) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 508) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 511) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 515) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 518) | def set_bias(self, value: tf.Variable): method call (line 523) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFAlbertMainLayer (line 537) | class TFAlbertMainLayer(tf.keras.layers.Layer): method __init__ (line 540) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = Tru... method get_input_embeddings (line 558) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 561) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 565) | def _prune_heads(self, heads_to_prune): method call (line 573) | def call( class TFAlbertForPreTrainingOutput (line 665) | class TFAlbertForPreTrainingOutput(ModelOutput): class TFAlbertModel (line 797) | class TFAlbertModel(TFAlbertPreTrainedModel): method __init__ (line 798) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 811) | def call( method serving_output (line 839) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFAlbertForPreTraining (line 858) | class TFAlbertForPreTraining(TFAlbertPreTrainedModel, TFAlbertPreTrainin... method __init__ (line 862) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 871) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 877) | def call( method serving_output (line 946) | def serving_output(self, output: TFAlbertForPreTrainingOutput) -> TFAl... class TFAlbertSOPHead (line 958) | class TFAlbertSOPHead(tf.keras.layers.Layer): method __init__ (line 959) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 969) | def call(self, pooled_output: tf.Tensor, training: bool) -> tf.Tensor: class TFAlbertForMaskedLM (line 977) | class TFAlbertForMaskedLM(TFAlbertPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 981) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 987) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 993) | def call( method serving_output (line 1072) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFAlbertForSequenceClassification (line 1086) | class TFAlbertForSequenceClassification(TFAlbertPreTrainedModel, TFSeque... method __init__ (line 1091) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1112) | def call( method serving_output (line 1162) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFAlbertForTokenClassification (line 1176) | class TFAlbertForTokenClassification(TFAlbertPreTrainedModel, TFTokenCla... method __init__ (line 1181) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1210) | def call( method serving_output (line 1258) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFAlbertForQuestionAnswering (line 1272) | class TFAlbertForQuestionAnswering(TFAlbertPreTrainedModel, TFQuestionAn... method __init__ (line 1276) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1298) | def call( method serving_output (line 1361) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... class TFAlbertForMultipleChoice (line 1377) | class TFAlbertForMultipleChoice(TFAlbertPreTrainedModel, TFMultipleChoic... method __init__ (line 1382) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method dummy_inputs (line 1392) | def dummy_inputs(self): method call (line 1409) | def call( method serving (line 1490) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceMod... method serving_output (line 1496) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... FILE: benchmark/third_party/transformers/src/transformers/models/albert/tokenization_albert.py class AlbertTokenizer (line 59) | class AlbertTokenizer(PreTrainedTokenizer): method __init__ (line 136) | def __init__( method vocab_size (line 186) | def vocab_size(self): method get_vocab (line 189) | def get_vocab(self): method __getstate__ (line 194) | def __getstate__(self): method __setstate__ (line 199) | def __setstate__(self, d): method preprocess_text (line 209) | def preprocess_text(self, inputs): method _tokenize (line 224) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 244) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 248) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 252) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 255) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 280) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 308) | def create_token_type_ids_from_sequences( method save_vocabulary (line 338) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/albert/tokenization_albert_fast.py class AlbertTokenizerFast (line 72) | class AlbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 124) | def __init__( method build_inputs_with_special_tokens (line 170) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 195) | def create_token_type_ids_from_sequences( method save_vocabulary (line 225) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/auto/auto_factory.py function _get_model_class (line 358) | def _get_model_class(config, model_mapping): class _BaseAutoModelClass (line 378) | class _BaseAutoModelClass: method __init__ (line 382) | def __init__(self, *args, **kwargs): method from_config (line 390) | def from_config(cls, config, **kwargs): method from_pretrained (line 418) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method register (line 472) | def register(cls, config_class, model_class): function insert_head_doc (line 491) | def insert_head_doc(docstring, head_doc=""): function auto_class_update (line 502) | def auto_class_update(cls, checkpoint_for_example="bert-base-cased", hea... function get_values (line 537) | def get_values(model_mapping): function getattribute_from_module (line 548) | def getattribute_from_module(module, attr): class _LazyAutoMapping (line 568) | class _LazyAutoMapping(OrderedDict): method __init__ (line 577) | def __init__(self, config_mapping, model_mapping): method __getitem__ (line 584) | def __getitem__(self, key): method _load_attr_from_module (line 600) | def _load_attr_from_module(self, model_type, attr): method keys (line 606) | def keys(self): method get (line 614) | def get(self, key, default): method __bool__ (line 620) | def __bool__(self): method values (line 623) | def values(self): method items (line 631) | def items(self): method __iter__ (line 642) | def __iter__(self): method __contains__ (line 645) | def __contains__(self, item): method register (line 653) | def register(self, key, value): FILE: benchmark/third_party/transformers/src/transformers/models/auto/configuration_auto.py function model_type_to_module_name (line 472) | def model_type_to_module_name(key): function config_class_to_model_type (line 481) | def config_class_to_model_type(config): class _LazyConfigMapping (line 489) | class _LazyConfigMapping(OrderedDict): method __init__ (line 494) | def __init__(self, mapping): method __getitem__ (line 499) | def __getitem__(self, key): method keys (line 516) | def keys(self): method values (line 519) | def values(self): method items (line 522) | def items(self): method __iter__ (line 525) | def __iter__(self): method __contains__ (line 528) | def __contains__(self, item): method register (line 531) | def register(self, key, value): class _LazyLoadAllMappings (line 543) | class _LazyLoadAllMappings(OrderedDict): method __init__ (line 552) | def __init__(self, mapping): method _initialize (line 557) | def _initialize(self): method __getitem__ (line 574) | def __getitem__(self, key): method keys (line 578) | def keys(self): method values (line 582) | def values(self): method items (line 586) | def items(self): method __iter__ (line 590) | def __iter__(self): method __contains__ (line 594) | def __contains__(self, item): function _get_class_name (line 602) | def _get_class_name(model_class: Union[str, List[str]]): function _list_model_options (line 608) | def _list_model_options(indent, config_to_class=None, use_model_types=Tr... function replace_list_option_in_docstrings (line 641) | def replace_list_option_in_docstrings(config_to_class=None, use_model_ty... class AutoConfig (line 665) | class AutoConfig: method __init__ (line 673) | def __init__(self): method for_model (line 680) | def for_model(cls, model_type: str, *args, **kwargs): method from_pretrained (line 690) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 812) | def register(model_type, config): FILE: benchmark/third_party/transformers/src/transformers/models/auto/feature_extraction_auto.py function feature_extractor_class_from_name (line 90) | def feature_extractor_class_from_name(class_name: str): function get_feature_extractor_config (line 114) | def get_feature_extractor_config( class AutoFeatureExtractor (line 204) | class AutoFeatureExtractor: method __init__ (line 212) | def __init__(self): method from_pretrained (line 220) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 346) | def register(config_class, feature_extractor_class): FILE: benchmark/third_party/transformers/src/transformers/models/auto/modeling_auto.py class AutoModel (line 887) | class AutoModel(_BaseAutoModelClass): class AutoModelForPreTraining (line 894) | class AutoModelForPreTraining(_BaseAutoModelClass): class _AutoModelWithLMHead (line 902) | class _AutoModelWithLMHead(_BaseAutoModelClass): class AutoModelForCausalLM (line 909) | class AutoModelForCausalLM(_BaseAutoModelClass): class AutoModelForMaskedLM (line 916) | class AutoModelForMaskedLM(_BaseAutoModelClass): class AutoModelForSeq2SeqLM (line 923) | class AutoModelForSeq2SeqLM(_BaseAutoModelClass): class AutoModelForSequenceClassification (line 932) | class AutoModelForSequenceClassification(_BaseAutoModelClass): class AutoModelForQuestionAnswering (line 941) | class AutoModelForQuestionAnswering(_BaseAutoModelClass): class AutoModelForTableQuestionAnswering (line 948) | class AutoModelForTableQuestionAnswering(_BaseAutoModelClass): class AutoModelForVisualQuestionAnswering (line 959) | class AutoModelForVisualQuestionAnswering(_BaseAutoModelClass): class AutoModelForDocumentQuestionAnswering (line 970) | class AutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class AutoModelForTokenClassification (line 981) | class AutoModelForTokenClassification(_BaseAutoModelClass): class AutoModelForMultipleChoice (line 988) | class AutoModelForMultipleChoice(_BaseAutoModelClass): class AutoModelForNextSentencePrediction (line 995) | class AutoModelForNextSentencePrediction(_BaseAutoModelClass): class AutoModelForImageClassification (line 1004) | class AutoModelForImageClassification(_BaseAutoModelClass): class AutoModelForImageSegmentation (line 1011) | class AutoModelForImageSegmentation(_BaseAutoModelClass): class AutoModelForSemanticSegmentation (line 1018) | class AutoModelForSemanticSegmentation(_BaseAutoModelClass): class AutoModelForInstanceSegmentation (line 1027) | class AutoModelForInstanceSegmentation(_BaseAutoModelClass): class AutoModelForObjectDetection (line 1036) | class AutoModelForObjectDetection(_BaseAutoModelClass): class AutoModelForZeroShotObjectDetection (line 1043) | class AutoModelForZeroShotObjectDetection(_BaseAutoModelClass): class AutoModelForDepthEstimation (line 1052) | class AutoModelForDepthEstimation(_BaseAutoModelClass): class AutoModelForVideoClassification (line 1059) | class AutoModelForVideoClassification(_BaseAutoModelClass): class AutoModelForVision2Seq (line 1066) | class AutoModelForVision2Seq(_BaseAutoModelClass): class AutoModelForAudioClassification (line 1073) | class AutoModelForAudioClassification(_BaseAutoModelClass): class AutoModelForCTC (line 1080) | class AutoModelForCTC(_BaseAutoModelClass): class AutoModelForSpeechSeq2Seq (line 1087) | class AutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class AutoModelForAudioFrameClassification (line 1096) | class AutoModelForAudioFrameClassification(_BaseAutoModelClass): class AutoModelForAudioXVector (line 1105) | class AutoModelForAudioXVector(_BaseAutoModelClass): class AutoModelForMaskedImageModeling (line 1112) | class AutoModelForMaskedImageModeling(_BaseAutoModelClass): class AutoModelWithLMHead (line 1119) | class AutoModelWithLMHead(_AutoModelWithLMHead): method from_config (line 1121) | def from_config(cls, config): method from_pretrained (line 1131) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: benchmark/third_party/transformers/src/transformers/models/auto/modeling_flax_auto.py class FlaxAutoModel (line 246) | class FlaxAutoModel(_BaseAutoModelClass): class FlaxAutoModelForPreTraining (line 253) | class FlaxAutoModelForPreTraining(_BaseAutoModelClass): class FlaxAutoModelForCausalLM (line 260) | class FlaxAutoModelForCausalLM(_BaseAutoModelClass): class FlaxAutoModelForMaskedLM (line 267) | class FlaxAutoModelForMaskedLM(_BaseAutoModelClass): class FlaxAutoModelForSeq2SeqLM (line 274) | class FlaxAutoModelForSeq2SeqLM(_BaseAutoModelClass): class FlaxAutoModelForSequenceClassification (line 283) | class FlaxAutoModelForSequenceClassification(_BaseAutoModelClass): class FlaxAutoModelForQuestionAnswering (line 292) | class FlaxAutoModelForQuestionAnswering(_BaseAutoModelClass): class FlaxAutoModelForTokenClassification (line 299) | class FlaxAutoModelForTokenClassification(_BaseAutoModelClass): class FlaxAutoModelForMultipleChoice (line 308) | class FlaxAutoModelForMultipleChoice(_BaseAutoModelClass): class FlaxAutoModelForNextSentencePrediction (line 315) | class FlaxAutoModelForNextSentencePrediction(_BaseAutoModelClass): class FlaxAutoModelForImageClassification (line 324) | class FlaxAutoModelForImageClassification(_BaseAutoModelClass): class FlaxAutoModelForVision2Seq (line 333) | class FlaxAutoModelForVision2Seq(_BaseAutoModelClass): class FlaxAutoModelForSpeechSeq2Seq (line 340) | class FlaxAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): FILE: benchmark/third_party/transformers/src/transformers/models/auto/modeling_tf_auto.py class TFAutoModel (line 444) | class TFAutoModel(_BaseAutoModelClass): class TFAutoModelForPreTraining (line 451) | class TFAutoModelForPreTraining(_BaseAutoModelClass): class _TFAutoModelWithLMHead (line 459) | class _TFAutoModelWithLMHead(_BaseAutoModelClass): class TFAutoModelForCausalLM (line 466) | class TFAutoModelForCausalLM(_BaseAutoModelClass): class TFAutoModelForMaskedImageModeling (line 473) | class TFAutoModelForMaskedImageModeling(_BaseAutoModelClass): class TFAutoModelForImageClassification (line 482) | class TFAutoModelForImageClassification(_BaseAutoModelClass): class TFAutoModelForSemanticSegmentation (line 491) | class TFAutoModelForSemanticSegmentation(_BaseAutoModelClass): class TFAutoModelForVision2Seq (line 500) | class TFAutoModelForVision2Seq(_BaseAutoModelClass): class TFAutoModelForMaskedLM (line 507) | class TFAutoModelForMaskedLM(_BaseAutoModelClass): class TFAutoModelForSeq2SeqLM (line 514) | class TFAutoModelForSeq2SeqLM(_BaseAutoModelClass): class TFAutoModelForSequenceClassification (line 523) | class TFAutoModelForSequenceClassification(_BaseAutoModelClass): class TFAutoModelForQuestionAnswering (line 532) | class TFAutoModelForQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForDocumentQuestionAnswering (line 539) | class TFAutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTableQuestionAnswering (line 550) | class TFAutoModelForTableQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTokenClassification (line 561) | class TFAutoModelForTokenClassification(_BaseAutoModelClass): class TFAutoModelForMultipleChoice (line 570) | class TFAutoModelForMultipleChoice(_BaseAutoModelClass): class TFAutoModelForNextSentencePrediction (line 577) | class TFAutoModelForNextSentencePrediction(_BaseAutoModelClass): class TFAutoModelForSpeechSeq2Seq (line 586) | class TFAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class TFAutoModelWithLMHead (line 595) | class TFAutoModelWithLMHead(_TFAutoModelWithLMHead): method from_config (line 597) | def from_config(cls, config): method from_pretrained (line 607) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: benchmark/third_party/transformers/src/transformers/models/auto/processing_auto.py function processor_class_from_name (line 71) | def processor_class_from_name(class_name: str): class AutoProcessor (line 95) | class AutoProcessor: method __init__ (line 103) | def __init__(self): method from_pretrained (line 111) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 277) | def register(config_class, processor_class): FILE: benchmark/third_party/transformers/src/transformers/models/auto/tokenization_auto.py function tokenizer_class_from_name (line 314) | def tokenizer_class_from_name(class_name: str): function get_tokenizer_config (line 342) | def get_tokenizer_config( class AutoTokenizer (line 437) | class AutoTokenizer: method __init__ (line 445) | def __init__(self): method from_pretrained (line 453) | def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwa... method register (line 652) | def register(config_class, slow_tokenizer_class=None, fast_tokenizer_c... FILE: benchmark/third_party/transformers/src/transformers/models/bart/configuration_bart.py class BartConfig (line 35) | class BartConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class BartOnnxConfig (line 185) | class BartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 187) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 231) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 243) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 311) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 349) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 375) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 399) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: benchmark/third_party/transformers/src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 56) | def remove_ignore_keys_(state_dict): function rename_key (line 68) | def rename_key(dct, old, new): function load_xsum_checkpoint (line 73) | def load_xsum_checkpoint(checkpoint_path): function make_linear_from_emb (line 81) | def make_linear_from_emb(emb): function convert_bart_checkpoint (line 89) | def convert_bart_checkpoint(checkpoint_path, pytorch_dump_folder_path, h... FILE: benchmark/third_party/transformers/src/transformers/models/bart/modeling_bart.py function shift_tokens_right (line 75) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 91) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 106) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BartLearnedPositionalEmbedding (line 120) | class BartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 131) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class BartAttention (line 142) | class BartAttention(nn.Module): method __init__ (line 145) | def __init__( method _shape (line 172) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 175) | def forward( class BartEncoderLayer (line 289) | class BartEncoderLayer(nn.Module): method __init__ (line 290) | def __init__(self, config: BartConfig): method forward (line 306) | def forward( class BartDecoderLayer (line 357) | class BartDecoderLayer(nn.Module): method __init__ (line 358) | def __init__(self, config: BartConfig): method forward (line 384) | def forward( class BartClassificationHead (line 474) | class BartClassificationHead(nn.Module): method __init__ (line 477) | def __init__( method forward (line 489) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BartPretrainedModel (line 498) | class BartPretrainedModel(PreTrainedModel): method _init_weights (line 505) | def _init_weights(self, module): method _set_gradient_checkpointing (line 516) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 521) | def dummy_inputs(self): class PretrainedBartModel (line 531) | class PretrainedBartModel(BartPretrainedModel): method __init_subclass__ (line 532) | def __init_subclass__(self): class BartEncoder (line 695) | class BartEncoder(BartPretrainedModel): method __init__ (line 705) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 732) | def get_input_embeddings(self): method set_input_embeddings (line 735) | def set_input_embeddings(self, value): method forward (line 738) | def forward( class BartDecoder (line 872) | class BartDecoder(BartPretrainedModel): method __init__ (line 881) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 905) | def get_input_embeddings(self): method set_input_embeddings (line 908) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 911) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 931) | def forward( class BartModel (line 1155) | class BartModel(BartPretrainedModel): method __init__ (line 1156) | def __init__(self, config: BartConfig): method get_input_embeddings (line 1168) | def get_input_embeddings(self): method set_input_embeddings (line 1171) | def set_input_embeddings(self, value): method get_encoder (line 1176) | def get_encoder(self): method get_decoder (line 1179) | def get_decoder(self): method forward (line 1190) | def forward( class BartForConditionalGeneration (line 1282) | class BartForConditionalGeneration(BartPretrainedModel): method __init__ (line 1286) | def __init__(self, config: BartConfig): method get_encoder (line 1295) | def get_encoder(self): method get_decoder (line 1298) | def get_decoder(self): method resize_token_embeddings (line 1301) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1306) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1315) | def get_output_embeddings(self): method set_output_embeddings (line 1318) | def set_output_embeddings(self, new_embeddings): method forward (line 1324) | def forward( method prepare_inputs_for_generation (line 1404) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1432) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1436) | def _reorder_cache(past, beam_idx): class BartForSequenceClassification (line 1453) | class BartForSequenceClassification(BartPretrainedModel): method __init__ (line 1454) | def __init__(self, config: BartConfig, **kwargs): method forward (line 1475) | def forward( class BartForQuestionAnswering (line 1580) | class BartForQuestionAnswering(BartPretrainedModel): method __init__ (line 1581) | def __init__(self, config): method forward (line 1601) | def forward( class BartDecoderWrapper (line 1696) | class BartDecoderWrapper(BartPretrainedModel): method __init__ (line 1702) | def __init__(self, config): method forward (line 1706) | def forward(self, *args, **kwargs): class BartForCausalLM (line 1716) | class BartForCausalLM(BartPretrainedModel): method __init__ (line 1717) | def __init__(self, config): method get_input_embeddings (line 1729) | def get_input_embeddings(self): method set_input_embeddings (line 1732) | def set_input_embeddings(self, value): method get_output_embeddings (line 1735) | def get_output_embeddings(self): method set_output_embeddings (line 1738) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1741) | def set_decoder(self, decoder): method get_decoder (line 1744) | def get_decoder(self): method forward (line 1748) | def forward( method prepare_inputs_for_generation (line 1891) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1907) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/bart/modeling_flax_bart.py function shift_tokens_right (line 223) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxBartAttention (line 235) | class FlaxBartAttention(nn.Module): method setup (line 244) | def setup(self) -> None: method _split_heads (line 270) | def _split_heads(self, hidden_states): method _merge_heads (line 273) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 277) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 308) | def __call__( class FlaxBartEncoderLayer (line 402) | class FlaxBartEncoderLayer(nn.Module): method setup (line 406) | def setup(self) -> None: method __call__ (line 429) | def __call__( class FlaxBartEncoderLayerCollection (line 459) | class FlaxBartEncoderLayerCollection(nn.Module): method setup (line 463) | def setup(self): method __call__ (line 469) | def __call__( class FlaxBartDecoderLayer (line 512) | class FlaxBartDecoderLayer(nn.Module): method setup (line 516) | def setup(self) -> None: method __call__ (line 549) | def __call__( class FlaxBartDecoderLayerCollection (line 600) | class FlaxBartDecoderLayerCollection(nn.Module): method setup (line 604) | def setup(self): method __call__ (line 610) | def __call__( class FlaxBartClassificationHead (line 669) | class FlaxBartClassificationHead(nn.Module): method setup (line 678) | def setup(self): method __call__ (line 689) | def __call__(self, hidden_states: jnp.ndarray, deterministic: bool): class FlaxBartEncoder (line 698) | class FlaxBartEncoder(nn.Module): method setup (line 703) | def setup(self): method __call__ (line 722) | def __call__( class FlaxBartDecoder (line 762) | class FlaxBartDecoder(nn.Module): method setup (line 767) | def setup(self): method __call__ (line 787) | def __call__( class FlaxBartModule (line 836) | class FlaxBartModule(nn.Module): method setup (line 840) | 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 1252) | class FlaxBartForConditionalGenerationModule(nn.Module): method setup (line 1257) | def setup(self): method _get_encoder_module (line 1267) | def _get_encoder_module(self): method _get_decoder_module (line 1270) | def _get_decoder_module(self): method __call__ (line 1273) | def __call__( class FlaxBartForConditionalGeneration (line 1327) | class FlaxBartForConditionalGeneration(FlaxBartPreTrainedModel): method decode (line 1333) | def decode( method prepare_inputs_for_generation (line 1468) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1499) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxBartForSequenceClassificationModule (line 1553) | class FlaxBartForSequenceClassificationModule(nn.Module): method setup (line 1558) | def setup(self): method _get_encoder_module (line 1567) | def _get_encoder_module(self): method _get_decoder_module (line 1570) | def _get_decoder_module(self): method __call__ (line 1573) | def __call__( class FlaxBartForSequenceClassification (line 1640) | class FlaxBartForSequenceClassification(FlaxBartPreTrainedModel): class FlaxBartForQuestionAnsweringModule (line 1654) | class FlaxBartForQuestionAnsweringModule(nn.Module): method setup (line 1659) | def setup(self): method _get_encoder_module (line 1665) | def _get_encoder_module(self): method _get_decoder_module (line 1668) | def _get_decoder_module(self): method __call__ (line 1671) | def __call__( class FlaxBartForQuestionAnswering (line 1727) | class FlaxBartForQuestionAnswering(FlaxBartPreTrainedModel): class FlaxBartDecoderPreTrainedModel (line 1741) | class FlaxBartDecoderPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1746) | def __init__( method init_weights (line 1760) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 1783) | def init_cache(self, batch_size, max_length): method __call__ (line 1803) | def __call__( class FlaxBartDecoderWrapper (line 1876) | class FlaxBartDecoderWrapper(nn.Module): method setup (line 1885) | def setup(self): method __call__ (line 1894) | def __call__(self, *args, **kwargs): class FlaxBartForCausalLMModule (line 1898) | class FlaxBartForCausalLMModule(nn.Module): method setup (line 1902) | def setup(self): method __call__ (line 1911) | def __call__( class FlaxBartForCausalLM (line 1964) | class FlaxBartForCausalLM(FlaxBartDecoderPreTrainedModel): method prepare_inputs_for_generation (line 1967) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1988) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/bart/modeling_tf_bart.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 88) | 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 TFBartLearnedPositionalEmbedding (line 118) | class TFBartLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 123) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 129) | def call( class TFBartAttention (line 145) | class TFBartAttention(tf.keras.layers.Layer): method __init__ (line 148) | def __init__( method _shape (line 176) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 179) | def call( class TFBartEncoderLayer (line 298) | class TFBartEncoderLayer(tf.keras.layers.Layer): method __init__ (line 299) | def __init__(self, config: BartConfig, **kwargs): method call (line 313) | def call( class TFBartDecoderLayer (line 354) | class TFBartDecoderLayer(tf.keras.layers.Layer): method __init__ (line 355) | def __init__(self, config: BartConfig, **kwargs): method call (line 382) | def call( class TFBartPretrainedModel (line 463) | class TFBartPretrainedModel(TFPreTrainedModel): method dummy_inputs (line 468) | def dummy_inputs(self): method serving (line 489) | def serving(self, inputs): class TFBartEncoder (line 653) | class TFBartEncoder(tf.keras.layers.Layer): method __init__ (line 663) | def __init__(self, config: BartConfig, embed_tokens: Optional[tf.keras... method call (line 682) | def call( class TFBartDecoder (line 816) | class TFBartDecoder(tf.keras.layers.Layer): method __init__ (line 826) | def __init__(self, config: BartConfig, embed_tokens: Optional[tf.keras... method call (line 844) | def call( class TFBartMainLayer (line 1048) | class TFBartMainLayer(tf.keras.layers.Layer): method __init__ (line 1051) | def __init__(self, config: BartConfig, load_weight_prefix=None, **kwar... method get_input_embeddings (line 1066) | def get_input_embeddings(self): method set_input_embeddings (line 1069) | def set_input_embeddings(self, new_embeddings): method call (line 1075) | def call( class TFBartModel (line 1169) | class TFBartModel(TFBartPretrainedModel): method __init__ (line 1173) | def __init__(self, config: BartConfig, load_weight_prefix=None, *input... method get_encoder (line 1178) | def get_encoder(self): method get_decoder (line 1181) | def get_decoder(self): method call (line 1192) | def call( method serving_output (line 1236) | def serving_output(self, output): class BiasLayer (line 1256) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1262) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1269) | def call(self, x): class TFBartForConditionalGeneration (line 1277) | class TFBartForConditionalGeneration(TFBartPretrainedModel, TFCausalLang... method __init__ (line 1281) | def __init__(self, config, load_weight_prefix=None, *inputs, **kwargs): method get_decoder (line 1290) | def get_decoder(self): method get_encoder (line 1293) | def get_encoder(self): method get_output_embeddings (line 1296) | def get_output_embeddings(self): method set_output_embeddings (line 1299) | def set_output_embeddings(self, value): method get_bias (line 1302) | def get_bias(self): method set_bias (line 1305) | def set_bias(self, value): method call (line 1317) | def call( method serving_output (line 1398) | def serving_output(self, output): method prepare_inputs_for_generation (line 1417) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1456) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 1460) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/bart/tokenization_bart.py function bytes_to_unicode (line 63) | def bytes_to_unicode(): function get_pairs (line 87) | def get_pairs(word): class BartTokenizer (line 101) | class BartTokenizer(PreTrainedTokenizer): method __init__ (line 182) | def __init__( method vocab_size (line 237) | def vocab_size(self): method get_vocab (line 240) | def get_vocab(self): method bpe (line 243) | def bpe(self, token): method _tokenize (line 285) | 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 save_vocabulary (line 309) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 338) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 363) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 390) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 413) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: benchmark/third_party/transformers/src/transformers/models/bart/tokenization_bart_fast.py class BartTokenizerFast (line 70) | class BartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 154) | def __init__( method mask_token (line 224) | def mask_token(self) -> str: method mask_token (line 239) | def mask_token(self, value): method _batch_encode_plus (line 250) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 261) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 272) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 276) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 283) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/barthez/tokenization_barthez.py class BarthezTokenizer (line 51) | class BarthezTokenizer(PreTrainedTokenizer): method __init__ (line 126) | def __init__( method build_inputs_with_special_tokens (line 165) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 191) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 218) | def create_token_type_ids_from_sequences( method vocab_size (line 241) | def vocab_size(self): method get_vocab (line 244) | def get_vocab(self): method _tokenize (line 249) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 252) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 260) | def _convert_id_to_token(self, index): method __getstate__ (line 266) | def __getstate__(self): method __setstate__ (line 271) | def __setstate__(self, d): method convert_tokens_to_string (line 281) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 285) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/barthez/tokenization_barthez_fast.py class BarthezTokenizerFast (line 62) | class BarthezTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 119) | def __init__( method build_inputs_with_special_tokens (line 151) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 177) | def create_token_type_ids_from_sequences( method save_vocabulary (line 199) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/bartpho/tokenization_bartpho.py class BartphoTokenizer (line 46) | class BartphoTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method __getstate__ (line 177) | def __getstate__(self): method __setstate__ (line 183) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 193) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 219) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 247) | def create_token_type_ids_from_sequences( method vocab_size (line 273) | def vocab_size(self): method get_vocab (line 276) | def get_vocab(self): method _tokenize (line 281) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 284) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 291) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 295) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 300) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/beit/configuration_beit.py class BeitConfig (line 36) | class BeitConfig(PretrainedConfig): method __init__ (line 120) | def __init__( class BeitOnnxConfig (line 189) | class BeitOnnxConfig(OnnxConfig): method inputs (line 194) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 202) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/beit/convert_beit_unilm_to_pytorch.py function create_rename_keys (line 44) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 116) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 158) | def rename_key(dct, old, new): function prepare_img (line 164) | def prepare_img(): function convert_beit_checkpoint (line 171) | def convert_beit_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/beit/feature_extraction_beit.py class BeitFeatureExtractor (line 41) | class BeitFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractio... method __init__ (line 79) | def __init__( method __call__ (line 103) | def __call__( method post_process_semantic_segmentation (line 232) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: benchmark/third_party/transformers/src/transformers/models/beit/modeling_beit.py class BeitModelOutputWithPooling (line 69) | class BeitModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 94) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class BeitDropPath (line 114) | class BeitDropPath(nn.Module): method __init__ (line 117) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 121) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 124) | def extra_repr(self) -> str: class BeitEmbeddings (line 130) | class BeitEmbeddings(nn.Module): method __init__ (line 136) | def __init__(self, config: BeitConfig) -> None: method forward (line 152) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class BeitPatchEmbeddings (line 172) | class BeitPatchEmbeddings(nn.Module): method __init__ (line 179) | def __init__(self, config): method forward (line 196) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class BeitSelfAttention (line 211) | class BeitSelfAttention(nn.Module): method __init__ (line 212) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method transpose_for_scores (line 235) | def transpose_for_scores(self, x): method forward (line 240) | def forward( class BeitSelfOutput (line 288) | class BeitSelfOutput(nn.Module): method __init__ (line 294) | def __init__(self, config: BeitConfig) -> None: method forward (line 299) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BeitAttention (line 306) | class BeitAttention(nn.Module): method __init__ (line 307) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method prune_heads (line 313) | def prune_heads(self, heads): method forward (line 331) | def forward( class BeitIntermediate (line 346) | class BeitIntermediate(nn.Module): method __init__ (line 347) | def __init__(self, config: BeitConfig) -> None: method forward (line 355) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitOutput (line 362) | class BeitOutput(nn.Module): method __init__ (line 363) | def __init__(self, config: BeitConfig) -> None: method forward (line 368) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitLayer (line 375) | class BeitLayer(nn.Module): method __init__ (line 378) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 396) | def forward( class BeitRelativePositionBias (line 436) | class BeitRelativePositionBias(nn.Module): method __init__ (line 437) | def __init__(self, config: BeitConfig, window_size: tuple) -> None: method forward (line 466) | def forward(self) -> torch.Tensor: class BeitEncoder (line 474) | class BeitEncoder(nn.Module): method __init__ (line 475) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 497) | def forward( class BeitPreTrainedModel (line 550) | class BeitPreTrainedModel(PreTrainedModel): method _init_weights (line 561) | def _init_weights(self, module): method _set_gradient_checkpointing (line 577) | def _set_gradient_checkpointing(self, module, value=False): class BeitModel (line 620) | class BeitModel(BeitPreTrainedModel): method __init__ (line 621) | def __init__(self, config: BeitConfig, add_pooling_layer: bool = True)... method get_input_embeddings (line 636) | def get_input_embeddings(self): method _prune_heads (line 639) | def _prune_heads(self, heads_to_prune): method forward (line 656) | def forward( class BeitPooler (line 706) | class BeitPooler(nn.Module): method __init__ (line 707) | def __init__(self, config: BeitConfig) -> None: method forward (line 713) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitForMaskedImageModeling (line 732) | class BeitForMaskedImageModeling(BeitPreTrainedModel): method __init__ (line 733) | def __init__(self, config: BeitConfig) -> None: method forward (line 748) | def forward( class BeitForImageClassification (line 832) | class BeitForImageClassification(BeitPreTrainedModel): method __init__ (line 833) | def __init__(self, config: BeitConfig) -> None: method forward (line 853) | def forward( class BeitConvModule (line 915) | class BeitConvModule(nn.Module): method __init__ (line 923) | def __init__( method forward (line 944) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingBlock (line 952) | class BeitPyramidPoolingBlock(nn.Module): method __init__ (line 953) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 962) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingModule (line 969) | class BeitPyramidPoolingModule(nn.Module): method __init__ (line 983) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 995) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class BeitUperHead (line 1006) | class BeitUperHead(nn.Module): method __init__ (line 1014) | def __init__(self, config: BeitConfig) -> None: method psp_forward (line 1052) | def psp_forward(self, inputs): method forward (line 1061) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitFCNHead (line 1091) | class BeitFCNHead(nn.Module): method __init__ (line 1106) | def __init__( method forward (line 1140) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitForSemanticSegmentation (line 1156) | class BeitForSemanticSegmentation(BeitPreTrainedModel): method __init__ (line 1157) | def __init__(self, config: BeitConfig) -> None: method compute_loss (line 1183) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1202) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/beit/modeling_flax_beit.py class FlaxBeitModelOutputWithPooling (line 46) | 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 173) | def setup(self): method __call__ (line 190) | def __call__(self, pixel_values): class FlaxBeitEmbeddings (line 201) | class FlaxBeitEmbeddings(nn.Module): method setup (line 207) | def setup(self): method __call__ (line 219) | def __call__(self, pixel_values, bool_masked_pos=None, deterministic=T... class FlaxBeitRelativePositionBias (line 243) | class FlaxBeitRelativePositionBias(nn.Module): method setup (line 248) | def setup(self): method __call__ (line 259) | def __call__(self): class FlaxBeitSelfAttention (line 266) | class FlaxBeitSelfAttention(nn.Module): method setup (line 271) | def setup(self): method __call__ (line 303) | def __call__( class FlaxBeitSelfOutput (line 351) | class FlaxBeitSelfOutput(nn.Module): method setup (line 355) | def setup(self): method __call__ (line 363) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitAttention (line 369) | class FlaxBeitAttention(nn.Module): method setup (line 374) | def setup(self): method __call__ (line 378) | def __call__( class FlaxBeitIntermediate (line 395) | class FlaxBeitIntermediate(nn.Module): method setup (line 399) | def setup(self): method __call__ (line 407) | def __call__(self, hidden_states): class FlaxBeitOutput (line 414) | class FlaxBeitOutput(nn.Module): method setup (line 418) | def setup(self): method __call__ (line 426) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitLayer (line 433) | class FlaxBeitLayer(nn.Module): method setup (line 439) | def setup(self): method __call__ (line 455) | def __call__( class FlaxBeitLayerCollection (line 494) | class FlaxBeitLayerCollection(nn.Module): method setup (line 501) | def setup(self): method __call__ (line 513) | def __call__( class FlaxBeitEncoder (line 550) | class FlaxBeitEncoder(nn.Module): method setup (line 555) | def setup(self): method __call__ (line 573) | def __call__( class FlaxBeitPreTrainedModel (line 590) | class FlaxBeitPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 601) | def __init__( method init_weights (line 615) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 636) | def __call__( class FlaxBeitPooler (line 673) | class FlaxBeitPooler(nn.Module): method setup (line 677) | def setup(self): method __call__ (line 681) | def __call__(self, hidden_states): class FlaxBeitModule (line 693) | class FlaxBeitModule(nn.Module): method setup (line 698) | def setup(self): method __call__ (line 707) | def __call__( class FlaxBeitModel (line 749) | class FlaxBeitModel(FlaxBeitPreTrainedModel): class FlaxBeitForMaskedImageModelingModule (line 779) | class FlaxBeitForMaskedImageModelingModule(nn.Module): method setup (line 783) | def setup(self): method __call__ (line 794) | def __call__( class FlaxBeitForMaskedImageModeling (line 833) | class FlaxBeitForMaskedImageModeling(FlaxBeitPreTrainedModel): class FlaxBeitForImageClassificationModule (line 868) | class FlaxBeitForImageClassificationModule(nn.Module): method setup (line 872) | def setup(self): method __call__ (line 880) | def __call__( class FlaxBeitForImageClassification (line 920) | class FlaxBeitForImageClassification(FlaxBeitPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/bert/configuration_bert.py class BertConfig (line 72) | class BertConfig(PretrainedConfig): method __init__ (line 139) | def __init__( class BertOnnxConfig (line 178) | class BertOnnxConfig(OnnxConfig): method inputs (line 180) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py function load_tf2_weights_in_bert (line 42) | def load_tf2_weights_in_bert(model, tf_checkpoint_path, config): function convert_tf2_checkpoint_to_pytorch (line 212) | def convert_tf2_checkpoint_to_pytorch(tf_checkpoint_path, config_path, p... FILE: benchmark/third_party/transformers/src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: benchmark/third_party/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 93) | def main(raw_args=None): FILE: benchmark/third_party/transformers/src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py function convert_checkpoint_to_pytorch (line 41) | def convert_checkpoint_to_pytorch(tf_checkpoint_path: str, config_path: ... FILE: benchmark/third_party/transformers/src/transformers/models/bert/modeling_bert.py function load_tf_weights_in_bert (line 108) | def load_tf_weights_in_bert(model, config, tf_checkpoint_path): class BertEmbeddings (line 181) | class BertEmbeddings(nn.Module): method __init__ (line 184) | def __init__(self, config): method forward (line 201) | def forward( class BertSelfAttention (line 243) | class BertSelfAttention(nn.Module): method __init__ (line 244) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 270) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 275) | def forward( class BertSelfOutput (line 370) | class BertSelfOutput(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 377) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertAttention (line 384) | class BertAttention(nn.Module): method __init__ (line 385) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 391) | def prune_heads(self, heads): method forward (line 409) | def forward( class BertIntermediate (line 433) | class BertIntermediate(nn.Module): method __init__ (line 434) | def __init__(self, config): method forward (line 442) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertOutput (line 448) | class BertOutput(nn.Module): method __init__ (line 449) | def __init__(self, config): method forward (line 455) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertLayer (line 462) | class BertLayer(nn.Module): method __init__ (line 463) | def __init__(self, config): method forward (line 477) | def forward( method feed_forward_chunk (line 542) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 548) | class BertEncoder(nn.Module): method __init__ (line 549) | def __init__(self, config): method forward (line 555) | def forward( class BertPooler (line 645) | class BertPooler(nn.Module): method __init__ (line 646) | def __init__(self, config): method forward (line 651) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertPredictionHeadTransform (line 660) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 661) | def __init__(self, config): method forward (line 670) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertLMPredictionHead (line 677) | class BertLMPredictionHead(nn.Module): method __init__ (line 678) | def __init__(self, config): method forward (line 691) | def forward(self, hidden_states): class BertOnlyMLMHead (line 697) | class BertOnlyMLMHead(nn.Module): method __init__ (line 698) | def __init__(self, config): method forward (line 702) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BertOnlyNSPHead (line 707) | class BertOnlyNSPHead(nn.Module): method __init__ (line 708) | def __init__(self, config): method forward (line 712) | def forward(self, pooled_output): class BertPreTrainingHeads (line 717) | class BertPreTrainingHeads(nn.Module): method __init__ (line 718) | def __init__(self, config): method forward (line 723) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 729) | class BertPreTrainedModel(PreTrainedModel): method _init_weights (line 741) | def _init_weights(self, module): method _set_gradient_checkpointing (line 757) | def _set_gradient_checkpointing(self, module, value=False): class BertForPreTrainingOutput (line 763) | class BertForPreTrainingOutput(ModelOutput): class BertModel (line 866) | class BertModel(BertPreTrainedModel): method __init__ (line 879) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 891) | def get_input_embeddings(self): method set_input_embeddings (line 894) | def set_input_embeddings(self, value): method _prune_heads (line 897) | def _prune_heads(self, heads_to_prune): method forward (line 912) | def forward( class BertForPreTraining (line 1049) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 1050) | def __init__(self, config): method get_output_embeddings (line 1059) | def get_output_embeddings(self): method set_output_embeddings (line 1062) | def set_output_embeddings(self, new_embeddings): method forward (line 1067) | def forward( class BertLMHeadModel (line 1153) | class BertLMHeadModel(BertPreTrainedModel): method __init__ (line 1158) | def __init__(self, config): method get_output_embeddings (line 1170) | def get_output_embeddings(self): method set_output_embeddings (line 1173) | def set_output_embeddings(self, new_embeddings): method forward (line 1183) | def forward( method prepare_inputs_for_generation (line 1268) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1280) | def _reorder_cache(self, past, beam_idx): class BertForMaskedLM (line 1288) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1293) | def __init__(self, config): method get_output_embeddings (line 1308) | def get_output_embeddings(self): method set_output_embeddings (line 1311) | def set_output_embeddings(self, new_embeddings): method forward (line 1323) | def forward( method prepare_inputs_for_generation (line 1380) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BertForNextSentencePrediction (line 1401) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1402) | def __init__(self, config): method forward (line 1413) | def forward( class BertForSequenceClassification (line 1506) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1507) | def __init__(self, config): method forward (line 1531) | def forward( class BertForMultipleChoice (line 1610) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1611) | def __init__(self, config): method forward (line 1631) | def forward( class BertForTokenClassification (line 1705) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1709) | def __init__(self, config): method forward (line 1732) | def forward( class BertForQuestionAnswering (line 1792) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1796) | def __init__(self, config): method forward (line 1817) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/bert/modeling_flax_bert.py class FlaxBertForPreTrainingOutput (line 64) | class FlaxBertForPreTrainingOutput(ModelOutput): class FlaxBertEmbeddings (line 179) | class FlaxBertEmbeddings(nn.Module): method setup (line 185) | def setup(self): method __call__ (line 204) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBertSelfAttention (line 219) | class FlaxBertSelfAttention(nn.Module): method setup (line 224) | def setup(self): method _split_heads (line 253) | def _split_heads(self, hidden_states): method _merge_heads (line 256) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 261) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 292) | def __call__( class FlaxBertSelfOutput (line 390) | class FlaxBertSelfOutput(nn.Module): method setup (line 394) | def setup(self): method __call__ (line 403) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBertAttention (line 410) | class FlaxBertAttention(nn.Module): method setup (line 415) | def setup(self): method __call__ (line 419) | def __call__( class FlaxBertIntermediate (line 452) | class FlaxBertIntermediate(nn.Module): method setup (line 456) | def setup(self): method __call__ (line 464) | def __call__(self, hidden_states): class FlaxBertOutput (line 470) | class FlaxBertOutput(nn.Module): method setup (line 474) | def setup(self): method __call__ (line 483) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBertLayer (line 490) | class FlaxBertLayer(nn.Module): method setup (line 494) | def setup(self): method __call__ (line 501) | def __call__( class FlaxBertLayerCollection (line 547) | class FlaxBertLayerCollection(nn.Module): method setup (line 552) | def setup(self): method __call__ (line 564) | def __call__( class FlaxBertEncoder (line 628) | class FlaxBertEncoder(nn.Module): method setup (line 633) | def setup(self): method __call__ (line 640) | def __call__( class FlaxBertPooler (line 667) | class FlaxBertPooler(nn.Module): method setup (line 671) | def setup(self): method __call__ (line 678) | def __call__(self, hidden_states): class FlaxBertPredictionHeadTransform (line 684) | class FlaxBertPredictionHeadTransform(nn.Module): method setup (line 688) | def setup(self): method __call__ (line 693) | def __call__(self, hidden_states): class FlaxBertLMPredictionHead (line 699) | class FlaxBertLMPredictionHead(nn.Module): method setup (line 704) | def setup(self): method __call__ (line 709) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyMLMHead (line 722) | class FlaxBertOnlyMLMHead(nn.Module): method setup (line 726) | def setup(self): method __call__ (line 729) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyNSPHead (line 734) | class FlaxBertOnlyNSPHead(nn.Module): method setup (line 737) | def setup(self): method __call__ (line 740) | def __call__(self, pooled_output): class FlaxBertPreTrainingHeads (line 744) | class FlaxBertPreTrainingHeads(nn.Module): method setup (line 748) | def setup(self): method __call__ (line 752) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBertPreTrainedModel (line 758) | class FlaxBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 768) | def __init__( method enable_gradient_checkpointing (line 786) | def enable_gradient_checkpointing(self): method init_weights (line 793) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 836) | def init_cache(self, batch_size, max_length): method __call__ (line 856) | def __call__( class FlaxBertModule (line 953) | class FlaxBertModule(nn.Module): method setup (line 959) | def setup(self): method __call__ (line 968) | def __call__( class FlaxBertModel (line 1028) | 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 1106) | class FlaxBertForPreTraining(FlaxBertPreTrainedModel): class FlaxBertForMaskedLMModule (line 1138) | class FlaxBertForMaskedLMModule(nn.Module): method setup (line 1143) | def setup(self): method __call__ (line 1152) | def __call__( class FlaxBertForMaskedLM (line 1197) | class FlaxBertForMaskedLM(FlaxBertPreTrainedModel): class FlaxBertForNextSentencePredictionModule (line 1206) | class FlaxBertForNextSentencePredictionModule(nn.Module): method setup (line 1211) | def setup(self): method __call__ (line 1219) | def __call__( class FlaxBertForNextSentencePrediction (line 1263) | class FlaxBertForNextSentencePrediction(FlaxBertPreTrainedModel): class FlaxBertForSequenceClassificationModule (line 1298) | class FlaxBertForSequenceClassificationModule(nn.Module): method setup (line 1303) | def setup(self): method __call__ (line 1320) | def __call__( class FlaxBertForSequenceClassification (line 1366) | class FlaxBertForSequenceClassification(FlaxBertPreTrainedModel): class FlaxBertForMultipleChoiceModule (line 1379) | class FlaxBertForMultipleChoiceModule(nn.Module): method setup (line 1384) | def setup(self): method __call__ (line 1393) | def __call__( class FlaxBertForMultipleChoice (line 1447) | class FlaxBertForMultipleChoice(FlaxBertPreTrainedModel): class FlaxBertForTokenClassificationModule (line 1459) | class FlaxBertForTokenClassificationModule(nn.Module): method setup (line 1464) | def setup(self): method __call__ (line 1479) | def __call__( class FlaxBertForTokenClassification (line 1525) | class FlaxBertForTokenClassification(FlaxBertPreTrainedModel): class FlaxBertForQuestionAnsweringModule (line 1534) | class FlaxBertForQuestionAnsweringModule(nn.Module): method setup (line 1539) | def setup(self): method __call__ (line 1548) | def __call__( class FlaxBertForQuestionAnswering (line 1598) | class FlaxBertForQuestionAnswering(FlaxBertPreTrainedModel): class FlaxBertForCausalLMModule (line 1611) | class FlaxBertForCausalLMModule(nn.Module): method setup (line 1616) | def setup(self): method __call__ (line 1625) | def __call__( class FlaxBertForCausalLM (line 1683) | class FlaxBertForCausalLM(FlaxBertPreTrainedModel): method prepare_inputs_for_generation (line 1686) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1707) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/bert/modeling_tf_bert.py class TFBertPreTrainingLoss (line 116) | class TFBertPreTrainingLoss: method hf_compute_loss (line 123) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFBertEmbeddings (line 146) | class TFBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 149) | def __init__(self, config: BertConfig, **kwargs): method build (line 160) | def build(self, input_shape: tf.TensorShape): method call (line 184) | def call( class TFBertSelfAttention (line 234) | class TFBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 235) | def __init__(self, config: BertConfig, **kwargs): method transpose_for_scores (line 262) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 269) | def call( class TFBertSelfOutput (line 351) | class TFBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 352) | def __init__(self, config: BertConfig, **kwargs): method call (line 361) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBertAttention (line 369) | class TFBertAttention(tf.keras.layers.Layer): method __init__ (line 370) | def __init__(self, config: BertConfig, **kwargs): method prune_heads (line 376) | def prune_heads(self, heads): method call (line 379) | def call( class TFBertIntermediate (line 409) | class TFBertIntermediate(tf.keras.layers.Layer): method __init__ (line 410) | def __init__(self, config: BertConfig, **kwargs): method call (line 422) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertOutput (line 429) | class TFBertOutput(tf.keras.layers.Layer): method __init__ (line 430) | def __init__(self, config: BertConfig, **kwargs): method call (line 439) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBertLayer (line 447) | class TFBertLayer(tf.keras.layers.Layer): method __init__ (line 448) | def __init__(self, config: BertConfig, **kwargs): method call (line 461) | def call( class TFBertEncoder (line 533) | class TFBertEncoder(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, config: BertConfig, **kwargs): method call (line 539) | def call( class TFBertPooler (line 602) | class TFBertPooler(tf.keras.layers.Layer): method __init__ (line 603) | def __init__(self, config: BertConfig, **kwargs): method call (line 613) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertPredictionHeadTransform (line 622) | class TFBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 623) | def __init__(self, config: BertConfig, **kwargs): method call (line 639) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertLMPredictionHead (line 647) | class TFBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 648) | def __init__(self, config: BertConfig, input_embeddings: tf.keras.laye... method build (line 660) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 665) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 668) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 672) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 675) | def set_bias(self, value: tf.Variable): method call (line 679) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertMLMHead (line 690) | class TFBertMLMHead(tf.keras.layers.Layer): method __init__ (line 691) | def __init__(self, config: BertConfig, input_embeddings: tf.keras.laye... method call (line 696) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFBertNSPHead (line 702) | class TFBertNSPHead(tf.keras.layers.Layer): method __init__ (line 703) | def __init__(self, config: BertConfig, **kwargs): method call (line 712) | def call(self, pooled_output: tf.Tensor) -> tf.Tensor: class TFBertMainLayer (line 719) | class TFBertMainLayer(tf.keras.layers.Layer): method __init__ (line 722) | def __init__(self, config: BertConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 732) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 735) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 739) | def _prune_heads(self, heads_to_prune): method call (line 747) | def call( class TFBertPreTrainedModel (line 906) | class TFBertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 916) | def dummy_inputs(self): class TFBertForPreTrainingOutput (line 935) | class TFBertForPreTrainingOutput(ModelOutput): class TFBertModel (line 1067) | class TFBertModel(TFBertPreTrainedModel): method __init__ (line 1068) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1081) | def call( method serving_output (line 1136) | def serving_output( class TFBertForPreTraining (line 1164) | class TFBertForPreTraining(TFBertPreTrainedModel, TFBertPreTrainingLoss): method __init__ (line 1172) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1179) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1182) | def get_prefix_bias_name(self) -> str: method call (line 1189) | def call( method serving_output (line 1268) | def serving_output(self, output: TFBertForPreTrainingOutput) -> TFBert... class TFBertForMaskedLM (line 1281) | class TFBertForMaskedLM(TFBertPreTrainedModel, TFMaskedLanguageModelingL... method __init__ (line 1290) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1302) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1305) | def get_prefix_bias_name(self) -> str: method call (line 1319) | def call( method serving_output (line 1366) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFBertLMHeadModel (line 1373) | class TFBertLMHeadModel(TFBertPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1382) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1391) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1394) | def get_prefix_bias_name(self) -> str: method prepare_inputs_for_generation (line 1398) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method call (line 1417) | def call( method serving_output (line 1498) | def serving_output(self, output: TFCausalLMOutputWithCrossAttentions) ... method _reorder_cache (line 1512) | def _reorder_cache(past, beam_idx): class TFBertForNextSentencePrediction (line 1523) | class TFBertForNextSentencePrediction(TFBertPreTrainedModel, TFNextSente... method __init__ (line 1527) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1536) | def call( method serving_output (line 1600) | def serving_output(self, output: TFNextSentencePredictorOutput) -> TFN... class TFBertForSequenceClassification (line 1614) | class TFBertForSequenceClassification(TFBertPreTrainedModel, TFSequenceC... method __init__ (line 1619) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1645) | def call( method serving_output (line 1693) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFBertForMultipleChoice (line 1707) | class TFBertForMultipleChoice(TFBertPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 1712) | def __init__(self, config: BertConfig, *inputs, **kwargs): method dummy_inputs (line 1722) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method call (line 1739) | def call( method serving (line 1818) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceMod... method serving_output (line 1823) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFBertForTokenClassification (line 1837) | class TFBertForTokenClassification(TFBertPreTrainedModel, TFTokenClassif... method __init__ (line 1848) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1874) | def call( method serving_output (line 1920) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFBertForQuestionAnswering (line 1934) | class TFBertForQuestionAnswering(TFBertPreTrainedModel, TFQuestionAnswer... method __init__ (line 1944) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1966) | def call( method serving_output (line 2027) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/bert/tokenization_bert.py function load_vocab (line 117) | def load_vocab(vocab_file): function whitespace_tokenize (line 128) | def whitespace_tokenize(text): class BertTokenizer (line 137) | class BertTokenizer(PreTrainedTokenizer): method __init__ (line 184) | def __init__( method do_lower_case (line 231) | def do_lower_case(self): method vocab_size (line 235) | def vocab_size(self): method get_vocab (line 238) | def get_vocab(self): method _tokenize (line 241) | def _tokenize(self, text): method _convert_token_to_id (line 255) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 259) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 263) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 268) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 293) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 321) | def create_token_type_ids_from_sequences( method save_vocabulary (line 350) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 371) | class BasicTokenizer(object): method __init__ (line 391) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 399) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 436) | def _run_strip_accents(self, text): method _run_split_on_punc (line 447) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 469) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 482) | def _is_chinese_char(self, cp): method _clean_text (line 506) | def _clean_text(self, text): class WordpieceTokenizer (line 520) | class WordpieceTokenizer(object): method __init__ (line 523) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 528) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/bert/tokenization_bert_fast.py class BertTokenizerFast (line 161) | class BertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 207) | def __init__( method build_inputs_with_special_tokens (line 249) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 273) | def create_token_type_ids_from_sequences( method save_vocabulary (line 302) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/bert/tokenization_bert_tf.py class TFBertTokenizer (line 12) | class TFBertTokenizer(tf.keras.layers.Layer): method __init__ (line 55) | def __init__( method from_tokenizer (line 101) | def from_tokenizer(cls, tokenizer: "PreTrainedTokenizerBase", **kwargs... method from_pretrained (line 131) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method unpaired_tokenize (line 155) | def unpaired_tokenize(self, texts): method call (line 161) | def call( method get_config (line 233) | def get_config(self): FILE: benchmark/third_party/transformers/src/transformers/models/bert_generation/configuration_bert_generation.py class BertGenerationConfig (line 20) | class BertGenerationConfig(PretrainedConfig): method __init__ (line 83) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/bert_generation/modeling_bert_generation.py class BertGenerationSelfOutput (line 47) | class BertGenerationSelfOutput(nn.Module): method __init__ (line 48) | def __init__(self, config): method forward (line 54) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertGenerationSelfAttention (line 62) | class BertGenerationSelfAttention(nn.Module): method __init__ (line 63) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 89) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 94) | def forward( class BertGenerationAttention (line 190) | class BertGenerationAttention(nn.Module): method __init__ (line 191) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 197) | def prune_heads(self, heads): method forward (line 215) | def forward( class BertGenerationIntermediate (line 240) | class BertGenerationIntermediate(nn.Module): method __init__ (line 241) | def __init__(self, config): method forward (line 249) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertGenerationOutput (line 256) | class BertGenerationOutput(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 BertGenerationLayer (line 271) | class BertGenerationLayer(nn.Module): method __init__ (line 272) | def __init__(self, config): method forward (line 286) | def forward( method feed_forward_chunk (line 351) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 358) | class BertEncoder(nn.Module): method __init__ (line 359) | def __init__(self, config): method forward (line 365) | def forward( function load_tf_weights_in_bert_generation (line 455) | def load_tf_weights_in_bert_generation( class BertGenerationEmbeddings (line 540) | class BertGenerationEmbeddings(nn.Module): method __init__ (line 543) | def __init__(self, config): method forward (line 555) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class BertGenerationPreTrainedModel (line 576) | class BertGenerationPreTrainedModel(PreTrainedModel): method _init_weights (line 587) | def _init_weights(self, module): method _set_gradient_checkpointing (line 603) | def _set_gradient_checkpointing(self, module, value=False): class BertGenerationEncoder (line 670) | class BertGenerationEncoder(BertGenerationPreTrainedModel): method __init__ (line 687) | def __init__(self, config): method get_input_embeddings (line 697) | def get_input_embeddings(self): method set_input_embeddings (line 700) | def set_input_embeddings(self, value): method _prune_heads (line 703) | def _prune_heads(self, heads_to_prune): method forward (line 718) | def forward( class BertGenerationOnlyLMHead (line 837) | class BertGenerationOnlyLMHead(nn.Module): method __init__ (line 838) | def __init__(self, config): method forward (line 844) | def forward(self, hidden_states): method _tie_weights (line 848) | def _tie_weights(self): class BertGenerationDecoder (line 857) | class BertGenerationDecoder(BertGenerationPreTrainedModel): method __init__ (line 858) | def __init__(self, config): 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 878) | def forward( method prepare_inputs_for_generation (line 981) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 993) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/bert_generation/tokenization_bert_generation.py class BertGenerationTokenizer (line 43) | class BertGenerationTokenizer(PreTrainedTokenizer): method __init__ (line 86) | def __init__( method vocab_size (line 116) | def vocab_size(self): method get_vocab (line 119) | def get_vocab(self): method __getstate__ (line 124) | def __getstate__(self): method __setstate__ (line 129) | def __setstate__(self, d): method _tokenize (line 139) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 143) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 147) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 152) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 157) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/bert_japanese/tokenization_bert_japanese.py function load_vocab (line 83) | def load_vocab(vocab_file): function whitespace_tokenize (line 95) | def whitespace_tokenize(text): class BertJapaneseTokenizer (line 104) | class BertJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 140) | def __init__( method do_lower_case (line 235) | def do_lower_case(self): method __getstate__ (line 238) | def __getstate__(self): method __setstate__ (line 244) | def __setstate__(self, state): method _tokenize (line 259) | def _tokenize(self, text): method vocab_size (line 273) | def vocab_size(self): method get_vocab (line 278) | def get_vocab(self): method _convert_token_to_id (line 285) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 291) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 297) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 305) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 331) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 360) | def create_token_type_ids_from_sequences( method save_vocabulary (line 389) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class MecabTokenizer (line 422) | class MecabTokenizer: method __init__ (line 425) | def __init__( method tokenize (line 511) | def tokenize(self, text, never_split=None, **kwargs): class SudachiTokenizer (line 530) | class SudachiTokenizer: method __init__ (line 533) | def __init__( method tokenize (line 591) | def tokenize(self, text, never_split=None, **kwargs): class JumanppTokenizer (line 616) | class JumanppTokenizer: method __init__ (line 619) | def __init__( method tokenize (line 656) | def tokenize(self, text, never_split=None, **kwargs): class CharacterTokenizer (line 681) | class CharacterTokenizer: method __init__ (line 684) | def __init__(self, vocab, unk_token, normalize_text=True): method tokenize (line 700) | def tokenize(self, text): class BasicTokenizer (line 728) | class BasicTokenizer(object): method __init__ (line 748) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 756) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 793) | def _run_strip_accents(self, text): method _run_split_on_punc (line 804) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 826) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 839) | def _is_chinese_char(self, cp): method _clean_text (line 863) | def _clean_text(self, text): class WordpieceTokenizer (line 878) | class WordpieceTokenizer(object): method __init__ (line 881) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 886) | def tokenize(self, text): class SentencepieceTokenizer (line 935) | class SentencepieceTokenizer(object): method __init__ (line 940) | def __init__( method preprocess_text (line 959) | def preprocess_text(self, inputs): method tokenize (line 974) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/bertweet/tokenization_bertweet.py function get_pairs (line 52) | def get_pairs(word): class BertweetTokenizer (line 68) | class BertweetTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 210) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 238) | def create_token_type_ids_from_sequences( method vocab_size (line 263) | def vocab_size(self): method get_vocab (line 266) | def get_vocab(self): method bpe (line 269) | def bpe(self, token): method _tokenize (line 313) | def _tokenize(self, text): method normalizeTweet (line 324) | def normalizeTweet(self, tweet): method normalizeToken (line 358) | def normalizeToken(self, token): method _convert_token_to_id (line 377) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 381) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 385) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 390) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method add_from_file (line 415) | def add_from_file(self, f): function _str_to_unicode (line 617) | def _str_to_unicode(text, encoding=None, errors="strict"): function _replace_html_entities (line 625) | def _replace_html_entities(text, keep=(), remove_illegal=True, encoding=... class TweetTokenizer (line 682) | class TweetTokenizer: method __init__ (line 702) | def __init__(self, preserve_case=True, reduce_len=False, strip_handles... method tokenize (line 707) | def tokenize(self, text): function reduce_lengthening (line 738) | def reduce_lengthening(text): function remove_handles (line 746) | def remove_handles(text): function casual_tokenize (line 762) | def casual_tokenize(text, preserve_case=True, reduce_len=False, strip_ha... FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/configuration_big_bird.py class BigBirdConfig (line 34) | class BigBirdConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class BigBirdOnnxConfig (line 166) | class BigBirdOnnxConfig(OnnxConfig): method inputs (line 168) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/convert_bigbird_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, big_bird_config... FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/modeling_big_bird.py function load_tf_weights_in_big_bird (line 84) | def load_tf_weights_in_big_bird(model, tf_checkpoint_path, is_trivia_qa=... class BigBirdEmbeddings (line 245) | class BigBirdEmbeddings(nn.Module): method __init__ (line 249) | def __init__(self, config): method forward (line 270) | def forward( class BigBirdSelfAttention (line 312) | class BigBirdSelfAttention(nn.Module): method __init__ (line 313) | def __init__(self, config): method transpose_for_scores (line 332) | def transpose_for_scores(self, x): method forward (line 337) | def forward( class BigBirdBlockSparseAttention (line 416) | class BigBirdBlockSparseAttention(nn.Module): method __init__ (line 417) | def __init__(self, config, seed=None): method transpose_for_scores (line 440) | def transpose_for_scores(self, x): method forward (line 445) | def forward( method torch_bmm_nd (line 500) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 508) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 515) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 965) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 991) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 1028) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 1061) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 1116) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1250) | def _get_single_block_row_attention( class BigBirdSelfOutput (line 1307) | class BigBirdSelfOutput(nn.Module): method __init__ (line 1308) | def __init__(self, config): method forward (line 1314) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdAttention (line 1321) | class BigBirdAttention(nn.Module): method __init__ (line 1322) | def __init__(self, config, seed=None): method set_attention_type (line 1339) | def set_attention_type(self, value: str): method forward (line 1365) | def forward( class BigBirdIntermediate (line 1412) | class BigBirdIntermediate(nn.Module): method __init__ (line 1413) | def __init__(self, config): method forward (line 1421) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdOutput (line 1428) | class BigBirdOutput(nn.Module): method __init__ (line 1429) | def __init__(self, config): method forward (line 1435) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdLayer (line 1442) | class BigBirdLayer(nn.Module): method __init__ (line 1443) | def __init__(self, config, seed=None): method set_attention_type (line 1459) | def set_attention_type(self, value: str): method forward (line 1473) | def forward( method feed_forward_chunk (line 1550) | def feed_forward_chunk(self, attention_output): class BigBirdEncoder (line 1556) | class BigBirdEncoder(nn.Module): method __init__ (line 1557) | def __init__(self, config): method set_attention_type (line 1567) | def set_attention_type(self, value: str): method forward (line 1579) | def forward( class BigBirdPredictionHeadTransform (line 1684) | class BigBirdPredictionHeadTransform(nn.Module): method __init__ (line 1685) | def __init__(self, config): method forward (line 1694) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdLMPredictionHead (line 1702) | class BigBirdLMPredictionHead(nn.Module): method __init__ (line 1703) | def __init__(self, config): method forward (line 1716) | def forward(self, hidden_states): class BigBirdOnlyMLMHead (line 1723) | class BigBirdOnlyMLMHead(nn.Module): method __init__ (line 1724) | def __init__(self, config): method forward (line 1728) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BigBirdOnlyNSPHead (line 1734) | class BigBirdOnlyNSPHead(nn.Module): method __init__ (line 1735) | def __init__(self, config): method forward (line 1739) | def forward(self, pooled_output): class BigBirdPreTrainingHeads (line 1745) | class BigBirdPreTrainingHeads(nn.Module): method __init__ (line 1746) | def __init__(self, config): method forward (line 1751) | def forward(self, sequence_output, pooled_output): class BigBirdPreTrainedModel (line 1757) | class BigBirdPreTrainedModel(PreTrainedModel): method _init_weights (line 1769) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1785) | def _set_gradient_checkpointing(self, module, value=False): class BigBirdForPreTrainingOutput (line 1852) | class BigBirdForPreTrainingOutput(ModelOutput): class BigBirdForQuestionAnsweringModelOutput (line 1886) | class BigBirdForQuestionAnsweringModelOutput(ModelOutput): class BigBirdModel (line 1924) | class BigBirdModel(BigBirdPreTrainedModel): method __init__ (line 1937) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1964) | def get_input_embeddings(self): method set_input_embeddings (line 1967) | def set_input_embeddings(self, value): method set_attention_type (line 1970) | def set_attention_type(self, value: str): method forward (line 1988) | def forward( method create_masks_for_block_sparse_attn (line 2182) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2220) | def _pad_to_block_size( class BigBirdForPreTraining (line 2264) | class BigBirdForPreTraining(BigBirdPreTrainedModel): method __init__ (line 2265) | def __init__(self, config): method get_output_embeddings (line 2274) | def get_output_embeddings(self): method set_output_embeddings (line 2277) | def set_output_embeddings(self, new_embeddings): method forward (line 2282) | def forward( class BigBirdForMaskedLM (line 2368) | class BigBirdForMaskedLM(BigBirdPreTrainedModel): method __init__ (line 2369) | def __init__(self, config): method get_output_embeddings (line 2384) | def get_output_embeddings(self): method set_output_embeddings (line 2387) | def set_output_embeddings(self, new_embeddings): method forward (line 2392) | def forward( method prepare_inputs_for_generation (line 2491) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BigBirdForCausalLM (line 2510) | class BigBirdForCausalLM(BigBirdPreTrainedModel): method __init__ (line 2514) | def __init__(self, config): method get_output_embeddings (line 2526) | def get_output_embeddings(self): method set_output_embeddings (line 2529) | def set_output_embeddings(self, new_embeddings): method forward (line 2539) | def forward( method prepare_inputs_for_generation (line 2621) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 2634) | def _reorder_cache(self, past, beam_idx): class BigBirdClassificationHead (line 2643) | class BigBirdClassificationHead(nn.Module): method __init__ (line 2646) | def __init__(self, config): method forward (line 2657) | def forward(self, features, **kwargs): class BigBirdForSequenceClassification (line 2674) | class BigBirdForSequenceClassification(BigBirdPreTrainedModel): method __init__ (line 2675) | def __init__(self, config): method forward (line 2687) | def forward( class BigBirdForMultipleChoice (line 2802) | class BigBirdForMultipleChoice(BigBirdPreTrainedModel): method __init__ (line 2803) | def __init__(self, config): method forward (line 2822) | def forward( class BigBirdForTokenClassification (line 2896) | class BigBirdForTokenClassification(BigBirdPreTrainedModel): method __init__ (line 2897) | def __init__(self, config): method forward (line 2923) | def forward( class BigBirdForQuestionAnsweringHead (line 2976) | class BigBirdForQuestionAnsweringHead(nn.Module): method __init__ (line 2979) | def __init__(self, config): method forward (line 2986) | def forward(self, encoder_output): class BigBirdForQuestionAnswering (line 3001) | class BigBirdForQuestionAnswering(BigBirdPreTrainedModel): method __init__ (line 3002) | def __init__(self, config, add_pooling_layer=False): method forward (line 3017) | def forward( method prepare_question_mask (line 3157) | def prepare_question_mask(q_lengths: torch.Tensor, maxlen: int): FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/modeling_flax_big_bird.py class FlaxBigBirdForPreTrainingOutput (line 62) | class FlaxBigBirdForPreTrainingOutput(ModelOutput): class FlaxBigBirdForQuestionAnsweringModelOutput (line 92) | class FlaxBigBirdForQuestionAnsweringModelOutput(ModelOutput): class FlaxBigBirdEmbeddings (line 196) | class FlaxBigBirdEmbeddings(nn.Module): method setup (line 203) | def setup(self): method __call__ (line 222) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBigBirdSelfAttention (line 241) | class FlaxBigBirdSelfAttention(nn.Module): method setup (line 246) | def setup(self): method _split_heads (line 275) | def _split_heads(self, hidden_states): method _merge_heads (line 278) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 283) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 314) | def __call__( class FlaxBigBirdBlockSparseAttention (line 412) | class FlaxBigBirdBlockSparseAttention(nn.Module): method setup (line 417) | def setup(self): method transpose_for_scores (line 438) | def transpose_for_scores(x, n_heads, head_size): method __call__ (line 443) | def __call__( method create_masks_for_block_sparse_attn (line 481) | def create_masks_for_block_sparse_attn(attention_mask, block_size: int): method bigbird_block_sparse_attention (line 519) | def bigbird_block_sparse_attention( method jax_gather (line 856) | def jax_gather(params, indices, batch_dims=2): method _create_rand_mask_from_inputs (line 873) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 911) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 944) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 999) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1133) | def _get_single_block_row_attention( class FlaxBigBirdSelfOutput (line 1190) | class FlaxBigBirdSelfOutput(nn.Module): method setup (line 1194) | def setup(self): method __call__ (line 1203) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBigBirdAttention (line 1210) | class FlaxBigBirdAttention(nn.Module): method setup (line 1216) | def setup(self): method __call__ (line 1229) | def __call__( class FlaxBigBirdIntermediate (line 1271) | class FlaxBigBirdIntermediate(nn.Module): method setup (line 1275) | def setup(self): method __call__ (line 1283) | def __call__(self, hidden_states): class FlaxBigBirdOutput (line 1290) | class FlaxBigBirdOutput(nn.Module): method setup (line 1294) | def setup(self): method __call__ (line 1303) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBigBirdLayer (line 1310) | class FlaxBigBirdLayer(nn.Module): method setup (line 1315) | def setup(self): method __call__ (line 1325) | def __call__( class FlaxBigBirdLayerCollection (line 1371) | class FlaxBigBirdLayerCollection(nn.Module): method setup (line 1376) | def setup(self): method __call__ (line 1390) | def __call__( class FlaxBigBirdEncoder (line 1455) | class FlaxBigBirdEncoder(nn.Module): method setup (line 1460) | def setup(self): method __call__ (line 1467) | def __call__( class FlaxBigBirdPredictionHeadTransform (line 1495) | class FlaxBigBirdPredictionHeadTransform(nn.Module): method setup (line 1499) | def setup(self): method __call__ (line 1504) | def __call__(self, hidden_states): class FlaxBigBirdLMPredictionHead (line 1511) | class FlaxBigBirdLMPredictionHead(nn.Module): method setup (line 1516) | def setup(self): method __call__ (line 1521) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdOnlyMLMHead (line 1535) | class FlaxBigBirdOnlyMLMHead(nn.Module): method setup (line 1539) | def setup(self): method __call__ (line 1542) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdPreTrainingHeads (line 1547) | class FlaxBigBirdPreTrainingHeads(nn.Module): method setup (line 1551) | def setup(self): method __call__ (line 1555) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBigBirdPreTrainedModel (line 1561) | class FlaxBigBirdPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1571) | def __init__( method enable_gradient_checkpointing (line 1590) | def enable_gradient_checkpointing(self): method init_weights (line 1598) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 1641) | def init_cache(self, batch_size, max_length): method __call__ (line 1662) | def __call__( class FlaxBigBirdModule (line 1759) | class FlaxBigBirdModule(nn.Module): method setup (line 1765) | def setup(self): method __call__ (line 1776) | def __call__( class FlaxBigBirdModel (line 1830) | class FlaxBigBirdModel(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForPreTrainingModule (line 1840) | class FlaxBigBirdForPreTrainingModule(nn.Module): method setup (line 1845) | def setup(self): method __call__ (line 1853) | def __call__( class FlaxBigBirdForPreTraining (line 1910) | class FlaxBigBirdForPreTraining(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMaskedLMModule (line 1943) | class FlaxBigBirdForMaskedLMModule(nn.Module): method setup (line 1948) | def setup(self): method __call__ (line 1957) | def __call__( class FlaxBigBirdForMaskedLM (line 2003) | class FlaxBigBirdForMaskedLM(FlaxBigBirdPreTrainedModel): class FlaxBigBirdClassificationHead (line 2012) | class FlaxBigBirdClassificationHead(nn.Module): method setup (line 2018) | def setup(self): method __call__ (line 2028) | def __call__(self, features, deterministic=True): class FlaxBigBirdForSequenceClassificationModule (line 2038) | class FlaxBigBirdForSequenceClassificationModule(nn.Module): method setup (line 2043) | def setup(self): method __call__ (line 2049) | def __call__( class FlaxBigBirdForSequenceClassification (line 2095) | class FlaxBigBirdForSequenceClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMultipleChoiceModule (line 2109) | class FlaxBigBirdForMultipleChoiceModule(nn.Module): method setup (line 2114) | def setup(self): method __call__ (line 2123) | def __call__( class FlaxBigBirdForMultipleChoice (line 2177) | class FlaxBigBirdForMultipleChoice(FlaxBigBirdPreTrainedModel): method __init__ (line 2180) | def __init__( class FlaxBigBirdForTokenClassificationModule (line 2209) | class FlaxBigBirdForTokenClassificationModule(nn.Module): method setup (line 2214) | def setup(self): method __call__ (line 2229) | def __call__( class FlaxBigBirdForTokenClassification (line 2276) | class FlaxBigBirdForTokenClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForQuestionAnsweringHead (line 2289) | class FlaxBigBirdForQuestionAnsweringHead(nn.Module): method setup (line 2293) | def setup(self): method __call__ (line 2299) | def __call__(self, encoder_output, deterministic=True): class FlaxBigBirdForQuestionAnsweringModule (line 2307) | class FlaxBigBirdForQuestionAnsweringModule(nn.Module): method setup (line 2313) | def setup(self): method __call__ (line 2323) | def __call__( class FlaxBigBirdForQuestionAnswering (line 2381) | class FlaxBigBirdForQuestionAnswering(FlaxBigBirdPreTrainedModel): method __call__ (line 2385) | def __call__( method prepare_question_mask (line 2456) | def prepare_question_mask(q_lengths, maxlen: int): class FlaxBigBirdForCausalLMModule (line 2473) | class FlaxBigBirdForCausalLMModule(nn.Module): method setup (line 2478) | def setup(self): method __call__ (line 2487) | def __call__( class FlaxBigBirdForCausalLM (line 2546) | class FlaxBigBirdForCausalLM(FlaxBigBirdPreTrainedModel): method prepare_inputs_for_generation (line 2549) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 2570) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/tokenization_big_bird.py class BigBirdTokenizer (line 51) | class BigBirdTokenizer(PreTrainedTokenizer): method __init__ (line 104) | def __init__( method vocab_size (line 147) | def vocab_size(self): method get_vocab (line 150) | def get_vocab(self): method __getstate__ (line 155) | def __getstate__(self): method __setstate__ (line 160) | def __setstate__(self, d): method _tokenize (line 170) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 174) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 178) | 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 188) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 205) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 230) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 257) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/big_bird/tokenization_big_bird_fast.py class BigBirdTokenizerFast (line 68) | class BigBirdTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 116) | def __init__( method build_inputs_with_special_tokens (line 155) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 180) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 211) | def create_token_type_ids_from_sequences( method save_vocabulary (line 241) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py class BigBirdPegasusConfig (line 43) | class BigBirdPegasusConfig(PretrainedConfig): method __init__ (line 131) | def __init__( class BigBirdPegasusOnnxConfig (line 201) | class BigBirdPegasusOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 203) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 247) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 259) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 327) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 365) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 391) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 415) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: benchmark/third_party/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 146) | def get_tf_weights_as_numpy(path) -> Dict: function convert_bigbird_pegasus_ckpt_to_pytorch (line 159) | def convert_bigbird_pegasus_ckpt_to_pytorch(ckpt_path: str, save_dir: st... FILE: benchmark/third_party/transformers/src/transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py function shift_tokens_right (line 78) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 94) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 109) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BigBirdPegasusLearnedPositionalEmbedding (line 123) | class BigBirdPegasusLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 128) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 131) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BigBirdPegasusSelfAttention (line 141) | class BigBirdPegasusSelfAttention(nn.Module): method __init__ (line 142) | def __init__(self, config): method transpose_for_scores (line 161) | def transpose_for_scores(self, x): method forward (line 166) | def forward( class BigBirdPegasusBlockSparseAttention (line 246) | class BigBirdPegasusBlockSparseAttention(nn.Module): method __init__ (line 247) | def __init__(self, config, seed=None): method transpose_for_scores (line 270) | def transpose_for_scores(self, x): method forward (line 275) | def forward( method torch_bmm_nd (line 330) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 338) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 345) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 795) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 821) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 858) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 891) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 946) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1080) | def _get_single_block_row_attention( class BigBirdPegasusEncoderAttention (line 1136) | class BigBirdPegasusEncoderAttention(nn.Module): method __init__ (line 1137) | def __init__(self, config, seed=None): method set_attention_type (line 1155) | def set_attention_type(self, value: str): method forward (line 1181) | def forward( class BigBirdPegasusDecoderAttention (line 1216) | class BigBirdPegasusDecoderAttention(nn.Module): method __init__ (line 1219) | def __init__( method _shape (line 1246) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 1249) | def forward( class BigBirdPegasusEncoderLayer (line 1363) | class BigBirdPegasusEncoderLayer(nn.Module): method __init__ (line 1364) | def __init__(self, config: BigBirdPegasusConfig, seed=None): method forward (line 1377) | def forward( method set_attention_type (line 1438) | def set_attention_type(self, value: str): class BigBirdPegasusDecoderLayer (line 1450) | class BigBirdPegasusDecoderLayer(nn.Module): method __init__ (line 1451) | def __init__(self, config: BigBirdPegasusConfig): method forward (line 1479) | def forward( class BigBirdPegasusClassificationHead (line 1570) | class BigBirdPegasusClassificationHead(nn.Module): method __init__ (line 1573) | def __init__( method forward (line 1585) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdPegasusPreTrainedModel (line 1594) | class BigBirdPegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 1600) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1611) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 1616) | def dummy_inputs(self): class BigBirdPegasusEncoder (line 1768) | class BigBirdPegasusEncoder(BigBirdPegasusPreTrainedModel): method __init__ (line 1778) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method forward (line 1808) | def forward( method set_attention_type (line 1993) | def set_attention_type(self, value: str): method create_masks_for_block_sparse_attn (line 2006) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2044) | def _pad_to_block_size(self, hidden_states: torch.Tensor, attention_ma... class BigBirdPegasusDecoder (line 2069) | class BigBirdPegasusDecoder(BigBirdPegasusPreTrainedModel): method __init__ (line 2078) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method get_input_embeddings (line 2102) | def get_input_embeddings(self): method set_input_embeddings (line 2105) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 2109) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 2129) | def forward( class BigBirdPegasusModel (line 2352) | class BigBirdPegasusModel(BigBirdPegasusPreTrainedModel): method __init__ (line 2353) | def __init__(self, config: BigBirdPegasusConfig): method get_input_embeddings (line 2365) | def get_input_embeddings(self): method set_input_embeddings (line 2368) | def set_input_embeddings(self, value): method get_encoder (line 2373) | def get_encoder(self): method get_decoder (line 2376) | def get_decoder(self): method forward (line 2387) | def forward( class BigBirdPegasusForConditionalGeneration (line 2481) | class BigBirdPegasusForConditionalGeneration(BigBirdPegasusPreTrainedMod... method __init__ (line 2485) | def __init__(self, config: BigBirdPegasusConfig): method get_encoder (line 2494) | def get_encoder(self): method get_decoder (line 2497) | def get_decoder(self): method resize_token_embeddings (line 2500) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 2505) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2514) | def get_output_embeddings(self): method set_output_embeddings (line 2517) | def set_output_embeddings(self, new_embeddings): method forward (line 2523) | def forward( method prepare_inputs_for_generation (line 2603) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2631) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2635) | def _reorder_cache(past, beam_idx): class BigBirdPegasusForSequenceClassification (line 2653) | class BigBirdPegasusForSequenceClassification(BigBirdPegasusPreTrainedMo... method __init__ (line 2654) | def __init__(self, config: BigBirdPegasusConfig, **kwargs): method forward (line 2675) | def forward( class BigBirdPegasusForQuestionAnswering (line 2781) | class BigBirdPegasusForQuestionAnswering(BigBirdPegasusPreTrainedModel): method __init__ (line 2782) | def __init__(self, config): method forward (line 2802) | def forward( class BigBirdPegasusDecoderWrapper (line 2898) | class BigBirdPegasusDecoderWrapper(BigBirdPegasusPreTrainedModel): method __init__ (line 2904) | def __init__(self, config): method forward (line 2908) | def forward(self, *args, **kwargs): class BigBirdPegasusForCausalLM (line 2912) | class BigBirdPegasusForCausalLM(BigBirdPegasusPreTrainedModel): method __init__ (line 2913) | def __init__(self, config): method get_input_embeddings (line 2925) | def get_input_embeddings(self): method set_input_embeddings (line 2928) | def set_input_embeddings(self, value): method get_output_embeddings (line 2931) | def get_output_embeddings(self): method set_output_embeddings (line 2934) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2937) | def set_decoder(self, decoder): method get_decoder (line 2940) | def get_decoder(self): method forward (line 2944) | def forward( method prepare_inputs_for_generation (line 3086) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 3102) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot/configuration_blenderbot.py class BlenderbotConfig (line 36) | class BlenderbotConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class BlenderbotOnnxConfig (line 176) | class BlenderbotOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 178) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 220) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 232) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 289) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 326) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 353) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 378) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method fill_with_past_key_values_ (line 386) | def fill_with_past_key_values_(self, inputs_or_outputs: Mapping[str, M... FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/blenderbot/modeling_blenderbot.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 81) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 97) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BlenderbotLearnedPositionalEmbedding (line 111) | class BlenderbotLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 116) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 119) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotAttention (line 129) | class BlenderbotAttention(nn.Module): method __init__ (line 132) | def __init__( method _shape (line 159) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 162) | def forward( class BlenderbotEncoderLayer (line 277) | class BlenderbotEncoderLayer(nn.Module): method __init__ (line 278) | def __init__(self, config: BlenderbotConfig): method forward (line 294) | def forward( class BlenderbotDecoderLayer (line 346) | class BlenderbotDecoderLayer(nn.Module): method __init__ (line 347) | def __init__(self, config: BlenderbotConfig): method forward (line 373) | def forward( class BlenderbotPreTrainedModel (line 463) | class BlenderbotPreTrainedModel(PreTrainedModel): method _init_weights (line 468) | def _init_weights(self, module): method _set_gradient_checkpointing (line 479) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 484) | def dummy_inputs(self): class BlenderbotEncoder (line 635) | class BlenderbotEncoder(BlenderbotPreTrainedModel): method __init__ (line 645) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... method forward (line 672) | def forward( class BlenderbotDecoder (line 806) | class BlenderbotDecoder(BlenderbotPreTrainedModel): method __init__ (line 815) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... method get_input_embeddings (line 839) | def get_input_embeddings(self): method set_input_embeddings (line 842) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 846) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 866) | def forward( class BlenderbotModel (line 1089) | class BlenderbotModel(BlenderbotPreTrainedModel): method __init__ (line 1090) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1103) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_input_embeddings (line 1115) | def get_input_embeddings(self): method set_input_embeddings (line 1118) | def set_input_embeddings(self, value): method get_encoder (line 1123) | def get_encoder(self): method get_decoder (line 1126) | def get_decoder(self): method forward (line 1131) | def forward( class BlenderbotForConditionalGeneration (line 1227) | class BlenderbotForConditionalGeneration(BlenderbotPreTrainedModel): method __init__ (line 1236) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1246) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_encoder (line 1260) | def get_encoder(self): method get_decoder (line 1263) | def get_decoder(self): method resize_token_embeddings (line 1266) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1271) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1280) | def get_output_embeddings(self): method set_output_embeddings (line 1283) | def set_output_embeddings(self, new_embeddings): method forward (line 1289) | def forward( method prepare_inputs_for_generation (line 1367) | def prepare_inputs_for_generation( method _reorder_cache (line 1396) | def _reorder_cache(past, beam_idx): class BlenderbotDecoderWrapper (line 1407) | class BlenderbotDecoderWrapper(BlenderbotPreTrainedModel): method __init__ (line 1413) | def __init__(self, config): method forward (line 1417) | def forward(self, *args, **kwargs): class BlenderbotForCausalLM (line 1422) | class BlenderbotForCausalLM(BlenderbotPreTrainedModel): method __init__ (line 1423) | def __init__(self, config): method get_input_embeddings (line 1435) | def get_input_embeddings(self): method set_input_embeddings (line 1438) | def set_input_embeddings(self, value): method get_output_embeddings (line 1441) | def get_output_embeddings(self): method set_output_embeddings (line 1444) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1447) | def set_decoder(self, decoder): method get_decoder (line 1450) | def get_decoder(self): method forward (line 1454) | def forward( method prepare_inputs_for_generation (line 1599) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1615) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot/modeling_flax_blenderbot.py function shift_tokens_right (line 210) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxBlenderbotAttention (line 223) | class FlaxBlenderbotAttention(nn.Module): method setup (line 232) | def setup(self) -> None: method _split_heads (line 258) | def _split_heads(self, hidden_states): method _merge_heads (line 261) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 265) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 296) | def __call__( class FlaxBlenderbotEncoderLayer (line 391) | class FlaxBlenderbotEncoderLayer(nn.Module): method setup (line 395) | def setup(self) -> None: method __call__ (line 418) | def __call__( class FlaxBlenderbotEncoderLayerCollection (line 448) | class FlaxBlenderbotEncoderLayerCollection(nn.Module): method setup (line 452) | def setup(self): method __call__ (line 459) | def __call__( class FlaxBlenderbotDecoderLayer (line 503) | class FlaxBlenderbotDecoderLayer(nn.Module): method setup (line 507) | def setup(self) -> None: method __call__ (line 540) | def __call__( class FlaxBlenderbotDecoderLayerCollection (line 592) | class FlaxBlenderbotDecoderLayerCollection(nn.Module): method setup (line 596) | def setup(self): method __call__ (line 603) | def __call__( class FlaxBlenderbotEncoder (line 662) | class FlaxBlenderbotEncoder(nn.Module): method setup (line 667) | def setup(self): method __call__ (line 683) | def __call__( class FlaxBlenderbotDecoder (line 731) | class FlaxBlenderbotDecoder(nn.Module): method setup (line 736) | def setup(self): method __call__ (line 753) | def __call__( class FlaxBlenderbotModule (line 811) | class FlaxBlenderbotModule(nn.Module): method setup (line 815) | def setup(self): method _get_encoder_module (line 825) | def _get_encoder_module(self): method _get_decoder_module (line 828) | def _get_decoder_module(self): method __call__ (line 831) | def __call__( class FlaxBlenderbotPreTrainedModel (line 880) | class FlaxBlenderbotPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 885) | def __init__( method init_weights (line 897) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 933) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 976) | def encode( method decode (line 1041) | def decode( method __call__ (line 1154) | def __call__( class FlaxBlenderbotModel (line 1218) | class FlaxBlenderbotModel(FlaxBlenderbotPreTrainedModel): class FlaxBlenderbotForConditionalGenerationModule (line 1230) | class FlaxBlenderbotForConditionalGenerationModule(nn.Module): method setup (line 1235) | def setup(self): method _get_encoder_module (line 1245) | def _get_encoder_module(self): method _get_decoder_module (line 1248) | def _get_decoder_module(self): method __call__ (line 1251) | def __call__( class FlaxBlenderbotForConditionalGeneration (line 1305) | class FlaxBlenderbotForConditionalGeneration(FlaxBlenderbotPreTrainedMod... method decode (line 1311) | def decode( method prepare_inputs_for_generation (line 1446) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1477) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot/modeling_tf_blenderbot.py function shift_tokens_right (line 65) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 90) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 108) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFBlenderbotLearnedPositionalEmbedding (line 121) | class TFBlenderbotLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 126) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 129) | def call( class TFBlenderbotAttention (line 142) | class TFBlenderbotAttention(tf.keras.layers.Layer): method __init__ (line 145) | def __init__( method _shape (line 173) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 176) | def call( class TFBlenderbotEncoderLayer (line 296) | class TFBlenderbotEncoderLayer(tf.keras.layers.Layer): method __init__ (line 297) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 311) | def call( class TFBlenderbotDecoderLayer (line 353) | class TFBlenderbotDecoderLayer(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 381) | def call( class TFBlenderbotPreTrainedModel (line 462) | class TFBlenderbotPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 467) | def dummy_inputs(self): method serving (line 489) | def serving(self, inputs): class TFBlenderbotEncoder (line 632) | class TFBlenderbotEncoder(tf.keras.layers.Layer): method __init__ (line 642) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[tf... method get_embed_tokens (line 660) | def get_embed_tokens(self): method set_embed_tokens (line 663) | def set_embed_tokens(self, embed_tokens): method call (line 667) | def call( class TFBlenderbotDecoder (line 807) | class TFBlenderbotDecoder(tf.keras.layers.Layer): method __init__ (line 817) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[tf... method get_embed_tokens (line 834) | def get_embed_tokens(self): method set_embed_tokens (line 837) | def set_embed_tokens(self, embed_tokens): method call (line 841) | def call( class TFBlenderbotMainLayer (line 1046) | class TFBlenderbotMainLayer(tf.keras.layers.Layer): method __init__ (line 1049) | def __init__(self, config: BlenderbotConfig, **kwargs): method get_input_embeddings (line 1065) | def get_input_embeddings(self): method set_input_embeddings (line 1068) | def set_input_embeddings(self, new_embeddings): method call (line 1074) | def call( class TFBlenderbotModel (line 1157) | class TFBlenderbotModel(TFBlenderbotPreTrainedModel): method __init__ (line 1158) | def __init__(self, config: BlenderbotConfig, *inputs, **kwargs): method get_encoder (line 1163) | def get_encoder(self): method get_decoder (line 1166) | def get_decoder(self): method from_pretrained (line 1170) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1193) | def call( method serving_output (line 1237) | def serving_output(self, output): class BiasLayer (line 1258) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1264) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1271) | def call(self, x): class TFBlenderbotForConditionalGeneration (line 1279) | class TFBlenderbotForConditionalGeneration(TFBlenderbotPreTrainedModel, ... method __init__ (line 1285) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1294) | def get_decoder(self): method get_encoder (line 1297) | def get_encoder(self): method get_output_embeddings (line 1300) | def get_output_embeddings(self): method set_output_embeddings (line 1303) | def set_output_embeddings(self, value): method get_bias (line 1306) | def get_bias(self): method set_bias (line 1309) | def set_bias(self, value): method from_pretrained (line 1318) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1337) | def call( method serving_output (line 1418) | def serving_output(self, output): method prepare_inputs_for_generation (line 1438) | def prepare_inputs_for_generation( method _reorder_cache (line 1479) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot/tokenization_blenderbot.py function bytes_to_unicode (line 53) | def bytes_to_unicode(): function get_pairs (line 78) | def get_pairs(word): class BlenderbotTokenizer (line 92) | class BlenderbotTokenizer(PreTrainedTokenizer): method __init__ (line 174) | def __init__( method vocab_size (line 230) | def vocab_size(self): method get_vocab (line 234) | def get_vocab(self): method bpe (line 238) | def bpe(self, token): method _tokenize (line 281) | def _tokenize(self, text): method _convert_token_to_id (line 292) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 297) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 302) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 309) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 339) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 367) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 391) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 397) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method _build_conversation_input_ids (line 412) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot/tokenization_blenderbot_fast.py class BlenderbotTokenizerFast (line 50) | class BlenderbotTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 136) | def __init__( method mask_token (line 206) | def mask_token(self) -> str: method mask_token (line 221) | def mask_token(self, value): method _batch_encode_plus (line 233) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 243) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 254) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_token_type_ids_from_sequences (line 259) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 282) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method _build_conversation_input_ids (line 297) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/configuration_blenderbot_small.py class BlenderbotSmallConfig (line 36) | class BlenderbotSmallConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class BlenderbotSmallOnnxConfig (line 175) | class BlenderbotSmallOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 177) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 221) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 233) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 301) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 339) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 365) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 389) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 78) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 94) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BlenderbotSmallLearnedPositionalEmbedding (line 109) | class BlenderbotSmallLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 114) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 117) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotSmallAttention (line 127) | class BlenderbotSmallAttention(nn.Module): method __init__ (line 130) | def __init__( method _shape (line 157) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 160) | def forward( class BlenderbotSmallEncoderLayer (line 275) | class BlenderbotSmallEncoderLayer(nn.Module): method __init__ (line 276) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 292) | def forward( class BlenderbotSmallDecoderLayer (line 344) | class BlenderbotSmallDecoderLayer(nn.Module): method __init__ (line 345) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 371) | def forward( class BlenderbotSmallPreTrainedModel (line 461) | class BlenderbotSmallPreTrainedModel(PreTrainedModel): method _init_weights (line 466) | def _init_weights(self, module): method _set_gradient_checkpointing (line 477) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 482) | def dummy_inputs(self): class BlenderbotSmallEncoder (line 633) | class BlenderbotSmallEncoder(BlenderbotSmallPreTrainedModel): method __init__ (line 643) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method forward (line 670) | def forward( class BlenderbotSmallDecoder (line 802) | class BlenderbotSmallDecoder(BlenderbotSmallPreTrainedModel): method __init__ (line 811) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method get_input_embeddings (line 835) | def get_input_embeddings(self): method set_input_embeddings (line 838) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 842) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 862) | def forward( class BlenderbotSmallModel (line 1083) | class BlenderbotSmallModel(BlenderbotSmallPreTrainedModel): method __init__ (line 1084) | def __init__(self, config: BlenderbotSmallConfig): method get_input_embeddings (line 1096) | def get_input_embeddings(self): method set_input_embeddings (line 1099) | def set_input_embeddings(self, value): method get_encoder (line 1104) | def get_encoder(self): method get_decoder (line 1107) | def get_decoder(self): method forward (line 1112) | def forward( class BlenderbotSmallForConditionalGeneration (line 1209) | class BlenderbotSmallForConditionalGeneration(BlenderbotSmallPreTrainedM... method __init__ (line 1218) | def __init__(self, config: BlenderbotSmallConfig): method get_encoder (line 1227) | def get_encoder(self): method get_decoder (line 1230) | def get_decoder(self): method resize_token_embeddings (line 1233) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1238) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1247) | def get_output_embeddings(self): method set_output_embeddings (line 1250) | def set_output_embeddings(self, new_embeddings): method forward (line 1256) | def forward( method prepare_inputs_for_generation (line 1334) | def prepare_inputs_for_generation( method _reorder_cache (line 1363) | def _reorder_cache(past, beam_idx): class BlenderbotSmallDecoderWrapper (line 1374) | class BlenderbotSmallDecoderWrapper(BlenderbotSmallPreTrainedModel): method __init__ (line 1380) | def __init__(self, config): method forward (line 1384) | def forward(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 1389) | class BlenderbotSmallForCausalLM(BlenderbotSmallPreTrainedModel): method __init__ (line 1390) | def __init__(self, config): 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 1421) | def forward( method prepare_inputs_for_generation (line 1566) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1582) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py function shift_tokens_right (line 222) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxBlenderbotSmallAttention (line 235) | class FlaxBlenderbotSmallAttention(nn.Module): method setup (line 244) | def setup(self) -> None: method _split_heads (line 270) | def _split_heads(self, hidden_states): method _merge_heads (line 273) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 277) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 308) | def __call__( class FlaxBlenderbotSmallEncoderLayer (line 403) | class FlaxBlenderbotSmallEncoderLayer(nn.Module): method setup (line 407) | def setup(self) -> None: method __call__ (line 430) | def __call__( class FlaxBlenderbotSmallEncoderLayerCollection (line 461) | class FlaxBlenderbotSmallEncoderLayerCollection(nn.Module): method setup (line 465) | def setup(self): method __call__ (line 472) | def __call__( class FlaxBlenderbotSmallDecoderLayer (line 516) | class FlaxBlenderbotSmallDecoderLayer(nn.Module): method setup (line 520) | def setup(self) -> None: method __call__ (line 553) | def __call__( class FlaxBlenderbotSmallDecoderLayerCollection (line 605) | class FlaxBlenderbotSmallDecoderLayerCollection(nn.Module): method setup (line 609) | def setup(self): method __call__ (line 616) | def __call__( class FlaxBlenderbotSmallEncoder (line 675) | class FlaxBlenderbotSmallEncoder(nn.Module): method setup (line 680) | def setup(self): method __call__ (line 696) | def __call__( class FlaxBlenderbotSmallDecoder (line 736) | class FlaxBlenderbotSmallDecoder(nn.Module): method setup (line 741) | def setup(self): method __call__ (line 758) | def __call__( class FlaxBlenderbotSmallModule (line 809) | class FlaxBlenderbotSmallModule(nn.Module): method setup (line 813) | 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 FlaxBlenderbotSmallPreTrainedModel (line 878) | class FlaxBlenderbotSmallPreTrainedModel(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 1151) | def __call__( class FlaxBlenderbotSmallModel (line 1215) | class FlaxBlenderbotSmallModel(FlaxBlenderbotSmallPreTrainedModel): class FlaxBlenderbotSmallForConditionalGenerationModule (line 1227) | class FlaxBlenderbotSmallForConditionalGenerationModule(nn.Module): method setup (line 1232) | def setup(self): method _get_encoder_module (line 1242) | def _get_encoder_module(self): method _get_decoder_module (line 1245) | def _get_decoder_module(self): method __call__ (line 1248) | def __call__( class FlaxBlenderbotSmallForConditionalGeneration (line 1303) | class FlaxBlenderbotSmallForConditionalGeneration(FlaxBlenderbotSmallPre... method decode (line 1309) | def decode( method prepare_inputs_for_generation (line 1444) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1475) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 89) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 107) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFBlenderbotSmallLearnedPositionalEmbedding (line 121) | class TFBlenderbotSmallLearnedPositionalEmbedding(tf.keras.layers.Embedd... method __init__ (line 126) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 129) | def call( class TFBlenderbotSmallAttention (line 142) | class TFBlenderbotSmallAttention(tf.keras.layers.Layer): method __init__ (line 145) | def __init__( method _shape (line 173) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 176) | def call( class TFBlenderbotSmallEncoderLayer (line 296) | class TFBlenderbotSmallEncoderLayer(tf.keras.layers.Layer): method __init__ (line 297) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 311) | def call( class TFBlenderbotSmallDecoderLayer (line 353) | class TFBlenderbotSmallDecoderLayer(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 381) | def call( class TFBlenderbotSmallPreTrainedModel (line 462) | class TFBlenderbotSmallPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 467) | def dummy_inputs(self): method serving (line 489) | def serving(self, inputs): class TFBlenderbotSmallEncoder (line 637) | class TFBlenderbotSmallEncoder(tf.keras.layers.Layer): method __init__ (line 647) | def __init__( method get_embed_tokens (line 667) | def get_embed_tokens(self): method set_embed_tokens (line 670) | def set_embed_tokens(self, embed_tokens): method call (line 674) | def call( class TFBlenderbotSmallDecoder (line 813) | class TFBlenderbotSmallDecoder(tf.keras.layers.Layer): method __init__ (line 823) | def __init__( method get_embed_tokens (line 842) | def get_embed_tokens(self): method set_embed_tokens (line 845) | def set_embed_tokens(self, embed_tokens): method call (line 849) | def call( class TFBlenderbotSmallMainLayer (line 1055) | class TFBlenderbotSmallMainLayer(tf.keras.layers.Layer): method __init__ (line 1058) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method get_input_embeddings (line 1074) | def get_input_embeddings(self): method set_input_embeddings (line 1077) | def set_input_embeddings(self, new_embeddings): method call (line 1083) | def call( class TFBlenderbotSmallModel (line 1167) | class TFBlenderbotSmallModel(TFBlenderbotSmallPreTrainedModel): method __init__ (line 1168) | def __init__(self, config: BlenderbotSmallConfig, *inputs, **kwargs): method get_encoder (line 1173) | def get_encoder(self): method get_decoder (line 1176) | def get_decoder(self): method call (line 1187) | def call( method serving_output (line 1232) | def serving_output(self, output): class BiasLayer (line 1253) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1259) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1266) | def call(self, x): class TFBlenderbotSmallForConditionalGeneration (line 1274) | class TFBlenderbotSmallForConditionalGeneration(TFBlenderbotSmallPreTrai... method __init__ (line 1280) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1289) | def get_decoder(self): method get_encoder (line 1292) | def get_encoder(self): method get_output_embeddings (line 1295) | def get_output_embeddings(self): method set_output_embeddings (line 1298) | def set_output_embeddings(self, value): method get_bias (line 1301) | def get_bias(self): method set_bias (line 1304) | def set_bias(self, value): method call (line 1316) | def call( method serving_output (line 1398) | def serving_output(self, output): method prepare_inputs_for_generation (line 1418) | def prepare_inputs_for_generation( method _reorder_cache (line 1459) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py function get_pairs (line 53) | def get_pairs(word): class BlenderbotSmallTokenizer (line 69) | class BlenderbotSmallTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method vocab_size (line 121) | def vocab_size(self) -> int: method get_vocab (line 124) | def get_vocab(self) -> Dict: method bpe (line 127) | def bpe(self, token: str) -> str: method _tokenize (line 187) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 197) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 202) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 206) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 211) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py class BlenderbotSmallTokenizerFast (line 52) | class BlenderbotSmallTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 66) | def __init__( method build_inputs_with_special_tokens (line 91) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 98) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/bloom/configuration_bloom.py class BloomConfig (line 44) | class BloomConfig(PretrainedConfig): method __init__ (line 115) | def __init__( class BloomOnnxConfig (line 154) | class BloomOnnxConfig(OnnxConfigWithPast): method __init__ (line 157) | def __init__( method inputs (line 170) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 182) | def num_layers(self) -> int: method num_attention_heads (line 186) | def num_attention_heads(self) -> int: method atol_for_validation (line 190) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 193) | def generate_dummy_inputs( method default_onnx_opset (line 243) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/bloom/convert_bloom_original_checkpoint_to_pytorch.py function layer_name_mapping (line 51) | def layer_name_mapping(key, file): function get_dtype_size (line 71) | def get_dtype_size(dtype): function convert_bloom_checkpoint_to_pytorch (line 81) | def convert_bloom_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/bloom/modeling_bloom.py function _make_causal_mask (line 57) | def _make_causal_mask( function _expand_mask (line 76) | def _expand_mask(mask: torch.Tensor, tgt_length: int) -> torch.BoolTensor: function build_alibi_tensor (line 87) | def build_alibi_tensor(attention_mask: torch.Tensor, num_heads: int, dty... function dropout_add (line 131) | def dropout_add(x: torch.Tensor, residual: torch.Tensor, prob: float, tr... function bloom_gelu_forward (line 150) | def bloom_gelu_forward(x: torch.Tensor) -> torch.Tensor: function bloom_gelu_back (line 162) | def bloom_gelu_back(g: torch.Tensor, x: torch.Tensor) -> torch.Tensor: class GeLUFunction (line 180) | class GeLUFunction(torch.autograd.Function): method forward (line 182) | def forward(ctx, input: torch.Tensor) -> torch.Tensor: method backward (line 187) | def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor: class BloomGelu (line 193) | class BloomGelu(nn.Module): method __init__ (line 202) | def __init__(self): method forward (line 205) | def forward(self, x: torch.Tensor) -> torch.Tensor: class BloomAttention (line 212) | class BloomAttention(nn.Module): method __init__ (line 213) | def __init__(self, config: BloomConfig): method _split_heads (line 239) | def _split_heads(self, fused_qkv: torch.Tensor) -> Tuple[torch.Tensor,... method _merge_heads (line 255) | def _merge_heads(self, x: torch.Tensor) -> torch.Tensor: method forward (line 280) | def forward( class BloomMLP (line 372) | class BloomMLP(nn.Module): method __init__ (line 373) | def __init__(self, config: BloomConfig): method forward (line 384) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class BloomBlock (line 403) | class BloomBlock(nn.Module): method __init__ (line 404) | def __init__(self, config: BloomConfig): method forward (line 418) | def forward( class BloomPreTrainedModel (line 474) | class BloomPreTrainedModel(PreTrainedModel): method __init__ (line 486) | def __init__(self, *inputs, **kwargs): method _init_weights (line 489) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 505) | def _set_gradient_checkpointing(self, module: nn.Module, value: bool =... class BloomModel (line 584) | class BloomModel(BloomPreTrainedModel): method __init__ (line 585) | def __init__(self, config: BloomConfig): method get_input_embeddings (line 606) | def get_input_embeddings(self): method _prepare_attn_mask (line 609) | def _prepare_attn_mask( method set_input_embeddings (line 631) | def set_input_embeddings(self, new_embeddings: torch.Tensor): method forward (line 641) | def forward( class BloomForCausalLM (line 786) | class BloomForCausalLM(BloomPreTrainedModel): method __init__ (line 789) | def __init__(self, config: BloomConfig): method get_output_embeddings (line 797) | def get_output_embeddings(self): method set_output_embeddings (line 800) | def set_output_embeddings(self, new_embeddings: torch.Tensor): method prepare_inputs_for_generation (line 803) | def prepare_inputs_for_generation( method forward (line 828) | def forward( method _reorder_cache (line 900) | def _reorder_cache( class BloomForSequenceClassification (line 949) | class BloomForSequenceClassification(BloomPreTrainedModel): method __init__ (line 952) | def __init__(self, config: BloomConfig): method forward (line 968) | def forward( class BloomForTokenClassification (line 1078) | class BloomForTokenClassification(BloomPreTrainedModel): method __init__ (line 1081) | def __init__(self, config: BloomConfig): method forward (line 1105) | def forward( class BloomForQuestionAnswering (line 1180) | class BloomForQuestionAnswering(BloomPreTrainedModel): method __init__ (line 1183) | def __init__(self, config): method forward (line 1192) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/bloom/tokenization_bloom_fast.py class BloomTokenizerFast (line 49) | class BloomTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 106) | def __init__( method _batch_encode_plus (line 137) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 147) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 158) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 162) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/bort/convert_bort_original_gluonnlp_checkpoint_to_pytorch.py function convert_bort_checkpoint_to_pytorch (line 55) | def convert_bort_checkpoint_to_pytorch(bort_checkpoint_path: str, pytorc... FILE: benchmark/third_party/transformers/src/transformers/models/byt5/convert_byt5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/byt5/tokenization_byt5.py class ByT5Tokenizer (line 28) | class ByT5Tokenizer(PreTrainedTokenizer): method __init__ (line 63) | def __init__( method vocab_size (line 115) | def vocab_size(self): method get_special_tokens_mask (line 118) | def get_special_tokens_mask( method _add_eos_if_not_present (line 146) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 157) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 179) | def build_inputs_with_special_tokens( method _tokenize (line 205) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 210) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 222) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 230) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 249) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/camembert/configuration_camembert.py class CamembertConfig (line 39) | class CamembertConfig(RobertaConfig): class CamembertOnnxConfig (line 49) | class CamembertOnnxConfig(OnnxConfig): method inputs (line 51) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/camembert/modeling_camembert.py class CamembertEmbeddings (line 80) | class CamembertEmbeddings(nn.Module): method __init__ (line 86) | def __init__(self, config): method forward (line 109) | def forward( method create_position_ids_from_inputs_embeds (line 149) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class CamembertSelfAttention (line 168) | class CamembertSelfAttention(nn.Module): method __init__ (line 169) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 195) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 200) | def forward( class CamembertSelfOutput (line 296) | class CamembertSelfOutput(nn.Module): method __init__ (line 297) | def __init__(self, config): method forward (line 303) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertAttention (line 311) | class CamembertAttention(nn.Module): method __init__ (line 312) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 318) | def prune_heads(self, heads): method forward (line 336) | def forward( class CamembertIntermediate (line 361) | class CamembertIntermediate(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 370) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertOutput (line 377) | class CamembertOutput(nn.Module): method __init__ (line 378) | def __init__(self, config): method forward (line 384) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertLayer (line 392) | class CamembertLayer(nn.Module): method __init__ (line 393) | def __init__(self, config): method forward (line 407) | def forward( method feed_forward_chunk (line 472) | def feed_forward_chunk(self, attention_output): class CamembertEncoder (line 479) | class CamembertEncoder(nn.Module): method __init__ (line 480) | def __init__(self, config): method forward (line 486) | def forward( class CamembertPooler (line 577) | class CamembertPooler(nn.Module): method __init__ (line 578) | def __init__(self, config): method forward (line 583) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertPreTrainedModel (line 592) | class CamembertPreTrainedModel(PreTrainedModel): method _init_weights (line 603) | def _init_weights(self, module): method _set_gradient_checkpointing (line 619) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 623) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class CamembertClassificationHead (line 684) | class CamembertClassificationHead(nn.Module): method __init__ (line 687) | def __init__(self, config): method forward (line 696) | def forward(self, features, **kwargs): class CamembertLMHead (line 707) | class CamembertLMHead(nn.Module): method __init__ (line 710) | def __init__(self, config): method forward (line 719) | def forward(self, features, **kwargs): method _tie_weights (line 729) | def _tie_weights(self): class CamembertModel (line 742) | class CamembertModel(CamembertPreTrainedModel): method __init__ (line 762) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 774) | def get_input_embeddings(self): method set_input_embeddings (line 777) | def set_input_embeddings(self, value): method _prune_heads (line 780) | def _prune_heads(self, heads_to_prune): method forward (line 796) | def forward( class CamembertForMaskedLM (line 931) | class CamembertForMaskedLM(CamembertPreTrainedModel): method __init__ (line 936) | def __init__(self, config): method get_output_embeddings (line 954) | def get_output_embeddings(self): method set_output_embeddings (line 957) | def set_output_embeddings(self, new_embeddings): method forward (line 970) | def forward( class CamembertForSequenceClassification (line 1036) | class CamembertForSequenceClassification(CamembertPreTrainedModel): method __init__ (line 1039) | def __init__(self, config): method forward (line 1059) | def forward( class CamembertForMultipleChoice (line 1137) | class CamembertForMultipleChoice(CamembertPreTrainedModel): method __init__ (line 1140) | def __init__(self, config): method forward (line 1159) | def forward( class CamembertForTokenClassification (line 1233) | class CamembertForTokenClassification(CamembertPreTrainedModel): method __init__ (line 1237) | def __init__(self, config): method forward (line 1260) | def forward( class CamembertForQuestionAnswering (line 1321) | class CamembertForQuestionAnswering(CamembertPreTrainedModel): method __init__ (line 1325) | def __init__(self, config): method forward (line 1344) | def forward( class CamembertForCausalLM (line 1423) | class CamembertForCausalLM(CamembertPreTrainedModel): method __init__ (line 1428) | def __init__(self, config): method get_output_embeddings (line 1443) | def get_output_embeddings(self): method set_output_embeddings (line 1446) | def set_output_embeddings(self, new_embeddings): method forward (line 1451) | def forward( method prepare_inputs_for_generation (line 1555) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1567) | def _reorder_cache(self, past, beam_idx): function create_position_ids_from_input_ids (line 1575) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/camembert/modeling_tf_camembert.py class TFCamembertEmbeddings (line 171) | class TFCamembertEmbeddings(tf.keras.layers.Layer): method __init__ (line 176) | def __init__(self, config, **kwargs): method build (line 188) | def build(self, input_shape: tf.TensorShape): 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 282) | class TFCamembertPooler(tf.keras.layers.Layer): method __init__ (line 283) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 293) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCamembertSelfAttention (line 303) | class TFCamembertSelfAttention(tf.keras.layers.Layer): method __init__ (line 304) | def __init__(self, config: CamembertConfig, **kwargs): method transpose_for_scores (line 331) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 338) | def call( class TFCamembertSelfOutput (line 421) | class TFCamembertSelfOutput(tf.keras.layers.Layer): method __init__ (line 422) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 431) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFCamembertAttention (line 440) | class TFCamembertAttention(tf.keras.layers.Layer): method __init__ (line 441) | def __init__(self, config: CamembertConfig, **kwargs): method prune_heads (line 447) | def prune_heads(self, heads): method call (line 450) | def call( class TFCamembertIntermediate (line 481) | class TFCamembertIntermediate(tf.keras.layers.Layer): method __init__ (line 482) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 494) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCamembertOutput (line 502) | class TFCamembertOutput(tf.keras.layers.Layer): method __init__ (line 503) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 512) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFCamembertLayer (line 521) | class TFCamembertLayer(tf.keras.layers.Layer): method __init__ (line 522) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 535) | def call( class TFCamembertEncoder (line 608) | class TFCamembertEncoder(tf.keras.layers.Layer): method __init__ (line 609) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 614) | def call( class TFCamembertMainLayer (line 679) | class TFCamembertMainLayer(tf.keras.layers.Layer): method __init__ (line 682) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 699) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 703) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 708) | def _prune_heads(self, heads_to_prune): method call (line 717) | def call( class TFCamembertPreTrainedModel (line 876) | class TFCamembertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 887) | def dummy_inputs(self): method serving (line 912) | def serving(self, inputs): class TFCamembertModel (line 923) | class TFCamembertModel(TFCamembertPreTrainedModel): method __init__ (line 924) | def __init__(self, config, *inputs, **kwargs): method call (line 936) | def call( method serving_output (line 993) | def serving_output( class TFCamembertLMHead (line 1015) | class TFCamembertLMHead(tf.keras.layers.Layer): method __init__ (line 1018) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1033) | def build(self, input_shape): method get_output_embeddings (line 1038) | def get_output_embeddings(self): method set_output_embeddings (line 1041) | def set_output_embeddings(self, value): method get_bias (line 1045) | def get_bias(self): method set_bias (line 1048) | def set_bias(self, value): method call (line 1052) | def call(self, hidden_states): class TFCamembertForMaskedLM (line 1072) | class TFCamembertForMaskedLM(TFCamembertPreTrainedModel, TFMaskedLanguag... method __init__ (line 1076) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1082) | def get_lm_head(self): method get_prefix_bias_name (line 1085) | def get_prefix_bias_name(self): method call (line 1100) | def call( method serving_output (line 1150) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFCamembertClassificationHead (line 1158) | class TFCamembertClassificationHead(tf.keras.layers.Layer): method __init__ (line 1161) | def __init__(self, config, **kwargs): method call (line 1177) | def call(self, features, training=False): class TFCamembertForSequenceClassification (line 1194) | class TFCamembertForSequenceClassification(TFCamembertPreTrainedModel, T... method __init__ (line 1198) | def __init__(self, config, *inputs, **kwargs): method call (line 1215) | def call( method serving_output (line 1264) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFCamembertForTokenClassification (line 1279) | class TFCamembertForTokenClassification(TFCamembertPreTrainedModel, TFTo... method __init__ (line 1284) | def __init__(self, config, *inputs, **kwargs): method call (line 1307) | def call( method serving_output (line 1356) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFCamembertForMultipleChoice (line 1371) | class TFCamembertForMultipleChoice(TFCamembertPreTrainedModel, TFMultipl... method __init__ (line 1376) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1386) | def dummy_inputs(self): method call (line 1405) | def call( method serving (line 1474) | def serving(self, inputs): method serving_output (line 1480) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFCamembertForQuestionAnswering (line 1495) | class TFCamembertForQuestionAnswering(TFCamembertPreTrainedModel, TFQues... method __init__ (line 1499) | def __init__(self, config, *inputs, **kwargs): method call (line 1518) | def call( method serving_output (line 1581) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... class TFCamembertForCausalLM (line 1594) | class TFCamembertForCausalLM(TFCamembertPreTrainedModel, TFCausalLanguag... method __init__ (line 1598) | def __init__(self, config: CamembertConfig, *inputs, **kwargs): method get_lm_head (line 1607) | def get_lm_head(self): method get_prefix_bias_name (line 1610) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1615) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method call (line 1635) | def call( method serving_output (line 1717) | def serving_output(self, output: TFCausalLMOutputWithCrossAttentions) ... method _reorder_cache (line 1732) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/camembert/tokenization_camembert.py class CamembertTokenizer (line 45) | class CamembertTokenizer(PreTrainedTokenizer): method __init__ (line 120) | def __init__( method build_inputs_with_special_tokens (line 161) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 187) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 214) | def create_token_type_ids_from_sequences( method vocab_size (line 238) | def vocab_size(self): method get_vocab (line 241) | def get_vocab(self): method _tokenize (line 246) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 249) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 258) | def _convert_id_to_token(self, index): method __getstate__ (line 264) | def __getstate__(self): method __setstate__ (line 269) | def __setstate__(self, d): method convert_tokens_to_string (line 279) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 283) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/camembert/tokenization_camembert_fast.py class CamembertTokenizerFast (line 53) | class CamembertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 111) | def __init__( method build_inputs_with_special_tokens (line 145) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 171) | def create_token_type_ids_from_sequences( method save_vocabulary (line 194) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/canine/configuration_canine.py class CanineConfig (line 29) | class CanineConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/canine/convert_canine_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, pytorch_dump_pa... FILE: benchmark/third_party/transformers/src/transformers/models/canine/modeling_canine.py class CanineModelOutputWithPooling (line 61) | class CanineModelOutputWithPooling(ModelOutput): function load_tf_weights_in_canine (line 95) | def load_tf_weights_in_canine(model, config, tf_checkpoint_path): class CanineEmbeddings (line 192) | class CanineEmbeddings(nn.Module): method __init__ (line 195) | def __init__(self, config): method _hash_bucket_tensors (line 217) | def _hash_bucket_tensors(self, input_ids, num_hashes: int, num_buckets... method _embed_hash_buckets (line 240) | def _embed_hash_buckets(self, input_ids, embedding_size: int, num_hash... method forward (line 254) | def forward( class CharactersToMolecules (line 291) | class CharactersToMolecules(nn.Module): method __init__ (line 294) | def __init__(self, config): method forward (line 309) | 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 824) | class CaninePooler(nn.Module): method __init__ (line 825) | def __init__(self, config): method forward (line 830) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CaninePredictionHeadTransform (line 839) | class CaninePredictionHeadTransform(nn.Module): method __init__ (line 840) | def __init__(self, config): method forward (line 849) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineLMPredictionHead (line 856) | class CanineLMPredictionHead(nn.Module): method __init__ (line 857) | def __init__(self, config): method forward (line 870) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineOnlyMLMHead (line 876) | class CanineOnlyMLMHead(nn.Module): method __init__ (line 877) | def __init__(self, config): method forward (line 881) | def forward( class CaninePreTrainedModel (line 889) | class CaninePreTrainedModel(PreTrainedModel): method _init_weights (line 901) | def _init_weights(self, module): method _set_gradient_checkpointing (line 917) | def _set_gradient_checkpointing(self, module, value=False): class CanineModel (line 987) | class CanineModel(CaninePreTrainedModel): method __init__ (line 988) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 1018) | def _prune_heads(self, heads_to_prune): method _create_3d_attention_mask_from_input_mask (line 1026) | def _create_3d_attention_mask_from_input_mask(self, from_tensor, to_ma... method _downsample_attention_mask (line 1053) | def _downsample_attention_mask(self, char_attention_mask: torch.Tensor... method _repeat_molecules (line 1070) | def _repeat_molecules(self, molecules: torch.Tensor, char_seq_length: ... method forward (line 1102) | def forward( class CanineForSequenceClassification (line 1265) | class CanineForSequenceClassification(CaninePreTrainedModel): method __init__ (line 1266) | def __init__(self, config): method forward (line 1284) | def forward( class CanineForMultipleChoice (line 1363) | class CanineForMultipleChoice(CaninePreTrainedModel): method __init__ (line 1364) | def __init__(self, config): method forward (line 1381) | def forward( class CanineForTokenClassification (line 1455) | class CanineForTokenClassification(CaninePreTrainedModel): method __init__ (line 1456) | def __init__(self, config): method forward (line 1474) | def forward( class CanineForQuestionAnswering (line 1534) | class CanineForQuestionAnswering(CaninePreTrainedModel): method __init__ (line 1535) | def __init__(self, config): method forward (line 1552) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/canine/tokenization_canine.py class CanineTokenizer (line 63) | class CanineTokenizer(PreTrainedTokenizer): method __init__ (line 79) | def __init__( method vocab_size (line 126) | def vocab_size(self) -> int: method _tokenize (line 129) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 133) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 140) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 152) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 155) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 182) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 210) | def create_token_type_ids_from_sequences( method save_vocabulary (line 242) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/clip/configuration_clip.py class CLIPTextConfig (line 40) | class CLIPTextConfig(PretrainedConfig): method __init__ (line 96) | def __init__( method from_pretrained (line 131) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPVisionConfig (line 148) | class CLIPVisionConfig(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 CLIPConfig (line 254) | class CLIPConfig(PretrainedConfig): method __init__ (line 302) | def __init__( method from_text_vision_configs (line 328) | def from_text_vision_configs(cls, text_config: CLIPTextConfig, vision_... method to_dict (line 339) | def to_dict(self): class CLIPOnnxConfig (line 353) | class CLIPOnnxConfig(OnnxConfig): method inputs (line 355) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 365) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 376) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 379) | def generate_dummy_inputs( method default_onnx_opset (line 396) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/clip/feature_extraction_clip.py class CLIPFeatureExtractor (line 32) | class CLIPFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractio... method __init__ (line 66) | def __init__( method __call__ (line 90) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/clip/modeling_clip.py function _expand_mask (line 49) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 65) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 69) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class CLIPOutput (line 76) | class CLIPOutput(ModelOutput): method to_tuple (line 105) | def to_tuple(self) -> Tuple[Any]: class CLIPVisionEmbeddings (line 112) | class CLIPVisionEmbeddings(nn.Module): method __init__ (line 113) | def __init__(self, config: CLIPVisionConfig): method forward (line 131) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class CLIPTextEmbeddings (line 142) | class CLIPTextEmbeddings(nn.Module): method __init__ (line 143) | def __init__(self, config: CLIPTextConfig): method forward (line 153) | def forward( class CLIPAttention (line 173) | class CLIPAttention(nn.Module): method __init__ (line 176) | 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 CLIPMLP (line 277) | class CLIPMLP(nn.Module): method __init__ (line 278) | def __init__(self, config): method forward (line 285) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CLIPEncoderLayer (line 292) | class CLIPEncoderLayer(nn.Module): method __init__ (line 293) | def __init__(self, config: CLIPConfig): method forward (line 301) | def forward( class CLIPPreTrainedModel (line 342) | class CLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 353) | def _init_weights(self, module): method _set_gradient_checkpointing (line 396) | def _set_gradient_checkpointing(self, module, value=False): class CLIPEncoder (line 497) | class CLIPEncoder(nn.Module): method __init__ (line 506) | def __init__(self, config: CLIPConfig): method forward (line 512) | def forward( class CLIPTextTransformer (line 600) | class CLIPTextTransformer(nn.Module): method __init__ (line 601) | def __init__(self, config: CLIPTextConfig): method forward (line 611) | def forward( method _build_causal_attention_mask (line 678) | def _build_causal_attention_mask(self, bsz, seq_len, dtype): class CLIPTextModel (line 688) | class CLIPTextModel(CLIPPreTrainedModel): method __init__ (line 693) | def __init__(self, config: CLIPTextConfig): method get_input_embeddings (line 699) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 702) | def set_input_embeddings(self, value): method forward (line 707) | def forward( class CLIPVisionTransformer (line 743) | class CLIPVisionTransformer(nn.Module): method __init__ (line 744) | def __init__(self, config: CLIPVisionConfig): method forward (line 756) | def forward( class CLIPVisionModel (line 801) | class CLIPVisionModel(CLIPPreTrainedModel): method __init__ (line 805) | def __init__(self, config: CLIPVisionConfig): method get_input_embeddings (line 811) | def get_input_embeddings(self) -> nn.Module: method forward (line 816) | def forward( class CLIPModel (line 854) | class CLIPModel(CLIPPreTrainedModel): method __init__ (line 857) | def __init__(self, config: CLIPConfig): method get_text_features (line 890) | def get_text_features( method get_image_features (line 937) | def get_image_features( method forward (line 987) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/clip/modeling_flax_clip.py class FlaxCLIPOutput (line 159) | class FlaxCLIPOutput(ModelOutput): method to_tuple (line 187) | def to_tuple(self) -> Tuple[Any]: class FlaxCLIPVisionEmbeddings (line 194) | class FlaxCLIPVisionEmbeddings(nn.Module): method setup (line 198) | def setup(self): method __call__ (line 220) | def __call__(self, pixel_values): class FlaxCLIPTextEmbeddings (line 232) | class FlaxCLIPTextEmbeddings(nn.Module): method setup (line 236) | def setup(self): method __call__ (line 247) | def __call__(self, input_ids, position_ids): class FlaxCLIPAttention (line 255) | class FlaxCLIPAttention(nn.Module): method setup (line 259) | def setup(self): method _split_heads (line 280) | def _split_heads(self, hidden_states): method _merge_heads (line 283) | def _merge_heads(self, hidden_states): method __call__ (line 286) | def __call__( class FlaxCLIPMLP (line 346) | class FlaxCLIPMLP(nn.Module): method setup (line 350) | def setup(self): method __call__ (line 359) | def __call__(self, hidden_states): class FlaxCLIPEncoderLayer (line 366) | class FlaxCLIPEncoderLayer(nn.Module): method setup (line 370) | def setup(self): method __call__ (line 376) | def __call__( class FlaxCLIPLayerCollection (line 408) | class FlaxCLIPLayerCollection(nn.Module): method setup (line 412) | def setup(self): method __call__ (line 418) | def __call__( class FlaxCLIPEncoder (line 455) | class FlaxCLIPEncoder(nn.Module): method setup (line 459) | def setup(self): method __call__ (line 462) | def __call__( class FlaxCLIPTextTransformer (line 481) | class FlaxCLIPTextTransformer(nn.Module): method setup (line 485) | def setup(self): method __call__ (line 490) | def __call__( class FlaxCLIPVisionTransformer (line 535) | class FlaxCLIPVisionTransformer(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 545) | def __call__( class FlaxCLIPTextPreTrainedModel (line 585) | class FlaxCLIPTextPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 589) | def __init__( method init_weights (line 601) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 622) | def __call__( class FlaxCLIPVisionPreTrainedModel (line 664) | class FlaxCLIPVisionPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 669) | def __init__( method init_weights (line 683) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 702) | def __call__( class FlaxCLIPPreTrainedModel (line 736) | class FlaxCLIPPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 740) | def __init__( method init_weights (line 754) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 777) | def __call__( method get_text_features (line 822) | def get_text_features( method get_image_features (line 889) | def get_image_features( class FlaxCLIPTextModule (line 941) | class FlaxCLIPTextModule(nn.Module): method setup (line 945) | def setup(self): method __call__ (line 948) | def __call__( class FlaxCLIPTextModel (line 969) | class FlaxCLIPTextModel(FlaxCLIPTextPreTrainedModel): class FlaxCLIPVisionModule (line 998) | class FlaxCLIPVisionModule(nn.Module): method setup (line 1002) | def setup(self): method __call__ (line 1005) | def __call__( class FlaxCLIPVisionModel (line 1022) | class FlaxCLIPVisionModel(FlaxCLIPVisionPreTrainedModel): class FlaxCLIPModule (line 1056) | class FlaxCLIPModule(nn.Module): method setup (line 1060) | def setup(self): method __call__ (line 1088) | def __call__( class FlaxCLIPModel (line 1148) | class FlaxCLIPModel(FlaxCLIPPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/clip/modeling_tf_clip.py function _expand_mask (line 62) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 77) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function clip_loss (line 85) | def clip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFCLIPOutput (line 92) | class TFCLIPOutput(ModelOutput): method to_tuple (line 122) | def to_tuple(self) -> Tuple[Any]: class TFCLIPVisionEmbeddings (line 129) | class TFCLIPVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 130) | def __init__(self, config: CLIPVisionConfig, **kwargs): method build (line 153) | def build(self, input_shape: tf.TensorShape): method call (line 174) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFCLIPTextEmbeddings (line 199) | class TFCLIPTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 200) | def __init__(self, config: CLIPTextConfig, **kwargs): method build (line 208) | def build(self, input_shape: tf.TensorShape): method call (line 228) | def call( class TFCLIPAttention (line 268) | class TFCLIPAttention(tf.keras.layers.Layer): method __init__ (line 271) | def __init__(self, config: CLIPConfig, **kwargs): method transpose_for_scores (line 306) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 313) | def call( class TFCLIPMLP (line 367) | class TFCLIPMLP(tf.keras.layers.Layer): method __init__ (line 368) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 384) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCLIPEncoderLayer (line 392) | class TFCLIPEncoderLayer(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 402) | def call( class TFCLIPEncoder (line 444) | class TFCLIPEncoder(tf.keras.layers.Layer): method __init__ (line 453) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 458) | def call( class TFCLIPTextTransformer (line 499) | class TFCLIPTextTransformer(tf.keras.layers.Layer): method __init__ (line 500) | def __init__(self, config: CLIPTextConfig, **kwargs): method call (line 509) | def call( method _build_causal_attention_mask (line 564) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... class TFCLIPTextMainLayer (line 584) | class TFCLIPTextMainLayer(tf.keras.layers.Layer): method __init__ (line 587) | def __init__(self, config: CLIPTextConfig, **kwargs): method get_input_embeddings (line 592) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 595) | def set_input_embeddings(self, value: tf.Variable): method call (line 600) | def call( class TFCLIPVisionTransformer (line 631) | class TFCLIPVisionTransformer(tf.keras.layers.Layer): method __init__ (line 632) | def __init__(self, config: CLIPVisionConfig, **kwargs): method call (line 640) | def call( class TFCLIPVisionMainLayer (line 678) | class TFCLIPVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 681) | def __init__(self, config: CLIPVisionConfig, **kwargs): method get_input_embeddings (line 686) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 690) | def call( class TFCLIPMainLayer (line 714) | class TFCLIPMainLayer(tf.keras.layers.Layer): method __init__ (line 717) | def __init__(self, config: CLIPConfig, **kwargs): method build (line 756) | def build(self, input_shape: tf.TensorShape): method get_text_features (line 768) | def get_text_features( method get_image_features (line 803) | def get_image_features( method call (line 828) | def call( class TFCLIPPreTrainedModel (line 904) | class TFCLIPPreTrainedModel(TFPreTrainedModel): class TFCLIPTextModel (line 1056) | class TFCLIPTextModel(TFCLIPPreTrainedModel): method __init__ (line 1059) | def __init__(self, config: CLIPTextConfig, *inputs, **kwargs): method call (line 1067) | def call( method serving (line 1115) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFBaseModelOutputWi... method serving_output (line 1119) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFCLIPVisionModel (line 1131) | class TFCLIPVisionModel(TFCLIPPreTrainedModel): method __init__ (line 1135) | def __init__(self, config: CLIPVisionConfig, *inputs, **kwargs): method dummy_inputs (line 1141) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1160) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFBaseModelOutputWi... method call (line 1175) | def call( method serving_output (line 1216) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFCLIPModel (line 1229) | class TFCLIPModel(TFCLIPPreTrainedModel): method __init__ (line 1232) | def __init__(self, config: CLIPConfig, *inputs, **kwargs): method dummy_inputs (line 1238) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1263) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFCLIPOutput: method get_text_features (line 1277) | def get_text_features( method get_image_features (line 1317) | def get_image_features( method call (line 1360) | def call( method serving_output (line 1411) | def serving_output(self, output: TFCLIPOutput) -> TFCLIPOutput: FILE: benchmark/third_party/transformers/src/transformers/models/clip/processing_clip.py class CLIPProcessor (line 22) | class CLIPProcessor(ProcessorMixin): method __init__ (line 38) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 42) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 95) | def batch_decode(self, *args, **kwargs): method decode (line 102) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/clip/tokenization_clip.py function bytes_to_unicode (line 56) | def bytes_to_unicode(): function get_pairs (line 80) | def get_pairs(word): function whitespace_clean (line 94) | def whitespace_clean(text): function whitespace_tokenize (line 101) | def whitespace_tokenize(text): class BasicTokenizer (line 111) | class BasicTokenizer(object): method __init__ (line 131) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 139) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 176) | def _run_strip_accents(self, text): method _run_split_on_punc (line 187) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 209) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 222) | def _is_chinese_char(self, cp): method _clean_text (line 246) | def _clean_text(self, text): class CLIPTokenizer (line 260) | class CLIPTokenizer(PreTrainedTokenizer): method __init__ (line 289) | def __init__( method vocab_size (line 340) | def vocab_size(self): method get_vocab (line 343) | def get_vocab(self): method build_inputs_with_special_tokens (line 346) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 373) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 401) | def create_token_type_ids_from_sequences( method bpe (line 424) | def bpe(self, token): method _tokenize (line 466) | def _tokenize(self, text): method _convert_token_to_id (line 481) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 485) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 489) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 496) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/clip/tokenization_clip_fast.py class CLIPTokenizerFast (line 50) | class CLIPTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 78) | def __init__( method _wrap_decode_method_backend_tokenizer (line 113) | def _wrap_decode_method_backend_tokenizer(self): method build_inputs_with_special_tokens (line 123) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 150) | def create_token_type_ids_from_sequences( method save_vocabulary (line 173) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/codegen/configuration_codegen.py class CodeGenConfig (line 44) | class CodeGenConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class CodeGenOnnxConfig (line 158) | class CodeGenOnnxConfig(OnnxConfigWithPast): method __init__ (line 159) | def __init__( method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 183) | def num_layers(self) -> int: method num_attention_heads (line 187) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 190) | def generate_dummy_inputs( method default_onnx_opset (line 235) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/codegen/modeling_codegen.py function fixed_pos_embedding (line 56) | def fixed_pos_embedding(x, seq_dim=1, seq_len=None): function rotate_every_two (line 68) | def rotate_every_two(x): function duplicate_interleave (line 76) | def duplicate_interleave(m): function apply_rotary_pos_emb (line 88) | def apply_rotary_pos_emb(x, sincos, offset=0): class CodeGenAttention (line 94) | class CodeGenAttention(nn.Module): method __init__ (line 95) | def __init__(self, config): method _split_heads (line 125) | def _split_heads(self, x, n_head, dim_head, mp_num): method _merge_heads (line 130) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 143) | def _attn( method forward (line 185) | def forward( class CodeGenMLP (line 265) | class CodeGenMLP(nn.Module): method __init__ (line 266) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 276) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class CodeGenBlock (line 285) | class CodeGenBlock(nn.Module): method __init__ (line 286) | def __init__(self, config): method forward (line 293) | def forward( class CodeGenPreTrainedModel (line 326) | class CodeGenPreTrainedModel(PreTrainedModel): method __init__ (line 337) | def __init__(self, *inputs, **kwargs): method _init_weights (line 340) | def _init_weights(self, module): method _set_gradient_checkpointing (line 356) | def _set_gradient_checkpointing(self, module, value=False): class CodeGenModel (line 426) | class CodeGenModel(CodeGenPreTrainedModel): method __init__ (line 427) | def __init__(self, config): method get_input_embeddings (line 443) | def get_input_embeddings(self): method set_input_embeddings (line 446) | def set_input_embeddings(self, new_embeddings): method forward (line 456) | def forward( class CodeGenForCausalLM (line 618) | class CodeGenForCausalLM(CodeGenPreTrainedModel): method __init__ (line 621) | def __init__(self, config): 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 prepare_inputs_for_generation (line 635) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method forward (line 670) | def forward( method _reorder_cache (line 737) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... FILE: benchmark/third_party/transformers/src/transformers/models/codegen/tokenization_codegen.py function bytes_to_unicode (line 61) | def bytes_to_unicode(): function get_pairs (line 85) | def get_pairs(word): class CodeGenTokenizer (line 99) | class CodeGenTokenizer(PreTrainedTokenizer): method __init__ (line 152) | def __init__( method vocab_size (line 198) | def vocab_size(self): method get_vocab (line 201) | def get_vocab(self): method bpe (line 204) | def bpe(self, token): method build_inputs_with_special_tokens (line 246) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... 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 prepare_for_tokenization (line 312) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method decode (line 318) | def decode( method truncate (line 361) | def truncate(self, completion, truncate_before_pattern): FILE: benchmark/third_party/transformers/src/transformers/models/codegen/tokenization_codegen_fast.py class CodeGenTokenizerFast (line 63) | class CodeGenTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 120) | def __init__( method _batch_encode_plus (line 161) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 170) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 180) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method decode (line 184) | def decode( method truncate (line 228) | def truncate(self, completion, truncate_before_pattern): FILE: benchmark/third_party/transformers/src/transformers/models/conditional_detr/configuration_conditional_detr.py class ConditionalDetrConfig (line 36) | class ConditionalDetrConfig(PretrainedConfig): method __init__ (line 137) | def __init__( method num_attention_heads (line 215) | def num_attention_heads(self) -> int: method hidden_size (line 219) | def hidden_size(self) -> int: class ConditionalDetrOnnxConfig (line 223) | class ConditionalDetrOnnxConfig(OnnxConfig): method inputs (line 228) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 237) | def atol_for_validation(self) -> float: method default_onnx_opset (line 241) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 178) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 183) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 195) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 215) | def prepare_img(): function convert_conditional_detr_checkpoint (line 223) | def convert_conditional_detr_checkpoint(model_name, pytorch_dump_folder_... FILE: benchmark/third_party/transformers/src/transformers/models/conditional_detr/feature_extraction_conditional_detr.py function center_to_corners_format (line 40) | def center_to_corners_format(x): function corners_to_center_format (line 51) | def corners_to_center_format(x): function masks_to_boxes (line 63) | def masks_to_boxes(masks): function rgb_to_id (line 97) | def rgb_to_id(color): function binary_mask_to_rle (line 106) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 128) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 150) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 179) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 198) | def compute_segments( class ConditionalDetrFeatureExtractor (line 258) | class ConditionalDetrFeatureExtractor(FeatureExtractionMixin, ImageFeatu... method __init__ (line 290) | def __init__( method _is_valid_format (line 311) | def _is_valid_format(self, format): method prepare (line 317) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 328) | def convert_coco_poly_to_mask(self, segmentations, height, width): method prepare_coco_detection (line 352) | def prepare_coco_detection(self, image, target, return_segmentation_ma... method prepare_coco_panoptic (line 417) | def prepare_coco_panoptic(self, image, target, masks_path, return_mask... method _resize (line 451) | def _resize(self, image, size, target=None, max_size=None): method _normalize (line 522) | def _normalize(self, image, mean, std, target=None): method __call__ (line 545) | def __call__( method _max_by_axis (line 776) | def _max_by_axis(self, the_list): method pad_and_create_pixel_mask (line 785) | def pad_and_create_pixel_mask( method post_process (line 827) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 873) | def post_process_object_detection( method post_process_semantic_segmentation (line 928) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 978) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1064) | def post_process_panoptic_segmentation( FILE: benchmark/third_party/transformers/src/transformers/models/conditional_detr/modeling_conditional_detr.py class ConditionalDetrDecoderOutput (line 61) | class ConditionalDetrDecoderOutput(BaseModelOutputWithCrossAttentions): class ConditionalDetrModelOutput (line 93) | class ConditionalDetrModelOutput(Seq2SeqModelOutput): class ConditionalDetrObjectDetectionOutput (line 136) | class ConditionalDetrObjectDetectionOutput(ModelOutput): class ConditionalDetrSegmentationOutput (line 200) | class ConditionalDetrSegmentationOutput(ModelOutput): class ConditionalDetrFrozenBatchNorm2d (line 270) | class ConditionalDetrFrozenBatchNorm2d(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 310) | def replace_batch_norm(m, name=""): class ConditionalDetrTimmConvEncoder (line 326) | class ConditionalDetrTimmConvEncoder(nn.Module): method __init__ (line 334) | def __init__(self, name: str, dilation: bool, use_pretrained_backbone:... method forward (line 362) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class ConditionalDetrConvModel (line 375) | class ConditionalDetrConvModel(nn.Module): method __init__ (line 380) | def __init__(self, conv_encoder, position_embedding): method forward (line 385) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 397) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class ConditionalDetrSinePositionEmbedding (line 412) | class ConditionalDetrSinePositionEmbedding(nn.Module): method __init__ (line 418) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 429) | def forward(self, pixel_values, pixel_mask): class ConditionalDetrLearnedPositionEmbedding (line 450) | class ConditionalDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 455) | def __init__(self, embedding_dim=256): method forward (line 460) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 474) | def build_position_encoding(config): function gen_sine_position_embeddings (line 488) | def gen_sine_position_embeddings(pos_tensor): function inverse_sigmoid (line 502) | def inverse_sigmoid(x, eps=1e-5): class DetrAttention (line 510) | class DetrAttention(nn.Module): method __init__ (line 517) | def __init__( method _shape (line 542) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 545) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 548) | def forward( class ConditionalDetrAttention (line 641) | class ConditionalDetrAttention(nn.Module): method __init__ (line 649) | def __init__( method _qk_shape (line 678) | def _qk_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method _v_shape (line 681) | def _v_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 684) | def forward( class ConditionalDetrEncoderLayer (line 759) | class ConditionalDetrEncoderLayer(nn.Module): method __init__ (line 760) | def __init__(self, config: ConditionalDetrConfig): method forward (line 776) | def forward( class ConditionalDetrDecoderLayer (line 829) | class ConditionalDetrDecoderLayer(nn.Module): method __init__ (line 830) | def __init__(self, config: ConditionalDetrConfig): method forward (line 871) | def forward( class ConditionalDetrClassificationHead (line 1001) | class ConditionalDetrClassificationHead(nn.Module): method __init__ (line 1004) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 1010) | def forward(self, hidden_states: torch.Tensor): class MLP (line 1020) | class MLP(nn.Module): method __init__ (line 1029) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1035) | def forward(self, x): class ConditionalDetrPreTrainedModel (line 1042) | class ConditionalDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1047) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1070) | def _set_gradient_checkpointing(self, module, value=False): class ConditionalDetrEncoder (line 1131) | class ConditionalDetrEncoder(ConditionalDetrPreTrainedModel): method __init__ (line 1146) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1159) | def forward( class ConditionalDetrDecoder (line 1240) | class ConditionalDetrDecoder(ConditionalDetrPreTrainedModel): method __init__ (line 1255) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1275) | def forward( class ConditionalDetrModel (line 1462) | class ConditionalDetrModel(ConditionalDetrPreTrainedModel): method __init__ (line 1463) | def __init__(self, config: ConditionalDetrConfig): method get_encoder (line 1484) | def get_encoder(self): method get_decoder (line 1487) | def get_decoder(self): method freeze_backbone (line 1490) | def freeze_backbone(self): method unfreeze_backbone (line 1494) | def unfreeze_backbone(self): method forward (line 1500) | def forward( class ConditionalDetrForObjectDetection (line 1633) | class ConditionalDetrForObjectDetection(ConditionalDetrPreTrainedModel): method __init__ (line 1634) | def __init__(self, config: ConditionalDetrConfig): method _set_aux_loss (line 1653) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1661) | def forward( class ConditionalDetrForSegmentation (line 1821) | class ConditionalDetrForSegmentation(ConditionalDetrPreTrainedModel): method __init__ (line 1822) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1845) | def forward( function _expand (line 2055) | def _expand(tensor, length: int): class ConditionalDetrMaskHeadSmallConv (line 2060) | class ConditionalDetrMaskHeadSmallConv(nn.Module): method __init__ (line 2065) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 2099) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class ConditionalDetrMHAttentionMap (line 2141) | class ConditionalDetrMHAttentionMap(nn.Module): method __init__ (line 2144) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 2155) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 2170) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2190) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class ConditionalDetrLoss (line 2221) | class ConditionalDetrLoss(nn.Module): method __init__ (line 2239) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2247) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2282) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2298) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2323) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2357) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2364) | def _get_target_permutation_idx(self, indices): method get_loss (line 2371) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2383) | def forward(self, outputs, targets): class ConditionalDetrMLPPredictionHead (line 2429) | class ConditionalDetrMLPPredictionHead(nn.Module): method __init__ (line 2438) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2444) | def forward(self, x): class ConditionalDetrHungarianMatcher (line 2451) | class ConditionalDetrHungarianMatcher(nn.Module): method __init__ (line 2468) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2479) | def forward(self, outputs, targets): function _upcast (line 2532) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2541) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2558) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2575) | def generalized_box_iou(boxes1, boxes2): function center_to_corners_format (line 2600) | def center_to_corners_format(x): function _max_by_axis (line 2611) | def _max_by_axis(the_list): class NestedTensor (line 2621) | class NestedTensor(object): method __init__ (line 2622) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2626) | def to(self, device): method decompose (line 2635) | def decompose(self): method __repr__ (line 2638) | def __repr__(self): function nested_tensor_from_tensor_list (line 2643) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: benchmark/third_party/transformers/src/transformers/models/convbert/configuration_convbert.py class ConvBertConfig (line 37) | class ConvBertConfig(PretrainedConfig): method __init__ (line 101) | def __init__( class ConvBertOnnxConfig (line 154) | class ConvBertOnnxConfig(OnnxConfig): method inputs (line 156) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/convbert/modeling_convbert.py function load_tf_weights_in_convbert (line 57) | def load_tf_weights_in_convbert(model, config, tf_checkpoint_path): class ConvBertEmbeddings (line 181) | class ConvBertEmbeddings(nn.Module): method __init__ (line 184) | def __init__(self, config): method forward (line 200) | def forward( class ConvBertPreTrainedModel (line 239) | class ConvBertPreTrainedModel(PreTrainedModel): method _init_weights (line 252) | def _init_weights(self, module): method _set_gradient_checkpointing (line 268) | def _set_gradient_checkpointing(self, module, value=False): class SeparableConv1D (line 273) | class SeparableConv1D(nn.Module): method __init__ (line 276) | def __init__(self, config, input_filters, output_filters, kernel_size,... method forward (line 292) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertSelfAttention (line 299) | class ConvBertSelfAttention(nn.Module): method __init__ (line 300) | def __init__(self, config): method transpose_for_scores (line 339) | def transpose_for_scores(self, x): method forward (line 344) | def forward( class ConvBertSelfOutput (line 424) | class ConvBertSelfOutput(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 431) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertAttention (line 438) | class ConvBertAttention(nn.Module): method __init__ (line 439) | def __init__(self, config): method prune_heads (line 445) | def prune_heads(self, heads): method forward (line 463) | def forward( class GroupedLinearLayer (line 483) | class GroupedLinearLayer(nn.Module): method __init__ (line 484) | def __init__(self, input_size, output_size, num_groups): method forward (line 494) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertIntermediate (line 505) | class ConvBertIntermediate(nn.Module): method __init__ (line 506) | def __init__(self, config): method forward (line 519) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertOutput (line 525) | class ConvBertOutput(nn.Module): method __init__ (line 526) | def __init__(self, config): method forward (line 537) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertLayer (line 544) | class ConvBertLayer(nn.Module): method __init__ (line 545) | def __init__(self, config): method forward (line 559) | def forward( method feed_forward_chunk (line 599) | def feed_forward_chunk(self, attention_output): class ConvBertEncoder (line 605) | class ConvBertEncoder(nn.Module): method __init__ (line 606) | def __init__(self, config): method forward (line 612) | def forward( class ConvBertPredictionHeadTransform (line 680) | class ConvBertPredictionHeadTransform(nn.Module): method __init__ (line 681) | def __init__(self, config): method forward (line 690) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertModel (line 765) | class ConvBertModel(ConvBertPreTrainedModel): method __init__ (line 766) | def __init__(self, config): method get_input_embeddings (line 778) | def get_input_embeddings(self): method set_input_embeddings (line 781) | def set_input_embeddings(self, value): method _prune_heads (line 784) | def _prune_heads(self, heads_to_prune): method forward (line 799) | def forward( class ConvBertGeneratorPredictions (line 861) | class ConvBertGeneratorPredictions(nn.Module): method __init__ (line 864) | def __init__(self, config): method forward (line 870) | def forward(self, generator_hidden_states: torch.FloatTensor) -> torch... class ConvBertForMaskedLM (line 879) | class ConvBertForMaskedLM(ConvBertPreTrainedModel): method __init__ (line 880) | def __init__(self, config): method get_output_embeddings (line 890) | def get_output_embeddings(self): method set_output_embeddings (line 893) | def set_output_embeddings(self, word_embeddings): method forward (line 903) | def forward( class ConvBertClassificationHead (line 958) | class ConvBertClassificationHead(nn.Module): method __init__ (line 961) | def __init__(self, config): method forward (line 972) | def forward(self, hidden_states: torch.Tensor, **kwargs) -> torch.Tensor: class ConvBertForSequenceClassification (line 989) | class ConvBertForSequenceClassification(ConvBertPreTrainedModel): method __init__ (line 990) | def __init__(self, config): method forward (line 1007) | def forward( class ConvBertForMultipleChoice (line 1085) | class ConvBertForMultipleChoice(ConvBertPreTrainedModel): method __init__ (line 1086) | def __init__(self, config): method forward (line 1105) | def forward( class ConvBertForTokenClassification (line 1179) | class ConvBertForTokenClassification(ConvBertPreTrainedModel): method __init__ (line 1180) | def __init__(self, config): method forward (line 1201) | def forward( class ConvBertForQuestionAnswering (line 1261) | class ConvBertForQuestionAnswering(ConvBertPreTrainedModel): method __init__ (line 1262) | def __init__(self, config): method forward (line 1279) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/convbert/modeling_tf_convbert.py class TFConvBertEmbeddings (line 71) | class TFConvBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 74) | def __init__(self, config: ConvBertConfig, **kwargs): method build (line 85) | def build(self, input_shape: tf.TensorShape): method call (line 110) | def call( class TFConvBertSelfAttention (line 160) | class TFConvBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 161) | def __init__(self, config, **kwargs): method transpose_for_scores (line 222) | def transpose_for_scores(self, x, batch_size): method call (line 227) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFConvBertSelfOutput (line 311) | class TFConvBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 312) | def __init__(self, config, **kwargs): method call (line 321) | def call(self, hidden_states, input_tensor, training=False): class TFConvBertAttention (line 329) | class TFConvBertAttention(tf.keras.layers.Layer): method __init__ (line 330) | def __init__(self, config, **kwargs): method prune_heads (line 336) | def prune_heads(self, heads): method call (line 339) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... class GroupedLinearLayer (line 349) | class GroupedLinearLayer(tf.keras.layers.Layer): method __init__ (line 350) | def __init__(self, input_size, output_size, num_groups, kernel_initial... method build (line 359) | def build(self, input_shape): method call (line 371) | def call(self, hidden_states): class TFConvBertIntermediate (line 381) | class TFConvBertIntermediate(tf.keras.layers.Layer): method __init__ (line 382) | def __init__(self, config, **kwargs): method call (line 402) | def call(self, hidden_states): class TFConvBertOutput (line 409) | class TFConvBertOutput(tf.keras.layers.Layer): method __init__ (line 410) | def __init__(self, config, **kwargs): method call (line 428) | def call(self, hidden_states, input_tensor, training=False): class TFConvBertLayer (line 436) | class TFConvBertLayer(tf.keras.layers.Layer): method __init__ (line 437) | def __init__(self, config, **kwargs): method call (line 444) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFConvBertEncoder (line 456) | class TFConvBertEncoder(tf.keras.layers.Layer): method __init__ (line 457) | def __init__(self, config, **kwargs): method call (line 462) | def call( class TFConvBertPredictionHeadTransform (line 499) | class TFConvBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 500) | def __init__(self, config, **kwargs): method call (line 514) | def call(self, hidden_states): class TFConvBertMainLayer (line 523) | class TFConvBertMainLayer(tf.keras.layers.Layer): method __init__ (line 526) | def __init__(self, config, **kwargs): method get_input_embeddings (line 537) | def get_input_embeddings(self): method set_input_embeddings (line 540) | def set_input_embeddings(self, value): method _prune_heads (line 544) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 551) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 572) | def get_head_mask(self, head_mask): method call (line 581) | def call( class TFConvBertPreTrainedModel (line 629) | class TFConvBertPreTrainedModel(TFPreTrainedModel): class TFConvBertModel (line 741) | class TFConvBertModel(TFConvBertPreTrainedModel): method __init__ (line 742) | def __init__(self, config, *inputs, **kwargs): method call (line 755) | def call( method serving_output (line 783) | def serving_output(self, output): class TFConvBertMaskedLMHead (line 790) | class TFConvBertMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 791) | def __init__(self, config, input_embeddings, **kwargs): method build (line 798) | def build(self, input_shape): method get_output_embeddings (line 803) | def get_output_embeddings(self): method set_output_embeddings (line 806) | def set_output_embeddings(self, value): method get_bias (line 810) | def get_bias(self): method set_bias (line 813) | def set_bias(self, value): method call (line 817) | def call(self, hidden_states): class TFConvBertGeneratorPredictions (line 827) | class TFConvBertGeneratorPredictions(tf.keras.layers.Layer): method __init__ (line 828) | def __init__(self, config, **kwargs): method call (line 834) | def call(self, generator_hidden_states, training=False): class TFConvBertForMaskedLM (line 843) | class TFConvBertForMaskedLM(TFConvBertPreTrainedModel, TFMaskedLanguageM... method __init__ (line 844) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 858) | def get_lm_head(self): method get_prefix_bias_name (line 861) | def get_prefix_bias_name(self): method call (line 872) | def call( method serving_output (line 922) | def serving_output(self, output): class TFConvBertClassificationHead (line 929) | class TFConvBertClassificationHead(tf.keras.layers.Layer): method __init__ (line 932) | def __init__(self, config, **kwargs): method call (line 948) | def call(self, hidden_states, **kwargs): class TFConvBertForSequenceClassification (line 965) | class TFConvBertForSequenceClassification(TFConvBertPreTrainedModel, TFS... method __init__ (line 966) | def __init__(self, config, *inputs, **kwargs): method call (line 980) | def call( method serving_output (line 1027) | def serving_output(self, output): class TFConvBertForMultipleChoice (line 1041) | class TFConvBertForMultipleChoice(TFConvBertPreTrainedModel, TFMultipleC... method __init__ (line 1042) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1054) | def dummy_inputs(self): method call (line 1073) | def call( method serving (line 1146) | def serving(self, inputs): method serving_output (line 1151) | def serving_output(self, output): class TFConvBertForTokenClassification (line 1165) | class TFConvBertForTokenClassification(TFConvBertPreTrainedModel, TFToke... method __init__ (line 1166) | def __init__(self, config, *inputs, **kwargs): method call (line 1187) | def call( method serving_output (line 1233) | def serving_output(self, output): class TFConvBertForQuestionAnswering (line 1247) | class TFConvBertForQuestionAnswering(TFConvBertPreTrainedModel, TFQuesti... method __init__ (line 1248) | def __init__(self, config, *inputs, **kwargs): method call (line 1265) | def call( method serving_output (line 1326) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/convbert/tokenization_convbert.py function load_vocab (line 54) | def load_vocab(vocab_file): function whitespace_tokenize (line 66) | def whitespace_tokenize(text): class ConvBertTokenizer (line 76) | class ConvBertTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method do_lower_case (line 170) | def do_lower_case(self): method vocab_size (line 174) | def vocab_size(self): method get_vocab (line 177) | def get_vocab(self): method _tokenize (line 180) | def _tokenize(self, text): method _convert_token_to_id (line 194) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 198) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 202) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 207) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 232) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 260) | def create_token_type_ids_from_sequences( method save_vocabulary (line 289) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 311) | class BasicTokenizer(object): method __init__ (line 331) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 339) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 376) | def _run_strip_accents(self, text): method _run_split_on_punc (line 387) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 409) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 422) | def _is_chinese_char(self, cp): method _clean_text (line 446) | def _clean_text(self, text): class WordpieceTokenizer (line 461) | class WordpieceTokenizer(object): method __init__ (line 464) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 469) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/convbert/tokenization_convbert_fast.py class ConvBertTokenizerFast (line 55) | class ConvBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 101) | def __init__( method build_inputs_with_special_tokens (line 143) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 167) | def create_token_type_ids_from_sequences( method save_vocabulary (line 196) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/convnext/configuration_convnext.py class ConvNextConfig (line 35) | class ConvNextConfig(PretrainedConfig): method __init__ (line 83) | def __init__( class ConvNextOnnxConfig (line 114) | class ConvNextOnnxConfig(OnnxConfig): method inputs (line 119) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 127) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/convnext/convert_convnext_to_pytorch.py function get_convnext_config (line 37) | def get_convnext_config(checkpoint_url): function rename_key (line 82) | def rename_key(name): function prepare_img (line 115) | def prepare_img(): function convert_convnext_checkpoint (line 122) | def convert_convnext_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/convnext/feature_extraction_convnext.py class ConvNextFeatureExtractor (line 38) | class ConvNextFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtra... method __init__ (line 70) | def __init__( method __call__ (line 90) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/convnext/modeling_convnext.py function drop_path (line 57) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class ConvNextDropPath (line 78) | class ConvNextDropPath(nn.Module): method __init__ (line 81) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 85) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 88) | def extra_repr(self) -> str: class ConvNextLayerNorm (line 92) | class ConvNextLayerNorm(nn.Module): method __init__ (line 98) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 108) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNextEmbeddings (line 122) | class ConvNextEmbeddings(nn.Module): method __init__ (line 127) | def __init__(self, config): method forward (line 135) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ConvNextLayer (line 146) | class ConvNextLayer(nn.Module): method __init__ (line 160) | def __init__(self, config, dim, drop_path=0): method forward (line 174) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextStage (line 190) | class ConvNextStage(nn.Module): method __init__ (line 201) | def __init__(self, config, in_channels, out_channels, kernel_size=2, s... method forward (line 216) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextEncoder (line 222) | class ConvNextEncoder(nn.Module): method __init__ (line 223) | def __init__(self, config): method forward (line 243) | def forward( class ConvNextPreTrainedModel (line 269) | class ConvNextPreTrainedModel(PreTrainedModel): method _init_weights (line 280) | def _init_weights(self, module): method _set_gradient_checkpointing (line 292) | def _set_gradient_checkpointing(self, module, value=False): class ConvNextModel (line 326) | class ConvNextModel(ConvNextPreTrainedModel): method __init__ (line 327) | def __init__(self, config): method forward (line 349) | def forward( class ConvNextForImageClassification (line 393) | class ConvNextForImageClassification(ConvNextPreTrainedModel): method __init__ (line 394) | def __init__(self, config): method forward (line 416) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/convnext/modeling_tf_convnext.py class TFConvNextDropPath (line 46) | class TFConvNextDropPath(tf.keras.layers.Layer): method __init__ (line 52) | def __init__(self, drop_path, **kwargs): method call (line 56) | def call(self, x, training=None): class TFConvNextEmbeddings (line 66) | class TFConvNextEmbeddings(tf.keras.layers.Layer): method __init__ (line 71) | def __init__(self, config, **kwargs): method call (line 84) | def call(self, pixel_values): class TFConvNextLayer (line 104) | class TFConvNextLayer(tf.keras.layers.Layer): method __init__ (line 119) | def __init__(self, config, dim, drop_path=0.0, **kwargs): method build (line 157) | def build(self, input_shape: tf.TensorShape): method call (line 171) | def call(self, hidden_states, training=False): class TFConvNextStage (line 186) | class TFConvNextStage(tf.keras.layers.Layer): method __init__ (line 197) | def __init__( method call (line 235) | def call(self, hidden_states): class TFConvNextEncoder (line 243) | class TFConvNextEncoder(tf.keras.layers.Layer): method __init__ (line 244) | def __init__(self, config, **kwargs): method call (line 265) | def call(self, hidden_states, output_hidden_states=False, return_dict=... class TFConvNextMainLayer (line 284) | class TFConvNextMainLayer(tf.keras.layers.Layer): method __init__ (line 287) | def __init__(self, config: ConvNextConfig, add_pooling_layer: bool = T... method call (line 299) | def call( class TFConvNextPreTrainedModel (line 343) | class TFConvNextPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 354) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 379) | def serving(self, inputs): class TFConvNextModel (line 452) | class TFConvNextModel(TFConvNextPreTrainedModel): method __init__ (line 453) | def __init__(self, config, *inputs, add_pooling_layer=True, **kwargs): method call (line 460) | def call( method serving_output (line 511) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFConvNextForImageClassification (line 527) | class TFConvNextForImageClassification(TFConvNextPreTrainedModel, TFSequ... method __init__ (line 528) | def __init__(self, config: ConvNextConfig, *inputs, **kwargs): method call (line 545) | def call( method serving_output (line 612) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... FILE: benchmark/third_party/transformers/src/transformers/models/cpm/tokenization_cpm.py class CpmTokenizer (line 38) | class CpmTokenizer(PreTrainedTokenizer): method __init__ (line 41) | def __init__( method vocab_size (line 162) | def vocab_size(self): method get_vocab (line 166) | def get_vocab(self): method __getstate__ (line 172) | def __getstate__(self): method __setstate__ (line 178) | def __setstate__(self, d): method preprocess_text (line 189) | def preprocess_text(self, inputs): method _tokenize (line 205) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 226) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 231) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 236) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 242) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 268) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 297) | def create_token_type_ids_from_sequences( method save_vocabulary (line 328) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _decode (line 345) | def _decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/cpm/tokenization_cpm_fast.py class CpmTokenizerFast (line 38) | class CpmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 41) | def __init__( method build_inputs_with_special_tokens (line 157) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 183) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _batch_encode_plus (line 233) | def _batch_encode_plus(self, batch_text_or_text_pairs, *args, **kwargs): method _decode (line 240) | def _decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/ctrl/configuration_ctrl.py class CTRLConfig (line 26) | class CTRLConfig(PretrainedConfig): method __init__ (line 89) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/ctrl/modeling_ctrl.py function angle_defn (line 42) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 47) | def positional_encoding(position, d_model_size, dtype): function scaled_dot_product_attention (line 62) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class MultiHeadAttention (line 88) | class MultiHeadAttention(nn.Module): method __init__ (line 89) | def __init__(self, d_model_size, num_heads): method prune_heads (line 103) | def prune_heads(self, heads): method split_into_heads (line 120) | def split_into_heads(self, x, batch_size): method forward (line 124) | def forward( function point_wise_feed_forward_network (line 167) | def point_wise_feed_forward_network(d_model_size, dff): class EncoderLayer (line 171) | class EncoderLayer(nn.Module): method __init__ (line 172) | def __init__(self, d_model_size, num_heads, dff, rate=0.1): method forward (line 184) | def forward( class CTRLPreTrainedModel (line 212) | class CTRLPreTrainedModel(PreTrainedModel): method _init_weights (line 221) | def _init_weights(self, module): class CTRLModel (line 319) | class CTRLModel(CTRLPreTrainedModel): method __init__ (line 320) | def __init__(self, config): method get_input_embeddings (line 339) | def get_input_embeddings(self): method set_input_embeddings (line 342) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 345) | def _prune_heads(self, heads_to_prune): method forward (line 354) | def forward( class CTRLLMHeadModel (line 511) | class CTRLLMHeadModel(CTRLPreTrainedModel): method __init__ (line 512) | def __init__(self, config): method get_output_embeddings (line 520) | def get_output_embeddings(self): method set_output_embeddings (line 523) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 526) | def prepare_inputs_for_generation(self, input_ids, past=None, use_cach... method forward (line 535) | def forward( method _reorder_cache (line 625) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class CTRLForSequenceClassification (line 649) | class CTRLForSequenceClassification(CTRLPreTrainedModel): method __init__ (line 650) | def __init__(self, config): method forward (line 661) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/ctrl/modeling_tf_ctrl.py function angle_defn (line 52) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 57) | def positional_encoding(position, d_model_size): function scaled_dot_product_attention (line 68) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class TFMultiHeadAttention (line 94) | class TFMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 95) | def __init__(self, d_model_size, num_heads, output_attentions=False, *... method split_into_heads (line 109) | def split_into_heads(self, x, batch_size): method call (line 113) | def call(self, v, k, q, mask, layer_past, attention_mask, head_mask, u... class TFPointWiseFeedForwardLayer (line 147) | class TFPointWiseFeedForwardLayer(tf.keras.layers.Layer): method __init__ (line 148) | def __init__(self, d_model_size, dff, **kwargs): method call (line 154) | def call(self, inputs, trainable=False): class TFEncoderLayer (line 161) | class TFEncoderLayer(tf.keras.layers.Layer): method __init__ (line 162) | def __init__( method call (line 180) | def call(self, x, mask, layer_past, attention_mask, head_mask, use_cac... class TFCTRLMainLayer (line 208) | class TFCTRLMainLayer(tf.keras.layers.Layer): method __init__ (line 211) | def __init__(self, config, **kwargs): method get_input_embeddings (line 244) | def get_input_embeddings(self): method set_input_embeddings (line 247) | def set_input_embeddings(self, value): method _prune_heads (line 251) | def _prune_heads(self, heads_to_prune): method call (line 258) | def call( class TFCTRLPreTrainedModel (line 409) | class TFCTRLPreTrainedModel(TFPreTrainedModel): class TFCTRLModel (line 532) | class TFCTRLModel(TFCTRLPreTrainedModel): method __init__ (line 533) | def __init__(self, config, *inputs, **kwargs): method call (line 545) | def call( method serving_output (line 576) | def serving_output(self, output): class TFCTRLLMHead (line 586) | class TFCTRLLMHead(tf.keras.layers.Layer): method __init__ (line 587) | def __init__(self, config, input_embeddings, **kwargs): method build (line 597) | def build(self, input_shape): method get_output_embeddings (line 601) | def get_output_embeddings(self): method set_output_embeddings (line 604) | def set_output_embeddings(self, value): method get_bias (line 608) | def get_bias(self): method set_bias (line 611) | def set_bias(self, value): method call (line 615) | def call(self, hidden_states): class TFCTRLLMHeadModel (line 628) | class TFCTRLLMHeadModel(TFCTRLPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 629) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 637) | def get_lm_head(self): method get_prefix_bias_name (line 640) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 644) | def prepare_inputs_for_generation(self, input_ids, past=None, use_cach... method call (line 659) | def call( method serving_output (line 718) | def serving_output(self, output): method _reorder_cache (line 726) | def _reorder_cache(past: Tuple[Tuple[tf.Tensor]], beam_idx: tf.Tensor)... class TFCTRLForSequenceClassification (line 747) | class TFCTRLForSequenceClassification(TFCTRLPreTrainedModel, TFSequenceC... method __init__ (line 748) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 759) | def get_output_embeddings(self): method call (line 770) | def call( method serving_output (line 861) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... FILE: benchmark/third_party/transformers/src/transformers/models/ctrl/tokenization_ctrl.py function get_pairs (line 103) | def get_pairs(word): class CTRLTokenizer (line 119) | class CTRLTokenizer(PreTrainedTokenizer): method __init__ (line 141) | def __init__(self, vocab_file, merges_file, unk_token="", **kwargs): method vocab_size (line 154) | def vocab_size(self): method get_vocab (line 157) | def get_vocab(self): method bpe (line 160) | def bpe(self, token): method _tokenize (line 204) | def _tokenize(self, text): method _convert_token_to_id (line 214) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 218) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 222) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 227) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/cvt/configuration_cvt.py class CvtConfig (line 29) | class CvtConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/cvt/modeling_cvt.py class BaseModelOutputWithCLSToken (line 61) | class BaseModelOutputWithCLSToken(ModelOutput): function drop_path (line 82) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class CvtDropPath (line 103) | class CvtDropPath(nn.Module): method __init__ (line 106) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 110) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 113) | def extra_repr(self) -> str: class CvtEmbeddings (line 117) | class CvtEmbeddings(nn.Module): method __init__ (line 122) | def __init__(self, patch_size, num_channels, embed_dim, stride, paddin... method forward (line 129) | def forward(self, pixel_values): class CvtConvEmbeddings (line 135) | class CvtConvEmbeddings(nn.Module): method __init__ (line 140) | def __init__(self, patch_size, num_channels, embed_dim, stride, padding): method forward (line 147) | def forward(self, pixel_values): class CvtSelfAttentionConvProjection (line 160) | class CvtSelfAttentionConvProjection(nn.Module): method __init__ (line 161) | def __init__(self, embed_dim, kernel_size, padding, stride): method forward (line 174) | def forward(self, hidden_state): class CvtSelfAttentionLinearProjection (line 180) | class CvtSelfAttentionLinearProjection(nn.Module): method forward (line 181) | def forward(self, hidden_state): class CvtSelfAttentionProjection (line 189) | class CvtSelfAttentionProjection(nn.Module): method __init__ (line 190) | def __init__(self, embed_dim, kernel_size, padding, stride, projection... method forward (line 196) | def forward(self, hidden_state): class CvtSelfAttention (line 202) | class CvtSelfAttention(nn.Module): method __init__ (line 203) | def __init__( method rearrange_for_multi_head_attention (line 244) | def rearrange_for_multi_head_attention(self, hidden_state): method forward (line 250) | def forward(self, hidden_state, height, width): class CvtSelfOutput (line 283) | class CvtSelfOutput(nn.Module): method __init__ (line 289) | def __init__(self, embed_dim, drop_rate): method forward (line 294) | def forward(self, hidden_state, input_tensor): class CvtAttention (line 300) | class CvtAttention(nn.Module): method __init__ (line 301) | def __init__( method prune_heads (line 333) | def prune_heads(self, heads): method forward (line 351) | def forward(self, hidden_state, height, width): class CvtIntermediate (line 357) | class CvtIntermediate(nn.Module): method __init__ (line 358) | def __init__(self, embed_dim, mlp_ratio): method forward (line 363) | def forward(self, hidden_state): class CvtOutput (line 369) | class CvtOutput(nn.Module): method __init__ (line 370) | def __init__(self, embed_dim, mlp_ratio, drop_rate): method forward (line 375) | def forward(self, hidden_state, input_tensor): class CvtLayer (line 382) | class CvtLayer(nn.Module): method __init__ (line 387) | def __init__( method forward (line 426) | def forward(self, hidden_state, height, width): class CvtStage (line 448) | class CvtStage(nn.Module): method __init__ (line 449) | def __init__(self, config, stage): method forward (line 493) | def forward(self, hidden_state): class CvtEncoder (line 513) | class CvtEncoder(nn.Module): method __init__ (line 514) | def __init__(self, config): method forward (line 521) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class CvtPreTrainedModel (line 541) | class CvtPreTrainedModel(PreTrainedModel): method _init_weights (line 551) | def _init_weights(self, module): class CvtModel (line 590) | class CvtModel(CvtPreTrainedModel): method __init__ (line 591) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 597) | def _prune_heads(self, heads_to_prune): method forward (line 614) | def forward( class CvtForImageClassification (line 653) | class CvtForImageClassification(CvtPreTrainedModel): method __init__ (line 654) | def __init__(self, config): method forward (line 676) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/cvt/modeling_tf_cvt.py class TFBaseModelOutputWithCLSToken (line 61) | class TFBaseModelOutputWithCLSToken(ModelOutput): class TFCvtDropPath (line 81) | class TFCvtDropPath(tf.keras.layers.Layer): method __init__ (line 87) | def __init__(self, drop_prob: float, **kwargs): method call (line 91) | def call(self, x: tf.Tensor, training=None): class TFCvtEmbeddings (line 101) | class TFCvtEmbeddings(tf.keras.layers.Layer): method __init__ (line 104) | def __init__( method call (line 125) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFCvtConvEmbeddings (line 131) | class TFCvtConvEmbeddings(tf.keras.layers.Layer): method __init__ (line 134) | def __init__(self, config: CvtConfig, patch_size: int, embed_dim: int,... method call (line 150) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFCvtSelfAttentionConvProjection (line 167) | class TFCvtSelfAttentionConvProjection(tf.keras.layers.Layer): method __init__ (line 170) | def __init__(self, config: CvtConfig, embed_dim: int, kernel_size: int... method call (line 186) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtSelfAttentionLinearProjection (line 192) | class TFCvtSelfAttentionLinearProjection(tf.keras.layers.Layer): method call (line 195) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: class TFCvtSelfAttentionProjection (line 203) | class TFCvtSelfAttentionProjection(tf.keras.layers.Layer): method __init__ (line 206) | def __init__( method call (line 223) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtSelfAttention (line 229) | class TFCvtSelfAttention(tf.keras.layers.Layer): method __init__ (line 235) | def __init__( method rearrange_for_multi_head_attention (line 308) | def rearrange_for_multi_head_attention(self, hidden_state: tf.Tensor) ... method call (line 315) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtSelfOutput (line 350) | class TFCvtSelfOutput(tf.keras.layers.Layer): method __init__ (line 353) | def __init__(self, config: CvtConfig, embed_dim: int, drop_rate: float... method call (line 360) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtAttention (line 366) | class TFCvtAttention(tf.keras.layers.Layer): method __init__ (line 369) | def __init__( method prune_heads (line 404) | def prune_heads(self, heads): method call (line 407) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtIntermediate (line 413) | class TFCvtIntermediate(tf.keras.layers.Layer): method __init__ (line 416) | def __init__(self, config: CvtConfig, embed_dim: int, mlp_ratio: int, ... method call (line 425) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: class TFCvtOutput (line 430) | class TFCvtOutput(tf.keras.layers.Layer): method __init__ (line 435) | def __init__(self, config: CvtConfig, embed_dim: int, drop_rate: int, ... method call (line 442) | def call(self, hidden_state: tf.Tensor, input_tensor: tf.Tensor, train... class TFCvtLayer (line 449) | class TFCvtLayer(tf.keras.layers.Layer): method __init__ (line 456) | def __init__( method call (line 504) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtStage (line 522) | class TFCvtStage(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, config: CvtConfig, stage: int, **kwargs): method call (line 580) | def call(self, hidden_state: tf.Tensor, training: bool = False): class TFCvtEncoder (line 605) | class TFCvtEncoder(tf.keras.layers.Layer): method __init__ (line 616) | def __init__(self, config: CvtConfig, **kwargs): method call (line 623) | def call( class TFCvtMainLayer (line 658) | class TFCvtMainLayer(tf.keras.layers.Layer): method __init__ (line 663) | def __init__(self, config: CvtConfig, **kwargs): method call (line 669) | def call( class TFCvtPreTrainedModel (line 698) | class TFCvtPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 709) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 726) | def serving(self, inputs): class TFCvtModel (line 789) | class TFCvtModel(TFCvtPreTrainedModel): method __init__ (line 790) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 798) | def call( method serving_output (line 845) | def serving_output(self, output: TFBaseModelOutputWithCLSToken) -> TFB... class TFCvtForImageClassification (line 860) | class TFCvtForImageClassification(TFCvtPreTrainedModel, TFSequenceClassi... method __init__ (line 861) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 881) | def call( method serving_output (line 947) | def serving_output(self, output: TFImageClassifierOutputWithNoAttentio... FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/configuration_data2vec_audio.py class Data2VecAudioConfig (line 31) | class Data2VecAudioConfig(PretrainedConfig): method __init__ (line 168) | def __init__( method inputs_to_logits_ratio (line 283) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/configuration_data2vec_text.py class Data2VecTextConfig (line 31) | 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: benchmark/third_party/transformers/src/transformers/models/data2vec/configuration_data2vec_vision.py class Data2VecVisionConfig (line 35) | class Data2VecVisionConfig(PretrainedConfig): method __init__ (line 119) | def __init__( class Data2VecVisionOnnxConfig (line 188) | class Data2VecVisionOnnxConfig(OnnxConfig): method inputs (line 193) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 201) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/convert_data2vec_audio_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 58) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 87) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function access_by_string (line 145) | def access_by_string(module, path): function set_weights (line 150) | def set_weights(full_name, module, fsq_value, hf_weight_path): function load_conv_layer (line 160) | def load_conv_layer(full_name, value, feature_extractor, unused_weights): function load_pos_conv_layer (line 178) | def load_pos_conv_layer(full_name, value, pos_conv_embeddings, unused_we... function convert_wav2vec2_checkpoint (line 195) | def convert_wav2vec2_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/convert_data2vec_text_original_pytorch_checkpoint_to_pytorch.py function convert_data2vec_checkpoint_to_pytorch (line 52) | def convert_data2vec_checkpoint_to_pytorch( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/data2vec/modeling_data2vec_audio.py function _compute_mask_indices (line 85) | def _compute_mask_indices( class Data2VecAudioConvLayer (line 204) | class Data2VecAudioConvLayer(nn.Module): method __init__ (line 205) | def __init__(self, config, layer_id=0): method forward (line 220) | def forward(self, hidden_states): class Data2VecAudioPadLayer (line 232) | class Data2VecAudioPadLayer(nn.Module): method __init__ (line 233) | def __init__(self, num_conv_pos_embeddings): method forward (line 237) | def forward(self, hidden_states): class Data2VecAudioPositionalConvLayer (line 243) | class Data2VecAudioPositionalConvLayer(nn.Module): method __init__ (line 244) | def __init__(self, config): method forward (line 259) | def forward(self, hidden_states): class Data2VecAudioPositionalConvEmbedding (line 270) | class Data2VecAudioPositionalConvEmbedding(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 277) | def forward(self, hidden_states): class Data2VecAudioFeatureEncoder (line 285) | class Data2VecAudioFeatureEncoder(nn.Module): method __init__ (line 288) | def __init__(self, config): method _freeze_parameters (line 297) | def _freeze_parameters(self): method forward (line 303) | def forward(self, input_values): class Data2VecAudioFeatureProjection (line 330) | class Data2VecAudioFeatureProjection(nn.Module): method __init__ (line 331) | def __init__(self, config): method forward (line 337) | def forward(self, hidden_states): class Data2VecAudioAttention (line 346) | class Data2VecAudioAttention(nn.Module): method __init__ (line 349) | def __init__( method _shape (line 376) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 379) | def forward( class Data2VecAudioFeedForward (line 494) | class Data2VecAudioFeedForward(nn.Module): method __init__ (line 495) | def __init__(self, config): method forward (line 508) | def forward(self, hidden_states): class Data2VecAudioEncoderLayer (line 519) | class Data2VecAudioEncoderLayer(nn.Module): method __init__ (line 520) | def __init__(self, config): method forward (line 533) | def forward(self, hidden_states, attention_mask=None, output_attention... class Data2VecAudioEncoder (line 554) | class Data2VecAudioEncoder(nn.Module): method __init__ (line 555) | def __init__(self, config): method forward (line 564) | def forward( class Data2VecAudioAdapter (line 642) | class Data2VecAudioAdapter(nn.Module): method __init__ (line 643) | def __init__(self, config): method forward (line 656) | def forward(self, hidden_states): class Data2VecAudioAdapterLayer (line 674) | class Data2VecAudioAdapterLayer(nn.Module): method __init__ (line 675) | def __init__(self, config): method forward (line 685) | def forward(self, hidden_states): class Data2VecAudioPreTrainedModel (line 692) | class Data2VecAudioPreTrainedModel(PreTrainedModel): method _init_weights (line 704) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 730) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 754) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 774) | def _set_gradient_checkpointing(self, module, value=False): class Data2VecAudioModel (line 840) | class Data2VecAudioModel(Data2VecAudioPreTrainedModel): method __init__ (line 841) | def __init__(self, config: Data2VecAudioConfig): method freeze_feature_encoder (line 858) | def freeze_feature_encoder(self): method _mask_hidden_states (line 865) | def _mask_hidden_states( method forward (line 920) | def forward( class Data2VecAudioForCTC (line 978) | class Data2VecAudioForCTC(Data2VecAudioPreTrainedModel): method __init__ (line 979) | def __init__(self, config): method freeze_feature_extractor (line 1000) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1012) | def freeze_feature_encoder(self): method forward (line 1028) | def forward( class Data2VecAudioForSequenceClassification (line 1109) | class Data2VecAudioForSequenceClassification(Data2VecAudioPreTrainedModel): method __init__ (line 1110) | def __init__(self, config): method freeze_feature_extractor (line 1127) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1139) | def freeze_feature_encoder(self): method freeze_base_model (line 1146) | def freeze_base_model(self): method forward (line 1164) | def forward( class Data2VecAudioForAudioFrameClassification (line 1233) | class Data2VecAudioForAudioFrameClassification(Data2VecAudioPreTrainedMo... method __init__ (line 1234) | def __init__(self, config): method freeze_feature_extractor (line 1251) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1263) | def freeze_feature_encoder(self): method freeze_base_model (line 1270) | def freeze_base_model(self): method forward (line 1287) | def forward( class AMSoftmaxLoss (line 1342) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1343) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1351) | def forward(self, hidden_states, labels): class TDNNLayer (line 1366) | class TDNNLayer(nn.Module): method __init__ (line 1367) | def __init__(self, config, layer_id=0): method forward (line 1377) | def forward(self, hidden_states): class Data2VecAudioForXVector (line 1399) | class Data2VecAudioForXVector(Data2VecAudioPreTrainedModel): method __init__ (line 1400) | def __init__(self, config): method freeze_feature_extractor (line 1419) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1431) | def freeze_feature_encoder(self): method freeze_base_model (line 1438) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1446) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1470) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/modeling_data2vec_text.py class Data2VecTextForTextEmbeddings (line 66) | class Data2VecTextForTextEmbeddings(nn.Module): method __init__ (line 72) | def __init__(self, config): method forward (line 95) | def forward( method create_position_ids_from_inputs_embeds (line 135) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class Data2VecTextSelfAttention (line 154) | class Data2VecTextSelfAttention(nn.Module): method __init__ (line 155) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 181) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 186) | def forward( class Data2VecTextSelfOutput (line 282) | class Data2VecTextSelfOutput(nn.Module): method __init__ (line 283) | def __init__(self, config): method forward (line 289) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecTextAttention (line 297) | class Data2VecTextAttention(nn.Module): method __init__ (line 298) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 304) | def prune_heads(self, heads): method forward (line 322) | def forward( class Data2VecTextIntermediate (line 347) | class Data2VecTextIntermediate(nn.Module): method __init__ (line 348) | def __init__(self, config): method forward (line 356) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextOutput (line 363) | class Data2VecTextOutput(nn.Module): method __init__ (line 364) | def __init__(self, config): method forward (line 370) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecTextLayer (line 378) | class Data2VecTextLayer(nn.Module): method __init__ (line 379) | def __init__(self, config): method forward (line 393) | def forward( method feed_forward_chunk (line 458) | def feed_forward_chunk(self, attention_output): class Data2VecTextEncoder (line 465) | class Data2VecTextEncoder(nn.Module): method __init__ (line 466) | def __init__(self, config): method forward (line 472) | def forward( class Data2VecTextPooler (line 563) | class Data2VecTextPooler(nn.Module): method __init__ (line 564) | def __init__(self, config): method forward (line 569) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextPreTrainedModel (line 578) | class Data2VecTextPreTrainedModel(PreTrainedModel): method _init_weights (line 589) | def _init_weights(self, module): method _set_gradient_checkpointing (line 607) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 611) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class Data2VecTextModel (line 694) | class Data2VecTextModel(Data2VecTextPreTrainedModel): method __init__ (line 712) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 724) | def get_input_embeddings(self): method set_input_embeddings (line 727) | def set_input_embeddings(self, value): method _prune_heads (line 730) | def _prune_heads(self, heads_to_prune): method forward (line 746) | def forward( class Data2VecTextForCausalLM (line 879) | class Data2VecTextForCausalLM(Data2VecTextPreTrainedModel): method __init__ (line 884) | def __init__(self, config): method get_output_embeddings (line 899) | def get_output_embeddings(self): method set_output_embeddings (line 902) | def set_output_embeddings(self, new_embeddings): method forward (line 907) | def forward( method prepare_inputs_for_generation (line 1011) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1023) | def _reorder_cache(self, past, beam_idx): class Data2VecTextForMaskedLM (line 1031) | class Data2VecTextForMaskedLM(Data2VecTextPreTrainedModel): method __init__ (line 1036) | 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 forward (line 1068) | def forward( class Data2VecTextLMHead (line 1127) | class Data2VecTextLMHead(nn.Module): method __init__ (line 1130) | def __init__(self, config): method forward (line 1139) | def forward(self, features, **kwargs): method _tie_weights (line 1149) | def _tie_weights(self): class Data2VecTextForSequenceClassification (line 1165) | class Data2VecTextForSequenceClassification(Data2VecTextPreTrainedModel): method __init__ (line 1168) | def __init__(self, config): method forward (line 1186) | def forward( class Data2VecTextForMultipleChoice (line 1263) | class Data2VecTextForMultipleChoice(Data2VecTextPreTrainedModel): method __init__ (line 1266) | def __init__(self, config): method forward (line 1285) | def forward( class Data2VecTextForTokenClassification (line 1358) | class Data2VecTextForTokenClassification(Data2VecTextPreTrainedModel): method __init__ (line 1362) | def __init__(self, config): method forward (line 1383) | def forward( class Data2VecTextClassificationHead (line 1437) | class Data2VecTextClassificationHead(nn.Module): method __init__ (line 1440) | def __init__(self, config): method forward (line 1449) | def forward(self, features, **kwargs): class Data2VecTextForQuestionAnswering (line 1466) | class Data2VecTextForQuestionAnswering(Data2VecTextPreTrainedModel): method __init__ (line 1470) | def __init__(self, config): method forward (line 1487) | def forward( function create_position_ids_from_input_ids (line 1562) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/modeling_data2vec_vision.py class Data2VecVisionModelOutputWithPooling (line 69) | class Data2VecVisionModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 95) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Data2VecVisionDropPath (line 116) | class Data2VecVisionDropPath(nn.Module): method __init__ (line 119) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 123) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 126) | def extra_repr(self) -> str: class Data2VecVisionEmbeddings (line 131) | class Data2VecVisionEmbeddings(nn.Module): method __init__ (line 137) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 153) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class Data2VecVisionPatchEmbeddings (line 174) | class Data2VecVisionPatchEmbeddings(nn.Module): method __init__ (line 181) | def __init__(self, config): method forward (line 198) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class Data2VecVisionSelfAttention (line 214) | class Data2VecVisionSelfAttention(nn.Module): method __init__ (line 215) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 238) | def transpose_for_scores(self, x): method forward (line 243) | def forward( class Data2VecVisionSelfOutput (line 292) | class Data2VecVisionSelfOutput(nn.Module): method __init__ (line 298) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 303) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecVisionAttention (line 311) | class Data2VecVisionAttention(nn.Module): method __init__ (line 312) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 318) | def prune_heads(self, heads): method forward (line 336) | def forward( class Data2VecVisionIntermediate (line 352) | class Data2VecVisionIntermediate(nn.Module): method __init__ (line 353) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 361) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionOutput (line 369) | class Data2VecVisionOutput(nn.Module): method __init__ (line 370) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 375) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionLayer (line 383) | class Data2VecVisionLayer(nn.Module): method __init__ (line 386) | def __init__( method forward (line 406) | def forward( class Data2VecVisionRelativePositionBias (line 447) | class Data2VecVisionRelativePositionBias(nn.Module): method __init__ (line 448) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple) -... method forward (line 477) | def forward(self) -> torch.Tensor: class Data2VecVisionEncoder (line 486) | class Data2VecVisionEncoder(nn.Module): method __init__ (line 487) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method forward (line 509) | def forward( class Data2VecVisionPreTrainedModel (line 563) | class Data2VecVisionPreTrainedModel(PreTrainedModel): method _init_weights (line 574) | def _init_weights(self, module): method _set_gradient_checkpointing (line 590) | def _set_gradient_checkpointing(self, module, value=False): class Data2VecVisionModel (line 634) | class Data2VecVisionModel(Data2VecVisionPreTrainedModel): method __init__ (line 635) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 650) | def get_input_embeddings(self): method _prune_heads (line 653) | def _prune_heads(self, heads_to_prune): method forward (line 670) | def forward( class Data2VecVisionPooler (line 721) | class Data2VecVisionPooler(nn.Module): method __init__ (line 722) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 728) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForImageClassification (line 748) | class Data2VecVisionForImageClassification(Data2VecVisionPreTrainedModel): method __init__ (line 749) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 769) | def forward( class Data2VecVisionConvModule (line 832) | class Data2VecVisionConvModule(nn.Module): method __init__ (line 840) | def __init__( method forward (line 861) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingBlock (line 870) | class Data2VecVisionPyramidPoolingBlock(nn.Module): method __init__ (line 871) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 880) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingModule (line 888) | class Data2VecVisionPyramidPoolingModule(nn.Module): method __init__ (line 902) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 916) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class Data2VecVisionUperHead (line 928) | class Data2VecVisionUperHead(nn.Module): method __init__ (line 936) | def __init__(self, config: Data2VecVisionConfig) -> None: method psp_forward (line 974) | def psp_forward(self, inputs): method forward (line 983) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionFCNHead (line 1014) | class Data2VecVisionFCNHead(nn.Module): method __init__ (line 1029) | def __init__( method forward (line 1067) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForSemanticSegmentation (line 1084) | class Data2VecVisionForSemanticSegmentation(Data2VecVisionPreTrainedModel): method __init__ (line 1085) | def __init__(self, config: Data2VecVisionConfig) -> None: method compute_loss (line 1111) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1130) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/data2vec/modeling_tf_data2vec_vision.py class TFData2VecVisionModelOutputWithPooling (line 73) | class TFData2VecVisionModelOutputWithPooling(TFBaseModelOutputWithPooling): class TFData2VecVisionDropPath (line 103) | class TFData2VecVisionDropPath(tf.keras.layers.Layer): method __init__ (line 109) | def __init__(self, drop_path, **kwargs): method call (line 113) | def call(self, x, training=None): class TFData2VecVisionEmbeddings (line 123) | class TFData2VecVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 129) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method build (line 139) | def build(self, input_shape: tf.TensorShape): method call (line 168) | def call(self, pixel_values: tf.Tensor, bool_masked_pos: Optional[tf.T... class TFData2VecVisionPatchEmbeddings (line 191) | class TFData2VecVisionPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 196) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 224) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFData2VecVisionSelfAttention (line 252) | class TFData2VecVisionSelfAttention(tf.keras.layers.Layer): method __init__ (line 253) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 288) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 295) | def call( class TFData2VecVisionSelfOutput (line 348) | class TFData2VecVisionSelfOutput(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 362) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, gamm... class TFData2VecVisionAttention (line 369) | class TFData2VecVisionAttention(tf.keras.layers.Layer): method __init__ (line 370) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 376) | def prune_heads(self, heads): method call (line 379) | def call( class TFData2VecVisionIntermediate (line 403) | class TFData2VecVisionIntermediate(tf.keras.layers.Layer): method __init__ (line 404) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 416) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionOutput (line 423) | class TFData2VecVisionOutput(tf.keras.layers.Layer): method __init__ (line 424) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 432) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFData2VecVisionLayer (line 439) | class TFData2VecVisionLayer(tf.keras.layers.Layer): method __init__ (line 442) | def __init__( method build (line 467) | def build(self, input_shape: tf.TensorShape): method call (line 488) | def call( class TFData2VecVisionRelativePositionBias (line 533) | class TFData2VecVisionRelativePositionBias(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple, *... method build (line 545) | def build(self, input_shape): method get_position_index (line 556) | def get_position_index(self): method call (line 584) | def call(self, inputs=None) -> tf.Tensor: class TFData2VecVisionEncoder (line 589) | class TFData2VecVisionEncoder(tf.keras.layers.Layer): method __init__ (line 590) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method call (line 612) | def call( class TFData2VecVisionMainLayer (line 655) | class TFData2VecVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 658) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 678) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 681) | def _prune_heads(self, heads_to_prune): method call (line 689) | def call( class TFData2VecVisionPooler (line 745) | class TFData2VecVisionPooler(tf.keras.layers.Layer): method __init__ (line 746) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 754) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionPreTrainedModel (line 766) | class TFData2VecVisionPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 778) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 796) | def serving(self, inputs): class TFData2VecVisionModel (line 882) | class TFData2VecVisionModel(TFData2VecVisionPreTrainedModel): method __init__ (line 883) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 891) | def get_input_embeddings(self): method call (line 904) | def call( method serving_output (line 927) | def serving_output(self, output: TFData2VecVisionModelOutputWithPoolin... class TFData2VecVisionForImageClassification (line 946) | class TFData2VecVisionForImageClassification(TFData2VecVisionPreTrainedM... method __init__ (line 947) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs): method call (line 969) | def call( method serving_output (line 1011) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFData2VecVisionConvModule (line 1018) | class TFData2VecVisionConvModule(tf.keras.layers.Layer): method __init__ (line 1026) | def __init__( method call (line 1047) | def call(self, input: tf.Tensor) -> tf.Tensor: class TFAdaptiveAvgPool1D (line 1056) | class TFAdaptiveAvgPool1D(tf.keras.layers.Layer): method __init__ (line 1057) | def __init__(self, output_dim, mode="dense", **kwargs): method build (line 1063) | def build(self, input_shape): method call (line 1096) | def call(self, inputs): method get_config (line 1105) | def get_config(self): class TFAdaptiveAvgPool2D (line 1111) | class TFAdaptiveAvgPool2D(tf.keras.layers.Layer): method __init__ (line 1112) | def __init__(self, output_shape, mode="dense", **kwargs): method call (line 1118) | def call(self, inputs): method get_config (line 1131) | def get_config(self): class TFData2VecVisionPyramidPoolingModule (line 1137) | class TFData2VecVisionPyramidPoolingModule(tf.keras.layers.Layer): method __init__ (line 1149) | def __init__(self, pool_scales: Tuple[int, ...], channels: int, **kwar... method call (line 1164) | def call(self, x: tf.Tensor) -> List[tf.Tensor]: class TFData2VecVisionUperHead (line 1178) | class TFData2VecVisionUperHead(tf.keras.layers.Layer): method __init__ (line 1186) | def __init__(self, config: Data2VecVisionConfig, **kwargs) -> None: method psp_forward (line 1212) | def psp_forward(self, inputs): method call (line 1221) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionFCNHead (line 1247) | class TFData2VecVisionFCNHead(tf.keras.layers.Layer): method __init__ (line 1261) | def __init__( method call (line 1307) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionForSemanticSegmentation (line 1325) | class TFData2VecVisionForSemanticSegmentation(TFData2VecVisionPreTrained... method __init__ (line 1326) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs) ->... method compute_loss (line 1349) | def compute_loss(self, logits, auxiliary_logits, labels): method call (line 1381) | def call( method serving_output (line 1478) | def serving_output(self, output: TFSemanticSegmenterOutput) -> TFSeman... FILE: benchmark/third_party/transformers/src/transformers/models/deberta/configuration_deberta.py class DebertaConfig (line 40) | class DebertaConfig(PretrainedConfig): method __init__ (line 110) | def __init__( class DebertaOnnxConfig (line 164) | class DebertaOnnxConfig(OnnxConfig): method inputs (line 166) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 179) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 182) | def generate_dummy_inputs( FILE: benchmark/third_party/transformers/src/transformers/models/deberta/modeling_deberta.py class ContextPooler (line 80) | class ContextPooler(nn.Module): method __init__ (line 81) | def __init__(self, config): method forward (line 87) | def forward(self, hidden_states): method output_dim (line 98) | def output_dim(self): class XSoftmax (line 102) | class XSoftmax(torch.autograd.Function): method forward (line 131) | def forward(self, input, mask, dim): method backward (line 142) | def backward(self, grad_output): method symbolic (line 148) | def symbolic(g, self, mask, dim): class DropoutContext (line 165) | class DropoutContext(object): method __init__ (line 166) | def __init__(self): function get_mask (line 173) | def get_mask(input, local_context): class XDropout (line 192) | class XDropout(torch.autograd.Function): method forward (line 196) | def forward(ctx, input, local_ctx): method backward (line 206) | def backward(ctx, grad_output): method symbolic (line 214) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 231) | class StableDropout(nn.Module): method __init__ (line 239) | def __init__(self, drop_prob): method forward (line 245) | def forward(self, x): method clear_context (line 256) | def clear_context(self): method init_context (line 260) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 268) | def get_context(self): class DebertaLayerNorm (line 280) | class DebertaLayerNorm(nn.Module): method __init__ (line 283) | def __init__(self, size, eps=1e-12): method forward (line 289) | def forward(self, hidden_states): class DebertaSelfOutput (line 300) | class DebertaSelfOutput(nn.Module): method __init__ (line 301) | def __init__(self, config): method forward (line 307) | def forward(self, hidden_states, input_tensor): class DebertaAttention (line 314) | class DebertaAttention(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 321) | def forward( class DebertaIntermediate (line 351) | class DebertaIntermediate(nn.Module): method __init__ (line 352) | def __init__(self, config): method forward (line 360) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaOutput (line 366) | class DebertaOutput(nn.Module): method __init__ (line 367) | def __init__(self, config): method forward (line 374) | def forward(self, hidden_states, input_tensor): class DebertaLayer (line 381) | class DebertaLayer(nn.Module): method __init__ (line 382) | def __init__(self, config): method forward (line 388) | def forward( class DebertaEncoder (line 415) | class DebertaEncoder(nn.Module): method __init__ (line 418) | def __init__(self, config): method get_rel_embedding (line 429) | def get_rel_embedding(self): method get_attention_mask (line 433) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 443) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 449) | def forward( function build_relative_position (line 524) | def build_relative_position(query_size, key_size, device): function c2p_dynamic_expand (line 550) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 555) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 560) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 564) | class DisentangledSelfAttention(nn.Module): method __init__ (line 575) | def __init__(self, config): method transpose_for_scores (line 610) | def transpose_for_scores(self, x): method forward (line 615) | def forward( method disentangled_att_bias (line 706) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class DebertaEmbeddings (line 758) | class DebertaEmbeddings(nn.Module): method __init__ (line 761) | def __init__(self, config): method forward (line 785) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaPreTrainedModel (line 832) | class DebertaPreTrainedModel(PreTrainedModel): method _init_weights (line 844) | def _init_weights(self, module): method _set_gradient_checkpointing (line 857) | def _set_gradient_checkpointing(self, module, value=False): class DebertaModel (line 927) | class DebertaModel(DebertaPreTrainedModel): method __init__ (line 928) | def __init__(self, config): method get_input_embeddings (line 938) | def get_input_embeddings(self): method set_input_embeddings (line 941) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 944) | def _prune_heads(self, heads_to_prune): method forward (line 958) | def forward( class DebertaForMaskedLM (line 1039) | class DebertaForMaskedLM(DebertaPreTrainedModel): method __init__ (line 1043) | def __init__(self, config): method get_output_embeddings (line 1052) | def get_output_embeddings(self): method set_output_embeddings (line 1055) | def set_output_embeddings(self, new_embeddings): method forward (line 1068) | def forward( class DebertaPredictionHeadTransform (line 1121) | class DebertaPredictionHeadTransform(nn.Module): method __init__ (line 1122) | def __init__(self, config): method forward (line 1131) | def forward(self, hidden_states): class DebertaLMPredictionHead (line 1139) | class DebertaLMPredictionHead(nn.Module): method __init__ (line 1140) | def __init__(self, config): method forward (line 1153) | def forward(self, hidden_states): class DebertaOnlyMLMHead (line 1160) | class DebertaOnlyMLMHead(nn.Module): method __init__ (line 1161) | def __init__(self, config): method forward (line 1165) | def forward(self, sequence_output): class DebertaForSequenceClassification (line 1177) | class DebertaForSequenceClassification(DebertaPreTrainedModel): method __init__ (line 1178) | def __init__(self, config): method get_input_embeddings (line 1196) | def get_input_embeddings(self): method set_input_embeddings (line 1199) | def set_input_embeddings(self, new_embeddings): method forward (line 1211) | def forward( class DebertaForTokenClassification (line 1298) | class DebertaForTokenClassification(DebertaPreTrainedModel): method __init__ (line 1301) | def __init__(self, config): method forward (line 1321) | def forward( class DebertaForQuestionAnswering (line 1376) | class DebertaForQuestionAnswering(DebertaPreTrainedModel): method __init__ (line 1379) | def __init__(self, config): method forward (line 1400) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/deberta/modeling_tf_deberta.py class TFDebertaContextPooler (line 60) | class TFDebertaContextPooler(tf.keras.layers.Layer): method __init__ (line 61) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 67) | def call(self, hidden_states, training: bool = False): method output_dim (line 77) | def output_dim(self) -> int: class TFDebertaXSoftmax (line 81) | class TFDebertaXSoftmax(tf.keras.layers.Layer): method __init__ (line 91) | def __init__(self, axis=-1, **kwargs): method call (line 95) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaStableDropout (line 104) | class TFDebertaStableDropout(tf.keras.layers.Layer): method __init__ (line 112) | def __init__(self, drop_prob, **kwargs): method xdropout (line 117) | def xdropout(self, inputs): method call (line 138) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaLayerNorm (line 144) | class TFDebertaLayerNorm(tf.keras.layers.Layer): method __init__ (line 147) | def __init__(self, size, eps=1e-12, **kwargs): method build (line 152) | def build(self, input_shape): method call (line 157) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDebertaSelfOutput (line 164) | class TFDebertaSelfOutput(tf.keras.layers.Layer): method __init__ (line 165) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 171) | def call(self, hidden_states, input_tensor, training: bool = False): class TFDebertaAttention (line 178) | class TFDebertaAttention(tf.keras.layers.Layer): method __init__ (line 179) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 185) | def call( class TFDebertaIntermediate (line 215) | class TFDebertaIntermediate(tf.keras.layers.Layer): method __init__ (line 216) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 228) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaOutput (line 235) | class TFDebertaOutput(tf.keras.layers.Layer): method __init__ (line 236) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 245) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDebertaLayer (line 253) | class TFDebertaLayer(tf.keras.layers.Layer): method __init__ (line 254) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 261) | def call( class TFDebertaEncoder (line 290) | class TFDebertaEncoder(tf.keras.layers.Layer): method __init__ (line 291) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 302) | def build(self, input_shape): method get_rel_embedding (line 311) | def get_rel_embedding(self): method get_attention_mask (line 315) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 325) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 331) | def call( function build_relative_position (line 393) | def build_relative_position(query_size, key_size): function c2p_dynamic_expand (line 417) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 427) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 437) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function torch_gather (line 442) | def torch_gather(x, indices, gather_axis): class TFDebertaDisentangledSelfAttention (line 466) | class TFDebertaDisentangledSelfAttention(tf.keras.layers.Layer): method __init__ (line 477) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 533) | def build(self, input_shape): method transpose_for_scores (line 542) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 550) | def call( method disentangled_att_bias (line 662) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class TFDebertaEmbeddings (line 719) | class TFDebertaEmbeddings(tf.keras.layers.Layer): method __init__ (line 722) | def __init__(self, config, **kwargs): method build (line 737) | def build(self, input_shape: tf.TensorShape): method call (line 767) | def call( class TFDebertaPredictionHeadTransform (line 832) | class TFDebertaPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 833) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 848) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaLMPredictionHead (line 856) | class TFDebertaLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 857) | def __init__(self, config: DebertaConfig, input_embeddings: tf.keras.l... method build (line 869) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 874) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 877) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 881) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 884) | def set_bias(self, value: tf.Variable): method call (line 888) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaOnlyMLMHead (line 899) | class TFDebertaOnlyMLMHead(tf.keras.layers.Layer): method __init__ (line 900) | def __init__(self, config: DebertaConfig, input_embeddings: tf.keras.l... method call (line 904) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFDebertaMainLayer (line 911) | class TFDebertaMainLayer(tf.keras.layers.Layer): method __init__ (line 914) | def __init__(self, config: DebertaConfig, **kwargs): method get_input_embeddings (line 922) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 925) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 929) | def _prune_heads(self, heads_to_prune): method call (line 937) | def call( class TFDebertaPreTrainedModel (line 995) | class TFDebertaPreTrainedModel(TFPreTrainedModel): class TFDebertaModel (line 1095) | class TFDebertaModel(TFDebertaPreTrainedModel): method __init__ (line 1096) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1109) | def call( method serving_output (line 1135) | def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput: class TFDebertaForMaskedLM (line 1143) | class TFDebertaForMaskedLM(TFDebertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1144) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method get_lm_head (line 1156) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1167) | def call( method serving_output (line 1212) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFDebertaForSequenceClassification (line 1226) | class TFDebertaForSequenceClassification(TFDebertaPreTrainedModel, TFSeq... method __init__ (line 1227) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1252) | def call( method serving_output (line 1300) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFDebertaForTokenClassification (line 1314) | class TFDebertaForTokenClassification(TFDebertaPreTrainedModel, TFTokenC... method __init__ (line 1315) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1334) | def call( method serving_output (line 1378) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFDebertaForQuestionAnswering (line 1392) | class TFDebertaForQuestionAnswering(TFDebertaPreTrainedModel, TFQuestion... method __init__ (line 1393) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1411) | def call( method serving_output (line 1470) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/deberta/tokenization_deberta.py function bytes_to_unicode (line 73) | def bytes_to_unicode(): function get_pairs (line 98) | def get_pairs(word): class DebertaTokenizer (line 112) | class DebertaTokenizer(PreTrainedTokenizer): method __init__ (line 180) | def __init__( method vocab_size (line 239) | def vocab_size(self): method get_vocab (line 243) | def get_vocab(self): method bpe (line 247) | def bpe(self, token): method build_inputs_with_special_tokens (line 289) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 314) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 341) | def create_token_type_ids_from_sequences( method _tokenize (line 372) | def _tokenize(self, text): method _convert_token_to_id (line 383) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 388) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 393) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 400) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 429) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 436) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/deberta/tokenization_deberta_fast.py class DebertaTokenizerFast (line 74) | class DebertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 143) | def __init__( method mask_token (line 186) | def mask_token(self) -> str: method mask_token (line 201) | def mask_token(self, value): method build_inputs_with_special_tokens (line 210) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 235) | def create_token_type_ids_from_sequences( method _batch_encode_plus (line 266) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 276) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 287) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 292) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/deberta_v2/configuration_deberta_v2.py class DebertaV2Config (line 42) | class DebertaV2Config(PretrainedConfig): method __init__ (line 98) | def __init__( class DebertaV2OnnxConfig (line 151) | class DebertaV2OnnxConfig(OnnxConfig): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 166) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 169) | def generate_dummy_inputs( FILE: benchmark/third_party/transformers/src/transformers/models/deberta_v2/modeling_deberta_v2.py class ContextPooler (line 80) | class ContextPooler(nn.Module): method __init__ (line 81) | def __init__(self, config): method forward (line 87) | def forward(self, hidden_states): method output_dim (line 98) | def output_dim(self): class XSoftmax (line 103) | class XSoftmax(torch.autograd.Function): method forward (line 132) | def forward(self, input, mask, dim): method backward (line 143) | def backward(self, grad_output): method symbolic (line 149) | def symbolic(g, self, mask, dim): class DropoutContext (line 167) | class DropoutContext(object): method __init__ (line 168) | def __init__(self): function get_mask (line 176) | def get_mask(input, local_context): class XDropout (line 196) | class XDropout(torch.autograd.Function): method forward (line 200) | def forward(ctx, input, local_ctx): method backward (line 210) | def backward(ctx, grad_output): method symbolic (line 218) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 236) | class StableDropout(nn.Module): method __init__ (line 244) | def __init__(self, drop_prob): method forward (line 250) | def forward(self, x): method clear_context (line 261) | def clear_context(self): method init_context (line 265) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 273) | def get_context(self): class DebertaV2SelfOutput (line 286) | class DebertaV2SelfOutput(nn.Module): method __init__ (line 287) | def __init__(self, config): method forward (line 293) | def forward(self, hidden_states, input_tensor): class DebertaV2Attention (line 301) | class DebertaV2Attention(nn.Module): method __init__ (line 302) | def __init__(self, config): method forward (line 308) | def forward( class DebertaV2Intermediate (line 338) | class DebertaV2Intermediate(nn.Module): method __init__ (line 339) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaV2Output (line 354) | class DebertaV2Output(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states, input_tensor): class DebertaV2Layer (line 370) | class DebertaV2Layer(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 377) | def forward( class ConvLayer (line 404) | class ConvLayer(nn.Module): method __init__ (line 405) | def __init__(self, config): method forward (line 417) | def forward(self, hidden_states, residual_states, input_mask): class DebertaV2Encoder (line 440) | class DebertaV2Encoder(nn.Module): method __init__ (line 443) | def __init__(self, config): method get_rel_embedding (line 470) | def get_rel_embedding(self): method get_attention_mask (line 476) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 486) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 494) | def forward( function make_log_bucket_position (line 577) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 592) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 623) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 629) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 635) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 639) | class DisentangledSelfAttention(nn.Module): method __init__ (line 650) | def __init__(self, config): method transpose_for_scores (line 688) | def transpose_for_scores(self, x, attention_heads): method forward (line 693) | def forward( method disentangled_attention_bias (line 777) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class DebertaV2Embeddings (line 856) | class DebertaV2Embeddings(nn.Module): method __init__ (line 859) | def __init__(self, config): method forward (line 883) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaV2PreTrainedModel (line 931) | class DebertaV2PreTrainedModel(PreTrainedModel): method _init_weights (line 943) | def _init_weights(self, module): method _set_gradient_checkpointing (line 956) | def _set_gradient_checkpointing(self, module, value=False): class DebertaV2Model (line 1027) | class DebertaV2Model(DebertaV2PreTrainedModel): method __init__ (line 1028) | def __init__(self, config): method get_input_embeddings (line 1038) | def get_input_embeddings(self): method set_input_embeddings (line 1041) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 1044) | def _prune_heads(self, heads_to_prune): method forward (line 1058) | def forward( class DebertaV2ForMaskedLM (line 1140) | class DebertaV2ForMaskedLM(DebertaV2PreTrainedModel): method __init__ (line 1144) | def __init__(self, config): method get_output_embeddings (line 1153) | def get_output_embeddings(self): method set_output_embeddings (line 1156) | def set_output_embeddings(self, new_embeddings): method forward (line 1169) | def forward( class DebertaV2PredictionHeadTransform (line 1222) | class DebertaV2PredictionHeadTransform(nn.Module): method __init__ (line 1223) | def __init__(self, config): method forward (line 1232) | def forward(self, hidden_states): class DebertaV2LMPredictionHead (line 1240) | class DebertaV2LMPredictionHead(nn.Module): method __init__ (line 1241) | def __init__(self, config): method forward (line 1254) | def forward(self, hidden_states): class DebertaV2OnlyMLMHead (line 1261) | class DebertaV2OnlyMLMHead(nn.Module): method __init__ (line 1262) | def __init__(self, config): method forward (line 1266) | def forward(self, sequence_output): class DebertaV2ForSequenceClassification (line 1279) | class DebertaV2ForSequenceClassification(DebertaV2PreTrainedModel): method __init__ (line 1280) | def __init__(self, config): method get_input_embeddings (line 1298) | def get_input_embeddings(self): method set_input_embeddings (line 1301) | def set_input_embeddings(self, new_embeddings): method forward (line 1313) | def forward( class DebertaV2ForTokenClassification (line 1401) | class DebertaV2ForTokenClassification(DebertaV2PreTrainedModel): method __init__ (line 1404) | def __init__(self, config): method forward (line 1424) | def forward( class DebertaV2ForQuestionAnswering (line 1480) | class DebertaV2ForQuestionAnswering(DebertaV2PreTrainedModel): method __init__ (line 1483) | def __init__(self, config): method forward (line 1504) | def forward( class DebertaV2ForMultipleChoice (line 1584) | class DebertaV2ForMultipleChoice(DebertaV2PreTrainedModel): method __init__ (line 1585) | def __init__(self, config): method get_input_embeddings (line 1602) | def get_input_embeddings(self): method set_input_embeddings (line 1605) | def set_input_embeddings(self, new_embeddings): method forward (line 1615) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/deberta_v2/modeling_tf_deberta_v2.py class TFDebertaV2ContextPooler (line 60) | class TFDebertaV2ContextPooler(tf.keras.layers.Layer): method __init__ (line 61) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 67) | def call(self, hidden_states, training: bool = False): method output_dim (line 77) | def output_dim(self) -> int: class TFDebertaV2XSoftmax (line 82) | class TFDebertaV2XSoftmax(tf.keras.layers.Layer): method __init__ (line 92) | def __init__(self, axis=-1, **kwargs): method call (line 96) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaV2StableDropout (line 106) | class TFDebertaV2StableDropout(tf.keras.layers.Layer): method __init__ (line 114) | def __init__(self, drop_prob, **kwargs): method xdropout (line 119) | def xdropout(self, inputs): method call (line 140) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaV2SelfOutput (line 147) | class TFDebertaV2SelfOutput(tf.keras.layers.Layer): method __init__ (line 148) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 154) | def call(self, hidden_states, input_tensor, training: bool = False): class TFDebertaV2Attention (line 162) | class TFDebertaV2Attention(tf.keras.layers.Layer): method __init__ (line 163) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 169) | def call( class TFDebertaV2Intermediate (line 200) | class TFDebertaV2Intermediate(tf.keras.layers.Layer): method __init__ (line 201) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 213) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2Output (line 221) | class TFDebertaV2Output(tf.keras.layers.Layer): method __init__ (line 222) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 231) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDebertaV2Layer (line 240) | class TFDebertaV2Layer(tf.keras.layers.Layer): method __init__ (line 241) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 248) | def call( class TFDebertaV2ConvLayer (line 277) | class TFDebertaV2ConvLayer(tf.keras.layers.Layer): method __init__ (line 278) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 289) | def build(self, input_shape): method call (line 301) | def call( class TFDebertaV2Encoder (line 332) | class TFDebertaV2Encoder(tf.keras.layers.Layer): method __init__ (line 333) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 357) | def build(self, input_shape): method get_rel_embedding (line 366) | def get_rel_embedding(self): method get_attention_mask (line 372) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 382) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 393) | def call( function make_log_bucket_position (line 455) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 471) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 499) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 509) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 519) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function take_along_axis (line 524) | def take_along_axis(x, indices): class TFDebertaV2DisentangledSelfAttention (line 543) | class TFDebertaV2DisentangledSelfAttention(tf.keras.layers.Layer): method __init__ (line 554) | def __init__(self, config: DebertaV2Config, **kwargs): method transpose_for_scores (line 616) | def transpose_for_scores(self, tensor: tf.Tensor, attention_heads: int... method call (line 627) | def call( method disentangled_att_bias (line 716) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class TFDebertaV2Embeddings (line 808) | class TFDebertaV2Embeddings(tf.keras.layers.Layer): method __init__ (line 811) | def __init__(self, config, **kwargs): method build (line 826) | def build(self, input_shape: tf.TensorShape): method call (line 856) | def call( class TFDebertaV2PredictionHeadTransform (line 922) | class TFDebertaV2PredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 923) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 938) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2LMPredictionHead (line 947) | class TFDebertaV2LMPredictionHead(tf.keras.layers.Layer): method __init__ (line 948) | def __init__(self, config: DebertaV2Config, input_embeddings: tf.keras... method build (line 960) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 965) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 968) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 972) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 975) | def set_bias(self, value: tf.Variable): method call (line 979) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2OnlyMLMHead (line 991) | class TFDebertaV2OnlyMLMHead(tf.keras.layers.Layer): method __init__ (line 992) | def __init__(self, config: DebertaV2Config, input_embeddings: tf.keras... method call (line 996) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFDebertaV2MainLayer (line 1003) | class TFDebertaV2MainLayer(tf.keras.layers.Layer): method __init__ (line 1006) | def __init__(self, config: DebertaV2Config, **kwargs): method get_input_embeddings (line 1014) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 1017) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 1021) | def _prune_heads(self, heads_to_prune): method call (line 1029) | def call( class TFDebertaV2PreTrainedModel (line 1088) | class TFDebertaV2PreTrainedModel(TFPreTrainedModel): class TFDebertaV2Model (line 1189) | class TFDebertaV2Model(TFDebertaV2PreTrainedModel): method __init__ (line 1190) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1203) | def call( method serving_output (line 1229) | def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput: class TFDebertaV2ForMaskedLM (line 1238) | class TFDebertaV2ForMaskedLM(TFDebertaV2PreTrainedModel, TFMaskedLanguag... method __init__ (line 1239) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method get_lm_head (line 1251) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1262) | def call( method serving_output (line 1307) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFDebertaV2ForSequenceClassification (line 1322) | class TFDebertaV2ForSequenceClassification(TFDebertaV2PreTrainedModel, T... method __init__ (line 1323) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1348) | def call( method serving_output (line 1396) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFDebertaV2ForTokenClassification (line 1411) | class TFDebertaV2ForTokenClassification(TFDebertaV2PreTrainedModel, TFTo... method __init__ (line 1412) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1431) | def call( method serving_output (line 1475) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFDebertaV2ForQuestionAnswering (line 1490) | class TFDebertaV2ForQuestionAnswering(TFDebertaV2PreTrainedModel, TFQues... method __init__ (line 1491) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1509) | def call( method serving_output (line 1568) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2.py class DebertaV2Tokenizer (line 56) | class DebertaV2Tokenizer(PreTrainedTokenizer): method __init__ (line 110) | def __init__( method vocab_size (line 152) | def vocab_size(self): method vocab (line 156) | def vocab(self): method get_vocab (line 159) | def get_vocab(self): method _tokenize (line 164) | def _tokenize(self, text: str) -> List[str]: 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 182) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 206) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 232) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method prepare_for_tokenization (line 259) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method save_vocabulary (line 265) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SPMTokenizer (line 269) | class SPMTokenizer: method __init__ (line 294) | def __init__(self, vocab_file, split_by_punct=False, sp_model_kwargs: ... method __getstate__ (line 316) | def __getstate__(self): method __setstate__ (line 321) | def __setstate__(self, d): method tokenize (line 331) | def tokenize(self, text): method convert_ids_to_tokens (line 334) | def convert_ids_to_tokens(self, ids): method decode (line 340) | def decode(self, tokens, start=-1, end=-1, raw_text=None): method add_special_token (line 357) | def add_special_token(self, token): method part_of_whole_word (line 365) | def part_of_whole_word(self, token, is_bos=False): method pad (line 377) | def pad(self): method bos (line 380) | def bos(self): method eos (line 383) | def eos(self): method unk (line 386) | def unk(self): method mask (line 389) | def mask(self): method sym (line 392) | def sym(self, id): method id (line 395) | def id(self, sym): method _encode_as_pieces (line 398) | def _encode_as_pieces(self, text): method split_to_words (line 407) | def split_to_words(self, text): method _run_strip_accents (line 443) | def _run_strip_accents(self, text): method _run_split_on_punc (line 454) | def _run_split_on_punc(self, text): method save_pretrained (line 474) | def save_pretrained(self, path: str, filename_prefix: str = None): function _is_whitespace (line 484) | def _is_whitespace(char): function _is_control (line 496) | def _is_control(char): function _is_punctuation (line 508) | def _is_punctuation(char): function convert_to_unicode (line 523) | def convert_to_unicode(text): FILE: benchmark/third_party/transformers/src/transformers/models/deberta_v2/tokenization_deberta_v2_fast.py class DebertaV2TokenizerFast (line 63) | class DebertaV2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 118) | def __init__( method build_inputs_with_special_tokens (line 153) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 177) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 203) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method save_vocabulary (line 230) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/decision_transformer/configuration_decision_transformer.py class DecisionTransformerConfig (line 31) | class DecisionTransformerConfig(PretrainedConfig): method __init__ (line 113) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/decision_transformer/modeling_decision_transformer.py function load_tf_weights_in_gpt2 (line 53) | def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path): class DecisionTransformerGPT2Attention (line 111) | class DecisionTransformerGPT2Attention(nn.Module): method __init__ (line 112) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 154) | def prune_heads(self, heads): method _attn (line 169) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 209) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 261) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 269) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 277) | def forward( class DecisionTransformerGPT2MLP (line 332) | class DecisionTransformerGPT2MLP(nn.Module): method __init__ (line 333) | def __init__(self, intermediate_size, config): method forward (line 341) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class DecisionTransformerGPT2Block (line 350) | class DecisionTransformerGPT2Block(nn.Module): method __init__ (line 351) | def __init__(self, config, layer_idx=None): method forward (line 368) | def forward( class DecisionTransformerGPT2PreTrainedModel (line 430) | class DecisionTransformerGPT2PreTrainedModel(PreTrainedModel): method __init__ (line 442) | def __init__(self, *inputs, **kwargs): method _init_weights (line 445) | def _init_weights(self, module): method _set_gradient_checkpointing (line 472) | def _set_gradient_checkpointing(self, module, value=False): class DecisionTransformerGPT2Model (line 477) | class DecisionTransformerGPT2Model(DecisionTransformerGPT2PreTrainedModel): method __init__ (line 480) | def __init__(self, config): method get_input_embeddings (line 502) | def get_input_embeddings(self): method set_input_embeddings (line 505) | def set_input_embeddings(self, new_embeddings): method forward (line 509) | def forward( class DecisionTransformerOutput (line 705) | class DecisionTransformerOutput(ModelOutput): class DecisionTransformerPreTrainedModel (line 739) | class DecisionTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 751) | def _init_weights(self, module): class DecisionTransformerModel (line 798) | class DecisionTransformerModel(DecisionTransformerPreTrainedModel): method __init__ (line 806) | def __init__(self, config): method forward (line 833) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/configuration_deformable_detr.py class DeformableDetrConfig (line 29) | class DeformableDetrConfig(PretrainedConfig): method __init__ (line 140) | def __init__( method num_attention_heads (line 226) | def num_attention_heads(self) -> int: method hidden_size (line 230) | def hidden_size(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/convert_deformable_detr_to_pytorch.py function rename_key (line 35) | def rename_key(orig_key): function read_in_q_k_v (line 64) | def read_in_q_k_v(state_dict): function prepare_img (line 80) | def prepare_img(): function convert_deformable_detr_checkpoint (line 88) | def convert_deformable_detr_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/custom_kernel/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: benchmark/third_party/transformers/src/transformers/models/deformable_detr/custom_kernel/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/custom_kernel/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/feature_extraction_deformable_detr.py function center_to_corners_format (line 40) | def center_to_corners_format(x): function corners_to_center_format (line 51) | def corners_to_center_format(x): function masks_to_boxes (line 63) | def masks_to_boxes(masks): function rgb_to_id (line 97) | def rgb_to_id(color): function id_to_rgb (line 106) | def id_to_rgb(id_map): class DeformableDetrFeatureExtractor (line 122) | class DeformableDetrFeatureExtractor(FeatureExtractionMixin, ImageFeatur... method __init__ (line 155) | def __init__( method _is_valid_format (line 176) | def _is_valid_format(self, format): method prepare (line 182) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 193) | def convert_coco_poly_to_mask(self, segmentations, height, width): method prepare_coco_detection (line 217) | def prepare_coco_detection(self, image, target, return_segmentation_ma... method prepare_coco_panoptic (line 282) | def prepare_coco_panoptic(self, image, target, masks_path, return_mask... method _resize (line 316) | def _resize(self, image, size, target=None, max_size=None): method _normalize (line 387) | def _normalize(self, image, mean, std, target=None): method __call__ (line 410) | def __call__( method _max_by_axis (line 641) | def _max_by_axis(self, the_list): method pad_and_create_pixel_mask (line 650) | def pad_and_create_pixel_mask( method post_process (line 692) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 738) | def post_process_object_detection( FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/load_custom.py function load_cuda_kernels (line 20) | def load_cuda_kernels(): FILE: benchmark/third_party/transformers/src/transformers/models/deformable_detr/modeling_deformable_detr.py class MultiScaleDeformableAttentionFunction (line 62) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 64) | def forward( method backward (line 89) | def backward(context, grad_output): class DeformableDetrDecoderOutput (line 128) | class DeformableDetrDecoderOutput(ModelOutput): class DeformableDetrModelOutput (line 165) | class DeformableDetrModelOutput(ModelOutput): class DeformableDetrObjectDetectionOutput (line 223) | class DeformableDetrObjectDetectionOutput(ModelOutput): function _get_clones (line 302) | def _get_clones(module, N): function inverse_sigmoid (line 306) | def inverse_sigmoid(x, eps=1e-5): class DeformableDetrFrozenBatchNorm2d (line 314) | class DeformableDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 322) | def __init__(self, n): method _load_from_state_dict (line 329) | def _load_from_state_dict( method forward (line 340) | def forward(self, x): function replace_batch_norm (line 354) | def replace_batch_norm(m, name=""): class DeformableDetrTimmConvEncoder (line 369) | class DeformableDetrTimmConvEncoder(nn.Module): method __init__ (line 376) | def __init__(self, config): method forward (line 401) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DeformableDetrConvModel (line 418) | class DeformableDetrConvModel(nn.Module): method __init__ (line 423) | def __init__(self, conv_encoder, position_embedding): method forward (line 428) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 440) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DeformableDetrSinePositionEmbedding (line 454) | class DeformableDetrSinePositionEmbedding(nn.Module): method __init__ (line 460) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 471) | def forward(self, pixel_values, pixel_mask): class DeformableDetrLearnedPositionEmbedding (line 493) | class DeformableDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 498) | def __init__(self, embedding_dim=256): method forward (line 503) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 517) | def build_position_encoding(config): function ms_deform_attn_core_pytorch (line 530) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... class DeformableDetrMultiscaleDeformableAttention (line 554) | class DeformableDetrMultiscaleDeformableAttention(nn.Module): method __init__ (line 559) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method _reset_parameters (line 588) | def _reset_parameters(self): method with_pos_embed (line 608) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 611) | def forward( class DeformableDetrMultiheadAttention (line 680) | class DeformableDetrMultiheadAttention(nn.Module): method __init__ (line 687) | def __init__( method _shape (line 711) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 714) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 717) | def forward( class DeformableDetrEncoderLayer (line 797) | class DeformableDetrEncoderLayer(nn.Module): method __init__ (line 798) | def __init__(self, config: DeformableDetrConfig): method forward (line 815) | def forward( class DeformableDetrDecoderLayer (line 885) | class DeformableDetrDecoderLayer(nn.Module): method __init__ (line 886) | def __init__(self, config: DeformableDetrConfig): method forward (line 914) | def forward( class DeformableDetrClassificationHead (line 998) | class DeformableDetrClassificationHead(nn.Module): method __init__ (line 1001) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 1007) | def forward(self, hidden_states: torch.Tensor): class DeformableDetrPreTrainedModel (line 1016) | class DeformableDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1021) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1045) | def _set_gradient_checkpointing(self, module, value=False): class DeformableDetrEncoder (line 1105) | class DeformableDetrEncoder(DeformableDetrPreTrainedModel): method __init__ (line 1116) | def __init__(self, config: DeformableDetrConfig): method get_reference_points (line 1126) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1156) | def forward( class DeformableDetrDecoder (line 1235) | class DeformableDetrDecoder(DeformableDetrPreTrainedModel): method __init__ (line 1250) | def __init__(self, config: DeformableDetrConfig): method forward (line 1264) | def forward( class DeformableDetrModel (line 1431) | class DeformableDetrModel(DeformableDetrPreTrainedModel): method __init__ (line 1432) | def __init__(self, config: DeformableDetrConfig): method get_encoder (line 1489) | def get_encoder(self): method get_decoder (line 1492) | def get_decoder(self): method freeze_backbone (line 1495) | def freeze_backbone(self): method unfreeze_backbone (line 1499) | def unfreeze_backbone(self): method get_valid_ratio (line 1503) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 1514) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 1531) | def gen_encoder_output_proposals(self, enc_output, padding_mask, spati... method forward (line 1581) | def forward( class DeformableDetrForObjectDetection (line 1790) | class DeformableDetrForObjectDetection(DeformableDetrPreTrainedModel): method __init__ (line 1791) | def __init__(self, config: DeformableDetrConfig): method _set_aux_loss (line 1833) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1841) | def forward( function dice_loss (line 2015) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2035) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DeformableDetrLoss (line 2066) | class DeformableDetrLoss(nn.Module): method __init__ (line 2083) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2091) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2126) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2142) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2167) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2174) | def _get_target_permutation_idx(self, indices): method get_loss (line 2180) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2190) | def forward(self, outputs, targets): class DeformableDetrMLPPredictionHead (line 2248) | class DeformableDetrMLPPredictionHead(nn.Module): method __init__ (line 2257) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2263) | def forward(self, x): class DeformableDetrHungarianMatcher (line 2269) | class DeformableDetrHungarianMatcher(nn.Module): method __init__ (line 2286) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2297) | def forward(self, outputs, targets): function _upcast (line 2350) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2359) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2376) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2393) | def generalized_box_iou(boxes1, boxes2): function center_to_corners_format (line 2418) | def center_to_corners_format(x): function _max_by_axis (line 2429) | def _max_by_axis(the_list): class NestedTensor (line 2439) | class NestedTensor(object): method __init__ (line 2440) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2444) | def to(self, device): method decompose (line 2453) | def decompose(self): method __repr__ (line 2456) | def __repr__(self): function nested_tensor_from_tensor_list (line 2461) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: benchmark/third_party/transformers/src/transformers/models/deit/configuration_deit.py class DeiTConfig (line 37) | class DeiTConfig(PretrainedConfig): method __init__ (line 96) | def __init__( class DeiTOnnxConfig (line 133) | class DeiTOnnxConfig(OnnxConfig): method inputs (line 137) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 145) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/deit/convert_deit_timm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 93) | def read_in_q_k_v(state_dict, config, base_model=False): function rename_key (line 119) | def rename_key(dct, old, new): function prepare_img (line 125) | def prepare_img(): function convert_deit_checkpoint (line 132) | def convert_deit_checkpoint(deit_name, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/deit/feature_extraction_deit.py class DeiTFeatureExtractor (line 38) | class DeiTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractio... method __init__ (line 72) | def __init__( method __call__ (line 94) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/deit/modeling_deit.py class DeiTEmbeddings (line 64) | class DeiTEmbeddings(nn.Module): method __init__ (line 69) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False) -... method forward (line 80) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class DeiTPatchEmbeddings (line 98) | class DeiTPatchEmbeddings(nn.Module): method __init__ (line 105) | def __init__(self, config): method forward (line 120) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class DeiTSelfAttention (line 135) | class DeiTSelfAttention(nn.Module): method __init__ (line 136) | def __init__(self, config: DeiTConfig) -> None: method transpose_for_scores (line 154) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 159) | def forward( class DeiTSelfOutput (line 196) | class DeiTSelfOutput(nn.Module): method __init__ (line 202) | def __init__(self, config: DeiTConfig) -> None: method forward (line 207) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTAttention (line 216) | class DeiTAttention(nn.Module): method __init__ (line 217) | def __init__(self, config: DeiTConfig) -> None: method prune_heads (line 223) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 241) | def forward( class DeiTIntermediate (line 256) | class DeiTIntermediate(nn.Module): method __init__ (line 257) | def __init__(self, config: DeiTConfig) -> None: method forward (line 265) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DeiTOutput (line 274) | class DeiTOutput(nn.Module): method __init__ (line 275) | def __init__(self, config: DeiTConfig) -> None: method forward (line 280) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTLayer (line 290) | class DeiTLayer(nn.Module): method __init__ (line 293) | def __init__(self, config: DeiTConfig) -> None: method forward (line 303) | def forward( class DeiTEncoder (line 333) | class DeiTEncoder(nn.Module): method __init__ (line 334) | def __init__(self, config: DeiTConfig) -> None: method forward (line 340) | def forward( class DeiTPreTrainedModel (line 391) | class DeiTPreTrainedModel(PreTrainedModel): method _init_weights (line 402) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 412) | def _set_gradient_checkpointing(self, module: DeiTEncoder, value: bool... class DeiTModel (line 455) | class DeiTModel(DeiTPreTrainedModel): method __init__ (line 456) | def __init__(self, config: DeiTConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 469) | def get_input_embeddings(self) -> DeiTPatchEmbeddings: method _prune_heads (line 472) | def _prune_heads(self, heads_to_prune): method forward (line 489) | def forward( class DeiTPooler (line 540) | class DeiTPooler(nn.Module): method __init__ (line 541) | def __init__(self, config: DeiTConfig): method forward (line 546) | def forward(self, hidden_states): class DeiTForMaskedImageModeling (line 567) | class DeiTForMaskedImageModeling(DeiTPreTrainedModel): method __init__ (line 568) | def __init__(self, config: DeiTConfig) -> None: method forward (line 587) | def forward( class DeiTForImageClassification (line 679) | class DeiTForImageClassification(DeiTPreTrainedModel): method __init__ (line 680) | def __init__(self, config: DeiTConfig) -> None: method forward (line 694) | def forward( class DeiTForImageClassificationWithTeacherOutput (line 786) | class DeiTForImageClassificationWithTeacherOutput(ModelOutput): class DeiTForImageClassificationWithTeacher (line 828) | class DeiTForImageClassificationWithTeacher(DeiTPreTrainedModel): method __init__ (line 829) | def __init__(self, config: DeiTConfig) -> None: method forward (line 854) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/deit/modeling_tf_deit.py class TFDeiTForImageClassificationWithTeacherOutput (line 73) | class TFDeiTForImageClassificationWithTeacherOutput(ModelOutput): class TFDeiTEmbeddings (line 103) | class TFDeiTEmbeddings(tf.keras.layers.Layer): method __init__ (line 108) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False, *... method build (line 115) | def build(self, input_shape: tf.TensorShape): method call (line 145) | def call( class TFDeiTPatchEmbeddings (line 166) | class TFDeiTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 173) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 190) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFDeiTSelfAttention (line 207) | class TFDeiTSelfAttention(tf.keras.layers.Layer): method __init__ (line 208) | def __init__(self, config: DeiTConfig, **kwargs): method transpose_for_scores (line 233) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 240) | def call( class TFDeiTSelfOutput (line 283) | class TFDeiTSelfOutput(tf.keras.layers.Layer): method __init__ (line 289) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 297) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDeiTAttention (line 305) | class TFDeiTAttention(tf.keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: DeiTConfig, **kwargs): method prune_heads (line 312) | def prune_heads(self, heads): method call (line 315) | def call( class TFDeiTIntermediate (line 334) | class TFDeiTIntermediate(tf.keras.layers.Layer): method __init__ (line 335) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 347) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDeiTOutput (line 355) | class TFDeiTOutput(tf.keras.layers.Layer): method __init__ (line 356) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 364) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDeiTLayer (line 372) | class TFDeiTLayer(tf.keras.layers.Layer): method __init__ (line 375) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 389) | def call( class TFDeiTEncoder (line 423) | class TFDeiTEncoder(tf.keras.layers.Layer): method __init__ (line 424) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 429) | def call( class TFDeiTMainLayer (line 469) | class TFDeiTMainLayer(tf.keras.layers.Layer): method __init__ (line 472) | def __init__( method get_input_embeddings (line 484) | def get_input_embeddings(self) -> TFDeiTPatchEmbeddings: method _prune_heads (line 487) | def _prune_heads(self, heads_to_prune): method get_head_mask (line 494) | def get_head_mask(self, head_mask): method call (line 503) | def call( class TFDeiTPreTrainedModel (line 560) | class TFDeiTPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 571) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 590) | def serving(self, inputs): class TFDeiTModel (line 641) | class TFDeiTModel(TFDeiTPreTrainedModel): method __init__ (line 642) | def __init__( method call (line 661) | def call( method serving_output (line 682) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFDeiTPooler (line 695) | class TFDeiTPooler(tf.keras.layers.Layer): method __init__ (line 696) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 706) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDeitPixelShuffle (line 715) | class TFDeitPixelShuffle(tf.keras.layers.Layer): method __init__ (line 718) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 724) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDeitDecoder (line 741) | class TFDeitDecoder(tf.keras.layers.Layer): method __init__ (line 742) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 749) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFDeiTForMaskedImageModeling (line 761) | class TFDeiTForMaskedImageModeling(TFDeiTPreTrainedModel): method __init__ (line 762) | def __init__(self, config: DeiTConfig) -> None: method call (line 771) | def call( method serving_output (line 868) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFDeiTForImageClassification (line 882) | class TFDeiTForImageClassification(TFDeiTPreTrainedModel, TFSequenceClas... method __init__ (line 883) | def __init__(self, config: DeiTConfig): method call (line 899) | def call( method serving_output (line 971) | def serving_output(self, output: TFImageClassifierOutput) -> TFImageCl... class TFDeiTForImageClassificationWithTeacher (line 990) | class TFDeiTForImageClassificationWithTeacher(TFDeiTPreTrainedModel): method __init__ (line 991) | def __init__(self, config: DeiTConfig) -> None: method call (line 1018) | def call( method serving_output (line 1058) | def serving_output( FILE: benchmark/third_party/transformers/src/transformers/models/detr/configuration_detr.py class DetrConfig (line 35) | class DetrConfig(PretrainedConfig): method __init__ (line 134) | def __init__( method num_attention_heads (line 210) | def num_attention_heads(self) -> int: method hidden_size (line 214) | def hidden_size(self) -> int: class DetrOnnxConfig (line 218) | class DetrOnnxConfig(OnnxConfig): method inputs (line 223) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 232) | def atol_for_validation(self) -> float: method default_onnx_opset (line 236) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/detr/convert_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 111) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 116) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 128) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 172) | def prepare_img(): function convert_detr_checkpoint (line 180) | def convert_detr_checkpoint(model_name, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/detr/feature_extraction_detr.py function center_to_corners_format (line 42) | def center_to_corners_format(x): function corners_to_center_format (line 52) | def corners_to_center_format(x): function masks_to_boxes (line 63) | def masks_to_boxes(masks): function rgb_to_id (line 99) | def rgb_to_id(color): function id_to_rgb (line 107) | def id_to_rgb(id_map): function binary_mask_to_rle (line 123) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 144) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 165) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 193) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 211) | def compute_segments( class DetrFeatureExtractor (line 271) | class DetrFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractio... method __init__ (line 303) | def __init__( method _is_valid_format (line 323) | def _is_valid_format(self, format): method prepare (line 328) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 339) | def convert_coco_poly_to_mask(self, segmentations, height, width): method prepare_coco_detection (line 363) | def prepare_coco_detection(self, image, target, return_segmentation_ma... method prepare_coco_panoptic (line 427) | def prepare_coco_panoptic(self, image, target, masks_path, return_mask... method _resize (line 460) | def _resize(self, image, size, target=None, max_size=None): method _normalize (line 530) | def _normalize(self, image, mean, std, target=None): method __call__ (line 552) | def __call__( method _max_by_axis (line 782) | def _max_by_axis(self, the_list): method pad_and_create_pixel_mask (line 790) | def pad_and_create_pixel_mask( method post_process (line 834) | def post_process(self, outputs, target_sizes): method post_process_segmentation (line 877) | def post_process_segmentation(self, outputs, target_sizes, threshold=0... method post_process_instance (line 924) | def post_process_instance(self, results, outputs, orig_target_sizes, m... method post_process_panoptic (line 973) | def post_process_panoptic(self, outputs, processed_sizes, target_sizes... method post_process_object_detection (line 1112) | def post_process_object_detection( method post_process_semantic_segmentation (line 1166) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 1214) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1298) | def post_process_panoptic_segmentation( FILE: benchmark/third_party/transformers/src/transformers/models/detr/modeling_detr.py class DetrDecoderOutput (line 61) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class DetrModelOutput (line 91) | class DetrModelOutput(Seq2SeqModelOutput): class DetrObjectDetectionOutput (line 131) | class DetrObjectDetectionOutput(ModelOutput): class DetrSegmentationOutput (line 194) | class DetrSegmentationOutput(ModelOutput): class DetrFrozenBatchNorm2d (line 265) | class DetrFrozenBatchNorm2d(nn.Module): method __init__ (line 273) | def __init__(self, n): method _load_from_state_dict (line 280) | def _load_from_state_dict( method forward (line 291) | def forward(self, x): function replace_batch_norm (line 304) | def replace_batch_norm(m, name=""): class DetrTimmConvEncoder (line 319) | class DetrTimmConvEncoder(nn.Module): method __init__ (line 327) | def __init__(self, name: str, dilation: bool, use_pretrained_backbone:... method forward (line 355) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DetrConvModel (line 367) | class DetrConvModel(nn.Module): method __init__ (line 372) | def __init__(self, conv_encoder, position_embedding): method forward (line 377) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 388) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DetrSinePositionEmbedding (line 402) | class DetrSinePositionEmbedding(nn.Module): method __init__ (line 408) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 419) | def forward(self, pixel_values, pixel_mask): class DetrLearnedPositionEmbedding (line 439) | class DetrLearnedPositionEmbedding(nn.Module): method __init__ (line 444) | def __init__(self, embedding_dim=256): method forward (line 449) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 462) | def build_position_encoding(config): class DetrAttention (line 475) | class DetrAttention(nn.Module): method __init__ (line 482) | def __init__( method _shape (line 507) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 510) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 513) | def forward( class DetrEncoderLayer (line 606) | class DetrEncoderLayer(nn.Module): method __init__ (line 607) | def __init__(self, config: DetrConfig): method forward (line 623) | def forward( class DetrDecoderLayer (line 676) | class DetrDecoderLayer(nn.Module): method __init__ (line 677) | def __init__(self, config: DetrConfig): method forward (line 703) | def forward( class DetrClassificationHead (line 783) | class DetrClassificationHead(nn.Module): method __init__ (line 786) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 792) | def forward(self, hidden_states: torch.Tensor): class DetrPreTrainedModel (line 801) | class DetrPreTrainedModel(PreTrainedModel): method _init_weights (line 806) | def _init_weights(self, module): method _set_gradient_checkpointing (line 829) | def _set_gradient_checkpointing(self, module, value=False): class DetrEncoder (line 889) | class DetrEncoder(DetrPreTrainedModel): method __init__ (line 904) | def __init__(self, config: DetrConfig): method forward (line 917) | def forward( class DetrDecoder (line 998) | class DetrDecoder(DetrPreTrainedModel): method __init__ (line 1013) | def __init__(self, config: DetrConfig): method forward (line 1026) | def forward( class DetrModel (line 1186) | class DetrModel(DetrPreTrainedModel): method __init__ (line 1187) | def __init__(self, config: DetrConfig): method get_encoder (line 1208) | def get_encoder(self): method get_decoder (line 1211) | def get_decoder(self): method freeze_backbone (line 1214) | def freeze_backbone(self): method unfreeze_backbone (line 1218) | def unfreeze_backbone(self): method forward (line 1224) | def forward( class DetrForObjectDetection (line 1356) | class DetrForObjectDetection(DetrPreTrainedModel): method __init__ (line 1357) | def __init__(self, config: DetrConfig): method _set_aux_loss (line 1376) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1384) | def forward( class DetrForSegmentation (line 1530) | class DetrForSegmentation(DetrPreTrainedModel): method __init__ (line 1531) | def __init__(self, config: DetrConfig): method forward (line 1554) | def forward( function _expand (line 1756) | def _expand(tensor, length: int): class DetrMaskHeadSmallConv (line 1761) | class DetrMaskHeadSmallConv(nn.Module): method __init__ (line 1766) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 1800) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class DetrMHAttentionMap (line 1841) | class DetrMHAttentionMap(nn.Module): method __init__ (line 1844) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 1855) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 1869) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1888) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DetrLoss (line 1920) | class DetrLoss(nn.Module): method __init__ (line 1945) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1956) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1978) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1993) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2017) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2050) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2056) | def _get_target_permutation_idx(self, indices): method get_loss (line 2062) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2073) | def forward(self, outputs, targets): class DetrMLPPredictionHead (line 2119) | class DetrMLPPredictionHead(nn.Module): method __init__ (line 2128) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2134) | def forward(self, x): class DetrHungarianMatcher (line 2141) | class DetrHungarianMatcher(nn.Module): method __init__ (line 2158) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2169) | def forward(self, outputs, targets): function _upcast (line 2222) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2230) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2247) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2263) | def generalized_box_iou(boxes1, boxes2): function center_to_corners_format (line 2288) | def center_to_corners_format(x): function _max_by_axis (line 2301) | def _max_by_axis(the_list): class NestedTensor (line 2310) | class NestedTensor(object): method __init__ (line 2311) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2315) | def to(self, device): method decompose (line 2324) | def decompose(self): method __repr__ (line 2327) | def __repr__(self): function nested_tensor_from_tensor_list (line 2331) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/distilbert/configuration_distilbert.py class DistilBertConfig (line 45) | class DistilBertConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class DistilBertOnnxConfig (line 142) | class DistilBertOnnxConfig(OnnxConfig): method inputs (line 144) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/distilbert/modeling_distilbert.py function create_sinusoidal_embeddings (line 73) | def create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): function _create_sinusoidal_embeddings (line 84) | def _create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): class Embeddings (line 92) | class Embeddings(nn.Module): method __init__ (line 93) | def __init__(self, config: PretrainedConfig): method forward (line 108) | def forward(self, input_ids: torch.Tensor) -> torch.Tensor: class MultiHeadSelfAttention (line 136) | class MultiHeadSelfAttention(nn.Module): method __init__ (line 137) | def __init__(self, config: PretrainedConfig): method prune_heads (line 153) | def prune_heads(self, heads: List[int]): method forward (line 168) | def forward( class FFN (line 233) | class FFN(nn.Module): method __init__ (line 234) | def __init__(self, config: PretrainedConfig): method forward (line 243) | def forward(self, input: torch.Tensor) -> torch.Tensor: method ff_chunk (line 246) | def ff_chunk(self, input: torch.Tensor) -> torch.Tensor: class TransformerBlock (line 254) | class TransformerBlock(nn.Module): method __init__ (line 255) | def __init__(self, config: PretrainedConfig): method forward (line 266) | def forward( class Transformer (line 308) | class Transformer(nn.Module): method __init__ (line 309) | def __init__(self, config: PretrainedConfig): method forward (line 314) | def forward( class DistilBertPreTrainedModel (line 369) | class DistilBertPreTrainedModel(PreTrainedModel): method _init_weights (line 379) | def _init_weights(self, module: nn.Module): class DistilBertModel (line 453) | class DistilBertModel(DistilBertPreTrainedModel): method __init__ (line 454) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 463) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 469) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_input_embeddings (line 511) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 514) | def set_input_embeddings(self, new_embeddings: nn.Embedding): method _prune_heads (line 517) | def _prune_heads(self, heads_to_prune: Dict[int, List[List[int]]]): method forward (line 532) | def forward( class DistilBertForMaskedLM (line 581) | class DistilBertForMaskedLM(DistilBertPreTrainedModel): method __init__ (line 582) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 597) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 603) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_output_embeddings (line 617) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 620) | def set_output_embeddings(self, new_embeddings: nn.Module): method forward (line 630) | def forward( class DistilBertForSequenceClassification (line 687) | class DistilBertForSequenceClassification(DistilBertPreTrainedModel): method __init__ (line 688) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 701) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 707) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 728) | def forward( class DistilBertForQuestionAnswering (line 805) | class DistilBertForQuestionAnswering(DistilBertPreTrainedModel): method __init__ (line 806) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 817) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 823) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 844) | def forward( class DistilBertForTokenClassification (line 922) | class DistilBertForTokenClassification(DistilBertPreTrainedModel): method __init__ (line 923) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 934) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 940) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 961) | def forward( class DistilBertForMultipleChoice (line 1017) | class DistilBertForMultipleChoice(DistilBertPreTrainedModel): method __init__ (line 1018) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 1029) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1035) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1053) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/distilbert/modeling_flax_distilbert.py function get_angles (line 97) | def get_angles(pos, i, d_model): function positional_encoding (line 102) | def positional_encoding(position, d_model): class FlaxEmbeddings (line 117) | class FlaxEmbeddings(nn.Module): method setup (line 123) | def setup(self): method __call__ (line 140) | def __call__(self, input_ids, deterministic: bool = True): class FlaxMultiHeadSelfAttention (line 162) | class FlaxMultiHeadSelfAttention(nn.Module): method setup (line 166) | def setup(self): method __call__ (line 195) | def __call__( class FlaxFFN (line 246) | class FlaxFFN(nn.Module): method setup (line 250) | def setup(self): method __call__ (line 267) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxTransformerBlock (line 275) | class FlaxTransformerBlock(nn.Module): method setup (line 279) | def setup(self): method __call__ (line 290) | def __call__( class FlaxTransformer (line 322) | class FlaxTransformer(nn.Module): method setup (line 326) | def setup(self): method __call__ (line 331) | def __call__( class FlaxTransformerEncoder (line 373) | class FlaxTransformerEncoder(nn.Module): method setup (line 377) | def setup(self): method __call__ (line 380) | def __call__( class FlaxDistilBertLMDecoder (line 399) | class FlaxDistilBertLMDecoder(nn.Module): method setup (line 404) | def setup(self): method __call__ (line 407) | def __call__(self, inputs, kernel): class FlaxDistilBertPreTrainedModel (line 416) | class FlaxDistilBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 426) | def __init__( method init_weights (line 438) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 459) | def __call__( class FlaxDistilBertModule (line 497) | class FlaxDistilBertModule(nn.Module): method setup (line 501) | def setup(self): method __call__ (line 505) | def __call__( class FlaxDistilBertModel (line 535) | class FlaxDistilBertModel(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForMaskedLMModule (line 542) | class FlaxDistilBertForMaskedLMModule(nn.Module): method setup (line 546) | def setup(self): method __call__ (line 566) | def __call__( class FlaxDistilBertForMaskedLM (line 608) | class FlaxDistilBertForMaskedLM(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForSequenceClassificationModule (line 617) | class FlaxDistilBertForSequenceClassificationModule(nn.Module): method setup (line 621) | def setup(self): method __call__ (line 634) | def __call__( class FlaxDistilBertForSequenceClassification (line 677) | class FlaxDistilBertForSequenceClassification(FlaxDistilBertPreTrainedMo... class FlaxDistilBertForMultipleChoiceModule (line 690) | class FlaxDistilBertForMultipleChoiceModule(nn.Module): method setup (line 694) | def setup(self): method __call__ (line 707) | def __call__( class FlaxDistilBertForMultipleChoice (line 757) | class FlaxDistilBertForMultipleChoice(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForTokenClassificationModule (line 773) | class FlaxDistilBertForTokenClassificationModule(nn.Module): method setup (line 777) | def setup(self): method __call__ (line 782) | def __call__( class FlaxDistilBertForTokenClassification (line 823) | class FlaxDistilBertForTokenClassification(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForQuestionAnsweringModule (line 836) | class FlaxDistilBertForQuestionAnsweringModule(nn.Module): method setup (line 840) | def setup(self): method __call__ (line 846) | def __call__( class FlaxDistilBertForQuestionAnswering (line 893) | class FlaxDistilBertForQuestionAnswering(FlaxDistilBertPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/distilbert/modeling_tf_distilbert.py class TFEmbeddings (line 74) | class TFEmbeddings(tf.keras.layers.Layer): method __init__ (line 77) | def __init__(self, config, **kwargs): method build (line 86) | def build(self, input_shape: tf.TensorShape): method call (line 103) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMultiHeadSelfAttention (line 138) | class TFMultiHeadSelfAttention(tf.keras.layers.Layer): method __init__ (line 139) | def __init__(self, config, **kwargs): method prune_heads (line 164) | def prune_heads(self, heads): method call (line 167) | def call(self, query, key, value, mask, head_mask, output_attentions, ... class TFFFN (line 224) | class TFFFN(tf.keras.layers.Layer): method __init__ (line 225) | def __init__(self, config, **kwargs): method call (line 236) | def call(self, input, training=False): class TFTransformerBlock (line 244) | class TFTransformerBlock(tf.keras.layers.Layer): method __init__ (line 245) | def __init__(self, config, **kwargs): method call (line 265) | def call(self, x, attn_mask, head_mask, output_attentions, training=Fa... class TFTransformer (line 293) | class TFTransformer(tf.keras.layers.Layer): method __init__ (line 294) | def __init__(self, config, **kwargs): method call (line 302) | def call(self, x, attn_mask, head_mask, output_attentions, output_hidd... class TFDistilBertMainLayer (line 349) | class TFDistilBertMainLayer(tf.keras.layers.Layer): method __init__ (line 352) | def __init__(self, config, **kwargs): method get_input_embeddings (line 364) | def get_input_embeddings(self): method set_input_embeddings (line 367) | def set_input_embeddings(self, value): method _prune_heads (line 371) | def _prune_heads(self, heads_to_prune): method call (line 375) | def call( class TFDistilBertPreTrainedModel (line 425) | class TFDistilBertPreTrainedModel(TFPreTrainedModel): method serving (line 442) | def serving(self, inputs): class TFDistilBertModel (line 537) | class TFDistilBertModel(TFDistilBertPreTrainedModel): method __init__ (line 538) | def __init__(self, config, *inputs, **kwargs): method call (line 550) | def call( method serving_output (line 573) | def serving_output(self, output): class TFDistilBertLMHead (line 580) | class TFDistilBertLMHead(tf.keras.layers.Layer): method __init__ (line 581) | def __init__(self, config, input_embeddings, **kwargs): method build (line 591) | def build(self, input_shape): method get_output_embeddings (line 596) | def get_output_embeddings(self): method set_output_embeddings (line 599) | def set_output_embeddings(self, value): method get_bias (line 603) | def get_bias(self): method set_bias (line 606) | def set_bias(self, value): method call (line 610) | def call(self, hidden_states): class TFDistilBertForMaskedLM (line 624) | class TFDistilBertForMaskedLM(TFDistilBertPreTrainedModel, TFMaskedLangu... method __init__ (line 625) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 637) | def get_lm_head(self): method get_prefix_bias_name (line 640) | def get_prefix_bias_name(self): method call (line 652) | def call( method serving_output (line 700) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFDistilBertForSequenceClassification (line 714) | class TFDistilBertForSequenceClassification(TFDistilBertPreTrainedModel,... method __init__ (line 715) | def __init__(self, config, *inputs, **kwargs): method call (line 739) | def call( method serving_output (line 787) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFDistilBertForTokenClassification (line 801) | class TFDistilBertForTokenClassification(TFDistilBertPreTrainedModel, TF... method __init__ (line 802) | def __init__(self, config, *inputs, **kwargs): method call (line 820) | def call( method serving_output (line 863) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFDistilBertForMultipleChoice (line 877) | class TFDistilBertForMultipleChoice(TFDistilBertPreTrainedModel, TFMulti... method __init__ (line 878) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 894) | def dummy_inputs(self): method call (line 913) | def call( method serving (line 982) | def serving(self, inputs): method serving_output (line 988) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFDistilBertForQuestionAnswering (line 1002) | class TFDistilBertForQuestionAnswering(TFDistilBertPreTrainedModel, TFQu... method __init__ (line 1003) | def __init__(self, config, *inputs, **kwargs): method call (line 1021) | def call( method serving_output (line 1080) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/distilbert/tokenization_distilbert.py class DistilBertTokenizer (line 62) | class DistilBertTokenizer(BertTokenizer): FILE: benchmark/third_party/transformers/src/transformers/models/distilbert/tokenization_distilbert_fast.py class DistilBertTokenizerFast (line 79) | class DistilBertTokenizerFast(BertTokenizerFast): FILE: benchmark/third_party/transformers/src/transformers/models/dit/convert_dit_unilm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 92) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 121) | def rename_key(dct, old, new): function prepare_img (line 127) | def prepare_img(): function convert_dit_checkpoint (line 134) | def convert_dit_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: benchmark/third_party/transformers/src/transformers/models/donut/configuration_donut_swin.py class DonutSwinConfig (line 29) | class DonutSwinConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/donut/feature_extraction_donut.py class DonutFeatureExtractor (line 38) | class DonutFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtracti... method __init__ (line 73) | def __init__( method rotate_image (line 97) | def rotate_image(self, image, size): method thumbnail (line 106) | def thumbnail(self, image, size): method pad (line 114) | def pad(self, image: Image.Image, size: Tuple[int, int], random_paddin... method __call__ (line 128) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/donut/modeling_donut_swin.py class DonutSwinEncoderOutput (line 60) | class DonutSwinEncoderOutput(ModelOutput): class DonutSwinModelOutput (line 94) | class DonutSwinModelOutput(ModelOutput): function window_partition (line 130) | def window_partition(input_feature, window_size): function window_reverse (line 143) | def window_reverse(windows, window_size, height, width): class DonutSwinEmbeddings (line 154) | class DonutSwinEmbeddings(nn.Module): method __init__ (line 159) | def __init__(self, config, use_mask_token=False): method forward (line 175) | def forward( class DonutSwinPatchEmbeddings (line 197) | class DonutSwinPatchEmbeddings(nn.Module): method __init__ (line 204) | def __init__(self, config): method maybe_pad (line 219) | def maybe_pad(self, pixel_values, height, width): method forward (line 228) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class DonutSwinPatchMerging (line 245) | class DonutSwinPatchMerging(nn.Module): method __init__ (line 258) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 265) | def maybe_pad(self, input_feature, height, width): method forward (line 273) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 300) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class DonutSwinDropPath (line 321) | class DonutSwinDropPath(nn.Module): method __init__ (line 324) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 328) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 331) | def extra_repr(self) -> str: class DonutSwinSelfAttention (line 336) | class DonutSwinSelfAttention(nn.Module): method __init__ (line 337) | def __init__(self, config, dim, num_heads): method transpose_for_scores (line 375) | def transpose_for_scores(self, x): method forward (line 380) | def forward( class DonutSwinSelfOutput (line 438) | class DonutSwinSelfOutput(nn.Module): method __init__ (line 439) | def __init__(self, config, dim): method forward (line 444) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DonutSwinAttention (line 452) | class DonutSwinAttention(nn.Module): method __init__ (line 453) | def __init__(self, config, dim, num_heads): method prune_heads (line 459) | def prune_heads(self, heads): method forward (line 477) | def forward( class DonutSwinIntermediate (line 491) | class DonutSwinIntermediate(nn.Module): method __init__ (line 492) | def __init__(self, config, dim): method forward (line 500) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinOutput (line 507) | class DonutSwinOutput(nn.Module): method __init__ (line 508) | def __init__(self, config, dim): method forward (line 513) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinLayer (line 520) | class DonutSwinLayer(nn.Module): method __init__ (line 521) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 535) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 541) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 569) | def maybe_pad(self, hidden_states, height, width): method forward (line 576) | def forward( class DonutSwinStage (line 639) | class DonutSwinStage(nn.Module): method __init__ (line 640) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 665) | def forward( class DonutSwinEncoder (line 696) | class DonutSwinEncoder(nn.Module): method __init__ (line 697) | def __init__(self, config, grid_size): method forward (line 719) | def forward( class DonutSwinPreTrainedModel (line 787) | class DonutSwinPreTrainedModel(PreTrainedModel): method _init_weights (line 798) | def _init_weights(self, module): method _set_gradient_checkpointing (line 810) | def _set_gradient_checkpointing(self, module, value=False): class DonutSwinModel (line 852) | class DonutSwinModel(DonutSwinPreTrainedModel): method __init__ (line 853) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 867) | def get_input_embeddings(self): method _prune_heads (line 870) | def _prune_heads(self, heads_to_prune): method forward (line 887) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/donut/processing_donut.py class DonutProcessor (line 25) | class DonutProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 48) | def __call__(self, *args, **kwargs): method batch_decode (line 81) | def batch_decode(self, *args, **kwargs): method decode (line 88) | def decode(self, *args, **kwargs): method as_target_processor (line 96) | def as_target_processor(self): method token2json (line 111) | def token2json(self, tokens, is_inner_value=False): FILE: benchmark/third_party/transformers/src/transformers/models/dpr/configuration_dpr.py class DPRConfig (line 45) | class DPRConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/dpr/modeling_dpr.py class DPRContextEncoderOutput (line 62) | class DPRContextEncoderOutput(ModelOutput): class DPRQuestionEncoderOutput (line 90) | class DPRQuestionEncoderOutput(ModelOutput): class DPRReaderOutput (line 118) | class DPRReaderOutput(ModelOutput): class DPRPreTrainedModel (line 150) | class DPRPreTrainedModel(PreTrainedModel): method _init_weights (line 151) | def _init_weights(self, module): method _set_gradient_checkpointing (line 167) | def _set_gradient_checkpointing(self, module, value=False): class DPREncoder (line 172) | class DPREncoder(DPRPreTrainedModel): method __init__ (line 176) | def __init__(self, config: DPRConfig): method forward (line 187) | def forward( method embeddings_size (line 223) | def embeddings_size(self) -> int: class DPRSpanPredictor (line 229) | class DPRSpanPredictor(DPRPreTrainedModel): method __init__ (line 233) | def __init__(self, config: DPRConfig): method forward (line 241) | def forward( class DPRPretrainedContextEncoder (line 292) | class DPRPretrainedContextEncoder(DPRPreTrainedModel): class DPRPretrainedQuestionEncoder (line 304) | class DPRPretrainedQuestionEncoder(DPRPreTrainedModel): class DPRPretrainedReader (line 316) | class DPRPretrainedReader(DPRPreTrainedModel): class DPRContextEncoder (line 446) | class DPRContextEncoder(DPRPretrainedContextEncoder): method __init__ (line 447) | def __init__(self, config: DPRConfig): method forward (line 456) | def forward( class DPRQuestionEncoder (line 527) | class DPRQuestionEncoder(DPRPretrainedQuestionEncoder): method __init__ (line 528) | def __init__(self, config: DPRConfig): method forward (line 537) | def forward( class DPRReader (line 608) | class DPRReader(DPRPretrainedReader): method __init__ (line 609) | def __init__(self, config: DPRConfig): method forward (line 618) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/dpr/modeling_tf_dpr.py class TFDPRContextEncoderOutput (line 60) | class TFDPRContextEncoderOutput(ModelOutput): class TFDPRQuestionEncoderOutput (line 88) | class TFDPRQuestionEncoderOutput(ModelOutput): class TFDPRReaderOutput (line 116) | class TFDPRReaderOutput(ModelOutput): class TFDPREncoderLayer (line 148) | class TFDPREncoderLayer(tf.keras.layers.Layer): method __init__ (line 152) | def __init__(self, config: DPRConfig, **kwargs): method call (line 168) | def call( method embeddings_size (line 206) | def embeddings_size(self) -> int: class TFDPRSpanPredictorLayer (line 212) | class TFDPRSpanPredictorLayer(tf.keras.layers.Layer): method __init__ (line 216) | def __init__(self, config: DPRConfig, **kwargs): method call (line 229) | def call( class TFDPRSpanPredictor (line 277) | class TFDPRSpanPredictor(TFPreTrainedModel): method __init__ (line 281) | def __init__(self, config: DPRConfig, **kwargs): method call (line 286) | def call( class TFDPREncoder (line 310) | class TFDPREncoder(TFPreTrainedModel): method __init__ (line 313) | def __init__(self, config: DPRConfig, **kwargs): method call (line 319) | def call( class TFDPRPretrainedContextEncoder (line 347) | class TFDPRPretrainedContextEncoder(TFPreTrainedModel): class TFDPRPretrainedQuestionEncoder (line 357) | class TFDPRPretrainedQuestionEncoder(TFPreTrainedModel): class TFDPRPretrainedReader (line 367) | class TFDPRPretrainedReader(TFPreTrainedModel): method serving (line 384) | def serving(self, inputs): class TFDPRContextEncoder (line 540) | class TFDPRContextEncoder(TFDPRPretrainedContextEncoder): method __init__ (line 541) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 545) | def get_input_embeddings(self): method call (line 555) | def call( method serving_output (line 616) | def serving_output(self, output): 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 serving_output (line 702) | def serving_output(self, output): class TFDPRReader (line 713) | class TFDPRReader(TFDPRPretrainedReader): method __init__ (line 714) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 718) | def get_input_embeddings(self): method call (line 728) | def call( method serving_output (line 782) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/dpr/tokenization_dpr.py class DPRContextEncoderTokenizer (line 113) | class DPRContextEncoderTokenizer(BertTokenizer): class DPRQuestionEncoderTokenizer (line 129) | class DPRQuestionEncoderTokenizer(BertTokenizer): class CustomDPRReaderTokenizerMixin (line 222) | class CustomDPRReaderTokenizerMixin: method __call__ (line 223) | def __call__( method decode_best_spans (line 282) | def decode_best_spans( method _get_best_spans (line 357) | def _get_best_spans( class DPRReaderTokenizer (line 396) | class DPRReaderTokenizer(CustomDPRReaderTokenizerMixin, BertTokenizer): FILE: benchmark/third_party/transformers/src/transformers/models/dpr/tokenization_dpr_fast.py class DPRContextEncoderTokenizerFast (line 114) | class DPRContextEncoderTokenizerFast(BertTokenizerFast): class DPRQuestionEncoderTokenizerFast (line 131) | class DPRQuestionEncoderTokenizerFast(BertTokenizerFast): class CustomDPRReaderTokenizerMixin (line 223) | class CustomDPRReaderTokenizerMixin: method __call__ (line 224) | def __call__( method decode_best_spans (line 282) | def decode_best_spans( method _get_best_spans (line 357) | def _get_best_spans( class DPRReaderTokenizerFast (line 394) | class DPRReaderTokenizerFast(CustomDPRReaderTokenizerMixin, BertTokenize... FILE: benchmark/third_party/transformers/src/transformers/models/dpt/configuration_dpt.py class DPTConfig (line 29) | class DPTConfig(PretrainedConfig): method __init__ (line 114) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/dpt/convert_dpt_to_pytorch.py function get_dpt_config (line 35) | def get_dpt_config(checkpoint_url): function remove_ignore_keys_ (line 62) | def remove_ignore_keys_(state_dict): function rename_key (line 68) | def rename_key(name): function read_in_q_k_v (line 161) | def read_in_q_k_v(state_dict, config): function prepare_img (line 182) | def prepare_img(): function convert_dpt_checkpoint (line 189) | def convert_dpt_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: benchmark/third_party/transformers/src/transformers/models/dpt/feature_extraction_dpt.py class DPTFeatureExtractor (line 41) | class DPTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtraction... method __init__ (line 75) | def __init__( method constrain_to_multiple_of (line 97) | def constrain_to_multiple_of(self, size, min_val=0, max_val=None): method update_size (line 108) | def update_size(self, image): method __call__ (line 138) | def __call__( method post_process_semantic_segmentation (line 209) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: benchmark/third_party/transformers/src/transformers/models/dpt/modeling_dpt.py class DPTViTEmbeddings (line 68) | class DPTViTEmbeddings(nn.Module): method __init__ (line 74) | def __init__(self, config): method _resize_pos_embed (line 84) | def _resize_pos_embed(self, posemb, grid_size_height, grid_size_width,... method forward (line 98) | def forward(self, pixel_values): class DPTViTPatchEmbeddings (line 123) | class DPTViTPatchEmbeddings(nn.Module): method __init__ (line 129) | def __init__(self, config): method forward (line 144) | def forward(self, pixel_values): class DPTViTSelfAttention (line 155) | class DPTViTSelfAttention(nn.Module): method __init__ (line 156) | def __init__(self, config: DPTConfig) -> None: method transpose_for_scores (line 174) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 179) | def forward( class DPTViTSelfOutput (line 216) | class DPTViTSelfOutput(nn.Module): method __init__ (line 222) | def __init__(self, config: DPTConfig) -> None: method forward (line 227) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTAttention (line 235) | class DPTViTAttention(nn.Module): method __init__ (line 236) | def __init__(self, config: DPTConfig) -> None: method prune_heads (line 243) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 262) | def forward( class DPTViTIntermediate (line 277) | class DPTViTIntermediate(nn.Module): method __init__ (line 278) | def __init__(self, config: DPTConfig) -> None: method forward (line 286) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DPTViTOutput (line 295) | class DPTViTOutput(nn.Module): method __init__ (line 296) | def __init__(self, config: DPTConfig) -> None: method forward (line 301) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTLayer (line 311) | class DPTViTLayer(nn.Module): method __init__ (line 314) | def __init__(self, config: DPTConfig) -> None: method forward (line 324) | def forward( class DPTViTEncoder (line 354) | class DPTViTEncoder(nn.Module): method __init__ (line 355) | def __init__(self, config: DPTConfig) -> None: method forward (line 361) | def forward( class DPTReassembleStage (line 411) | class DPTReassembleStage(nn.Module): method __init__ (line 427) | def __init__(self, config): method forward (line 442) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class DPTReassembleLayer (line 476) | class DPTReassembleLayer(nn.Module): method __init__ (line 477) | def __init__(self, config, channels, factor): method forward (line 491) | def forward(self, hidden_state): class DPTFeatureFusionStage (line 497) | class DPTFeatureFusionStage(nn.Module): method __init__ (line 498) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states): class DPTPreActResidualLayer (line 520) | class DPTPreActResidualLayer(nn.Module): method __init__ (line 529) | def __init__(self, config): method forward (line 557) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class DPTFeatureFusionLayer (line 575) | class DPTFeatureFusionLayer(nn.Module): method __init__ (line 585) | def __init__(self, config, align_corners=True): method forward (line 595) | def forward(self, hidden_state, residual=None): class DPTPreTrainedModel (line 612) | class DPTPreTrainedModel(PreTrainedModel): method _init_weights (line 623) | def _init_weights(self, module): method _set_gradient_checkpointing (line 635) | def _set_gradient_checkpointing(self, module, value=False): class DPTModel (line 678) | class DPTModel(DPTPreTrainedModel): method __init__ (line 679) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 693) | def get_input_embeddings(self): method _prune_heads (line 696) | def _prune_heads(self, heads_to_prune): method forward (line 713) | def forward( class DPTViTPooler (line 761) | class DPTViTPooler(nn.Module): method __init__ (line 762) | def __init__(self, config: DPTConfig): method forward (line 767) | def forward(self, hidden_states): class DPTNeck (line 776) | class DPTNeck(nn.Module): method __init__ (line 788) | def __init__(self, config): method forward (line 802) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class DPTDepthEstimationHead (line 820) | class DPTDepthEstimationHead(nn.Module): method __init__ (line 827) | def __init__(self, config): method forward (line 842) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTForDepthEstimation (line 859) | class DPTForDepthEstimation(DPTPreTrainedModel): method __init__ (line 860) | def __init__(self, config): method forward (line 876) | def forward( class DPTSemanticSegmentationHead (line 969) | class DPTSemanticSegmentationHead(nn.Module): method __init__ (line 970) | def __init__(self, config): method forward (line 985) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTAuxiliaryHead (line 994) | class DPTAuxiliaryHead(nn.Module): method __init__ (line 995) | def __init__(self, config): method forward (line 1007) | def forward(self, hidden_states): class DPTForSemanticSegmentation (line 1019) | class DPTForSemanticSegmentation(DPTPreTrainedModel): method __init__ (line 1020) | def __init__(self, config): method forward (line 1037) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/electra/configuration_electra.py class ElectraConfig (line 44) | class ElectraConfig(PretrainedConfig): method __init__ (line 135) | def __init__( class ElectraOnnxConfig (line 185) | class ElectraOnnxConfig(OnnxConfig): method inputs (line 187) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/electra/convert_electra_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/electra/modeling_electra.py function load_tf_weights_in_electra (line 68) | def load_tf_weights_in_electra(model, config, tf_checkpoint_path, discri... class ElectraEmbeddings (line 150) | class ElectraEmbeddings(nn.Module): method __init__ (line 153) | def __init__(self, config): method forward (line 172) | def forward( class ElectraSelfAttention (line 215) | class ElectraSelfAttention(nn.Module): method __init__ (line 216) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 242) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 247) | def forward( class ElectraSelfOutput (line 343) | class ElectraSelfOutput(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 350) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ElectraAttention (line 358) | class ElectraAttention(nn.Module): method __init__ (line 359) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 365) | def prune_heads(self, heads): method forward (line 383) | def forward( class ElectraIntermediate (line 408) | class ElectraIntermediate(nn.Module): method __init__ (line 409) | def __init__(self, config): method forward (line 417) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ElectraOutput (line 424) | class ElectraOutput(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 431) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ElectraLayer (line 439) | class ElectraLayer(nn.Module): method __init__ (line 440) | def __init__(self, config): method forward (line 454) | def forward( method feed_forward_chunk (line 519) | def feed_forward_chunk(self, attention_output): class ElectraEncoder (line 526) | class ElectraEncoder(nn.Module): method __init__ (line 527) | def __init__(self, config): method forward (line 533) | def forward( class ElectraDiscriminatorPredictions (line 623) | class ElectraDiscriminatorPredictions(nn.Module): method __init__ (line 626) | def __init__(self, config): method forward (line 633) | def forward(self, discriminator_hidden_states): class ElectraGeneratorPredictions (line 641) | class ElectraGeneratorPredictions(nn.Module): method __init__ (line 644) | def __init__(self, config): method forward (line 650) | def forward(self, generator_hidden_states): class ElectraPreTrainedModel (line 658) | class ElectraPreTrainedModel(PreTrainedModel): method _init_weights (line 672) | def _init_weights(self, module): method _set_gradient_checkpointing (line 688) | def _set_gradient_checkpointing(self, module, value=False): class ElectraForPreTrainingOutput (line 694) | class ElectraForPreTrainingOutput(ModelOutput): class ElectraModel (line 806) | class ElectraModel(ElectraPreTrainedModel): method __init__ (line 807) | def __init__(self, config): method get_input_embeddings (line 819) | def get_input_embeddings(self): method set_input_embeddings (line 822) | def set_input_embeddings(self, value): method _prune_heads (line 825) | def _prune_heads(self, heads_to_prune): method forward (line 840) | def forward( class ElectraClassificationHead (line 929) | class ElectraClassificationHead(nn.Module): method __init__ (line 932) | def __init__(self, config): method forward (line 941) | def forward(self, features, **kwargs): class ElectraForSequenceClassification (line 958) | class ElectraForSequenceClassification(ElectraPreTrainedModel): method __init__ (line 959) | def __init__(self, config): method forward (line 978) | def forward( class ElectraForPreTraining (line 1057) | class ElectraForPreTraining(ElectraPreTrainedModel): method __init__ (line 1058) | def __init__(self, config): method forward (line 1068) | def forward( class ElectraForMaskedLM (line 1163) | class ElectraForMaskedLM(ElectraPreTrainedModel): method __init__ (line 1164) | def __init__(self, config): method get_output_embeddings (line 1174) | def get_output_embeddings(self): method set_output_embeddings (line 1177) | def set_output_embeddings(self, word_embeddings): method forward (line 1190) | def forward( class ElectraForTokenClassification (line 1253) | class ElectraForTokenClassification(ElectraPreTrainedModel): method __init__ (line 1254) | def __init__(self, config): method forward (line 1276) | def forward( class ElectraForQuestionAnswering (line 1335) | class ElectraForQuestionAnswering(ElectraPreTrainedModel): method __init__ (line 1339) | def __init__(self, config): method forward (line 1360) | def forward( class ElectraForMultipleChoice (line 1444) | class ElectraForMultipleChoice(ElectraPreTrainedModel): method __init__ (line 1445) | def __init__(self, config): method forward (line 1462) | def forward( class ElectraForCausalLM (line 1532) | class ElectraForCausalLM(ElectraPreTrainedModel): method __init__ (line 1533) | def __init__(self, config): method get_output_embeddings (line 1545) | def get_output_embeddings(self): method set_output_embeddings (line 1548) | def set_output_embeddings(self, new_embeddings): method forward (line 1553) | def forward( method prepare_inputs_for_generation (line 1658) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1671) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/electra/modeling_flax_electra.py class FlaxElectraForPreTrainingOutput (line 62) | class FlaxElectraForPreTrainingOutput(ModelOutput): class FlaxElectraEmbeddings (line 148) | class FlaxElectraEmbeddings(nn.Module): method setup (line 154) | def setup(self): method __call__ (line 174) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxElectraSelfAttention (line 190) | class FlaxElectraSelfAttention(nn.Module): method setup (line 195) | def setup(self): method _split_heads (line 224) | def _split_heads(self, hidden_states): method _merge_heads (line 227) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 232) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 263) | def __call__( class FlaxElectraSelfOutput (line 362) | class FlaxElectraSelfOutput(nn.Module): method setup (line 366) | def setup(self): method __call__ (line 375) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxElectraAttention (line 383) | class FlaxElectraAttention(nn.Module): method setup (line 388) | def setup(self): method __call__ (line 392) | def __call__( class FlaxElectraIntermediate (line 426) | class FlaxElectraIntermediate(nn.Module): method setup (line 430) | def setup(self): method __call__ (line 438) | def __call__(self, hidden_states): class FlaxElectraOutput (line 445) | class FlaxElectraOutput(nn.Module): method setup (line 449) | def setup(self): method __call__ (line 458) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxElectraLayer (line 466) | class FlaxElectraLayer(nn.Module): method setup (line 470) | def setup(self): method __call__ (line 477) | def __call__( class FlaxElectraLayerCollection (line 524) | class FlaxElectraLayerCollection(nn.Module): method setup (line 529) | def setup(self): method __call__ (line 542) | def __call__( class FlaxElectraEncoder (line 607) | class FlaxElectraEncoder(nn.Module): method setup (line 612) | def setup(self): method __call__ (line 619) | def __call__( class FlaxElectraGeneratorPredictions (line 646) | class FlaxElectraGeneratorPredictions(nn.Module): method setup (line 650) | def setup(self): method __call__ (line 654) | def __call__(self, hidden_states): class FlaxElectraDiscriminatorPredictions (line 661) | class FlaxElectraDiscriminatorPredictions(nn.Module): method setup (line 667) | def setup(self): method __call__ (line 671) | def __call__(self, hidden_states): class FlaxElectraPreTrainedModel (line 678) | class FlaxElectraPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 688) | def __init__( method enable_gradient_checkpointing (line 702) | def enable_gradient_checkpointing(self): method init_weights (line 710) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 753) | def init_cache(self, batch_size, max_length): method __call__ (line 773) | def __call__( class FlaxElectraModule (line 871) | class FlaxElectraModule(nn.Module): method setup (line 876) | def setup(self): method __call__ (line 884) | def __call__( class FlaxElectraModel (line 923) | class FlaxElectraModel(FlaxElectraPreTrainedModel): class FlaxElectraTiedDense (line 932) | class FlaxElectraTiedDense(nn.Module): method setup (line 938) | def setup(self): method __call__ (line 941) | def __call__(self, x, kernel): class FlaxElectraForMaskedLMModule (line 954) | class FlaxElectraForMaskedLMModule(nn.Module): method setup (line 959) | def setup(self): method __call__ (line 969) | def __call__( class FlaxElectraForMaskedLM (line 1012) | class FlaxElectraForMaskedLM(FlaxElectraPreTrainedModel): class FlaxElectraForPreTrainingModule (line 1021) | class FlaxElectraForPreTrainingModule(nn.Module): method setup (line 1026) | def setup(self): method __call__ (line 1032) | def __call__( class FlaxElectraForPreTraining (line 1078) | class FlaxElectraForPreTraining(FlaxElectraPreTrainedModel): class FlaxElectraForTokenClassificationModule (line 1109) | class FlaxElectraForTokenClassificationModule(nn.Module): method setup (line 1114) | def setup(self): method __call__ (line 1126) | def __call__( class FlaxElectraForTokenClassification (line 1173) | class FlaxElectraForTokenClassification(FlaxElectraPreTrainedModel): function identity (line 1186) | def identity(x, **kwargs): class FlaxElectraSequenceSummary (line 1190) | class FlaxElectraSequenceSummary(nn.Module): method setup (line 1210) | def setup(self): method __call__ (line 1234) | def __call__(self, hidden_states, cls_index=None, deterministic: bool ... class FlaxElectraForMultipleChoiceModule (line 1256) | class FlaxElectraForMultipleChoiceModule(nn.Module): method setup (line 1261) | def setup(self): method __call__ (line 1268) | def __call__( class FlaxElectraForMultipleChoice (line 1321) | class FlaxElectraForMultipleChoice(FlaxElectraPreTrainedModel): class FlaxElectraForQuestionAnsweringModule (line 1338) | class FlaxElectraForQuestionAnsweringModule(nn.Module): method setup (line 1343) | def setup(self): method __call__ (line 1349) | def __call__( class FlaxElectraForQuestionAnswering (line 1397) | class FlaxElectraForQuestionAnswering(FlaxElectraPreTrainedModel): class FlaxElectraClassificationHead (line 1410) | class FlaxElectraClassificationHead(nn.Module): method setup (line 1416) | def setup(self): method __call__ (line 1426) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxElectraForSequenceClassificationModule (line 1436) | class FlaxElectraForSequenceClassificationModule(nn.Module): method setup (line 1441) | def setup(self): method __call__ (line 1447) | def __call__( class FlaxElectraForSequenceClassification (line 1491) | class FlaxElectraForSequenceClassification(FlaxElectraPreTrainedModel): class FlaxElectraForCausalLMModule (line 1504) | class FlaxElectraForCausalLMModule(nn.Module): method setup (line 1509) | def setup(self): method __call__ (line 1519) | def __call__( class FlaxElectraForCausalLM (line 1576) | class FlaxElectraForCausalLM(FlaxElectraPreTrainedModel): method prepare_inputs_for_generation (line 1579) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1600) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/electra/modeling_tf_electra.py class TFElectraSelfAttention (line 79) | class TFElectraSelfAttention(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, config: ElectraConfig, **kwargs): method transpose_for_scores (line 107) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 114) | def call( class TFElectraSelfOutput (line 197) | class TFElectraSelfOutput(tf.keras.layers.Layer): method __init__ (line 198) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 207) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFElectraAttention (line 216) | class TFElectraAttention(tf.keras.layers.Layer): method __init__ (line 217) | def __init__(self, config: ElectraConfig, **kwargs): method prune_heads (line 223) | def prune_heads(self, heads): method call (line 226) | def call( class TFElectraIntermediate (line 257) | class TFElectraIntermediate(tf.keras.layers.Layer): method __init__ (line 258) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 270) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFElectraOutput (line 278) | class TFElectraOutput(tf.keras.layers.Layer): method __init__ (line 279) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 288) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFElectraLayer (line 297) | class TFElectraLayer(tf.keras.layers.Layer): method __init__ (line 298) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 311) | def call( class TFElectraEncoder (line 384) | class TFElectraEncoder(tf.keras.layers.Layer): method __init__ (line 385) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 390) | def call( class TFElectraPooler (line 454) | class TFElectraPooler(tf.keras.layers.Layer): method __init__ (line 455) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 465) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFElectraEmbeddings (line 475) | class TFElectraEmbeddings(tf.keras.layers.Layer): method __init__ (line 478) | def __init__(self, config: ElectraConfig, **kwargs): method build (line 489) | def build(self, input_shape: tf.TensorShape): method call (line 514) | def call( class TFElectraDiscriminatorPredictions (line 564) | class TFElectraDiscriminatorPredictions(tf.keras.layers.Layer): method __init__ (line 565) | def __init__(self, config, **kwargs): method call (line 572) | def call(self, discriminator_hidden_states, training=False): class TFElectraGeneratorPredictions (line 580) | class TFElectraGeneratorPredictions(tf.keras.layers.Layer): method __init__ (line 581) | def __init__(self, config, **kwargs): method call (line 587) | def call(self, generator_hidden_states, training=False): class TFElectraPreTrainedModel (line 595) | class TFElectraPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 609) | def dummy_inputs(self): class TFElectraMainLayer (line 628) | class TFElectraMainLayer(tf.keras.layers.Layer): method __init__ (line 631) | def __init__(self, config, **kwargs): method get_input_embeddings (line 644) | def get_input_embeddings(self): method set_input_embeddings (line 647) | def set_input_embeddings(self, value): method _prune_heads (line 651) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 658) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 707) | def get_head_mask(self, head_mask): method call (line 716) | def call( class TFElectraForPreTrainingOutput (line 815) | class TFElectraForPreTrainingOutput(ModelOutput): class TFElectraModel (line 940) | class TFElectraModel(TFElectraPreTrainedModel): method __init__ (line 941) | def __init__(self, config, *inputs, **kwargs): method call (line 954) | def call( method serving_output (line 1010) | def serving_output(self, output): class TFElectraForPreTraining (line 1037) | class TFElectraForPreTraining(TFElectraPreTrainedModel): method __init__ (line 1038) | def __init__(self, config, **kwargs): method call (line 1047) | def call( method serving_output (line 1099) | def serving_output(self, output): class TFElectraMaskedLMHead (line 1106) | class TFElectraMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 1107) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1114) | def build(self, input_shape): method get_output_embeddings (line 1119) | def get_output_embeddings(self): method set_output_embeddings (line 1122) | def set_output_embeddings(self, value): method get_bias (line 1126) | def get_bias(self): method set_bias (line 1129) | def set_bias(self, value): method call (line 1133) | def call(self, hidden_states): class TFElectraForMaskedLM (line 1152) | class TFElectraForMaskedLM(TFElectraPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1153) | def __init__(self, config, **kwargs): method get_lm_head (line 1167) | def get_lm_head(self): method get_prefix_bias_name (line 1170) | def get_prefix_bias_name(self): method call (line 1185) | def call( method serving_output (line 1235) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFElectraClassificationHead (line 1242) | class TFElectraClassificationHead(tf.keras.layers.Layer): method __init__ (line 1245) | def __init__(self, config, **kwargs): method call (line 1261) | def call(self, inputs, **kwargs): class TFElectraForSequenceClassification (line 1279) | class TFElectraForSequenceClassification(TFElectraPreTrainedModel, TFSeq... method __init__ (line 1280) | def __init__(self, config, *inputs, **kwargs): method call (line 1296) | def call( method serving_output (line 1344) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFElectraForMultipleChoice (line 1358) | class TFElectraForMultipleChoice(TFElectraPreTrainedModel, TFMultipleCho... method __init__ (line 1359) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1371) | def dummy_inputs(self): method call (line 1388) | def call( method serving (line 1463) | def serving(self, inputs: Dict[str, tf.Tensor]): method serving_output (line 1469) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFElectraForTokenClassification (line 1484) | class TFElectraForTokenClassification(TFElectraPreTrainedModel, TFTokenC... method __init__ (line 1485) | def __init__(self, config, **kwargs): method call (line 1507) | def call( method serving_output (line 1555) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFElectraForQuestionAnswering (line 1569) | class TFElectraForQuestionAnswering(TFElectraPreTrainedModel, TFQuestion... method __init__ (line 1570) | def __init__(self, config, *inputs, **kwargs): method call (line 1591) | def call( method serving_output (line 1657) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/electra/tokenization_electra.py function load_vocab (line 71) | def load_vocab(vocab_file): function whitespace_tokenize (line 83) | def whitespace_tokenize(text): class ElectraTokenizer (line 93) | class ElectraTokenizer(PreTrainedTokenizer): method __init__ (line 140) | def __init__( method do_lower_case (line 187) | def do_lower_case(self): method vocab_size (line 191) | def vocab_size(self): method get_vocab (line 194) | def get_vocab(self): method _tokenize (line 197) | def _tokenize(self, text): method _convert_token_to_id (line 211) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 215) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 219) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 224) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 249) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 277) | def create_token_type_ids_from_sequences( method save_vocabulary (line 306) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 328) | class BasicTokenizer(object): method __init__ (line 348) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 356) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 393) | def _run_strip_accents(self, text): method _run_split_on_punc (line 404) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 426) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 439) | def _is_chinese_char(self, cp): method _clean_text (line 463) | def _clean_text(self, text): class WordpieceTokenizer (line 478) | class WordpieceTokenizer(object): method __init__ (line 481) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 486) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/electra/tokenization_electra_fast.py class ElectraTokenizerFast (line 88) | class ElectraTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 134) | def __init__( method build_inputs_with_special_tokens (line 176) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 200) | def create_token_type_ids_from_sequences( method save_vocabulary (line 229) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py class EncoderDecoderConfig (line 26) | class EncoderDecoderConfig(PretrainedConfig): method __init__ (line 75) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 92) | def from_encoder_decoder_configs( method to_dict (line 108) | def to_dict(self): FILE: benchmark/third_party/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 181) | def __init__( method tie_weights (line 251) | def tie_weights(self): method _set_gradient_checkpointing (line 260) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 265) | def get_encoder(self): method get_decoder (line 268) | def get_decoder(self): method get_input_embeddings (line 271) | def get_input_embeddings(self): method get_output_embeddings (line 274) | def get_output_embeddings(self): method set_output_embeddings (line 277) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 281) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 382) | def from_encoder_decoder_pretrained( method forward (line 533) | def forward( method prepare_decoder_input_ids_from_labels (line 657) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 660) | def prepare_inputs_for_generation( method resize_token_embeddings (line 675) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 682) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/encoder_decoder/modeling_flax_encoder_decoder.py class FlaxEncoderDecoderModule (line 207) | class FlaxEncoderDecoderModule(nn.Module): method setup (line 211) | def setup(self): method _get_encoder_module (line 237) | def _get_encoder_module(self): method _get_projection_module (line 240) | def _get_projection_module(self): method _get_decoder_module (line 243) | def _get_decoder_module(self): method __call__ (line 246) | def __call__( class FlaxEncoderDecoderModel (line 302) | class FlaxEncoderDecoderModel(FlaxPreTrainedModel): method __init__ (line 313) | def __init__( method init_weights (line 342) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 387) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 430) | def encode( method decode (line 504) | def decode( method __call__ (line 630) | def __call__( method prepare_inputs_for_generation (line 722) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 755) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 761) | def from_encoder_decoder_pretrained( FILE: benchmark/third_party/transformers/src/transformers/models/encoder_decoder/modeling_tf_encoder_decoder.py function shift_tokens_right (line 159) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... class TFEncoderDecoderModel (line 187) | class TFEncoderDecoderModel(TFPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 198) | def __init__( method dummy_inputs (line 266) | def dummy_inputs(self): method get_encoder (line 278) | def get_encoder(self): method get_decoder (line 281) | def get_decoder(self): method get_input_embeddings (line 284) | def get_input_embeddings(self): method get_output_embeddings (line 287) | def get_output_embeddings(self): method set_output_embeddings (line 290) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 294) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 346) | def from_encoder_decoder_pretrained( method call (line 511) | def call( method serving_output (line 671) | def serving_output(self, output): method prepare_inputs_for_generation (line 694) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 714) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 717) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 724) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/ernie/configuration_ernie.py class ErnieConfig (line 41) | class ErnieConfig(PretrainedConfig): method __init__ (line 112) | def __init__( class ErnieOnnxConfig (line 155) | class ErnieOnnxConfig(OnnxConfig): method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/ernie/modeling_ernie.py class ErnieEmbeddings (line 75) | class ErnieEmbeddings(nn.Module): method __init__ (line 78) | def __init__(self, config): method forward (line 98) | def forward( class ErnieSelfAttention (line 150) | class ErnieSelfAttention(nn.Module): method __init__ (line 151) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 177) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 182) | def forward( class ErnieSelfOutput (line 278) | class ErnieSelfOutput(nn.Module): method __init__ (line 279) | def __init__(self, config): method forward (line 285) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ErnieAttention (line 293) | class ErnieAttention(nn.Module): method __init__ (line 294) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 300) | def prune_heads(self, heads): method forward (line 318) | def forward( class ErnieIntermediate (line 343) | class ErnieIntermediate(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 352) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieOutput (line 359) | class ErnieOutput(nn.Module): method __init__ (line 360) | def __init__(self, config): method forward (line 366) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ErnieLayer (line 374) | class ErnieLayer(nn.Module): method __init__ (line 375) | def __init__(self, config): method forward (line 389) | def forward( method feed_forward_chunk (line 454) | def feed_forward_chunk(self, attention_output): class ErnieEncoder (line 461) | class ErnieEncoder(nn.Module): method __init__ (line 462) | def __init__(self, config): method forward (line 468) | def forward( class ErniePooler (line 559) | class ErniePooler(nn.Module): method __init__ (line 560) | def __init__(self, config): method forward (line 565) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErniePredictionHeadTransform (line 575) | class ErniePredictionHeadTransform(nn.Module): method __init__ (line 576) | def __init__(self, config): method forward (line 585) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieLMPredictionHead (line 593) | class ErnieLMPredictionHead(nn.Module): method __init__ (line 594) | def __init__(self, config): method forward (line 607) | def forward(self, hidden_states): class ErnieOnlyMLMHead (line 614) | class ErnieOnlyMLMHead(nn.Module): method __init__ (line 615) | def __init__(self, config): method forward (line 619) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class ErnieOnlyNSPHead (line 625) | class ErnieOnlyNSPHead(nn.Module): method __init__ (line 626) | def __init__(self, config): method forward (line 630) | def forward(self, pooled_output): class ErniePreTrainingHeads (line 636) | class ErniePreTrainingHeads(nn.Module): method __init__ (line 637) | def __init__(self, config): method forward (line 642) | def forward(self, sequence_output, pooled_output): class ErniePreTrainedModel (line 648) | class ErniePreTrainedModel(PreTrainedModel): method _init_weights (line 659) | def _init_weights(self, module): method _set_gradient_checkpointing (line 675) | def _set_gradient_checkpointing(self, module, value=False): class ErnieForPreTrainingOutput (line 682) | class ErnieForPreTrainingOutput(ModelOutput): class ErnieModel (line 790) | class ErnieModel(ErniePreTrainedModel): method __init__ (line 804) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 817) | def get_input_embeddings(self): method set_input_embeddings (line 821) | def set_input_embeddings(self, value): method _prune_heads (line 825) | def _prune_heads(self, heads_to_prune): method forward (line 840) | def forward( class ErnieForPreTraining (line 979) | class ErnieForPreTraining(ErniePreTrainedModel): method __init__ (line 981) | def __init__(self, config): method get_output_embeddings (line 991) | def get_output_embeddings(self): method set_output_embeddings (line 995) | def set_output_embeddings(self, new_embeddings): method forward (line 1000) | def forward( class ErnieForCausalLM (line 1088) | class ErnieForCausalLM(ErniePreTrainedModel): method __init__ (line 1093) | def __init__(self, config): method get_output_embeddings (line 1106) | def get_output_embeddings(self): method set_output_embeddings (line 1110) | def set_output_embeddings(self, new_embeddings): method forward (line 1120) | def forward( method prepare_inputs_for_generation (line 1208) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1221) | def _reorder_cache(self, past, beam_idx): class ErnieForMaskedLM (line 1229) | class ErnieForMaskedLM(ErniePreTrainedModel): method __init__ (line 1234) | def __init__(self, config): method get_output_embeddings (line 1250) | def get_output_embeddings(self): method set_output_embeddings (line 1254) | def set_output_embeddings(self, new_embeddings): method forward (line 1266) | def forward( method prepare_inputs_for_generation (line 1326) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class ErnieForNextSentencePrediction (line 1347) | class ErnieForNextSentencePrediction(ErniePreTrainedModel): method __init__ (line 1349) | def __init__(self, config): method forward (line 1360) | def forward( class ErnieForSequenceClassification (line 1455) | class ErnieForSequenceClassification(ErniePreTrainedModel): method __init__ (line 1457) | def __init__(self, config): method forward (line 1473) | def forward( class ErnieForMultipleChoice (line 1554) | class ErnieForMultipleChoice(ErniePreTrainedModel): method __init__ (line 1556) | def __init__(self, config): method forward (line 1576) | def forward( class ErnieForTokenClassification (line 1652) | class ErnieForTokenClassification(ErniePreTrainedModel): method __init__ (line 1656) | def __init__(self, config): method forward (line 1671) | def forward( class ErnieForQuestionAnswering (line 1733) | class ErnieForQuestionAnswering(ErniePreTrainedModel): method __init__ (line 1737) | def __init__(self, config): method forward (line 1748) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/esm/configuration_esm.py class EsmConfig (line 33) | class EsmConfig(PretrainedConfig): method __init__ (line 105) | def __init__( method to_dict (line 167) | def to_dict(self): class EsmFoldConfig (line 181) | class EsmFoldConfig: method __post_init__ (line 195) | def __post_init__(self): method to_dict (line 201) | def to_dict(self): class TrunkConfig (line 214) | class TrunkConfig: method __post_init__ (line 228) | def __post_init__(self): method to_dict (line 266) | def to_dict(self): class StructureModuleConfig (line 279) | class StructureModuleConfig: method to_dict (line 330) | def to_dict(self): function get_default_vocab_list (line 334) | def get_default_vocab_list(): FILE: benchmark/third_party/transformers/src/transformers/models/esm/convert_esm.py function transfer_and_check_weights (line 69) | def transfer_and_check_weights(original_module, our_module): function convert_esm_checkpoint_to_pytorch (line 77) | def convert_esm_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/esm/modeling_esm.py function rotate_half (line 52) | def rotate_half(x): function apply_rotary_pos_emb (line 57) | def apply_rotary_pos_emb(x, cos, sin): function gelu (line 64) | def gelu(x): class RotaryEmbedding (line 71) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 78) | def __init__(self, dim: int): method _update_cos_sin_tables (line 89) | def _update_cos_sin_tables(self, x, seq_dimension=2): method forward (line 105) | def forward(self, q: torch.Tensor, k: torch.Tensor) -> Tuple[torch.Ten... class EsmEmbeddings (line 114) | class EsmEmbeddings(nn.Module): method __init__ (line 119) | def __init__(self, config): method forward (line 139) | def forward( method create_position_ids_from_inputs_embeds (line 184) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class EsmSelfAttention (line 202) | class EsmSelfAttention(nn.Module): method __init__ (line 203) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 232) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 237) | def forward( class EsmSelfOutput (line 341) | class EsmSelfOutput(nn.Module): method __init__ (line 342) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states, input_tensor): class EsmAttention (line 354) | class EsmAttention(nn.Module): method __init__ (line 355) | def __init__(self, config): method prune_heads (line 362) | def prune_heads(self, heads): method forward (line 380) | def forward( class EsmIntermediate (line 405) | class EsmIntermediate(nn.Module): method __init__ (line 406) | def __init__(self, config): method forward (line 410) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmOutput (line 416) | class EsmOutput(nn.Module): method __init__ (line 417) | def __init__(self, config): method forward (line 422) | def forward(self, hidden_states, input_tensor): class EsmLayer (line 429) | class EsmLayer(nn.Module): method __init__ (line 430) | def __init__(self, config): method forward (line 445) | def forward( method feed_forward_chunk (line 508) | def feed_forward_chunk(self, attention_output): class EsmEncoder (line 515) | class EsmEncoder(nn.Module): method __init__ (line 516) | def __init__(self, config): method forward (line 523) | def forward( class EsmPooler (line 618) | class EsmPooler(nn.Module): method __init__ (line 619) | def __init__(self, config): method forward (line 624) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmPreTrainedModel (line 633) | class EsmPreTrainedModel(PreTrainedModel): method _init_weights (line 643) | def _init_weights(self, module): class EsmModel (line 722) | class EsmModel(EsmPreTrainedModel): method __init__ (line 739) | def __init__(self, config, add_pooling_layer=True): method _set_gradient_checkpointing (line 751) | def _set_gradient_checkpointing(self, module, value=False): method get_input_embeddings (line 755) | def get_input_embeddings(self): method set_input_embeddings (line 758) | def set_input_embeddings(self, value): method _prune_heads (line 761) | def _prune_heads(self, heads_to_prune): method forward (line 776) | def forward( class EsmForMaskedLM (line 898) | class EsmForMaskedLM(EsmPreTrainedModel): method __init__ (line 902) | def __init__(self, config): method get_output_embeddings (line 916) | def get_output_embeddings(self): method set_output_embeddings (line 919) | def set_output_embeddings(self, new_embeddings): method forward (line 930) | def forward( class EsmLMHead (line 986) | class EsmLMHead(nn.Module): method __init__ (line 989) | def __init__(self, config): method forward (line 997) | def forward(self, features, **kwargs): class EsmForSequenceClassification (line 1014) | class EsmForSequenceClassification(EsmPreTrainedModel): method __init__ (line 1017) | def __init__(self, config): method forward (line 1034) | def forward( class EsmForTokenClassification (line 1109) | class EsmForTokenClassification(EsmPreTrainedModel): method __init__ (line 1113) | def __init__(self, config): method forward (line 1130) | def forward( class EsmClassificationHead (line 1190) | class EsmClassificationHead(nn.Module): method __init__ (line 1193) | def __init__(self, config): method forward (line 1199) | def forward(self, features, **kwargs): function create_position_ids_from_input_ids (line 1209) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/esm/modeling_esmfold.py class EsmForProteinFoldingOutput (line 61) | class EsmForProteinFoldingOutput(ModelOutput): function is_fp16_enabled (line 174) | def is_fp16_enabled(): function is_deepspeed_initialized (line 182) | def is_deepspeed_initialized(): function collate_dense_tensors (line 195) | def collate_dense_tensors(samples: List[torch.Tensor], pad_v: float = 0)... function flatten_final_dims (line 218) | def flatten_final_dims(t: torch.Tensor, no_dims: int): function permute_final_dims (line 222) | def permute_final_dims(tensor: torch.Tensor, inds: List[int]): function dict_multimap (line 228) | def dict_multimap(fn, dicts): function trunc_normal_init_ (line 241) | def trunc_normal_init_(weights, scale=1.0, fan="fan_in"): function ipa_point_weights_init_ (line 262) | def ipa_point_weights_init_(weights): class EsmFoldLinear (line 268) | class EsmFoldLinear(nn.Linear): method __init__ (line 275) | def __init__( class EsmFoldLayerNorm (line 314) | class EsmFoldLayerNorm(nn.Module): method __init__ (line 315) | def __init__(self, c_in, eps=1e-5): method forward (line 324) | def forward(self, x): function softmax_no_cast (line 336) | def softmax_no_cast(t: torch.Tensor, dim: int = -1) -> torch.Tensor: class EsmFoldAttention (line 350) | class EsmFoldAttention(nn.Module): method __init__ (line 355) | def __init__( method _prep_qkv (line 402) | def _prep_qkv(self, q_x: torch.Tensor, kv_x: torch.Tensor) -> Tuple[to... method _wrap_up (line 422) | def _wrap_up(self, o: torch.Tensor, q_x: torch.Tensor) -> torch.Tensor: method forward (line 438) | def forward( class EsmFoldTriangleAttention (line 502) | class EsmFoldTriangleAttention(nn.Module): method __init__ (line 503) | def __init__(self, c_in, c_hidden, no_heads, starting=True, inf=1e9): method _chunk (line 528) | def _chunk( method forward (line 552) | def forward( class EsmFoldTriangleMultiplicativeUpdate (line 612) | class EsmFoldTriangleMultiplicativeUpdate(nn.Module): method __init__ (line 617) | def __init__(self, config, _outgoing=True): method _combine_projections (line 634) | def _combine_projections( method _inference_forward (line 660) | def _inference_forward( method forward (line 887) | def forward( class EsmFoldPreTrainedModel (line 941) | class EsmFoldPreTrainedModel(EsmPreTrainedModel): method _init_weights (line 948) | def _init_weights(self, module): class EsmFoldSelfAttention (line 993) | class EsmFoldSelfAttention(nn.Module): method __init__ (line 994) | def __init__(self, embed_dim, num_heads, head_width, gated=False): method forward (line 1014) | def forward(self, x, mask=None, bias=None, indices=None): class EsmFoldDropout (line 1055) | class EsmFoldDropout(nn.Module): method __init__ (line 1060) | def __init__(self, r: float, batch_dim: Union[int, List[int]]): method forward (line 1069) | def forward(self, x: torch.Tensor) -> torch.Tensor: class EsmFoldSequenceToPair (line 1077) | class EsmFoldSequenceToPair(nn.Module): method __init__ (line 1078) | def __init__(self, sequence_state_dim, inner_dim, pairwise_state_dim): method forward (line 1088) | def forward(self, sequence_state): class EsmFoldPairToSequence (line 1115) | class EsmFoldPairToSequence(nn.Module): method __init__ (line 1116) | def __init__(self, pairwise_state_dim, num_heads): method forward (line 1122) | def forward(self, pairwise_state): class EsmFoldResidueMLP (line 1136) | class EsmFoldResidueMLP(nn.Module): method __init__ (line 1137) | def __init__(self, embed_dim, inner_dim, dropout=0): method forward (line 1148) | def forward(self, x): class EsmFoldTriangularSelfAttentionBlock (line 1152) | class EsmFoldTriangularSelfAttentionBlock(nn.Module): method __init__ (line 1153) | def __init__(self, config): method forward (line 1187) | def forward(self, sequence_state, pairwise_state, mask=None, chunk_siz... class EsmCategoricalMixture (line 1256) | class EsmCategoricalMixture: method __init__ (line 1257) | def __init__(self, param, bins=50, start=0, end=1): method log_prob (line 1263) | def log_prob(self, true): method mean (line 1271) | def mean(self): function categorical_lddt (line 1275) | def categorical_lddt(logits, bins=50): function get_axial_mask (line 1280) | def get_axial_mask(mask): class EsmFoldRelativePosition (line 1302) | class EsmFoldRelativePosition(nn.Module): method __init__ (line 1303) | def __init__(self, config): method forward (line 1311) | def forward(self, residue_index, mask=None): class EsmFoldAngleResnetBlock (line 1338) | class EsmFoldAngleResnetBlock(nn.Module): method __init__ (line 1339) | def __init__(self, config): method forward (line 1347) | def forward(self, a: torch.Tensor) -> torch.Tensor: class EsmFoldAngleResnet (line 1358) | class EsmFoldAngleResnet(nn.Module): method __init__ (line 1363) | def __init__(self, config): method forward (line 1379) | def forward(self, s: torch.Tensor, s_initial: torch.Tensor) -> Tuple[t... class EsmFoldInvariantPointAttention (line 1423) | class EsmFoldInvariantPointAttention(nn.Module): method __init__ (line 1428) | def __init__(self, config): method forward (line 1463) | def forward( class EsmFoldBackboneUpdate (line 1620) | class EsmFoldBackboneUpdate(nn.Module): method __init__ (line 1625) | def __init__(self, config): method forward (line 1630) | def forward(self, s: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class EsmFoldStructureModuleTransitionLayer (line 1643) | class EsmFoldStructureModuleTransitionLayer(nn.Module): method __init__ (line 1644) | def __init__(self, config): method forward (line 1653) | def forward(self, s): class EsmFoldStructureModuleTransition (line 1666) | class EsmFoldStructureModuleTransition(nn.Module): method __init__ (line 1667) | def __init__(self, config): method forward (line 1679) | def forward(self, s): class EsmFoldStructureModule (line 1689) | class EsmFoldStructureModule(nn.Module): method __init__ (line 1690) | def __init__(self, config): method forward (line 1714) | def forward( method _init_residue_constants (line 1827) | def _init_residue_constants(self, float_dtype, device): method torsion_angles_to_frames (line 1872) | def torsion_angles_to_frames(self, r, alpha, f): method frames_and_literature_positions_to_atom14_pos (line 1878) | def frames_and_literature_positions_to_atom14_pos(self, r, f): # [*, ... class EsmFoldingTrunk (line 1891) | class EsmFoldingTrunk(nn.Module): method __init__ (line 1892) | def __init__(self, config): method set_chunk_size (line 1915) | def set_chunk_size(self, chunk_size): method forward (line 1922) | def forward(self, seq_feats, pair_feats, true_aa, residx, mask, no_rec... method distogram (line 1988) | def distogram(coords, min_bin, max_bin, num_bins): class EsmForProteinFolding (line 2021) | class EsmForProteinFolding(EsmPreTrainedModel): method __init__ (line 2022) | def __init__(self, config): method _af2_to_esm_from_vocab_list (line 2078) | def _af2_to_esm_from_vocab_list(vocab_list: List[str]) -> torch.Tensor: method forward (line 2085) | def forward( method af2_idx_to_esm_idx (line 2209) | def af2_idx_to_esm_idx(self, aa, mask): method compute_language_model_representations (line 2213) | def compute_language_model_representations(self, esmaa: torch.Tensor) ... method bert_mask (line 2238) | def bert_mask(self, aa, esmaa, mask, pattern): method infer (line 2248) | def infer( method output_to_pdb (line 2289) | def output_to_pdb(output: Dict) -> List[str]: method infer_pdb (line 2310) | def infer_pdb(self, seqs, *args, **kwargs) -> str: method infer_pdbs (line 2316) | def infer_pdbs(self, seqs: List[str], *args, **kwargs) -> List[str]: FILE: benchmark/third_party/transformers/src/transformers/models/esm/modeling_tf_esm.py function rotate_half (line 62) | def rotate_half(x): function apply_rotary_pos_emb (line 67) | def apply_rotary_pos_emb(x, cos, sin): class TFRotaryEmbedding (line 74) | class TFRotaryEmbedding(Layer): method __init__ (line 81) | def __init__(self, dim: int, name=None): method build (line 91) | def build(self, input_shape): method _compute_cos_sin (line 100) | def _compute_cos_sin(self, x, seq_dimension=2): method call (line 109) | def call(self, q: tf.Tensor, k: tf.Tensor) -> Tuple[tf.Tensor, tf.Tens... class TFEsmEmbeddings (line 118) | class TFEsmEmbeddings(Layer): method __init__ (line 123) | def __init__(self, config, name=None): method call (line 153) | def call( method create_position_ids_from_inputs_embeds (line 207) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class TFEsmSelfAttention (line 225) | class TFEsmSelfAttention(Layer): method __init__ (line 226) | def __init__(self, config, position_embedding_type=None, name=None): method transpose_for_scores (line 263) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 268) | def call( class TFEsmSelfOutput (line 373) | class TFEsmSelfOutput(Layer): method __init__ (line 374) | def __init__(self, config, name=None): method call (line 381) | def call(self, hidden_states, input_tensor, training=False): class TFEsmAttention (line 388) | class TFEsmAttention(Layer): method __init__ (line 389) | def __init__(self, config, name=None): method prune_heads (line 396) | def prune_heads(self, heads): method call (line 399) | def call( class TFEsmIntermediate (line 427) | class TFEsmIntermediate(tf.keras.layers.Layer): method __init__ (line 428) | def __init__(self, config: EsmConfig, **kwargs): method call (line 440) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEsmOutput (line 447) | class TFEsmOutput(Layer): method __init__ (line 448) | def __init__(self, config, name=None): method call (line 455) | def call(self, hidden_states, input_tensor, training=False): class TFEsmLayer (line 462) | class TFEsmLayer(Layer): method __init__ (line 463) | def __init__(self, config, name=None): method call (line 478) | def call( class TFEsmEncoder (line 549) | class TFEsmEncoder(Layer): method __init__ (line 550) | def __init__(self, config, name=None): method call (line 556) | def call( class TFEsmPooler (line 629) | class TFEsmPooler(Layer): method __init__ (line 630) | def __init__(self, config: EsmConfig, **kwargs): method call (line 640) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEsmPreTrainedModel (line 649) | class TFEsmPreTrainedModel(TFPreTrainedModel): class TFEsmMainLayer (line 720) | class TFEsmMainLayer(Layer): method __init__ (line 735) | def __init__(self, config, add_pooling_layer=True, name=None, **kwargs): method get_input_embeddings (line 745) | def get_input_embeddings(self): method set_input_embeddings (line 748) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 752) | def _prune_heads(self, heads_to_prune): method call (line 755) | def call( class TFEsmModel (line 914) | class TFEsmModel(TFEsmPreTrainedModel): method __init__ (line 915) | def __init__(self, config: EsmConfig, add_pooling_layer=True, *inputs,... method call (line 928) | def call( method serving (line 989) | def serving(self, inputs): method serving_output (line 994) | def serving_output( class TFEsmForMaskedLM (line 1016) | class TFEsmForMaskedLM(TFEsmPreTrainedModel, TFMaskedLanguageModelingLoss): method __init__ (line 1020) | def __init__(self, config): method get_output_embeddings (line 1032) | def get_output_embeddings(self): method set_output_embeddings (line 1035) | def set_output_embeddings(self, new_embeddings): method get_lm_head (line 1038) | def get_lm_head(self): method call (line 1050) | def call( method serving_output (line 1107) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: method serving (line 1121) | def serving(self, inputs): class TFEsmLMHead (line 1127) | class TFEsmLMHead(Layer): method __init__ (line 1130) | def __init__(self, config, name=None): method build (line 1146) | def build(self, input_shape): method get_bias (line 1152) | def get_bias(self): method call (line 1155) | def call(self, features): class TFEsmForSequenceClassification (line 1173) | class TFEsmForSequenceClassification(TFEsmPreTrainedModel, TFSequenceCla... method __init__ (line 1176) | def __init__(self, config): method call (line 1192) | def call( method serving_output (line 1241) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... method serving (line 1255) | def serving(self, inputs): class TFEsmForTokenClassification (line 1268) | class TFEsmForTokenClassification(TFEsmPreTrainedModel, TFTokenClassific... method __init__ (line 1272) | def __init__(self, config): method call (line 1288) | def call( method serving_output (line 1338) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... method serving (line 1352) | def serving(self, inputs): class TFEsmClassificationHead (line 1358) | class TFEsmClassificationHead(Layer): method __init__ (line 1361) | def __init__(self, config, name=None): method call (line 1377) | def call(self, features, training=False): function create_position_ids_from_input_ids (line 1386) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/chunk_utils.py function _fetch_dims (line 24) | def _fetch_dims(tree): function _flat_idx_to_idx (line 42) | def _flat_idx_to_idx( function _get_minimal_slice_set (line 55) | def _get_minimal_slice_set( function _chunk_slice (line 163) | def _chunk_slice( function chunk_layer (line 196) | def chunk_layer( class ChunkSizeTuner (line 317) | class ChunkSizeTuner: method __init__ (line 318) | def __init__( method _determine_favorable_chunk_size (line 328) | def _determine_favorable_chunk_size(self, fn, args, min_chunk_size): method _compare_arg_caches (line 359) | def _compare_arg_caches(self, ac1, ac2): method tune_chunk_size (line 374) | def tune_chunk_size( FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/data_transforms.py function make_atom14_masks (line 23) | def make_atom14_masks(protein): function make_atom14_masks_np (line 88) | def make_atom14_masks_np(batch): FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/feats.py function pseudo_beta_fn (line 24) | def pseudo_beta_fn(aatype, all_atom_positions, all_atom_masks): function atom14_to_atom37 (line 45) | def atom14_to_atom37(atom14, batch): function build_template_angle_feat (line 58) | def build_template_angle_feat(template_feats): function build_template_pair_feat (line 76) | def build_template_pair_feat(batch, min_bin, max_bin, no_bins, use_unit_... function build_extra_msa_feat (line 129) | def build_extra_msa_feat(batch): function torsion_angles_to_frames (line 139) | def torsion_angles_to_frames( function frames_and_literature_positions_to_atom14_pos (line 203) | def frames_and_literature_positions_to_atom14_pos( FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/loss.py function _calculate_bin_centers (line 21) | def _calculate_bin_centers(boundaries: 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: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/protein.py class Protein (line 33) | class Protein: function from_proteinnet_string (line 70) | def from_proteinnet_string(proteinnet_str: str) -> Protein: function get_pdb_headers (line 118) | def get_pdb_headers(prot: Protein, chain_id: int = 0) -> Sequence[str]: function add_pdb_headers (line 138) | def add_pdb_headers(prot: Protein, pdb_str: str) -> str: function to_pdb (line 188) | def to_pdb(prot: Protein) -> str: function ideal_atom_mask (line 280) | def ideal_atom_mask(prot: Protein) -> np.ndarray: function from_prediction (line 295) | def from_prediction( FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/residue_constants.py function map_structure_with_atom_order (line 437) | def map_structure_with_atom_order(in_list: List, first_call: bool = True): function load_stereo_chemical_props (line 452) | def load_stereo_chemical_props() -> Tuple[ function sequence_to_onehot (line 879) | def sequence_to_onehot(sequence: str, mapping: Mapping[str, int], map_un... function _make_standard_atom_mask (line 1025) | def _make_standard_atom_mask() -> np.ndarray: function chi_angle_atom (line 1043) | def chi_angle_atom(atom_index: int) -> np.ndarray: function _make_rigid_transformation_4x4 (line 1085) | def _make_rigid_transformation_4x4(ex, ey, translation): function _make_rigid_group_constants (line 1114) | def _make_rigid_group_constants(): function make_atom14_dists_bounds (line 1186) | def make_atom14_dists_bounds(overlap_tolerance=1.5, bond_length_toleranc... function _make_atom14_ambiguity_feats (line 1235) | def _make_atom14_ambiguity_feats(): function aatype_to_str_sequence (line 1250) | def aatype_to_str_sequence(aatype): FILE: benchmark/third_party/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): function quat_to_rot (line 145) | def quat_to_rot(quat: torch.Tensor) -> torch.Tensor: function rot_to_quat (line 168) | def rot_to_quat( function _get_quat (line 229) | def _get_quat(quat_key, dtype, device): function quat_multiply (line 233) | def quat_multiply(quat1, quat2): function quat_multiply_by_vec (line 240) | def quat_multiply_by_vec(quat, vec): function invert_rot_mat (line 247) | def invert_rot_mat(rot_mat: torch.Tensor): function invert_quat (line 251) | def invert_quat(quat: torch.Tensor): class Rotation (line 258) | class Rotation: method __init__ (line 266) | def __init__( method identity (line 301) | def identity( method __getitem__ (line 341) | def __getitem__(self, index: Any) -> Rotation: method __mul__ (line 364) | def __mul__( method __rmul__ (line 389) | def __rmul__( method shape (line 407) | def shape(self) -> torch.Size: method dtype (line 425) | def dtype(self) -> torch.dtype: method device (line 440) | def device(self) -> torch.device: method requires_grad (line 455) | def requires_grad(self) -> bool: method get_rot_mats (line 469) | def get_rot_mats(self) -> torch.Tensor: method get_quats (line 485) | def get_quats(self) -> torch.Tensor: method get_cur_rot (line 503) | def get_cur_rot(self) -> torch.Tensor: method compose_q_update_vec (line 519) | def compose_q_update_vec(self, q_update_vec: torch.Tensor, normalize_q... method compose_r (line 541) | def compose_r(self, r: Rotation) -> Rotation: method compose_q (line 556) | def compose_q(self, r: Rotation, normalize_quats: bool = True) -> Rota... method apply (line 574) | def apply(self, pts: torch.Tensor) -> torch.Tensor: method invert_apply (line 587) | def invert_apply(self, pts: torch.Tensor) -> torch.Tensor: method invert (line 601) | def invert(self) -> Rotation: method unsqueeze (line 621) | def unsqueeze( method cat (line 646) | def cat( method map_tensor_fn (line 669) | def map_tensor_fn(self, fn: Callable[torch.Tensor, torch.Tensor]) -> R... method cuda (line 691) | def cuda(self) -> Rotation: method to (line 705) | def to(self, device: Optional[torch.device], dtype: Optional[torch.dty... method detach (line 731) | def detach(self) -> Rotation: class Rigid (line 750) | class Rigid: method __init__ (line 757) | def __init__( method identity (line 808) | def identity( method __getitem__ (line 835) | def __getitem__( method __mul__ (line 863) | def __mul__( method __rmul__ (line 884) | def __rmul__( method shape (line 900) | def shape(self) -> torch.Size: method device (line 911) | def device(self) -> torch.device: method get_rots (line 920) | def get_rots(self) -> Rotation: method get_trans (line 929) | def get_trans(self) -> torch.Tensor: method compose_q_update_vec (line 938) | def compose_q_update_vec( method compose (line 959) | def compose( method apply (line 976) | def apply( method invert_apply (line 991) | def invert_apply(self, pts: torch.Tensor) -> torch.Tensor: method invert (line 1003) | def invert(self) -> Rigid: method map_tensor_fn (line 1015) | def map_tensor_fn(self, fn: Callable[torch.Tensor, torch.Tensor]) -> R... method to_tensor_4x4 (line 1031) | def to_tensor_4x4(self) -> torch.Tensor: method from_tensor_4x4 (line 1045) | def from_tensor_4x4(t: torch.Tensor) -> Rigid: method to_tensor_7 (line 1062) | def to_tensor_7(self) -> torch.Tensor: method from_tensor_7 (line 1077) | def from_tensor_7( method from_3_points (line 1091) | def from_3_points( method unsqueeze (line 1131) | def unsqueeze( method cat (line 1151) | def cat( method apply_rot_fn (line 1171) | def apply_rot_fn(self, fn: Callable[Rotation, Rotation]) -> Rigid: method apply_trans_fn (line 1182) | def apply_trans_fn(self, fn: Callable[torch.Tensor, torch.Tensor]) -> ... method scale_translation (line 1194) | def scale_translation(self, trans_scale_factor: float) -> Rigid: method stop_rot_gradient (line 1206) | def stop_rot_gradient(self) -> Rigid: method make_transform_from_reference (line 1216) | def make_transform_from_reference(n_xyz, ca_xyz, c_xyz, eps=1e-20): method cuda (line 1283) | def cuda(self) -> Rigid: FILE: benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/tensor_utils.py function add (line 23) | def add(m1, m2, inplace): function permute_final_dims (line 34) | def permute_final_dims(tensor: torch.Tensor, inds: List[int]): function flatten_final_dims (line 40) | def flatten_final_dims(t: torch.Tensor, no_dims: int): function masked_mean (line 44) | def masked_mean(mask, value, dim, eps=1e-4): function pts_to_distogram (line 49) | def pts_to_distogram(pts, min_bin=2.3125, max_bin=21.6875, no_bins=64): function dict_multimap (line 55) | def dict_multimap(fn, dicts): function one_hot (line 68) | def one_hot(x, v_bins): function batched_gather (line 75) | def batched_gather(data, inds, dim=0, no_batch_dims=0): function dict_map (line 91) | def dict_map(fn, dic, leaf_type): function tree_map (line 102) | def tree_map(fn, tree, leaf_type): FILE: benchmark/third_party/transformers/src/transformers/models/esm/tokenization_esm.py function load_vocab_file (line 41) | def load_vocab_file(vocab_file): class EsmTokenizer (line 47) | class EsmTokenizer(PreTrainedTokenizer): method __init__ (line 57) | def __init__(self, vocab_file, **kwargs): method _convert_id_to_token (line 70) | def _convert_id_to_token(self, index: int) -> str: method _convert_token_to_id (line 73) | def _convert_token_to_id(self, token: str) -> int: method _tokenize (line 76) | def _tokenize(self, text, **kwargs): method get_vocab_size (line 79) | def get_vocab_size(self, with_added_tokens=False): method get_vocab (line 82) | 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 100) | def get_special_tokens_mask( method save_vocabulary (line 131) | def save_vocabulary(self, save_directory, filename_prefix): method vocab_size (line 138) | def vocab_size(self) -> int: method _add_tokens (line 141) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... FILE: benchmark/third_party/transformers/src/transformers/models/flaubert/configuration_flaubert.py class FlaubertConfig (line 34) | class FlaubertConfig(PretrainedConfig): method __init__ (line 146) | def __init__( class FlaubertOnnxConfig (line 226) | class FlaubertOnnxConfig(OnnxConfig): method inputs (line 228) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/flaubert/modeling_flaubert.py function create_sinusoidal_embeddings (line 66) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 75) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 101) | class MultiHeadAttention(nn.Module): method __init__ (line 105) | def __init__(self, n_heads, dim, config): method prune_heads (line 119) | def prune_heads(self, heads): method forward (line 134) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 199) | class TransformerFFN(nn.Module): method __init__ (line 200) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 209) | def forward(self, input): method ff_chunk (line 212) | def ff_chunk(self, input): class FlaubertPredLayer (line 300) | class FlaubertPredLayer(nn.Module): method __init__ (line 305) | def __init__(self, config): method forward (line 323) | def forward(self, x, y=None): class FlaubertPreTrainedModel (line 343) | class FlaubertPreTrainedModel(PreTrainedModel): method __init__ (line 353) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 357) | def dummy_inputs(self): method _init_weights (line 366) | def _init_weights(self, module): class FlaubertModel (line 383) | class FlaubertModel(FlaubertPreTrainedModel): method __init__ (line 386) | def __init__(self, config): # , dico, is_encoder, with_output): method get_input_embeddings (line 463) | def get_input_embeddings(self): method set_input_embeddings (line 467) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 471) | def _prune_heads(self, heads_to_prune): method forward (line 486) | def forward( class FlaubertWithLMHeadModel (line 659) | class FlaubertWithLMHeadModel(FlaubertPreTrainedModel): method __init__ (line 660) | def __init__(self, config): method get_output_embeddings (line 668) | def get_output_embeddings(self): method set_output_embeddings (line 671) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 674) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 695) | def forward( class FlaubertForSequenceClassification (line 756) | class FlaubertForSequenceClassification(FlaubertPreTrainedModel): method __init__ (line 757) | def __init__(self, config): method forward (line 775) | def forward( class FlaubertForTokenClassification (line 860) | class FlaubertForTokenClassification(FlaubertPreTrainedModel): method __init__ (line 861) | def __init__(self, config): method forward (line 879) | def forward( class FlaubertForQuestionAnsweringSimple (line 946) | class FlaubertForQuestionAnsweringSimple(FlaubertPreTrainedModel): method __init__ (line 947) | def __init__(self, config): method forward (line 963) | def forward( class FlaubertForQuestionAnsweringOutput (line 1053) | class FlaubertForQuestionAnsweringOutput(ModelOutput): class FlaubertForQuestionAnswering (line 1096) | class FlaubertForQuestionAnswering(FlaubertPreTrainedModel): method __init__ (line 1097) | def __init__(self, config): method forward (line 1108) | def forward( class FlaubertForMultipleChoice (line 1218) | class FlaubertForMultipleChoice(FlaubertPreTrainedModel): method __init__ (line 1219) | def __init__(self, config, *inputs, **kwargs): method forward (line 1238) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/flaubert/modeling_tf_flaubert.py function get_masks (line 188) | def get_masks(slen, lengths, causal, padding_mask=None): class TFFlaubertPreTrainedModel (line 217) | class TFFlaubertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 227) | def dummy_inputs(self): class TFFlaubertModel (line 245) | class TFFlaubertModel(TFFlaubertPreTrainedModel): method __init__ (line 246) | def __init__(self, config, *inputs, **kwargs): method call (line 258) | def call( method serving_output (line 293) | def serving_output(self, output): class TFFlaubertMultiHeadAttention (line 301) | class TFFlaubertMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 304) | 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... class TFFlaubertTransformerFFN (line 394) | class TFFlaubertTransformerFFN(tf.keras.layers.Layer): method __init__ (line 395) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 403) | def call(self, input, training=False): class TFFlaubertMainLayer (line 413) | class TFFlaubertMainLayer(tf.keras.layers.Layer): method __init__ (line 416) | def __init__(self, config, **kwargs): method build (line 463) | def build(self, input_shape): method get_input_embeddings (line 481) | def get_input_embeddings(self): method set_input_embeddings (line 484) | def set_input_embeddings(self, value): method call (line 489) | def call( class TFFlaubertPredLayer (line 695) | class TFFlaubertPredLayer(tf.keras.layers.Layer): method __init__ (line 700) | def __init__(self, config, input_embeddings, **kwargs): method build (line 719) | def build(self, input_shape): method get_output_embeddings (line 725) | def get_output_embeddings(self): method set_output_embeddings (line 728) | def set_output_embeddings(self, value): method get_bias (line 732) | def get_bias(self): method set_bias (line 735) | def set_bias(self, value): method call (line 739) | def call(self, hidden_states): class TFFlaubertWithLMHeadModelOutput (line 747) | class TFFlaubertWithLMHeadModelOutput(ModelOutput): class TFFlaubertWithLMHeadModel (line 779) | class TFFlaubertWithLMHeadModel(TFFlaubertPreTrainedModel): method __init__ (line 780) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 787) | def get_lm_head(self): method get_prefix_bias_name (line 790) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 794) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 816) | def call( method serving_output (line 858) | def serving_output(self, output): class TFFlaubertForSequenceClassification (line 873) | class TFFlaubertForSequenceClassification(TFFlaubertPreTrainedModel, TFS... method __init__ (line 874) | def __init__(self, config, *inputs, **kwargs): method call (line 889) | def call( method serving_output (line 945) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFFlaubertForQuestionAnsweringSimple (line 960) | class TFFlaubertForQuestionAnsweringSimple(TFFlaubertPreTrainedModel, TF... method __init__ (line 961) | def __init__(self, config, *inputs, **kwargs): method call (line 976) | def call( method serving_output (line 1045) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... class TFFlaubertForTokenClassification (line 1062) | class TFFlaubertForTokenClassification(TFFlaubertPreTrainedModel, TFToke... method __init__ (line 1063) | def __init__(self, config, *inputs, **kwargs): method call (line 1081) | def call( method serving_output (line 1136) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFFlaubertForMultipleChoice (line 1151) | class TFFlaubertForMultipleChoice(TFFlaubertPreTrainedModel, TFMultipleC... method __init__ (line 1152) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1162) | def dummy_inputs(self): method call (line 1190) | def call( method serving (line 1275) | def serving(self, inputs: Dict[str, tf.Tensor]): method serving_output (line 1281) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... FILE: benchmark/third_party/transformers/src/transformers/models/flaubert/tokenization_flaubert.py function convert_to_unicode (line 77) | def convert_to_unicode(text): function get_pairs (line 94) | def get_pairs(word): function replace_unicode_punct (line 108) | def replace_unicode_punct(text): function remove_non_printing_char (line 152) | def remove_non_printing_char(text): class FlaubertTokenizer (line 165) | class FlaubertTokenizer(PreTrainedTokenizer): method __init__ (line 223) | def __init__( method do_lower_case (line 309) | def do_lower_case(self): method moses_punct_norm (line 313) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 322) | def moses_tokenize(self, text, lang): method moses_pipeline (line 331) | def moses_pipeline(self, text, lang): method ja_tokenize (line 338) | def ja_tokenize(self, text): method vocab_size (line 361) | def vocab_size(self): method get_vocab (line 365) | def get_vocab(self): method bpe (line 369) | def bpe(self, token): method preprocess_text (line 413) | def preprocess_text(self, text): method _tokenize (line 423) | def _tokenize(self, text, bypass_tokenizer=False): method _convert_token_to_id (line 461) | 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 471) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 477) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 505) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 534) | def create_token_type_ids_from_sequences( method save_vocabulary (line 564) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 593) | def __getstate__(self): method __setstate__ (line 599) | def __setstate__(self, d): FILE: benchmark/third_party/transformers/src/transformers/models/flava/configuration_flava.py class FlavaImageConfig (line 32) | class FlavaImageConfig(PretrainedConfig): method __init__ (line 95) | def __init__( method from_pretrained (line 133) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaTextConfig (line 150) | class FlavaTextConfig(PretrainedConfig): method __init__ (line 223) | def __init__( method from_pretrained (line 261) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaMultimodalConfig (line 278) | class FlavaMultimodalConfig(PretrainedConfig): method __init__ (line 333) | def __init__( method from_pretrained (line 363) | 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 463) | class FlavaConfig(PretrainedConfig): method __init__ (line 536) | def __init__( method from_configs (line 609) | def from_configs( method to_dict (line 633) | def to_dict(self): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/flava/feature_extraction_flava.py class FlavaMaskingGenerator (line 44) | class FlavaMaskingGenerator: method __init__ (line 45) | def __init__( method __repr__ (line 67) | def __repr__(self): method get_shape (line 79) | def get_shape(self): method _mask (line 82) | def _mask(self, mask, max_mask_patches): method __call__ (line 106) | def __call__(self): class FlavaFeatureExtractor (line 122) | class FlavaFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtracti... method __init__ (line 189) | def __init__( method masking_generator (line 247) | def masking_generator(self): method map_pixels (line 257) | def map_pixels(self, x): method __call__ (line 260) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/flava/modeling_flava.py class FlavaModelOutput (line 73) | class FlavaModelOutput(ModelOutput): method to_tuple (line 103) | def to_tuple(self) -> Tuple[Any]: class FlavaLosses (line 111) | class FlavaLosses(ModelOutput): method all_none (line 138) | def all_none(self) -> bool: class FlavaForPreTrainingOutput (line 148) | class FlavaForPreTrainingOutput(ModelOutput): method to_tuple (line 235) | def to_tuple(self) -> Tuple[Any]: class FlavaImageEmbeddings (line 249) | class FlavaImageEmbeddings(nn.Module): method __init__ (line 254) | def __init__(self, config: FlavaImageConfig, use_mask_token: bool = Fa... method interpolate_pos_encoding (line 271) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 306) | def forward( class PatchEmbeddings (line 342) | class PatchEmbeddings(nn.Module): method __init__ (line 347) | def __init__( method forward (line 366) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class FlavaTextEmbeddings (line 378) | class FlavaTextEmbeddings(nn.Module): method __init__ (line 381) | def __init__(self, config): method forward (line 398) | def forward( class FlavaSelfAttention (line 433) | class FlavaSelfAttention(nn.Module): method __init__ (line 434) | def __init__(self, config: FlavaPossibleConfigs) -> None: method transpose_for_scores (line 452) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 457) | def forward( class FlavaSelfOutput (line 502) | class FlavaSelfOutput(nn.Module): method __init__ (line 508) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 513) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaAttention (line 521) | class FlavaAttention(nn.Module): method __init__ (line 522) | def __init__(self, config: FlavaPossibleConfigs) -> None: method prune_heads (line 528) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 546) | def forward( class FlavaIntermediate (line 563) | class FlavaIntermediate(nn.Module): method __init__ (line 564) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 573) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FlavaOutput (line 581) | class FlavaOutput(nn.Module): method __init__ (line 582) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 588) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaLayer (line 597) | class FlavaLayer(nn.Module): method __init__ (line 600) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 612) | def forward( class FlavaEncoder (line 643) | class FlavaEncoder(nn.Module): method __init__ (line 644) | def __init__(self, config: FlavaConfig) -> None: method forward (line 650) | def forward( class FlavaPooler (line 700) | class FlavaPooler(nn.Module): method __init__ (line 701) | def __init__(self, config: FlavaPossibleConfigs): method forward (line 706) | def forward(self, hidden_states: torch.Tensor): class FlavaPreTrainedModel (line 859) | class FlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 869) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 885) | def _set_gradient_checkpointing(self, module: FlavaEncoder, value: boo... class FlavaImageModel (line 894) | class FlavaImageModel(FlavaPreTrainedModel): method __init__ (line 900) | def __init__(self, config: FlavaImageConfig, add_pooling_layer: bool =... method get_input_embeddings (line 913) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 916) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 919) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 936) | def forward( class FlavaTextModel (line 994) | class FlavaTextModel(FlavaPreTrainedModel): method __init__ (line 999) | def __init__(self, config: FlavaTextConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 1011) | def get_input_embeddings(self) -> PatchEmbeddings: method set_input_embeddings (line 1014) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 1017) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1032) | def forward( class FlavaMultimodalModel (line 1100) | class FlavaMultimodalModel(FlavaPreTrainedModel): method __init__ (line 1106) | def __init__(self, config: FlavaMultimodalConfig, add_pooling_layer=Tr... method _prune_heads (line 1120) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1137) | def forward( class FlavaModel (line 1199) | class FlavaModel(FlavaPreTrainedModel): method __init__ (line 1202) | def __init__(self, config: FlavaConfig): method get_text_features (line 1246) | def get_text_features( method get_image_features (line 1292) | def get_image_features( method forward (line 1347) | def forward( class FlavaImageCodebookResPath (line 1451) | class FlavaImageCodebookResPath(nn.Module): method __init__ (line 1452) | def __init__(self, in_size: int, out_size: int, **kwargs): method forward (line 1468) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookBlock (line 1472) | class FlavaImageCodebookBlock(nn.Module): method __init__ (line 1473) | def __init__(self, in_size: int, out_size: int, num_layers: int, **kwa... method forward (line 1485) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookLayerGroup (line 1489) | class FlavaImageCodebookLayerGroup(nn.Module): method __init__ (line 1490) | def __init__(self, num_blocks: int, num_layers: int, in_size: int, out... method forward (line 1504) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebook (line 1517) | class FlavaImageCodebook(FlavaPreTrainedModel): method __init__ (line 1523) | def __init__( method get_codebook_indices (line 1567) | def get_codebook_indices(self, pixel_values: torch.Tensor) -> torch.Te... method get_codebook_probs (line 1597) | def get_codebook_probs(self, pixel_values: torch.Tensor) -> torch.Tensor: method forward (line 1601) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class FlavaPredictionHeadTransform (line 1638) | class FlavaPredictionHeadTransform(nn.Module): method __init__ (line 1639) | def __init__(self, config): method forward (line 1648) | def forward(self, hidden_states): class FlavaMaskedPredictionHead (line 1655) | class FlavaMaskedPredictionHead(nn.Module): method __init__ (line 1656) | def __init__(self, config, weight=None): method forward (line 1668) | def forward(self, x): class FlavaITMHead (line 1674) | class FlavaITMHead(nn.Module): method __init__ (line 1675) | def __init__(self, config): method forward (line 1681) | def forward(self, x): class FlavaGlobalContrastiveHead (line 1687) | class FlavaGlobalContrastiveHead(nn.Module): method __init__ (line 1688) | def __init__(self, config): method forward (line 1693) | def forward(self, image_embeddings, text_embeddings, logit_scale): class FlavaForPreTraining (line 1731) | class FlavaForPreTraining(FlavaPreTrainedModel): method __init__ (line 1732) | def __init__(self, config: FlavaConfig, image_codebook: Optional[nn.Mo... method _resize_to_2d (line 1762) | def _resize_to_2d(self, x: torch.Tensor): method forward (line 1771) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/flava/processing_flava.py class FlavaProcessor (line 26) | class FlavaProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 44) | def __call__( method batch_decode (line 112) | def batch_decode(self, *args, **kwargs): method decode (line 119) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/fnet/configuration_fnet.py class FNetConfig (line 30) | class FNetConfig(PretrainedConfig): method __init__ (line 89) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/fnet/convert_fnet_original_flax_checkpoint_to_pytorch.py function convert_flax_checkpoint_to_pytorch (line 30) | def convert_flax_checkpoint_to_pytorch(flax_checkpoint_path, fnet_config... FILE: benchmark/third_party/transformers/src/transformers/models/fnet/modeling_fnet.py function _two_dim_matmul (line 71) | def _two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function two_dim_matmul (line 80) | def two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function fftn (line 85) | def fftn(x): class FNetEmbeddings (line 101) | class FNetEmbeddings(nn.Module): method __init__ (line 104) | def __init__(self, config): method forward (line 124) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class FNetBasicFourierTransform (line 160) | class FNetBasicFourierTransform(nn.Module): method __init__ (line 161) | def __init__(self, config): method _init_fourier_transform (line 165) | def _init_fourier_transform(self, config): method forward (line 188) | def forward(self, hidden_states): class FNetBasicOutput (line 199) | class FNetBasicOutput(nn.Module): method __init__ (line 200) | def __init__(self, config): method forward (line 204) | def forward(self, hidden_states, input_tensor): class FNetFourierTransform (line 209) | class FNetFourierTransform(nn.Module): method __init__ (line 210) | def __init__(self, config): method forward (line 215) | def forward(self, hidden_states): class FNetIntermediate (line 223) | class FNetIntermediate(nn.Module): method __init__ (line 224) | def __init__(self, config): method forward (line 232) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetOutput (line 239) | class FNetOutput(nn.Module): method __init__ (line 240) | def __init__(self, config): method forward (line 246) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FNetLayer (line 253) | class FNetLayer(nn.Module): method __init__ (line 254) | def __init__(self, config): method forward (line 262) | def forward(self, hidden_states): method feed_forward_chunk (line 274) | def feed_forward_chunk(self, fourier_output): class FNetEncoder (line 280) | class FNetEncoder(nn.Module): method __init__ (line 281) | def __init__(self, config): method forward (line 287) | def forward(self, hidden_states, output_hidden_states=False, return_di... class FNetPooler (line 318) | class FNetPooler(nn.Module): method __init__ (line 319) | def __init__(self, config): method forward (line 324) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetPredictionHeadTransform (line 334) | class FNetPredictionHeadTransform(nn.Module): method __init__ (line 335) | def __init__(self, config): method forward (line 344) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetLMPredictionHead (line 351) | class FNetLMPredictionHead(nn.Module): method __init__ (line 352) | def __init__(self, config): method forward (line 363) | def forward(self, hidden_states): method _tie_weights (line 368) | def _tie_weights(self): class FNetOnlyMLMHead (line 373) | class FNetOnlyMLMHead(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 378) | def forward(self, sequence_output): class FNetOnlyNSPHead (line 384) | class FNetOnlyNSPHead(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 389) | def forward(self, pooled_output): class FNetPreTrainingHeads (line 395) | class FNetPreTrainingHeads(nn.Module): method __init__ (line 396) | def __init__(self, config): method forward (line 401) | def forward(self, sequence_output, pooled_output): class FNetPreTrainedModel (line 407) | class FNetPreTrainedModel(PreTrainedModel): method _init_weights (line 418) | def _init_weights(self, module): method _set_gradient_checkpointing (line 435) | def _set_gradient_checkpointing(self, module, value=False): class FNetForPreTrainingOutput (line 441) | class FNetForPreTrainingOutput(ModelOutput): class FNetModel (line 516) | class FNetModel(FNetPreTrainedModel): method __init__ (line 524) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 536) | def get_input_embeddings(self): method set_input_embeddings (line 539) | def set_input_embeddings(self, value): method forward (line 549) | def forward( class FNetForPreTraining (line 626) | class FNetForPreTraining(FNetPreTrainedModel): method __init__ (line 627) | def __init__(self, config): method get_output_embeddings (line 636) | def get_output_embeddings(self): method set_output_embeddings (line 639) | def set_output_embeddings(self, new_embeddings): method forward (line 644) | def forward( class FNetForMaskedLM (line 718) | class FNetForMaskedLM(FNetPreTrainedModel): method __init__ (line 719) | def __init__(self, config): method get_output_embeddings (line 728) | def get_output_embeddings(self): method set_output_embeddings (line 731) | def set_output_embeddings(self, new_embeddings): method forward (line 741) | def forward( class FNetForNextSentencePrediction (line 787) | class FNetForNextSentencePrediction(FNetPreTrainedModel): method __init__ (line 788) | def __init__(self, config): method forward (line 799) | def forward( class FNetForSequenceClassification (line 882) | class FNetForSequenceClassification(FNetPreTrainedModel): method __init__ (line 883) | def __init__(self, config): method forward (line 901) | def forward( class FNetForMultipleChoice (line 968) | class FNetForMultipleChoice(FNetPreTrainedModel): method __init__ (line 969) | def __init__(self, config): method forward (line 986) | def forward( class FNetForTokenClassification (line 1048) | class FNetForTokenClassification(FNetPreTrainedModel): method __init__ (line 1049) | def __init__(self, config): method forward (line 1068) | def forward( class FNetForQuestionAnswering (line 1118) | class FNetForQuestionAnswering(FNetPreTrainedModel): method __init__ (line 1119) | def __init__(self, config): method forward (line 1137) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/fnet/tokenization_fnet.py class FNetTokenizer (line 46) | class FNetTokenizer(PreTrainedTokenizer): method __init__ (line 103) | def __init__( method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 152) | def get_vocab(self): method __getstate__ (line 157) | def __getstate__(self): method __setstate__ (line 162) | def __setstate__(self, d): method preprocess_text (line 172) | def preprocess_text(self, inputs): method _tokenize (line 187) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 207) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 211) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 215) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 218) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 243) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 271) | def create_token_type_ids_from_sequences( method save_vocabulary (line 300) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/fnet/tokenization_fnet_fast.py class FNetTokenizerFast (line 54) | class FNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 95) | def __init__( method build_inputs_with_special_tokens (line 137) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 162) | def create_token_type_ids_from_sequences( method save_vocabulary (line 192) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/fsmt/configuration_fsmt.py class DecoderConfig (line 29) | class DecoderConfig(PretrainedConfig): method __init__ (line 35) | def __init__(self, vocab_size=0, bos_token_id=0): class FSMTConfig (line 41) | class FSMTConfig(PretrainedConfig): method __init__ (line 135) | def __init__( method to_dict (line 214) | def to_dict(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/fsmt/modeling_fsmt.py function invert_mask (line 289) | def invert_mask(attention_mask): function triu_onnx (line 295) | def triu_onnx(x, diagonal=0): function _prepare_fsmt_decoder_inputs (line 306) | def _prepare_fsmt_decoder_inputs( class PretrainedFSMTModel (line 332) | class PretrainedFSMTModel(PreTrainedModel): method _init_weights (line 336) | def _init_weights(self, module): method dummy_inputs (line 350) | def dummy_inputs(self): function _make_linear_from_emb (line 360) | def _make_linear_from_emb(emb): function _check_shapes (line 368) | def _check_shapes(shape_1, shape2): function shift_tokens_right (line 373) | def shift_tokens_right(input_ids, pad_token_id): function make_padding_mask (line 386) | def make_padding_mask(input_ids, padding_idx=1): class EncoderLayer (line 397) | class EncoderLayer(nn.Module): method __init__ (line 398) | def __init__(self, config: FSMTConfig): method forward (line 410) | def forward(self, x, encoder_padding_mask, layer_head_mask, output_att... class FSMTEncoder (line 446) | class FSMTEncoder(nn.Module): method __init__ (line 454) | def __init__(self, config: FSMTConfig, embed_tokens): method forward (line 469) | def forward( class DecoderLayer (line 548) | class DecoderLayer(nn.Module): method __init__ (line 549) | def __init__(self, config: FSMTConfig): method forward (line 574) | def forward( class FSMTDecoder (line 636) | class FSMTDecoder(nn.Module): method __init__ (line 645) | def __init__(self, config: FSMTConfig, embed_tokens: nn.Embedding): method forward (line 670) | def forward( function _reorder_buffer (line 807) | def _reorder_buffer(attn_cache, new_order): class Attention (line 814) | class Attention(nn.Module): method __init__ (line 817) | def __init__( method _shape (line 840) | def _shape(self, tensor, seq_len, bsz): method forward (line 843) | def forward( method _use_saved_state (line 948) | def _use_saved_state(self, k, v, saved_state, key_padding_mask, static... function fill_with_neg_inf (line 980) | def fill_with_neg_inf(t): function _get_shape (line 986) | def _get_shape(t): class FSMTModel (line 994) | class FSMTModel(PretrainedFSMTModel): method __init__ (line 995) | def __init__(self, config: FSMTConfig): method forward (line 1015) | def forward( method get_input_embeddings (line 1102) | def get_input_embeddings(self): method set_input_embeddings (line 1105) | def set_input_embeddings(self, value): method get_output_embeddings (line 1108) | def get_output_embeddings(self): method set_output_embeddings (line 1111) | def set_output_embeddings(self, value): class FSMTForConditionalGeneration (line 1118) | class FSMTForConditionalGeneration(PretrainedFSMTModel): method __init__ (line 1129) | def __init__(self, config: FSMTConfig): method forward (line 1137) | def forward( method prepare_inputs_for_generation (line 1207) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1231) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1235) | def _reorder_cache(past, beam_idx): method get_encoder (line 1245) | def get_encoder(self): method get_output_embeddings (line 1248) | def get_output_embeddings(self): method set_output_embeddings (line 1251) | def set_output_embeddings(self, value): class SinusoidalPositionalEmbedding (line 1255) | class SinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 1266) | def __init__(self, num_positions, embedding_dim, padding_idx): method make_weight (line 1269) | def make_weight(self, num_positions, embedding_dim, padding_idx): method get_embedding (line 1282) | def get_embedding(num_embeddings, embedding_dim, padding_idx): method make_positions (line 1302) | def make_positions(tensor, padding_idx: int): method forward (line 1315) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/fsmt/tokenization_fsmt.py function get_pairs (line 57) | def get_pairs(word): function replace_unicode_punct (line 70) | def replace_unicode_punct(text): function remove_non_printing_char (line 113) | def remove_non_printing_char(text): class FSMTTokenizer (line 135) | class FSMTTokenizer(PreTrainedTokenizer): method __init__ (line 187) | def __init__( method get_vocab (line 255) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 260) | def vocab_size(self) -> int: method moses_punct_norm (line 263) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 269) | def moses_tokenize(self, text, lang): method moses_detokenize (line 277) | def moses_detokenize(self, tokens, lang): method moses_pipeline (line 283) | def moses_pipeline(self, text, lang): method src_vocab_size (line 290) | def src_vocab_size(self): method tgt_vocab_size (line 294) | def tgt_vocab_size(self): method get_src_vocab (line 297) | def get_src_vocab(self): method get_tgt_vocab (line 300) | def get_tgt_vocab(self): method bpe (line 303) | def bpe(self, token): method _tokenize (line 347) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 386) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 390) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 394) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 404) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 430) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 458) | def create_token_type_ids_from_sequences( method save_vocabulary (line 491) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 527) | def __getstate__(self): method __setstate__ (line 532) | def __setstate__(self, d): FILE: benchmark/third_party/transformers/src/transformers/models/funnel/configuration_funnel.py class FunnelConfig (line 41) | class FunnelConfig(PretrainedConfig): method __init__ (line 110) | def __init__( method num_hidden_layers (line 173) | def num_hidden_layers(self): method num_hidden_layers (line 177) | def num_hidden_layers(self, value): method num_blocks (line 183) | def num_blocks(self): method num_blocks (line 187) | def num_blocks(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/funnel/convert_funnel_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/funnel/modeling_funnel.py function load_tf_weights_in_funnel (line 69) | def load_tf_weights_in_funnel(model, config, tf_checkpoint_path): class FunnelEmbeddings (line 159) | class FunnelEmbeddings(nn.Module): method __init__ (line 160) | def __init__(self, config: FunnelConfig) -> None: method forward (line 166) | def forward( class FunnelAttentionStructure (line 176) | class FunnelAttentionStructure(nn.Module): method __init__ (line 183) | def __init__(self, config: FunnelConfig) -> None: method init_attention_inputs (line 192) | def init_attention_inputs( method token_type_ids_to_mat (line 212) | def token_type_ids_to_mat(self, token_type_ids: torch.Tensor) -> torch... method get_position_embeds (line 220) | def get_position_embeds( method stride_pool_pos (line 300) | def stride_pool_pos(self, pos_id: torch.Tensor, block_index: int): method relative_pos (line 315) | def relative_pos(self, pos: torch.Tensor, stride: int, pooled_pos=None... method stride_pool (line 329) | def stride_pool( method pool_tensor (line 362) | def pool_tensor( method pre_attention_pooling (line 400) | def pre_attention_pooling( method post_attention_pooling (line 422) | def post_attention_pooling(self, attention_inputs: Tuple[torch.Tensor]... function _relative_shift_gather (line 436) | def _relative_shift_gather(positional_attn: torch.Tensor, context_len: i... class FunnelRelMultiheadAttention (line 452) | class FunnelRelMultiheadAttention(nn.Module): method __init__ (line 453) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method relative_positional_attention (line 476) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 518) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method forward (line 542) | def forward( class FunnelPositionwiseFFN (line 596) | class FunnelPositionwiseFFN(nn.Module): method __init__ (line 597) | def __init__(self, config: FunnelConfig) -> None: method forward (line 606) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelLayer (line 615) | class FunnelLayer(nn.Module): method __init__ (line 616) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method forward (line 621) | def forward( class FunnelEncoder (line 634) | class FunnelEncoder(nn.Module): method __init__ (line 635) | def __init__(self, config: FunnelConfig) -> None: method forward (line 646) | def forward( function upsample (line 697) | def upsample( class FunnelDecoder (line 719) | class FunnelDecoder(nn.Module): method __init__ (line 720) | def __init__(self, config: FunnelConfig) -> None: method forward (line 726) | def forward( class FunnelDiscriminatorPredictions (line 768) | class FunnelDiscriminatorPredictions(nn.Module): method __init__ (line 771) | def __init__(self, config: FunnelConfig) -> None: method forward (line 777) | def forward(self, discriminator_hidden_states: torch.Tensor) -> torch.... class FunnelPreTrainedModel (line 784) | class FunnelPreTrainedModel(PreTrainedModel): method _init_weights (line 794) | def _init_weights(self, module): class FunnelClassificationHead (line 819) | class FunnelClassificationHead(nn.Module): method __init__ (line 820) | def __init__(self, config: FunnelConfig, n_labels: int) -> None: method forward (line 826) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelForPreTrainingOutput (line 834) | class FunnelForPreTrainingOutput(ModelOutput): class FunnelBaseModel (line 927) | class FunnelBaseModel(FunnelPreTrainedModel): method __init__ (line 928) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 937) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 940) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 950) | def forward( class FunnelModel (line 1004) | class FunnelModel(FunnelPreTrainedModel): method __init__ (line 1005) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 1015) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 1018) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1028) | def forward( class FunnelForPreTraining (line 1112) | class FunnelForPreTraining(FunnelPreTrainedModel): method __init__ (line 1113) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1123) | def forward( class FunnelForMaskedLM (line 1195) | class FunnelForMaskedLM(FunnelPreTrainedModel): method __init__ (line 1196) | def __init__(self, config: FunnelConfig) -> None: method get_output_embeddings (line 1205) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 1208) | def set_output_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1219) | def forward( class FunnelForSequenceClassification (line 1275) | class FunnelForSequenceClassification(FunnelPreTrainedModel): method __init__ (line 1276) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1293) | def forward( class FunnelForMultipleChoice (line 1368) | class FunnelForMultipleChoice(FunnelPreTrainedModel): method __init__ (line 1369) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1384) | def forward( class FunnelForTokenClassification (line 1452) | class FunnelForTokenClassification(FunnelPreTrainedModel): method __init__ (line 1453) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1471) | def forward( class FunnelForQuestionAnswering (line 1526) | class FunnelForQuestionAnswering(FunnelPreTrainedModel): method __init__ (line 1527) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1544) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/funnel/modeling_tf_funnel.py class TFFunnelEmbeddings (line 79) | class TFFunnelEmbeddings(tf.keras.layers.Layer): method __init__ (line 82) | def __init__(self, config, **kwargs): method build (line 92) | def build(self, input_shape): method call (line 102) | def call(self, input_ids=None, inputs_embeds=None, training=False): class TFFunnelAttentionStructure (line 131) | class TFFunnelAttentionStructure: method __init__ (line 138) | def __init__(self, config): method init_attention_inputs (line 153) | def init_attention_inputs(self, inputs_embeds, attention_mask=None, to... method token_type_ids_to_mat (line 168) | def token_type_ids_to_mat(self, token_type_ids): method get_position_embeds (line 176) | def get_position_embeds(self, seq_len, training=False): method stride_pool_pos (line 258) | def stride_pool_pos(self, pos_id, block_index): method relative_pos (line 273) | def relative_pos(self, pos, stride, pooled_pos=None, shift=1): method stride_pool (line 287) | def stride_pool(self, tensor, axis): method pool_tensor (line 314) | def pool_tensor(self, tensor, mode="mean", stride=2): method pre_attention_pooling (line 342) | def pre_attention_pooling(self, output, attention_inputs): method post_attention_pooling (line 362) | def post_attention_pooling(self, attention_inputs): function _relative_shift_gather (line 376) | def _relative_shift_gather(positional_attn, context_len, shift): class TFFunnelRelMultiheadAttention (line 392) | class TFFunnelRelMultiheadAttention(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config, block_index, **kwargs): method build (line 417) | def build(self, input_shape): method relative_positional_attention (line 438) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 484) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method call (line 511) | def call(self, query, key, value, attention_inputs, output_attentions=... class TFFunnelPositionwiseFFN (line 557) | class TFFunnelPositionwiseFFN(tf.keras.layers.Layer): method __init__ (line 558) | def __init__(self, config, **kwargs): method call (line 568) | def call(self, hidden, training=False): class TFFunnelLayer (line 577) | class TFFunnelLayer(tf.keras.layers.Layer): method __init__ (line 578) | def __init__(self, config, block_index, **kwargs): method call (line 583) | def call(self, query, key, value, attention_inputs, output_attentions=... class TFFunnelEncoder (line 591) | class TFFunnelEncoder(tf.keras.layers.Layer): method __init__ (line 592) | def __init__(self, config, **kwargs): method call (line 603) | def call( function upsample (line 661) | def upsample(x, stride, target_len, separate_cls=True, truncate_seq=False): class TFFunnelDecoder (line 681) | class TFFunnelDecoder(tf.keras.layers.Layer): method __init__ (line 682) | def __init__(self, config, **kwargs): method call (line 690) | def call( class TFFunnelBaseLayer (line 737) | class TFFunnelBaseLayer(tf.keras.layers.Layer): method __init__ (line 742) | def __init__(self, config, **kwargs): method get_input_embeddings (line 753) | def get_input_embeddings(self): method set_input_embeddings (line 756) | def set_input_embeddings(self, value): method _prune_heads (line 760) | def _prune_heads(self, heads_to_prune): method call (line 764) | def call( class TFFunnelMainLayer (line 808) | class TFFunnelMainLayer(tf.keras.layers.Layer): method __init__ (line 813) | def __init__(self, config, **kwargs): method get_input_embeddings (line 826) | def get_input_embeddings(self): method set_input_embeddings (line 829) | def set_input_embeddings(self, value): method _prune_heads (line 833) | def _prune_heads(self, heads_to_prune): method call (line 837) | def call( class TFFunnelDiscriminatorPredictions (line 907) | class TFFunnelDiscriminatorPredictions(tf.keras.layers.Layer): method __init__ (line 910) | def __init__(self, config, **kwargs): method call (line 917) | def call(self, discriminator_hidden_states): class TFFunnelMaskedLMHead (line 924) | class TFFunnelMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 925) | def __init__(self, config, input_embeddings, **kwargs): method build (line 931) | def build(self, input_shape): method get_output_embeddings (line 936) | def get_output_embeddings(self): method set_output_embeddings (line 939) | def set_output_embeddings(self, value): method get_bias (line 943) | def get_bias(self): method set_bias (line 946) | def set_bias(self, value): method call (line 950) | def call(self, hidden_states, training=False): class TFFunnelClassificationHead (line 960) | class TFFunnelClassificationHead(tf.keras.layers.Layer): method __init__ (line 961) | def __init__(self, config, n_labels, **kwargs): method call (line 970) | def call(self, hidden, training=False): class TFFunnelPreTrainedModel (line 977) | class TFFunnelPreTrainedModel(TFPreTrainedModel): class TFFunnelForPreTrainingOutput (line 988) | class TFFunnelForPreTrainingOutput(ModelOutput): class TFFunnelBaseModel (line 1110) | class TFFunnelBaseModel(TFFunnelPreTrainedModel): method __init__ (line 1111) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1123) | def call( method serving_output (line 1145) | def serving_output(self, output): class TFFunnelModel (line 1159) | class TFFunnelModel(TFFunnelPreTrainedModel): method __init__ (line 1160) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1172) | def call( method serving_output (line 1195) | def serving_output(self, output): class TFFunnelForPreTraining (line 1211) | class TFFunnelForPreTraining(TFFunnelPreTrainedModel): method __init__ (line 1212) | def __init__(self, config: FunnelConfig, **kwargs) -> None: method call (line 1221) | def call( method serving_output (line 1270) | def serving_output(self, output): class TFFunnelForMaskedLM (line 1279) | class TFFunnelForMaskedLM(TFFunnelPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 1280) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method get_lm_head (line 1286) | def get_lm_head(self) -> TFFunnelMaskedLMHead: method get_prefix_bias_name (line 1289) | def get_prefix_bias_name(self) -> str: method call (line 1301) | def call( method serving_output (line 1345) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFFunnelForSequenceClassification (line 1358) | class TFFunnelForSequenceClassification(TFFunnelPreTrainedModel, TFSeque... method __init__ (line 1359) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1374) | def call( method serving_output (line 1419) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFFunnelForMultipleChoice (line 1434) | class TFFunnelForMultipleChoice(TFFunnelPreTrainedModel, TFMultipleChoic... method __init__ (line 1435) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method dummy_inputs (line 1442) | def dummy_inputs(self): method call (line 1459) | def call( method serving (line 1530) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceMod... method serving_output (line 1535) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFFunnelForTokenClassification (line 1550) | class TFFunnelForTokenClassification(TFFunnelPreTrainedModel, TFTokenCla... method __init__ (line 1551) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1569) | def call( method serving_output (line 1613) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFFunnelForQuestionAnswering (line 1628) | class TFFunnelForQuestionAnswering(TFFunnelPreTrainedModel, TFQuestionAn... method __init__ (line 1629) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1646) | def call( method serving_output (line 1704) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/funnel/tokenization_funnel.py function load_vocab (line 70) | def load_vocab(vocab_file): function whitespace_tokenize (line 82) | def whitespace_tokenize(text): class FunnelTokenizer (line 91) | class FunnelTokenizer(PreTrainedTokenizer): method __init__ (line 143) | def __init__( method do_lower_case (line 195) | def do_lower_case(self): method vocab_size (line 200) | def vocab_size(self): method get_vocab (line 204) | def get_vocab(self): method _tokenize (line 208) | def _tokenize(self, text): method _convert_token_to_id (line 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 293) | def create_token_type_ids_from_sequences( method save_vocabulary (line 323) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 345) | class BasicTokenizer(object): method __init__ (line 365) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 373) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 410) | def _run_strip_accents(self, text): method _run_split_on_punc (line 421) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 443) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 456) | def _is_chinese_char(self, cp): method _clean_text (line 480) | def _clean_text(self, text): class WordpieceTokenizer (line 495) | class WordpieceTokenizer(object): method __init__ (line 498) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 503) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/funnel/tokenization_funnel_fast.py class FunnelTokenizerFast (line 94) | class FunnelTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 145) | def __init__( method build_inputs_with_special_tokens (line 196) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 220) | def create_token_type_ids_from_sequences( method save_vocabulary (line 250) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/glpn/configuration_glpn.py class GLPNConfig (line 29) | class GLPNConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/glpn/convert_glpn_to_pytorch.py function rename_keys (line 34) | def rename_keys(state_dict): function read_in_k_v (line 99) | def read_in_k_v(state_dict, config): function prepare_img (line 118) | def prepare_img(): function convert_glpn_checkpoint (line 126) | def convert_glpn_checkpoint(checkpoint_path, pytorch_dump_folder_path, p... FILE: benchmark/third_party/transformers/src/transformers/models/glpn/image_processing_glpn.py class GLPNImageProcessor (line 34) | class GLPNImageProcessor(BaseImageProcessor): method __init__ (line 54) | def __init__( method resize (line 68) | def resize( method rescale (line 100) | def rescale( method preprocess (line 122) | def preprocess( FILE: benchmark/third_party/transformers/src/transformers/models/glpn/modeling_glpn.py function drop_path (line 57) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class GLPNDropPath (line 78) | class GLPNDropPath(nn.Module): method __init__ (line 81) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 85) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 88) | def extra_repr(self) -> str: class GLPNOverlapPatchEmbeddings (line 93) | class GLPNOverlapPatchEmbeddings(nn.Module): method __init__ (line 96) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 108) | def forward(self, pixel_values): class GLPNEfficientSelfAttention (line 119) | class GLPNEfficientSelfAttention(nn.Module): method __init__ (line 123) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 150) | def transpose_for_scores(self, hidden_states): method forward (line 155) | def forward( class GLPNSelfOutput (line 201) | class GLPNSelfOutput(nn.Module): method __init__ (line 202) | def __init__(self, config, hidden_size): method forward (line 207) | def forward(self, hidden_states, input_tensor): class GLPNAttention (line 214) | class GLPNAttention(nn.Module): method __init__ (line 215) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 226) | def prune_heads(self, heads): method forward (line 244) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNDWConv (line 253) | class GLPNDWConv(nn.Module): method __init__ (line 254) | def __init__(self, dim=768): method forward (line 258) | def forward(self, hidden_states, height, width): class GLPNMixFFN (line 268) | class GLPNMixFFN(nn.Module): method __init__ (line 269) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 281) | def forward(self, hidden_states, height, width): class GLPNLayer (line 292) | class GLPNLayer(nn.Module): method __init__ (line 295) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 309) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNEncoder (line 335) | class GLPNEncoder(nn.Module): method __init__ (line 336) | def __init__(self, config): method forward (line 384) | def forward( class GLPNPreTrainedModel (line 423) | class GLPNPreTrainedModel(PreTrainedModel): method _init_weights (line 434) | def _init_weights(self, module): class GLPNModel (line 484) | class GLPNModel(GLPNPreTrainedModel): method __init__ (line 486) | def __init__(self, config): method _prune_heads (line 496) | def _prune_heads(self, heads_to_prune): method forward (line 514) | def forward( class GLPNSelectiveFeatureFusion (line 545) | class GLPNSelectiveFeatureFusion(nn.Module): method __init__ (line 551) | def __init__(self, in_channel=64): method forward (line 572) | def forward(self, local_features, global_features): class GLPNDecoderStage (line 589) | class GLPNDecoderStage(nn.Module): method __init__ (line 590) | def __init__(self, in_channels, out_channels): method forward (line 597) | def forward(self, hidden_state, residual=None): class GLPNDecoder (line 609) | class GLPNDecoder(nn.Module): method __init__ (line 610) | def __init__(self, config): method forward (line 624) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class SiLogLoss (line 636) | class SiLogLoss(nn.Module): method __init__ (line 645) | def __init__(self, lambd=0.5): method forward (line 649) | def forward(self, pred, target): class GLPNDepthEstimationHead (line 657) | class GLPNDepthEstimationHead(nn.Module): method __init__ (line 658) | def __init__(self, config): method forward (line 670) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class GLPNForDepthEstimation (line 686) | class GLPNForDepthEstimation(GLPNPreTrainedModel): method __init__ (line 687) | def __init__(self, config): method forward (line 699) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/configuration_gpt2.py class GPT2Config (line 38) | class GPT2Config(PretrainedConfig): method __init__ (line 141) | def __init__( class GPT2OnnxConfig (line 196) | class GPT2OnnxConfig(OnnxConfigWithPast): method __init__ (line 197) | def __init__( method inputs (line 210) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 221) | def num_layers(self) -> int: method num_attention_heads (line 225) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 228) | def generate_dummy_inputs( method default_onnx_opset (line 273) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/convert_gpt2_original_tf_checkpoint_to_pytorch.py function convert_gpt2_checkpoint_to_pytorch (line 29) | def convert_gpt2_checkpoint_to_pytorch(gpt2_checkpoint_path, gpt2_config... FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/modeling_flax_gpt2.py class FlaxConv1D (line 111) | class FlaxConv1D(nn.Module): method __call__ (line 118) | def __call__(self, inputs): class FlaxGPT2Attention (line 130) | class FlaxGPT2Attention(nn.Module): method setup (line 136) | def setup(self): method _split_heads (line 156) | def _split_heads(self, hidden_states): method _merge_heads (line 159) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 163) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 194) | def __call__( class FlaxGPT2MLP (line 284) | class FlaxGPT2MLP(nn.Module): method setup (line 289) | def setup(self): method __call__ (line 296) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPT2Block (line 304) | class FlaxGPT2Block(nn.Module): method setup (line 308) | def setup(self): method __call__ (line 324) | def __call__( class FlaxGPT2PreTrainedModel (line 382) | class FlaxGPT2PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 392) | def __init__( method init_weights (line 404) | 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 FlaxGPT2BlockCollection (line 537) | class FlaxGPT2BlockCollection(nn.Module): method setup (line 541) | def setup(self): method __call__ (line 546) | def __call__( class FlaxGPT2Module (line 589) | class FlaxGPT2Module(nn.Module): method setup (line 593) | def setup(self): method __call__ (line 612) | def __call__( class FlaxGPT2Model (line 667) | class FlaxGPT2Model(FlaxGPT2PreTrainedModel): class FlaxGPT2LMHeadModule (line 680) | class FlaxGPT2LMHeadModule(nn.Module): method setup (line 684) | def setup(self): method __call__ (line 693) | def __call__( class FlaxGPT2LMHeadModel (line 745) | class FlaxGPT2LMHeadModel(FlaxGPT2PreTrainedModel): method prepare_inputs_for_generation (line 748) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 769) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/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 123) | class GPT2Attention(nn.Module): method __init__ (line 124) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 166) | def prune_heads(self, heads): method _attn (line 181) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 221) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 273) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 281) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 289) | def forward( class GPT2MLP (line 343) | class GPT2MLP(nn.Module): method __init__ (line 344) | def __init__(self, intermediate_size, config): method forward (line 352) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class GPT2Block (line 360) | class GPT2Block(nn.Module): method __init__ (line 361) | def __init__(self, config, layer_idx=None): method forward (line 376) | def forward( class GPT2PreTrainedModel (line 438) | class GPT2PreTrainedModel(PreTrainedModel): method __init__ (line 451) | def __init__(self, *inputs, **kwargs): method _init_weights (line 454) | def _init_weights(self, module): method _set_gradient_checkpointing (line 481) | def _set_gradient_checkpointing(self, module, value=False): class GPT2DoubleHeadsModelOutput (line 487) | class GPT2DoubleHeadsModelOutput(ModelOutput): class GPT2Model (line 667) | class GPT2Model(GPT2PreTrainedModel): method __init__ (line 670) | def __init__(self, config): method parallelize (line 691) | def parallelize(self, device_map=None): method deparallelize (line 711) | def deparallelize(self): method get_input_embeddings (line 723) | def get_input_embeddings(self): method set_input_embeddings (line 726) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 729) | def _prune_heads(self, heads_to_prune): method forward (line 743) | def forward( class GPT2LMHeadModel (line 945) | class GPT2LMHeadModel(GPT2PreTrainedModel): method __init__ (line 948) | def __init__(self, config): method parallelize (line 961) | def parallelize(self, device_map=None): method deparallelize (line 973) | def deparallelize(self): method get_output_embeddings (line 980) | def get_output_embeddings(self): method set_output_embeddings (line 983) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 986) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method forward (line 1021) | def forward( method _reorder_cache (line 1093) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class GPT2DoubleHeadsModel (line 1114) | class GPT2DoubleHeadsModel(GPT2PreTrainedModel): method __init__ (line 1117) | def __init__(self, config): method parallelize (line 1132) | def parallelize(self, device_map=None): method deparallelize (line 1145) | def deparallelize(self): method get_output_embeddings (line 1153) | def get_output_embeddings(self): method set_output_embeddings (line 1156) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1159) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method forward (line 1190) | def forward( method _reorder_cache (line 1301) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class GPT2ForSequenceClassification (line 1328) | class GPT2ForSequenceClassification(GPT2PreTrainedModel): method __init__ (line 1331) | def __init__(self, config): method forward (line 1353) | def forward( class GPT2ForTokenClassification (line 1456) | class GPT2ForTokenClassification(GPT2PreTrainedModel): method __init__ (line 1457) | def __init__(self, config): method forward (line 1489) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/modeling_tf_gpt2.py class TFAttention (line 71) | class TFAttention(tf.keras.layers.Layer): method __init__ (line 72) | def __init__(self, nx, config, scale=False, is_cross_attention=False, ... method prune_heads (line 96) | def prune_heads(self, heads): method causal_attention_mask (line 100) | def causal_attention_mask(nd, ns, dtype): method _attn (line 110) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 143) | def merge_heads(self, x): method split_heads (line 149) | def split_heads(self, x): method call (line 155) | def call( class TFMLP (line 208) | class TFMLP(tf.keras.layers.Layer): method __init__ (line 209) | def __init__(self, n_state, config, **kwargs): method call (line 217) | def call(self, x, training=False): class TFBlock (line 224) | class TFBlock(tf.keras.layers.Layer): method __init__ (line 225) | def __init__(self, config, scale=False, **kwargs): method call (line 242) | def call( class TFGPT2MainLayer (line 304) | class TFGPT2MainLayer(tf.keras.layers.Layer): method __init__ (line 307) | def __init__(self, config, *inputs, **kwargs): method build (line 329) | def build(self, input_shape): method get_input_embeddings (line 339) | def get_input_embeddings(self): method set_input_embeddings (line 342) | def set_input_embeddings(self, value): method _prune_heads (line 346) | def _prune_heads(self, heads_to_prune): method call (line 353) | def call( class TFGPT2PreTrainedModel (line 529) | class TFGPT2PreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 541) | def dummy_inputs(self): method serving (line 566) | def serving(self, inputs): class TFGPT2DoubleHeadsModelOutput (line 573) | class TFGPT2DoubleHeadsModelOutput(ModelOutput): class TFGPT2Model (line 722) | class TFGPT2Model(TFGPT2PreTrainedModel): method __init__ (line 723) | def __init__(self, config, *inputs, **kwargs): method call (line 735) | def call( method serving_output (line 792) | def serving_output(self, output): class TFGPT2LMHeadModel (line 820) | class TFGPT2LMHeadModel(TFGPT2PreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 821) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 825) | def get_output_embeddings(self): method set_output_embeddings (line 828) | def set_output_embeddings(self, value): method prepare_inputs_for_generation (line 831) | def prepare_inputs_for_generation(self, inputs, past=None, use_cache=N... method call (line 864) | def call( method serving_output (line 945) | def serving_output(self, output): class TFGPT2DoubleHeadsModel (line 971) | class TFGPT2DoubleHeadsModel(TFGPT2PreTrainedModel): method __init__ (line 972) | def __init__(self, config, *inputs, **kwargs): method call (line 983) | def call( method serving (line 1085) | def serving(self, inputs): method serving_output (line 1090) | def serving_output(self, output): class TFGPT2ForSequenceClassification (line 1119) | class TFGPT2ForSequenceClassification(TFGPT2PreTrainedModel, TFSequenceC... method __init__ (line 1120) | def __init__(self, config, *inputs, **kwargs): method call (line 1139) | def call( method serving_output (line 1226) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/tokenization_gpt2.py function bytes_to_unicode (line 66) | def bytes_to_unicode(): function get_pairs (line 90) | def get_pairs(word): class GPT2Tokenizer (line 104) | class GPT2Tokenizer(PreTrainedTokenizer): method __init__ (line 157) | def __init__( method vocab_size (line 203) | def vocab_size(self): method get_vocab (line 206) | def get_vocab(self): method bpe (line 209) | def bpe(self, token): method build_inputs_with_special_tokens (line 251) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 264) | def get_special_tokens_mask( method _tokenize (line 296) | def _tokenize(self, text): method _convert_token_to_id (line 306) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 310) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 314) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 320) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 349) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 355) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/gpt2/tokenization_gpt2_fast.py class GPT2TokenizerFast (line 70) | class GPT2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 127) | def __init__( method _batch_encode_plus (line 159) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 168) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 178) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 182) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neo/configuration_gpt_neo.py class GPTNeoConfig (line 34) | class GPTNeoConfig(PretrainedConfig): method __init__ (line 100) | def __init__( method expand_attention_types_params (line 165) | def expand_attention_types_params(attention_types): function custom_unfold (line 173) | def custom_unfold(input, dimension, size, step): function custom_get_block_length_and_num_blocks (line 195) | def custom_get_block_length_and_num_blocks(seq_length, window_size): class GPTNeoOnnxConfig (line 210) | class GPTNeoOnnxConfig(OnnxConfigWithPast): method inputs (line 212) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_attention_heads (line 223) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 226) | def generate_dummy_inputs( method default_onnx_opset (line 272) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neo/convert_gpt_neo_mesh_tf_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neo/modeling_flax_gpt_neo.py class FlaxGPTNeoSelfAttention (line 109) | class FlaxGPTNeoSelfAttention(nn.Module): method setup (line 114) | def setup(self): method _split_heads (line 142) | def _split_heads(self, hidden_states): method _merge_heads (line 145) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 149) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 180) | def __call__( class FlaxGPTNeoAttention (line 250) | class FlaxGPTNeoAttention(nn.Module): method setup (line 255) | def setup(self): method __call__ (line 259) | def __call__( class FlaxGPTNeoMLP (line 276) | class FlaxGPTNeoMLP(nn.Module): method setup (line 281) | def setup(self): method __call__ (line 289) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPTNeoBlock (line 297) | class FlaxGPTNeoBlock(nn.Module): method setup (line 302) | def setup(self): method __call__ (line 311) | def __call__( class FlaxGPTNeoPreTrainedModel (line 341) | class FlaxGPTNeoPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 351) | def __init__( method init_weights (line 363) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 383) | def init_cache(self, batch_size, max_length): method __call__ (line 403) | def __call__( class FlaxGPTNeoBlockCollection (line 473) | class FlaxGPTNeoBlockCollection(nn.Module): method setup (line 477) | def setup(self): method __call__ (line 483) | def __call__( class FlaxGPTNeoModule (line 518) | class FlaxGPTNeoModule(nn.Module): method setup (line 522) | def setup(self): method __call__ (line 539) | def __call__( class FlaxGPTNeoModel (line 592) | class FlaxGPTNeoModel(FlaxGPTNeoPreTrainedModel): class FlaxGPTNeoForCausalLMModule (line 601) | class FlaxGPTNeoForCausalLMModule(nn.Module): method setup (line 605) | def setup(self): method __call__ (line 614) | def __call__( class FlaxGPTNeoForCausalLM (line 657) | class FlaxGPTNeoForCausalLM(FlaxGPTNeoPreTrainedModel): method prepare_inputs_for_generation (line 660) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 681) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neo/modeling_gpt_neo.py function load_tf_weights_in_gpt_neo (line 52) | def load_tf_weights_in_gpt_neo(model, config, gpt_neo_checkpoint_path): class GPTNeoSelfAttention (line 132) | class GPTNeoSelfAttention(nn.Module): method __init__ (line 133) | def __init__(self, config, attention_type): method _split_heads (line 167) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 175) | def _merge_heads(self, tensor, num_heads, attn_head_size): method _attn (line 183) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 214) | def forward( class GPTNeoAttention (line 256) | class GPTNeoAttention(nn.Module): method __init__ (line 257) | def __init__(self, config, layer_id=0): method forward (line 271) | def forward( class GPTNeoMLP (line 290) | class GPTNeoMLP(nn.Module): method __init__ (line 291) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 299) | def forward(self, hidden_states): class GPTNeoBlock (line 307) | class GPTNeoBlock(nn.Module): method __init__ (line 308) | def __init__(self, config, layer_id): method forward (line 317) | def forward( class GPTNeoPreTrainedModel (line 355) | class GPTNeoPreTrainedModel(PreTrainedModel): method __init__ (line 367) | def __init__(self, *inputs, **kwargs): method _init_weights (line 370) | def _init_weights(self, module): method _set_gradient_checkpointing (line 386) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoModel (line 476) | class GPTNeoModel(GPTNeoPreTrainedModel): method __init__ (line 477) | def __init__(self, config): method get_input_embeddings (line 491) | def get_input_embeddings(self): method set_input_embeddings (line 494) | def set_input_embeddings(self, new_embeddings): method forward (line 504) | def forward( class GPTNeoForCausalLM (line 664) | class GPTNeoForCausalLM(GPTNeoPreTrainedModel): method __init__ (line 672) | def __init__(self, config): method get_output_embeddings (line 680) | def get_output_embeddings(self): method set_output_embeddings (line 683) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 686) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method forward (line 721) | def forward( method _reorder_cache (line 790) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class GPTNeoForSequenceClassification (line 817) | class GPTNeoForSequenceClassification(GPTNeoPreTrainedModel): method __init__ (line 820) | def __init__(self, config): method forward (line 836) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox/configuration_gpt_neox.py class GPTNeoXConfig (line 29) | class GPTNeoXConfig(PretrainedConfig): method __init__ (line 88) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox/modeling_gpt_neox.py class GPTNeoXPreTrainedModel (line 49) | class GPTNeoXPreTrainedModel(PreTrainedModel): method _init_weights (line 60) | def _init_weights(self, module): method _set_gradient_checkpointing (line 74) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoXAttention (line 79) | class GPTNeoXAttention(nn.Module): method __init__ (line 80) | def __init__(self, config): method forward (line 101) | def forward( method _split_heads (line 166) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 179) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _attn (line 190) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): function attention_mask_func (line 237) | def attention_mask_func(attention_scores, ltor_mask): class RotaryEmbedding (line 242) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 243) | def __init__(self, dim, max_position_embeddings, base=10000, device=No... method forward (line 257) | def forward(self, x, seq_len=None): function rotate_half (line 271) | def rotate_half(x): function apply_rotary_pos_emb (line 278) | def apply_rotary_pos_emb(q, k, cos, sin, offset: int = 0): class GPTNeoXMLP (line 286) | class GPTNeoXMLP(nn.Module): method __init__ (line 287) | def __init__(self, config): method forward (line 293) | def forward(self, hidden_states): class GPTNeoXLayer (line 300) | class GPTNeoXLayer(nn.Module): method __init__ (line 301) | def __init__(self, config): method forward (line 309) | def forward( class GPTNeoXModel (line 416) | class GPTNeoXModel(GPTNeoXPreTrainedModel): method __init__ (line 417) | def __init__(self, config): method get_input_embeddings (line 430) | def get_input_embeddings(self): method set_input_embeddings (line 433) | def set_input_embeddings(self, value): method forward (line 443) | def forward( class GPTNeoXForCausalLM (line 579) | class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel): method __init__ (line 583) | def __init__(self, config): method get_output_embeddings (line 592) | def get_output_embeddings(self): method set_output_embeddings (line 595) | def set_output_embeddings(self, new_embeddings): method forward (line 600) | def forward( method prepare_inputs_for_generation (line 689) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 702) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox/tokenization_gpt_neox_fast.py class GPTNeoXTokenizerFast (line 44) | class GPTNeoXTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 100) | def __init__( method save_vocabulary (line 130) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 134) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py class GPTNeoXJapaneseConfig (line 28) | class GPTNeoXJapaneseConfig(PretrainedConfig): method __init__ (line 88) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py class GPTNeoXJapanesePreTrainedModel (line 44) | class GPTNeoXJapanesePreTrainedModel(PreTrainedModel): method _init_weights (line 55) | def _init_weights(self, module): method _set_gradient_checkpointing (line 69) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoXJapaneseAttention (line 74) | class GPTNeoXJapaneseAttention(nn.Module): method __init__ (line 75) | def __init__(self, config, use_bias=False): method forward (line 95) | def forward( method _split_heads (line 160) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 173) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _create_casual_mask (line 184) | def _create_casual_mask(self, key_length, query_length): method _attn (line 192) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): class RotaryEmbedding (line 242) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 243) | def __init__(self, dim, max_position_embeddings, base=10000, device=No... method forward (line 257) | def forward(self, x, seq_len=None): function rotate_half (line 271) | def rotate_half(x): function apply_rotary_pos_emb (line 278) | def apply_rotary_pos_emb(q, k, cos, sin, offset: int = 0): function bias_dropout_add (line 286) | def bias_dropout_add(x: Tensor, bias: Tensor, residual: Optional[Tensor]... class GPTNeoXJapaneseMLP (line 307) | class GPTNeoXJapaneseMLP(nn.Module): method __init__ (line 308) | def __init__(self, config): method forward (line 316) | def forward(self, hidden_states): class GPTNeoXJapaneseLayer (line 323) | class GPTNeoXJapaneseLayer(nn.Module): method __init__ (line 324) | def __init__(self, config, layer_number): method forward (line 334) | def forward( class GPTNeoXJapaneseModel (line 439) | class GPTNeoXJapaneseModel(GPTNeoXJapanesePreTrainedModel): method __init__ (line 440) | def __init__(self, config): method get_input_embeddings (line 453) | def get_input_embeddings(self): method set_input_embeddings (line 456) | def set_input_embeddings(self, value): method forward (line 461) | def forward( class GPTNeoXJapaneseForCausalLM (line 593) | class GPTNeoXJapaneseForCausalLM(GPTNeoXJapanesePreTrainedModel): method __init__ (line 597) | def __init__(self, config): method get_output_embeddings (line 607) | def get_output_embeddings(self): method set_output_embeddings (line 610) | def set_output_embeddings(self, new_embeddings): method forward (line 615) | def forward( method prepare_inputs_for_generation (line 705) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 718) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/gpt_neox_japanese/tokenization_gpt_neox_japanese.py function load_vocab_and_emoji (line 50) | def load_vocab_and_emoji(vocab_file, emoji_file): class GPTNeoXJapaneseTokenizer (line 70) | class GPTNeoXJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method vocab_size (line 159) | def vocab_size(self): method get_vocab (line 163) | def get_vocab(self): method _tokenize (line 166) | def _tokenize(self, text): method _convert_token_to_id (line 169) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 173) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 177) | def convert_tokens_to_string(self, tokens): method _build_conversation_input_ids (line 182) | def _build_conversation_input_ids(self, conversation: "Conversation") ... method save_vocabulary (line 192) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SubWordJapaneseTokenizer (line 223) | class SubWordJapaneseTokenizer(object): method __init__ (line 247) | def __init__(self, vocab, ids_to_tokens, emoji): method __len__ (line 268) | def __len__(self): method clean_text (line 271) | def clean_text(self, content): method tokenize (line 283) | def tokenize(self, text, clean=False): method convert_id_to_token (line 350) | def convert_id_to_token(self, index, breakline="\n"): FILE: benchmark/third_party/transformers/src/transformers/models/gptj/configuration_gptj.py class GPTJConfig (line 33) | class GPTJConfig(PretrainedConfig): method __init__ (line 98) | def __init__( class GPTJOnnxConfig (line 145) | class GPTJOnnxConfig(OnnxConfigWithPast): method __init__ (line 146) | def __init__( method inputs (line 159) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 170) | def num_layers(self) -> int: method num_attention_heads (line 174) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 177) | def generate_dummy_inputs( method default_onnx_opset (line 222) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/gptj/modeling_flax_gptj.py function create_sinusoidal_positions (line 111) | def create_sinusoidal_positions(num_pos, dim): function rotate_every_two (line 124) | def rotate_every_two(tensor): function apply_rotary_pos_emb (line 130) | def apply_rotary_pos_emb(tensor, sincos): class FlaxGPTJAttention (line 137) | class FlaxGPTJAttention(nn.Module): method setup (line 143) | def setup(self): method _split_heads (line 169) | def _split_heads(self, hidden_states): method _merge_heads (line 172) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 176) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 207) | def __call__( class FlaxGPTJMLP (line 297) | class FlaxGPTJMLP(nn.Module): method setup (line 302) | def setup(self): method __call__ (line 312) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPTJBlock (line 320) | class FlaxGPTJBlock(nn.Module): method setup (line 324) | def setup(self): method __call__ (line 333) | def __call__( class FlaxGPTJPreTrainedModel (line 361) | class FlaxGPTJPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 371) | def __init__( method init_weights (line 383) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 418) | def init_cache(self, batch_size, max_length): method __call__ (line 438) | def __call__( class FlaxGPTJBlockCollection (line 508) | class FlaxGPTJBlockCollection(nn.Module): method setup (line 512) | def setup(self): method __call__ (line 517) | def __call__( class FlaxGPTJModule (line 554) | class FlaxGPTJModule(nn.Module): method setup (line 558) | def setup(self): method __call__ (line 570) | def __call__( class FlaxGPTJModel (line 619) | class FlaxGPTJModel(FlaxGPTJPreTrainedModel): class FlaxGPTJForCausalLMModule (line 632) | class FlaxGPTJForCausalLMModule(nn.Module): method setup (line 636) | def setup(self): method __call__ (line 644) | def __call__( class FlaxGPTJForCausalLM (line 686) | class FlaxGPTJForCausalLM(FlaxGPTJPreTrainedModel): method prepare_inputs_for_generation (line 689) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 710) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/gptj/modeling_gptj.py function fixed_pos_embedding (line 58) | def fixed_pos_embedding(x, seq_dim=1, seq_len=None): function rotate_every_two (line 69) | def rotate_every_two(x): function duplicate_interleave (line 76) | def duplicate_interleave(m): function apply_rotary_pos_emb (line 87) | def apply_rotary_pos_emb(x, sincos, offset=0): class GPTJAttention (line 93) | class GPTJAttention(nn.Module): method __init__ (line 94) | def __init__(self, config): method _split_heads (line 127) | def _split_heads(self, tensor, num_attention_heads, attn_head_size, ro... method _merge_heads (line 142) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 155) | def _attn( method forward (line 198) | def forward( class GPTJMLP (line 272) | class GPTJMLP(nn.Module): method __init__ (line 273) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 283) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class GPTJBlock (line 291) | class GPTJBlock(nn.Module): method __init__ (line 292) | def __init__(self, config): method forward (line 299) | def forward( class GPTJPreTrainedModel (line 332) | class GPTJPreTrainedModel(PreTrainedModel): method __init__ (line 344) | def __init__(self, *inputs, **kwargs): method _init_weights (line 347) | def _init_weights(self, module): method _set_gradient_checkpointing (line 363) | def _set_gradient_checkpointing(self, module, value=False): class GPTJModel (line 481) | class GPTJModel(GPTJPreTrainedModel): method __init__ (line 482) | def __init__(self, config): method parallelize (line 501) | def parallelize(self, device_map=None): method deparallelize (line 520) | def deparallelize(self): method get_input_embeddings (line 531) | def get_input_embeddings(self): method set_input_embeddings (line 534) | def set_input_embeddings(self, new_embeddings): method forward (line 544) | def forward( class GPTJForCausalLM (line 722) | class GPTJForCausalLM(GPTJPreTrainedModel): method __init__ (line 725) | def __init__(self, config): method parallelize (line 738) | def parallelize(self, device_map=None): method deparallelize (line 750) | def deparallelize(self): method get_output_embeddings (line 757) | def get_output_embeddings(self): method set_output_embeddings (line 760) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 763) | def prepare_inputs_for_generation(self, input_ids, past=None, **kwargs): method forward (line 798) | def forward( method _reorder_cache (line 870) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class GPTJForSequenceClassification (line 897) | class GPTJForSequenceClassification(GPTJPreTrainedModel): method __init__ (line 900) | def __init__(self, config): method forward (line 922) | def forward( class GPTJForQuestionAnswering (line 1024) | class GPTJForQuestionAnswering(GPTJPreTrainedModel): method __init__ (line 1027) | def __init__(self, config): method forward (line 1049) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/gptj/modeling_tf_gptj.py function create_sinusoidal_positions (line 63) | def create_sinusoidal_positions(num_pos: int, dim: int) -> tf.Tensor: function rotate_every_two (line 71) | def rotate_every_two(x: tf.Tensor) -> tf.Tensor: function apply_rotary_pos_emb (line 78) | def apply_rotary_pos_emb(tensor: tf.Tensor, sincos: tf.Tensor) -> tf.Ten... class TFGPTJAttention (line 85) | class TFGPTJAttention(tf.keras.layers.Layer): method __init__ (line 86) | def __init__(self, config: GPTJConfig, **kwargs): method get_causal_mask (line 136) | def get_causal_mask(self, key_length, query_length) -> tf.Tensor: method get_masked_bias (line 140) | def get_masked_bias(dtype: tf.DType) -> tf.Tensor: method _split_heads (line 143) | def _split_heads(self, hidden_states: tf.Tensor, rotary: bool) -> tf.T... method _merge_heads (line 157) | def _merge_heads(self, hidden_states: tf.Tensor) -> tf.Tensor: method _attn (line 170) | def _attn( method call (line 207) | def call( class TFGPTJMLP (line 271) | class TFGPTJMLP(tf.keras.layers.Layer): method __init__ (line 272) | def __init__(self, intermediate_size: int, config: GPTJConfig, **kwargs): method call (line 286) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFGPTJBlock (line 294) | class TFGPTJBlock(tf.keras.layers.Layer): method __init__ (line 295) | def __init__(self, config: GPTJConfig, **kwargs): method call (line 302) | def call( class TFGPTJMainLayer (line 337) | class TFGPTJMainLayer(tf.keras.layers.Layer): method __init__ (line 340) | def __init__(self, config: GPTJConfig, *inputs, **kwargs): method get_input_embeddings (line 362) | def get_input_embeddings(self): method set_input_embeddings (line 365) | def set_input_embeddings(self, value: tf.Tensor): method _prune_heads (line 369) | def _prune_heads(self, heads_to_prune): method call (line 376) | def call( class TFGPTJPreTrainedModel (line 515) | class TFGPTJPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 527) | def dummy_inputs(self): method serving (line 545) | def serving(self, inputs): class TFGPTJModel (line 660) | class TFGPTJModel(TFGPTJPreTrainedModel): method __init__ (line 661) | def __init__(self, config, *inputs, **kwargs): method call (line 673) | def call( method serving_output (line 711) | def serving_output(self, output): class TFGPTJForCausalLM (line 730) | class TFGPTJForCausalLM(TFGPTJPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 731) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 738) | def get_output_embeddings(self): method set_output_embeddings (line 741) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 744) | def prepare_inputs_for_generation(self, inputs, past=None, use_cache=N... method call (line 777) | def call( method serving_output (line 836) | def serving_output(self, output): class TFGPTJForSequenceClassification (line 859) | class TFGPTJForSequenceClassification(TFGPTJPreTrainedModel, TFSequenceC... method __init__ (line 862) | def __init__(self, config, *inputs, **kwargs): method call (line 881) | def call( method serving_output (line 968) | def serving_output(self, output): class TFGPTJForQuestionAnswering (line 985) | class TFGPTJForQuestionAnswering(TFGPTJPreTrainedModel, TFQuestionAnswer... method __init__ (line 988) | def __init__(self, config, *inputs, **kwargs): method call (line 1004) | def call( method serving_output (line 1069) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/groupvit/configuration_groupvit.py class GroupViTTextConfig (line 39) | class GroupViTTextConfig(PretrainedConfig): method __init__ (line 94) | def __init__( method from_pretrained (line 129) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTVisionConfig (line 146) | class GroupViTVisionConfig(PretrainedConfig): method __init__ (line 204) | def __init__( method from_pretrained (line 255) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTConfig (line 272) | class GroupViTConfig(PretrainedConfig): method __init__ (line 301) | def __init__( method from_text_vision_configs (line 331) | def from_text_vision_configs(cls, text_config: GroupViTTextConfig, vis... method to_dict (line 342) | def to_dict(self): class GroupViTOnnxConfig (line 356) | class GroupViTOnnxConfig(OnnxConfig): method inputs (line 358) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 368) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 379) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 382) | def generate_dummy_inputs( method default_onnx_opset (line 399) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/groupvit/modeling_groupvit.py function _expand_mask (line 52) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 68) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function groupvit_loss (line 73) | def groupvit_loss(similarity: torch.Tensor) -> torch.Tensor: function hard_softmax (line 79) | def hard_softmax(logits: torch.Tensor, dim: int): function gumbel_softmax (line 89) | def gumbel_softmax(logits: torch.Tensor, tau: float = 1, hard: bool = Fa... function resize_attention_map (line 111) | def resize_attention_map(attentions, height, width, align_corners=False): function get_grouping_from_attentions (line 141) | def get_grouping_from_attentions(attentions, hw_shape): class GroupViTCrossAttentionLayer (line 170) | class GroupViTCrossAttentionLayer(nn.Module): method __init__ (line 171) | def __init__(self, config: GroupViTVisionConfig): method forward (line 178) | def forward(self, query, key): class GroupViTAssignAttention (line 186) | class GroupViTAssignAttention(nn.Module): method __init__ (line 187) | def __init__(self, config: GroupViTVisionConfig): method get_attn (line 197) | def get_attn(self, attn, gumbel=True, hard=True): method forward (line 209) | def forward(self, query, key): class GroupViTTokenAssign (line 235) | class GroupViTTokenAssign(nn.Module): method __init__ (line 236) | def __init__(self, config: GroupViTVisionConfig, num_group_token, num_... method project_group_token (line 257) | def project_group_token(self, group_tokens): method forward (line 270) | def forward(self, image_tokens, group_tokens): class GroupViTModelOutput (line 291) | class GroupViTModelOutput(ModelOutput): method to_tuple (line 334) | def to_tuple(self) -> Tuple[Any]: class GroupViTPatchEmbeddings (line 341) | class GroupViTPatchEmbeddings(nn.Module): method __init__ (line 346) | def __init__( method forward (line 363) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTVisionEmbeddings (line 375) | class GroupViTVisionEmbeddings(nn.Module): method __init__ (line 376) | def __init__(self, config: GroupViTVisionConfig): method interpolate_pos_encoding (line 391) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 425) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTTextEmbeddings (line 445) | class GroupViTTextEmbeddings(nn.Module): method __init__ (line 446) | def __init__(self, config: GroupViTTextConfig): method forward (line 456) | def forward( class GroupViTStage (line 476) | class GroupViTStage(nn.Module): method __init__ (line 479) | def __init__( method with_group_token (line 515) | def with_group_token(self): method split_x (line 518) | def split_x(self, x): method concat_x (line 524) | def concat_x(self, x: torch.Tensor, group_token: Optional[torch.Tensor... method forward (line 529) | def forward( class GroupViTMLP (line 571) | class GroupViTMLP(nn.Module): method __init__ (line 572) | def __init__( method forward (line 588) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GroupViTMixerMLP (line 595) | class GroupViTMixerMLP(GroupViTMLP): method forward (line 596) | def forward(self, x): class GroupViTAttention (line 601) | class GroupViTAttention(nn.Module): method __init__ (line 604) | def __init__(self, config): method _shape (line 623) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 626) | def forward( class GroupViTEncoderLayer (line 712) | class GroupViTEncoderLayer(nn.Module): method __init__ (line 713) | def __init__(self, config: GroupViTConfig): method forward (line 721) | def forward( class GroupViTPreTrainedModel (line 762) | class GroupViTPreTrainedModel(PreTrainedModel): method _init_weights (line 773) | def _init_weights(self, module): method _set_gradient_checkpointing (line 808) | def _set_gradient_checkpointing(self, module, value=False): class GroupViTVisionEncoder (line 909) | class GroupViTVisionEncoder(nn.Module): method __init__ (line 910) | def __init__(self, config: GroupViTVisionConfig) -> None: method forward (line 927) | def forward( class GroupViTTextEncoder (line 968) | class GroupViTTextEncoder(nn.Module): method __init__ (line 977) | def __init__(self, config: GroupViTTextConfig): method forward (line 983) | def forward( class GroupViTTextTransformer (line 1072) | class GroupViTTextTransformer(nn.Module): method __init__ (line 1073) | def __init__(self, config: GroupViTTextConfig): method forward (line 1083) | def forward( method _build_causal_attention_mask (line 1150) | def _build_causal_attention_mask(self, bsz, seq_len, dtype): class GroupViTTextModel (line 1160) | class GroupViTTextModel(GroupViTPreTrainedModel): method __init__ (line 1163) | def __init__(self, config: GroupViTTextConfig): method get_input_embeddings (line 1169) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1172) | def set_input_embeddings(self, value): method forward (line 1177) | def forward( class GroupViTVisionTransformer (line 1213) | class GroupViTVisionTransformer(nn.Module): method __init__ (line 1214) | def __init__(self, config: GroupViTVisionConfig): method forward (line 1225) | def forward( class GroupViTVisionModel (line 1271) | class GroupViTVisionModel(GroupViTPreTrainedModel): method __init__ (line 1275) | def __init__(self, config: GroupViTVisionConfig): method get_input_embeddings (line 1281) | def get_input_embeddings(self) -> GroupViTPatchEmbeddings: method forward (line 1286) | def forward( class GroupViTModel (line 1324) | class GroupViTModel(GroupViTPreTrainedModel): method __init__ (line 1327) | def __init__(self, config: GroupViTConfig): method get_text_features (line 1371) | def get_text_features( method get_image_features (line 1418) | def get_image_features( method forward (line 1468) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/groupvit/modeling_tf_groupvit.py function _expand_mask (line 77) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 92) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function groupvit_loss (line 101) | def groupvit_loss(similarity: tf.Tensor) -> tf.Tensor: function hard_softmax (line 107) | def hard_softmax(logits: tf.Tensor, dim: int) -> tf.Tensor: function gumbel_softmax (line 124) | def gumbel_softmax(logits: tf.Tensor, tau: float = 1, hard: bool = False... function resize_attention_map (line 149) | def resize_attention_map(attentions: tf.Tensor, height: int, width: int,... function get_grouping_from_attentions (line 187) | def get_grouping_from_attentions(attentions: Tuple[tf.Tensor], hw_shape:... class TFGroupViTModelOutput (line 216) | class TFGroupViTModelOutput(ModelOutput): method to_tuple (line 259) | def to_tuple(self) -> Tuple[Any]: class TFGroupViTCrossAttentionLayer (line 266) | class TFGroupViTCrossAttentionLayer(tf.keras.layers.Layer): method __init__ (line 267) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 274) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = Fals... class TFGroupViTAssignAttention (line 282) | class TFGroupViTAssignAttention(tf.keras.layers.Layer): method __init__ (line 283) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_attn (line 293) | def get_attn(self, attn: tf.Tensor, gumbel: bool = True, hard: bool = ... method call (line 305) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = False): class TFGroupViTTokenAssign (line 331) | class TFGroupViTTokenAssign(tf.keras.layers.Layer): method __init__ (line 332) | def __init__(self, config: GroupViTVisionConfig, num_group_token: int,... method project_group_token (line 357) | def project_group_token(self, group_tokens: tf.Tensor) -> tf.Tensor: method call (line 370) | def call(self, image_tokens: tf.Tensor, group_tokens: tf.Tensor, train... class TFGroupViTPatchEmbeddings (line 391) | class TFGroupViTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 398) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 426) | def call( class TFGroupViTVisionEmbeddings (line 462) | class TFGroupViTVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 468) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method build (line 476) | def build(self, input_shape: tf.TensorShape): method interpolate_pos_encoding (line 488) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 515) | def call( class TFGroupViTTextEmbeddings (line 534) | class TFGroupViTTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 535) | def __init__(self, config: GroupViTTextConfig, **kwargs): method build (line 543) | def build(self, input_shape: tf.TensorShape): method call (line 563) | def call( class TFGroupViTStage (line 603) | class TFGroupViTStage(tf.keras.layers.Layer): method __init__ (line 606) | def __init__( method build (line 641) | def build(self, input_shape: tf.TensorShape): method with_group_token (line 654) | def with_group_token(self): method split_x (line 657) | def split_x(self, x: tf.Tensor) -> tf.Tensor: method concat_x (line 663) | def concat_x(self, x: tf.Tensor, group_token: Optional[tf.Tensor] = No... method call (line 668) | def call( class TFGroupViTMLP (line 718) | class TFGroupViTMLP(tf.keras.layers.Layer): method __init__ (line 719) | def __init__( method call (line 736) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFGroupViTMixerMLP (line 743) | class TFGroupViTMixerMLP(TFGroupViTMLP): method call (line 744) | def call(self, x, training: bool = False): class TFGroupViTAttention (line 750) | class TFGroupViTAttention(tf.keras.layers.Layer): method __init__ (line 753) | def __init__(self, config: GroupViTConfig, **kwargs): method transpose_for_scores (line 788) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 795) | def call( class TFGroupViTEncoderLayer (line 858) | class TFGroupViTEncoderLayer(tf.keras.layers.Layer): method __init__ (line 859) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 868) | def call( class TFGroupViTTextEncoder (line 911) | class TFGroupViTTextEncoder(tf.keras.layers.Layer): method __init__ (line 912) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 917) | def call( class TFGroupViTVisionEncoder (line 955) | class TFGroupViTVisionEncoder(tf.keras.layers.Layer): method __init__ (line 956) | def __init__(self, config: GroupViTVisionConfig, **kwargs) -> None: method call (line 971) | def call( class TFGroupViTTextTransformer (line 1007) | class TFGroupViTTextTransformer(tf.keras.layers.Layer): method __init__ (line 1008) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 1017) | def call( method _build_causal_attention_mask (line 1072) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... class TFGroupViTVisionTransformer (line 1092) | class TFGroupViTVisionTransformer(tf.keras.layers.Layer): method __init__ (line 1093) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 1100) | def call( class TFGroupViTTextMainLayer (line 1137) | class TFGroupViTTextMainLayer(tf.keras.layers.Layer): method __init__ (line 1140) | def __init__(self, config: GroupViTTextConfig, **kwargs): method get_input_embeddings (line 1145) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 1148) | def set_input_embeddings(self, value: tf.Variable): method call (line 1153) | def call( class TFGroupViTVisionMainLayer (line 1186) | class TFGroupViTVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 1189) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_input_embeddings (line 1194) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 1198) | def call( class TFGroupViTMainLayer (line 1223) | class TFGroupViTMainLayer(tf.keras.layers.Layer): method __init__ (line 1226) | def __init__(self, config: GroupViTConfig, **kwargs): method build (line 1267) | def build(self, input_shape: tf.TensorShape): method get_text_features (line 1279) | def get_text_features( method get_image_features (line 1316) | def get_image_features( method call (line 1344) | def call( class TFGroupViTPreTrainedModel (line 1472) | class TFGroupViTPreTrainedModel(TFPreTrainedModel): class TFGroupViTTextModel (line 1619) | class TFGroupViTTextModel(TFGroupViTPreTrainedModel): method __init__ (line 1623) | def __init__(self, config: GroupViTTextConfig, *inputs, **kwargs): method dummy_inputs (line 1629) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1648) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFBaseModelOutputWi... method call (line 1655) | def call( method serving_output (line 1695) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFGroupViTVisionModel (line 1707) | class TFGroupViTVisionModel(TFGroupViTPreTrainedModel): method __init__ (line 1711) | def __init__(self, config: GroupViTVisionConfig, *inputs, **kwargs): method dummy_inputs (line 1717) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1736) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFBaseModelOutputWi... method call (line 1751) | def call( method serving_output (line 1792) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFGroupViTModel (line 1803) | class TFGroupViTModel(TFGroupViTPreTrainedModel): method __init__ (line 1806) | def __init__(self, config: GroupViTConfig, *inputs, **kwargs): method dummy_inputs (line 1812) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1837) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFGroupViTModelOutput: method get_text_features (line 1851) | def get_text_features( method get_image_features (line 1892) | def get_image_features( method call (line 1936) | def call( method serving_output (line 1990) | def serving_output(self, output: TFGroupViTModelOutput) -> TFGroupViTM... FILE: benchmark/third_party/transformers/src/transformers/models/herbert/tokenization_herbert.py function get_pairs (line 46) | def get_pairs(word): function replace_unicode_punct (line 60) | def replace_unicode_punct(text): function remove_non_printing_char (line 104) | def remove_non_printing_char(text): function whitespace_tokenize (line 118) | def whitespace_tokenize(text): class BasicTokenizer (line 128) | class BasicTokenizer(object): method __init__ (line 148) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 156) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 193) | def _run_strip_accents(self, text): method _run_split_on_punc (line 204) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 226) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 239) | def _is_chinese_char(self, cp): method _clean_text (line 263) | def _clean_text(self, text): class HerbertTokenizer (line 277) | class HerbertTokenizer(PreTrainedTokenizer): method __init__ (line 297) | def __init__( method do_lower_case (line 384) | def do_lower_case(self): method moses_punct_norm (line 388) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 397) | def moses_tokenize(self, text, lang): method moses_pipeline (line 406) | def moses_pipeline(self, text, lang): method ja_tokenize (line 413) | def ja_tokenize(self, text): method vocab_size (line 436) | def vocab_size(self): method get_vocab (line 440) | def get_vocab(self): method bpe (line 444) | def bpe(self, token): method _tokenize (line 488) | def _tokenize(self, text): method _convert_token_to_id (line 500) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 505) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 510) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 516) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 544) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 573) | def create_token_type_ids_from_sequences( method save_vocabulary (line 603) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 632) | def __getstate__(self): method __setstate__ (line 638) | def __setstate__(self, d): FILE: benchmark/third_party/transformers/src/transformers/models/herbert/tokenization_herbert_fast.py class HerbertTokenizerFast (line 40) | class HerbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 65) | def __init__( method build_inputs_with_special_tokens (line 90) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 117) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 144) | def create_token_type_ids_from_sequences( method save_vocabulary (line 172) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/hubert/configuration_hubert.py class HubertConfig (line 32) | class HubertConfig(PretrainedConfig): method __init__ (line 159) | def __init__( method inputs_to_logits_ratio (line 256) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/hubert/convert_distilhubert_original_s3prl_checkpoint_to_pytorch.py function set_recursively (line 45) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 73) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 117) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 157) | def convert_config(model): function convert_hubert_checkpoint (line 191) | def convert_hubert_checkpoint(pytorch_dump_folder_path, config_path=None): FILE: benchmark/third_party/transformers/src/transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 58) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 86) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 130) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_hubert_checkpoint (line 171) | def convert_hubert_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py function convert_s3prl_checkpoint (line 32) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: benchmark/third_party/transformers/src/transformers/models/hubert/modeling_hubert.py function _compute_mask_indices (line 75) | def _compute_mask_indices( class HubertNoLayerNormConvLayer (line 195) | class HubertNoLayerNormConvLayer(nn.Module): method __init__ (line 196) | def __init__(self, config, layer_id=0): method forward (line 210) | def forward(self, hidden_states): class HubertLayerNormConvLayer (line 217) | class HubertLayerNormConvLayer(nn.Module): method __init__ (line 218) | def __init__(self, config, layer_id=0): method forward (line 233) | def forward(self, hidden_states): class HubertGroupNormConvLayer (line 245) | class HubertGroupNormConvLayer(nn.Module): method __init__ (line 246) | def __init__(self, config, layer_id=0): method forward (line 262) | def forward(self, hidden_states): class HubertPositionalConvEmbedding (line 270) | class HubertPositionalConvEmbedding(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 294) | def forward(self, hidden_states): class HubertSamePadLayer (line 306) | class HubertSamePadLayer(nn.Module): method __init__ (line 307) | def __init__(self, num_conv_pos_embeddings): method forward (line 311) | def forward(self, hidden_states): class HubertFeatureEncoder (line 318) | class HubertFeatureEncoder(nn.Module): method __init__ (line 321) | def __init__(self, config): method _freeze_parameters (line 338) | def _freeze_parameters(self): method forward (line 343) | def forward(self, input_values): class HubertFeatureExtractor (line 369) | class HubertFeatureExtractor(HubertFeatureEncoder): method __init__ (line 370) | def __init__(self, config): class HubertFeatureProjection (line 380) | class HubertFeatureProjection(nn.Module): method __init__ (line 381) | def __init__(self, config): method forward (line 389) | def forward(self, hidden_states): class HubertAttention (line 399) | class HubertAttention(nn.Module): method __init__ (line 402) | def __init__( method _shape (line 429) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 432) | def forward( class HubertFeedForward (line 547) | class HubertFeedForward(nn.Module): method __init__ (line 548) | def __init__(self, config): method forward (line 561) | def forward(self, hidden_states): class HubertEncoderLayer (line 572) | class HubertEncoderLayer(nn.Module): method __init__ (line 573) | def __init__(self, config): method forward (line 586) | def forward(self, hidden_states, attention_mask=None, output_attention... class HubertEncoderLayerStableLayerNorm (line 607) | class HubertEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 621) | def forward( class HubertEncoder (line 645) | class HubertEncoder(nn.Module): method __init__ (line 646) | def __init__(self, config): method forward (line 655) | def forward( class HubertEncoderStableLayerNorm (line 733) | class HubertEncoderStableLayerNorm(nn.Module): method __init__ (line 734) | def __init__(self, config): method forward (line 745) | def forward( class HubertPreTrainedModel (line 824) | class HubertPreTrainedModel(PreTrainedModel): method _init_weights (line 836) | def _init_weights(self, module): method _set_gradient_checkpointing (line 861) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 865) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 880) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class HubertModel (line 954) | class HubertModel(HubertPreTrainedModel): method __init__ (line 955) | def __init__(self, config: HubertConfig): method _mask_hidden_states (line 973) | def _mask_hidden_states( method forward (line 1021) | def forward( class HubertForCTC (line 1098) | class HubertForCTC(HubertPreTrainedModel): method __init__ (line 1099) | def __init__(self, config): method freeze_feature_extractor (line 1120) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1132) | def freeze_feature_encoder(self): method forward (line 1148) | def forward( class HubertForSequenceClassification (line 1229) | class HubertForSequenceClassification(HubertPreTrainedModel): method __init__ (line 1230) | def __init__(self, config): method freeze_feature_extractor (line 1247) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1259) | def freeze_feature_encoder(self): method freeze_base_model (line 1266) | def freeze_base_model(self): method forward (line 1284) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/hubert/modeling_tf_hubert.py function input_values_processing (line 51) | def input_values_processing(func, config, input_values, **kwargs): function _sample_without_replacement (line 169) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 180) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 196) | def _compute_mask_indices( function _expand_mask (line 267) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFHubertGroupNorm (line 281) | class TFHubertGroupNorm(tf.keras.layers.Layer): method __init__ (line 286) | def __init__( method build (line 316) | def build(self, input_shape): method call (line 328) | def call(self, inputs): method get_config (line 345) | def get_config(self): method compute_output_shape (line 362) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 365) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 378) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 402) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 413) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 424) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 430) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 451) | def _check_axis(self): method _create_input_spec (line 458) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 463) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 479) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 495) | def _create_broadcast_shape(self, input_shape): class TFHubertWeightNormConv1D (line 507) | class TFHubertWeightNormConv1D(tf.keras.layers.Conv1D): method __init__ (line 510) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 525) | def _init_norm(self): method _normalize_kernel (line 530) | def _normalize_kernel(self): method build (line 535) | def build(self, input_shape): method call (line 554) | def call(self, inputs): class TFHubertNoLayerNormConvLayer (line 568) | class TFHubertNoLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 569) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 583) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertLayerNormConvLayer (line 590) | class TFHubertLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 591) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 606) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertGroupNormConvLayer (line 614) | class TFHubertGroupNormConvLayer(tf.keras.layers.Layer): method __init__ (line 615) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 630) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertPositionalConvEmbedding (line 638) | class TFHubertPositionalConvEmbedding(tf.keras.layers.Layer): method __init__ (line 639) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 651) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertSamePadLayer (line 659) | class TFHubertSamePadLayer(tf.keras.layers.Layer): method __init__ (line 660) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 664) | def call(self, hidden_states): class TFHubertFeatureEncoder (line 670) | class TFHubertFeatureEncoder(tf.keras.layers.Layer): method __init__ (line 671) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 690) | def call(self, input_values): class TFHubertFeatureExtractor (line 697) | class TFHubertFeatureExtractor(TFHubertFeatureEncoder): method __init__ (line 698) | def __init__(self, config, **kwargs): class TFHubertFeatureProjection (line 708) | class TFHubertFeatureProjection(tf.keras.layers.Layer): method __init__ (line 709) | def __init__(self, config: HubertConfig, **kwargs): method call (line 721) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFHubertAttention (line 729) | class TFHubertAttention(tf.keras.layers.Layer): method __init__ (line 732) | def __init__( method _shape (line 760) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 763) | def call( class TFHubertFeedForward (line 883) | class TFHubertFeedForward(tf.keras.layers.Layer): method __init__ (line 884) | def __init__(self, config: HubertConfig, **kwargs): method call (line 905) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFHubertEncoderLayer (line 916) | class TFHubertEncoderLayer(tf.keras.layers.Layer): method __init__ (line 917) | def __init__(self, config: HubertConfig, **kwargs): method call (line 933) | def call( class TFHubertEncoderLayerStableLayerNorm (line 960) | class TFHubertEncoderLayerStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 961) | def __init__(self, config: HubertConfig, **kwargs): method call (line 977) | def call( class TFHubertEncoder (line 1002) | class TFHubertEncoder(tf.keras.layers.Layer): method __init__ (line 1003) | def __init__(self, config: HubertConfig, **kwargs): method call (line 1011) | def call( class TFHubertEncoderStableLayerNorm (line 1068) | class TFHubertEncoderStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 1069) | def __init__(self, config: HubertConfig, **kwargs): method call (line 1079) | def call( class TFHubertMainLayer (line 1136) | class TFHubertMainLayer(tf.keras.layers.Layer): method __init__ (line 1139) | def __init__(self, config: HubertConfig, **kwargs): method build (line 1150) | def build(self, input_shape: tf.TensorShape): method _get_feat_extract_output_lengths (line 1157) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1172) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1216) | def call( class TFHubertPreTrainedModel (line 1284) | class TFHubertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 1295) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method __init__ (line 1304) | def __init__(self, config, *inputs, **kwargs): method serving (line 1320) | def serving(self, inputs): class TFHubertModel (line 1428) | class TFHubertModel(TFHubertPreTrainedModel): method __init__ (line 1429) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method call (line 1436) | def call( method serving_output (line 1515) | def serving_output(self, output): class TFHubertForCTC (line 1527) | class TFHubertForCTC(TFHubertPreTrainedModel): method __init__ (line 1528) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method freeze_feature_extractor (line 1535) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1547) | def freeze_feature_encoder(self): method call (line 1556) | def call( method serving_output (line 1691) | def serving_output(self, output: TFCausalLMOutput) -> TFCausalLMOutput: FILE: benchmark/third_party/transformers/src/transformers/models/ibert/configuration_ibert.py class IBertConfig (line 38) | class IBertConfig(PretrainedConfig): method __init__ (line 94) | def __init__( class IBertOnnxConfig (line 135) | class IBertOnnxConfig(OnnxConfig): method inputs (line 137) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/ibert/modeling_ibert.py class IBertEmbeddings (line 58) | class IBertEmbeddings(nn.Module): method __init__ (line 63) | def __init__(self, config): method forward (line 113) | def forward( method create_position_ids_from_inputs_embeds (line 160) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class IBertSelfAttention (line 178) | class IBertSelfAttention(nn.Module): method __init__ (line 179) | def __init__(self, config): method transpose_for_scores (line 237) | def transpose_for_scores(self, x): method forward (line 242) | def forward( class IBertSelfOutput (line 320) | class IBertSelfOutput(nn.Module): method __init__ (line 321) | def __init__(self, config): method forward (line 350) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertAttention (line 367) | class IBertAttention(nn.Module): method __init__ (line 368) | def __init__(self, config): method prune_heads (line 375) | def prune_heads(self, heads): method forward (line 393) | def forward( class IBertIntermediate (line 416) | class IBertIntermediate(nn.Module): method __init__ (line 417) | def __init__(self, config): method forward (line 437) | def forward(self, hidden_states, hidden_states_scaling_factor): class IBertOutput (line 450) | class IBertOutput(nn.Module): method __init__ (line 451) | def __init__(self, config): method forward (line 480) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertLayer (line 497) | class IBertLayer(nn.Module): method __init__ (line 498) | def __init__(self, config): method forward (line 511) | def forward( method feed_forward_chunk (line 538) | def feed_forward_chunk(self, attention_output, attention_output_scalin... class IBertEncoder (line 555) | class IBertEncoder(nn.Module): method __init__ (line 556) | def __init__(self, config): method forward (line 562) | def forward( class IBertPooler (line 619) | class IBertPooler(nn.Module): method __init__ (line 620) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states): class IBertPreTrainedModel (line 635) | class IBertPreTrainedModel(PreTrainedModel): method _init_weights (line 644) | def _init_weights(self, module): method resize_token_embeddings (line 660) | def resize_token_embeddings(self, new_num_tokens=None): class IBertModel (line 734) | class IBertModel(IBertPreTrainedModel): method __init__ (line 746) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 759) | def get_input_embeddings(self): method set_input_embeddings (line 762) | def set_input_embeddings(self, value): method _prune_heads (line 765) | def _prune_heads(self, heads_to_prune): method forward (line 780) | def forward( class IBertForMaskedLM (line 858) | class IBertForMaskedLM(IBertPreTrainedModel): method __init__ (line 862) | def __init__(self, config): method get_output_embeddings (line 871) | def get_output_embeddings(self): method set_output_embeddings (line 874) | def set_output_embeddings(self, new_embeddings): method forward (line 885) | def forward( class IBertLMHead (line 939) | class IBertLMHead(nn.Module): method __init__ (line 942) | def __init__(self, config): method forward (line 951) | def forward(self, features, **kwargs): method _tie_weights (line 961) | def _tie_weights(self): class IBertForSequenceClassification (line 973) | class IBertForSequenceClassification(IBertPreTrainedModel): method __init__ (line 976) | def __init__(self, config): method forward (line 993) | def forward( class IBertForMultipleChoice (line 1069) | class IBertForMultipleChoice(IBertPreTrainedModel): method __init__ (line 1072) | def __init__(self, config): method forward (line 1089) | def forward( class IBertForTokenClassification (line 1162) | class IBertForTokenClassification(IBertPreTrainedModel): method __init__ (line 1166) | def __init__(self, config): method forward (line 1184) | def forward( class IBertClassificationHead (line 1237) | class IBertClassificationHead(nn.Module): method __init__ (line 1240) | def __init__(self, config): method forward (line 1246) | def forward(self, features, **kwargs): class IBertForQuestionAnswering (line 1263) | class IBertForQuestionAnswering(IBertPreTrainedModel): method __init__ (line 1267) | def __init__(self, config): method forward (line 1284) | def forward( function create_position_ids_from_input_ids (line 1359) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/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 221) | class QuantLinear(nn.Module): method __init__ (line 236) | def __init__( method __repr__ (line 258) | def __repr__(self): method forward (line 263) | def forward(self, x, prev_act_scaling_factor=None): class IntGELU (line 301) | class IntGELU(nn.Module): method __init__ (line 312) | def __init__(self, quant_mode=True, force_dequant="none"): method int_erf (line 328) | def int_erf(self, x_int, scaling_factor): method forward (line 343) | def forward(self, x, scaling_factor=None): class IntSoftmax (line 358) | class IntSoftmax(nn.Module): method __init__ (line 371) | def __init__(self, output_bit, quant_mode=False, force_dequant="none"): method int_polynomial (line 388) | def int_polynomial(self, x_int, scaling_factor): method int_exp (line 396) | def int_exp(self, x_int, scaling_factor): method forward (line 408) | def forward(self, x, scaling_factor): class IntLayerNorm (line 429) | class IntLayerNorm(nn.Module): method __init__ (line 442) | def __init__(self, normalized_shape, eps, output_bit=8, quant_mode=Fal... method set_shift (line 461) | def set_shift(self, y_int): method overflow_fallback (line 470) | def overflow_fallback(self, y_int): method forward (line 481) | def forward(self, x, scaling_factor=None): function get_percentile_min_max (line 530) | def get_percentile_min_max(input, lower_percentile, upper_percentile, ou... function linear_quantize (line 566) | def linear_quantize(input, scale, zero_point, inplace=False): function symmetric_linear_quantization_params (line 601) | def symmetric_linear_quantization_params(num_bits, saturation_min, satur... class SymmetricQuantFunction (line 633) | class SymmetricQuantFunction(Function): method forward (line 639) | def forward(ctx, x, k, percentile_mode, scale): method backward (line 665) | def backward(ctx, grad_output): class floor_ste (line 679) | class floor_ste(Function): method forward (line 685) | def forward(ctx, x): method backward (line 689) | def backward(ctx, grad_output): class round_ste (line 693) | class round_ste(Function): method forward (line 699) | def forward(ctx, x): method backward (line 703) | def backward(ctx, grad_output): function batch_frexp (line 707) | def batch_frexp(inputs, max_bit=31): class FixedPointMul (line 741) | class FixedPointMul(Function): method forward (line 765) | def forward( method backward (line 819) | def backward(ctx, grad_output): FILE: benchmark/third_party/transformers/src/transformers/models/imagegpt/configuration_imagegpt.py class ImageGPTConfig (line 37) | class ImageGPTConfig(PretrainedConfig): method __init__ (line 110) | def __init__( class ImageGPTOnnxConfig (line 152) | class ImageGPTOnnxConfig(OnnxConfig): method inputs (line 154) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 161) | def generate_dummy_inputs( FILE: benchmark/third_party/transformers/src/transformers/models/imagegpt/convert_imagegpt_original_tf2_to_pytorch.py function convert_imagegpt_checkpoint_to_pytorch (line 29) | def convert_imagegpt_checkpoint_to_pytorch(imagegpt_checkpoint_path, mod... FILE: benchmark/third_party/transformers/src/transformers/models/imagegpt/feature_extraction_imagegpt.py function squared_euclidean_distance (line 32) | def squared_euclidean_distance(a, b): function color_quantize (line 41) | def color_quantize(x, clusters): class ImageGPTFeatureExtractor (line 47) | class ImageGPTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtra... method __init__ (line 76) | def __init__( method normalize (line 86) | def normalize(self, image): method __call__ (line 101) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/imagegpt/modeling_imagegpt.py function load_tf_weights_in_imagegpt (line 54) | def load_tf_weights_in_imagegpt(model, config, imagegpt_checkpoint_path): class ImageGPTLayerNorm (line 162) | class ImageGPTLayerNorm(nn.Module): method __init__ (line 163) | def __init__(self, hidden_size: Tuple[int], eps: float = 1e-5): method forward (line 168) | def forward(self, tensor: torch.Tensor) -> tuple: class ImageGPTAttention (line 177) | class ImageGPTAttention(nn.Module): method __init__ (line 178) | def __init__(self, config, is_cross_attention: Optional[bool] = False,... method prune_heads (line 220) | def prune_heads(self, heads): method _attn (line 235) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 273) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 325) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 333) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 341) | def forward( class ImageGPTMLP (line 395) | class ImageGPTMLP(nn.Module): method __init__ (line 396) | def __init__(self, intermediate_size, config): method forward (line 404) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ImageGPTBlock (line 412) | class ImageGPTBlock(nn.Module): method __init__ (line 413) | def __init__(self, config, layer_idx=None): method forward (line 428) | def forward( class ImageGPTPreTrainedModel (line 487) | class ImageGPTPreTrainedModel(PreTrainedModel): method __init__ (line 499) | def __init__(self, *inputs, **kwargs): method _init_weights (line 502) | def _init_weights(self, module): method _set_gradient_checkpointing (line 528) | def _set_gradient_checkpointing(self, module, value=False): class ImageGPTModel (line 617) | class ImageGPTModel(ImageGPTPreTrainedModel): method __init__ (line 620) | def __init__(self, config: ImageGPTConfig): method get_input_embeddings (line 639) | def get_input_embeddings(self): method set_input_embeddings (line 642) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 645) | def _prune_heads(self, heads_to_prune): method forward (line 654) | def forward( class ImageGPTForCausalImageModeling (line 897) | class ImageGPTForCausalImageModeling(ImageGPTPreTrainedModel): method __init__ (line 900) | def __init__(self, config: ImageGPTConfig): method get_output_embeddings (line 911) | def get_output_embeddings(self): method set_output_embeddings (line 914) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 917) | def prepare_inputs_for_generation(self, input_ids: torch.Tensor, past:... method forward (line 947) | def forward( method _reorder_cache (line 1066) | def _reorder_cache(past: Tuple[Tuple[torch.Tensor]], beam_idx: torch.T... class ImageGPTForImageClassification (line 1085) | class ImageGPTForImageClassification(ImageGPTPreTrainedModel): method __init__ (line 1088) | def __init__(self, config: ImageGPTConfig): method forward (line 1099) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlm/configuration_layoutlm.py class LayoutLMConfig (line 38) | class LayoutLMConfig(PretrainedConfig): method __init__ (line 97) | 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: benchmark/third_party/transformers/src/transformers/models/layoutlm/modeling_layoutlm.py class LayoutLMEmbeddings (line 55) | class LayoutLMEmbeddings(nn.Module): method __init__ (line 58) | def __init__(self, config): method forward (line 73) | def forward( class LayoutLMSelfAttention (line 130) | class LayoutLMSelfAttention(nn.Module): method __init__ (line 131) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 157) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 162) | def forward( class LayoutLMSelfOutput (line 258) | class LayoutLMSelfOutput(nn.Module): method __init__ (line 259) | def __init__(self, config): method forward (line 265) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMAttention (line 273) | class LayoutLMAttention(nn.Module): method __init__ (line 274) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 280) | def prune_heads(self, heads): method forward (line 298) | def forward( class LayoutLMIntermediate (line 323) | class LayoutLMIntermediate(nn.Module): method __init__ (line 324) | def __init__(self, config): method forward (line 332) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMOutput (line 339) | class LayoutLMOutput(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 LayoutLMLayer (line 354) | class LayoutLMLayer(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 369) | def forward( method feed_forward_chunk (line 434) | def feed_forward_chunk(self, attention_output): class LayoutLMEncoder (line 441) | class LayoutLMEncoder(nn.Module): method __init__ (line 442) | def __init__(self, config): method forward (line 448) | def forward( class LayoutLMPooler (line 539) | class LayoutLMPooler(nn.Module): method __init__ (line 540) | def __init__(self, config): method forward (line 545) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMPredictionHeadTransform (line 555) | class LayoutLMPredictionHeadTransform(nn.Module): method __init__ (line 556) | def __init__(self, config): method forward (line 565) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMLMPredictionHead (line 573) | class LayoutLMLMPredictionHead(nn.Module): method __init__ (line 574) | def __init__(self, config): method forward (line 587) | def forward(self, hidden_states): class LayoutLMOnlyMLMHead (line 594) | class LayoutLMOnlyMLMHead(nn.Module): method __init__ (line 595) | def __init__(self, config): method forward (line 599) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class LayoutLMPreTrainedModel (line 604) | class LayoutLMPreTrainedModel(PreTrainedModel): method _init_weights (line 616) | def _init_weights(self, module): method _set_gradient_checkpointing (line 632) | def _set_gradient_checkpointing(self, module, value=False): class LayoutLMModel (line 703) | class LayoutLMModel(LayoutLMPreTrainedModel): method __init__ (line 704) | def __init__(self, config): method get_input_embeddings (line 715) | def get_input_embeddings(self): method set_input_embeddings (line 718) | def set_input_embeddings(self, value): method _prune_heads (line 721) | def _prune_heads(self, heads_to_prune): method forward (line 731) | def forward( class LayoutLMForMaskedLM (line 851) | class LayoutLMForMaskedLM(LayoutLMPreTrainedModel): method __init__ (line 852) | def __init__(self, config): method get_input_embeddings (line 861) | def get_input_embeddings(self): method get_output_embeddings (line 864) | def get_output_embeddings(self): method set_output_embeddings (line 867) | def set_output_embeddings(self, new_embeddings): method forward (line 872) | def forward( class LayoutLMForSequenceClassification (line 980) | class LayoutLMForSequenceClassification(LayoutLMPreTrainedModel): method __init__ (line 981) | def __init__(self, config): method get_input_embeddings (line 991) | def get_input_embeddings(self): method forward (line 996) | def forward( class LayoutLMForTokenClassification (line 1117) | class LayoutLMForTokenClassification(LayoutLMPreTrainedModel): method __init__ (line 1118) | def __init__(self, config): method get_input_embeddings (line 1128) | def get_input_embeddings(self): method forward (line 1133) | def forward( class LayoutLMForQuestionAnswering (line 1235) | class LayoutLMForQuestionAnswering(LayoutLMPreTrainedModel): method __init__ (line 1236) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1246) | def get_input_embeddings(self): method forward (line 1250) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlm/modeling_tf_layoutlm.py class TFLayoutLMEmbeddings (line 59) | class TFLayoutLMEmbeddings(tf.keras.layers.Layer): method __init__ (line 62) | def __init__(self, config: LayoutLMConfig, **kwargs): method build (line 74) | def build(self, input_shape: tf.TensorShape): method call (line 126) | def call( class TFLayoutLMSelfAttention (line 199) | class TFLayoutLMSelfAttention(tf.keras.layers.Layer): method __init__ (line 200) | def __init__(self, config: LayoutLMConfig, **kwargs): method transpose_for_scores (line 227) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 234) | def call( class TFLayoutLMSelfOutput (line 317) | class TFLayoutLMSelfOutput(tf.keras.layers.Layer): method __init__ (line 318) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 327) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMAttention (line 336) | class TFLayoutLMAttention(tf.keras.layers.Layer): method __init__ (line 337) | def __init__(self, config: LayoutLMConfig, **kwargs): method prune_heads (line 343) | def prune_heads(self, heads): method call (line 346) | def call( class TFLayoutLMIntermediate (line 377) | class TFLayoutLMIntermediate(tf.keras.layers.Layer): method __init__ (line 378) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 390) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMOutput (line 398) | class TFLayoutLMOutput(tf.keras.layers.Layer): method __init__ (line 399) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 408) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMLayer (line 417) | class TFLayoutLMLayer(tf.keras.layers.Layer): method __init__ (line 418) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 431) | def call( class TFLayoutLMEncoder (line 504) | class TFLayoutLMEncoder(tf.keras.layers.Layer): method __init__ (line 505) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 510) | def call( class TFLayoutLMPooler (line 574) | class TFLayoutLMPooler(tf.keras.layers.Layer): method __init__ (line 575) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 585) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMPredictionHeadTransform (line 595) | class TFLayoutLMPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 596) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 612) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMLMPredictionHead (line 621) | class TFLayoutLMLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 622) | def __init__(self, config: LayoutLMConfig, input_embeddings: tf.keras.... method build (line 634) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 639) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 642) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 646) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 649) | def set_bias(self, value: tf.Variable): method call (line 653) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMMLMHead (line 665) | class TFLayoutLMMLMHead(tf.keras.layers.Layer): method __init__ (line 666) | def __init__(self, config: LayoutLMConfig, input_embeddings: tf.keras.... method call (line 671) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFLayoutLMMainLayer (line 678) | class TFLayoutLMMainLayer(tf.keras.layers.Layer): method __init__ (line 681) | def __init__(self, config: LayoutLMConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 690) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 693) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 697) | def _prune_heads(self, heads_to_prune): method call (line 705) | def call( class TFLayoutLMPreTrainedModel (line 808) | class TFLayoutLMPreTrainedModel(TFPreTrainedModel): class TFLayoutLMModel (line 920) | class TFLayoutLMModel(TFLayoutLMPreTrainedModel): method __init__ (line 921) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 931) | def call( method serving_output (line 998) | def serving_output( class TFLayoutLMForMaskedLM (line 1020) | class TFLayoutLMForMaskedLM(TFLayoutLMPreTrainedModel, TFMaskedLanguageM... method __init__ (line 1029) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method get_lm_head (line 1041) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1044) | def get_prefix_bias_name(self) -> str: method call (line 1051) | def call( method serving_output (line 1139) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFLayoutLMForSequenceClassification (line 1153) | class TFLayoutLMForSequenceClassification(TFLayoutLMPreTrainedModel, TFS... method __init__ (line 1158) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1174) | def call( method serving_output (line 1263) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFLayoutLMForTokenClassification (line 1277) | class TFLayoutLMForTokenClassification(TFLayoutLMPreTrainedModel, TFToke... method __init__ (line 1288) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1304) | def call( method serving_output (line 1391) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFLayoutLMForQuestionAnswering (line 1406) | class TFLayoutLMForQuestionAnswering(TFLayoutLMPreTrainedModel, TFQuesti... method __init__ (line 1416) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1430) | def call( method serving_output (line 1536) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... FILE: benchmark/third_party/transformers/src/transformers/models/layoutlm/tokenization_layoutlm.py function load_vocab (line 53) | def load_vocab(vocab_file): function whitespace_tokenize (line 65) | def whitespace_tokenize(text): class LayoutLMTokenizer (line 75) | class LayoutLMTokenizer(PreTrainedTokenizer): method __init__ (line 122) | def __init__( method do_lower_case (line 169) | def do_lower_case(self): method vocab_size (line 173) | def vocab_size(self): method get_vocab (line 176) | def get_vocab(self): method _tokenize (line 179) | def _tokenize(self, text): method _convert_token_to_id (line 193) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 197) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 201) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 206) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 231) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 259) | def create_token_type_ids_from_sequences( method save_vocabulary (line 288) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 310) | class BasicTokenizer(object): method __init__ (line 330) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 338) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 375) | def _run_strip_accents(self, text): method _run_split_on_punc (line 386) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 408) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 421) | def _is_chinese_char(self, cp): method _clean_text (line 445) | def _clean_text(self, text): class WordpieceTokenizer (line 460) | class WordpieceTokenizer(object): method __init__ (line 463) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 468) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/layoutlm/tokenization_layoutlm_fast.py class LayoutLMTokenizerFast (line 62) | class LayoutLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 108) | def __init__( method build_inputs_with_special_tokens (line 150) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 174) | def create_token_type_ids_from_sequences( method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/configuration_layoutlmv2.py class LayoutLMv2Config (line 34) | class LayoutLMv2Config(PretrainedConfig): method __init__ (line 119) | def __init__( method get_default_detectron2_config (line 184) | def get_default_detectron2_config(self): method get_detectron2_config (line 214) | def get_detectron2_config(self): FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/feature_extraction_layoutlmv2.py function normalize_box (line 42) | def normalize_box(box, width, height): function apply_tesseract (line 51) | def apply_tesseract(image: Image.Image, lang: Optional[str], tesseract_c... class LayoutLMv2FeatureExtractor (line 84) | class LayoutLMv2FeatureExtractor(FeatureExtractionMixin, ImageFeatureExt... method __init__ (line 121) | def __init__( method __call__ (line 139) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/modeling_layoutlmv2.py class LayoutLMv2Embeddings (line 64) | class LayoutLMv2Embeddings(nn.Module): method __init__ (line 67) | def __init__(self, config): method _calc_spatial_position_embeddings (line 83) | def _calc_spatial_position_embeddings(self, bbox): class LayoutLMv2SelfAttention (line 109) | class LayoutLMv2SelfAttention(nn.Module): method __init__ (line 110) | def __init__(self, config): method transpose_for_scores (line 136) | def transpose_for_scores(self, x): method compute_qkv (line 141) | def compute_qkv(self, hidden_states): method forward (line 158) | def forward( class LayoutLMv2Attention (line 202) | class LayoutLMv2Attention(nn.Module): method __init__ (line 203) | def __init__(self, config): method forward (line 208) | def forward( class LayoutLMv2SelfOutput (line 230) | class LayoutLMv2SelfOutput(nn.Module): method __init__ (line 231) | def __init__(self, config): method forward (line 237) | def forward(self, hidden_states, input_tensor): class LayoutLMv2Intermediate (line 245) | class LayoutLMv2Intermediate(nn.Module): method __init__ (line 246) | def __init__(self, config): method forward (line 254) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv2Output (line 261) | class LayoutLMv2Output(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 LayoutLMv2Layer (line 275) | class LayoutLMv2Layer(nn.Module): method __init__ (line 276) | def __init__(self, config): method forward (line 284) | def forward( method feed_forward_chunk (line 312) | def feed_forward_chunk(self, attention_output): function relative_position_bucket (line 318) | def relative_position_bucket(relative_position, bidirectional=True, num_... class LayoutLMv2Encoder (line 362) | class LayoutLMv2Encoder(nn.Module): method __init__ (line 363) | def __init__(self, config): method _calculate_1d_position_embeddings (line 386) | def _calculate_1d_position_embeddings(self, hidden_states, position_ids): method _calculate_2d_position_embeddings (line 398) | def _calculate_2d_position_embeddings(self, hidden_states, bbox): method forward (line 422) | def forward( class LayoutLMv2PreTrainedModel (line 501) | class LayoutLMv2PreTrainedModel(PreTrainedModel): method _init_weights (line 512) | def _init_weights(self, module): method _set_gradient_checkpointing (line 528) | def _set_gradient_checkpointing(self, module, value=False): function my_convert_sync_batchnorm (line 533) | def my_convert_sync_batchnorm(module, process_group=None): class LayoutLMv2VisualBackbone (line 557) | class LayoutLMv2VisualBackbone(nn.Module): method __init__ (line 558) | def __init__(self, config): method forward (line 590) | def forward(self, images): method synchronize_batch_norm (line 597) | def synchronize_batch_norm(self): class LayoutLMv2Pooler (line 691) | class LayoutLMv2Pooler(nn.Module): method __init__ (line 692) | def __init__(self, config): method forward (line 697) | def forward(self, hidden_states): class LayoutLMv2Model (line 710) | class LayoutLMv2Model(LayoutLMv2PreTrainedModel): method __init__ (line 711) | def __init__(self, config): method get_input_embeddings (line 731) | def get_input_embeddings(self): method set_input_embeddings (line 734) | def set_input_embeddings(self, value): method _calc_text_embeddings (line 737) | def _calc_text_embeddings(self, input_ids, bbox, position_ids, token_t... method _calc_img_embeddings (line 762) | def _calc_img_embeddings(self, image, bbox, position_ids): method _calc_visual_bbox (line 773) | def _calc_visual_bbox(self, image_feature_pool_shape, bbox, device, fi... method _get_input_shape (line 808) | def _get_input_shape(self, input_ids=None, inputs_embeds=None): method forward (line 820) | def forward( class LayoutLMv2ForSequenceClassification (line 969) | class LayoutLMv2ForSequenceClassification(LayoutLMv2PreTrainedModel): method __init__ (line 970) | def __init__(self, config): method get_input_embeddings (line 980) | def get_input_embeddings(self): method forward (line 985) | def forward( class LayoutLMv2ForTokenClassification (line 1150) | class LayoutLMv2ForTokenClassification(LayoutLMv2PreTrainedModel): method __init__ (line 1151) | def __init__(self, config): method get_input_embeddings (line 1161) | def get_input_embeddings(self): method forward (line 1166) | def forward( class LayoutLMv2ForQuestionAnswering (line 1281) | class LayoutLMv2ForQuestionAnswering(LayoutLMv2PreTrainedModel): method __init__ (line 1282) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1292) | def get_input_embeddings(self): method forward (line 1297) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/processing_layoutlmv2.py class LayoutLMv2Processor (line 25) | class LayoutLMv2Processor(ProcessorMixin): method __call__ (line 47) | def __call__( method get_overflowing_images (line 134) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 148) | def batch_decode(self, *args, **kwargs): method decode (line 155) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/tokenization_layoutlmv2.py function load_vocab (line 170) | def load_vocab(vocab_file): function whitespace_tokenize (line 181) | def whitespace_tokenize(text): function subfinder (line 193) | def subfinder(mylist, pattern): class LayoutLMv2Tokenizer (line 206) | class LayoutLMv2Tokenizer(PreTrainedTokenizer): method __init__ (line 225) | def __init__( method do_lower_case (line 293) | def do_lower_case(self): method vocab_size (line 297) | def vocab_size(self): method get_vocab (line 300) | def get_vocab(self): method _tokenize (line 303) | def _tokenize(self, text): method _convert_token_to_id (line 317) | 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 build_inputs_with_special_tokens (line 330) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 355) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 383) | def create_token_type_ids_from_sequences( method save_vocabulary (line 406) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 427) | def __call__( method batch_encode_plus (line 575) | def batch_encode_plus( method _batch_encode_plus (line 634) | def _batch_encode_plus( method _batch_prepare_for_model (line 691) | def _batch_prepare_for_model( method encode (line 762) | def encode( method encode_plus (line 809) | def encode_plus( method _encode_plus (line 875) | def _encode_plus( method prepare_for_model (line 928) | def prepare_for_model( method truncate_sequences (line 1138) | def truncate_sequences( method _pad (line 1264) | def _pad( class BasicTokenizer (line 1350) | class BasicTokenizer(object): method __init__ (line 1370) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 1378) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 1415) | def _run_strip_accents(self, text): method _run_split_on_punc (line 1426) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 1448) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 1461) | def _is_chinese_char(self, cp): method _clean_text (line 1485) | def _clean_text(self, text): class WordpieceTokenizer (line 1500) | class WordpieceTokenizer(object): method __init__ (line 1503) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 1508) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py class LayoutLMv2TokenizerFast (line 70) | class LayoutLMv2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 122) | def __init__( method __call__ (line 180) | def __call__( method batch_encode_plus (line 328) | def batch_encode_plus( method tokenize (line 387) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 396) | def encode_plus( method _batch_encode_plus (line 462) | def _batch_encode_plus( method _encode_plus (line 619) | def _encode_plus( method _pad (line 686) | def _pad( method build_inputs_with_special_tokens (line 770) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 794) | def create_token_type_ids_from_sequences( method save_vocabulary (line 817) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/configuration_layoutlmv3.py class LayoutLMv3Config (line 40) | class LayoutLMv3Config(PretrainedConfig): method __init__ (line 124) | def __init__( class LayoutLMv3OnnxConfig (line 193) | class LayoutLMv3OnnxConfig(OnnxConfig): method inputs (line 198) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 220) | def atol_for_validation(self) -> float: method default_onnx_opset (line 224) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 227) | def generate_dummy_inputs( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/feature_extraction_layoutlmv3.py function normalize_box (line 42) | def normalize_box(box, width, height): function apply_tesseract (line 51) | def apply_tesseract(image: Image.Image, lang: Optional[str], tesseract_c... class LayoutLMv3FeatureExtractor (line 83) | class LayoutLMv3FeatureExtractor(FeatureExtractionMixin, ImageFeatureExt... method __init__ (line 126) | def __init__( method __call__ (line 150) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py class LayoutLMv3PatchEmbeddings (line 201) | class LayoutLMv3PatchEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config): method forward (line 221) | def forward(self, pixel_values, position_embedding=None): class LayoutLMv3TextEmbeddings (line 236) | class LayoutLMv3TextEmbeddings(nn.Module): method __init__ (line 241) | def __init__(self, config): method calculate_spatial_position_embeddings (line 262) | def calculate_spatial_position_embeddings(self, bbox): method create_position_ids_from_input_ids (line 288) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 298) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 310) | def forward( class LayoutLMv3PreTrainedModel (line 352) | class LayoutLMv3PreTrainedModel(PreTrainedModel): method _init_weights (line 361) | def _init_weights(self, module): class LayoutLMv3SelfAttention (line 378) | class LayoutLMv3SelfAttention(nn.Module): method __init__ (line 379) | def __init__(self, config): method transpose_for_scores (line 399) | def transpose_for_scores(self, x): method cogview_attention (line 404) | def cogview_attention(self, attention_scores, alpha=32): method forward (line 416) | def forward( class LayoutLMv3SelfOutput (line 469) | class LayoutLMv3SelfOutput(nn.Module): method __init__ (line 470) | def __init__(self, config): method forward (line 476) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv3Attention (line 484) | class LayoutLMv3Attention(nn.Module): method __init__ (line 485) | def __init__(self, config): method forward (line 490) | def forward( class LayoutLMv3Layer (line 513) | class LayoutLMv3Layer(nn.Module): method __init__ (line 514) | def __init__(self, config): method forward (line 522) | def forward( method feed_forward_chunk (line 550) | def feed_forward_chunk(self, attention_output): class LayoutLMv3Encoder (line 556) | class LayoutLMv3Encoder(nn.Module): method __init__ (line 557) | def __init__(self, config): method relative_position_bucket (line 579) | def relative_position_bucket(self, relative_position, bidirectional=Tr... method _cal_1d_pos_emb (line 602) | def _cal_1d_pos_emb(self, hidden_states, position_ids): method _cal_2d_pos_emb (line 615) | def _cal_2d_pos_emb(self, hidden_states, bbox): method forward (line 639) | def forward( class LayoutLMv3Intermediate (line 720) | class LayoutLMv3Intermediate(nn.Module): method __init__ (line 721) | def __init__(self, config): method forward (line 729) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv3Output (line 736) | class LayoutLMv3Output(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 LayoutLMv3Model (line 754) | class LayoutLMv3Model(LayoutLMv3PreTrainedModel): method __init__ (line 757) | def __init__(self, config): method get_input_embeddings (line 786) | def get_input_embeddings(self): method set_input_embeddings (line 789) | def set_input_embeddings(self, value): method _prune_heads (line 792) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 800) | def init_visual_bbox(self, image_size=(14, 14), max_len=1000): method calculate_visual_bbox (line 823) | def calculate_visual_bbox(self, device, dtype, batch_size): method forward_image (line 828) | def forward_image(self, pixel_values): method forward (line 849) | def forward( class LayoutLMv3ClassificationHead (line 1006) | class LayoutLMv3ClassificationHead(nn.Module): method __init__ (line 1011) | def __init__(self, config, pool_feature=False): method forward (line 1024) | def forward(self, x): class LayoutLMv3ForTokenClassification (line 1042) | class LayoutLMv3ForTokenClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1046) | def __init__(self, config): method forward (line 1063) | def forward( class LayoutLMv3ForQuestionAnswering (line 1157) | class LayoutLMv3ForQuestionAnswering(LayoutLMv3PreTrainedModel): method __init__ (line 1161) | def __init__(self, config): method forward (line 1174) | def forward( class LayoutLMv3ForSequenceClassification (line 1290) | class LayoutLMv3ForSequenceClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1293) | def __init__(self, config): method forward (line 1306) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py class TFLayoutLMv3PatchEmbeddings (line 64) | class TFLayoutLMv3PatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 67) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 87) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFLayoutLMv3TextEmbeddings (line 97) | class TFLayoutLMv3TextEmbeddings(tf.keras.layers.Layer): method __init__ (line 102) | def __init__(self, config: LayoutLMv3Config, **kwargs): method calculate_spatial_position_embeddings (line 151) | def calculate_spatial_position_embeddings(self, bbox: tf.Tensor) -> tf... method create_position_ids_from_inputs_embeds (line 192) | def create_position_ids_from_inputs_embeds(self, inputs_embds: tf.Tens... method create_position_ids_from_input_ids (line 207) | def create_position_ids_from_input_ids(self, input_ids: tf.Tensor) -> ... method create_position_ids (line 216) | def create_position_ids(self, input_ids: tf.Tensor, inputs_embeds: tf.... method call (line 222) | def call( class TFLayoutLMv3SelfAttention (line 269) | class TFLayoutLMv3SelfAttention(tf.keras.layers.Layer): method __init__ (line 270) | def __init__(self, config: LayoutLMv3Config, **kwargs): method transpose_for_scores (line 303) | def transpose_for_scores(self, x: tf.Tensor): method cogview_attention (line 314) | def cogview_attention(self, attention_scores: tf.Tensor, alpha: Union[... method call (line 327) | def call( class TFLayoutLMv3SelfOutput (line 382) | class TFLayoutLMv3SelfOutput(tf.keras.layers.Layer): method __init__ (line 383) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 392) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMv3Attention (line 400) | class TFLayoutLMv3Attention(tf.keras.layers.Layer): method __init__ (line 401) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 406) | def call( class TFLayoutLMv3Intermediate (line 431) | class TFLayoutLMv3Intermediate(tf.keras.layers.Layer): method __init__ (line 432) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 444) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMv3Output (line 452) | class TFLayoutLMv3Output(tf.keras.layers.Layer): method __init__ (line 453) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 462) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMv3Layer (line 470) | class TFLayoutLMv3Layer(tf.keras.layers.Layer): method __init__ (line 471) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 477) | def call( class TFLayoutLMv3Encoder (line 504) | class TFLayoutLMv3Encoder(tf.keras.layers.Layer): method __init__ (line 505) | def __init__(self, config: LayoutLMv3Config, **kwargs): method relative_position_bucket (line 539) | def relative_position_bucket(self, relative_positions: tf.Tensor, num_... method _cal_pos_emb (line 564) | def _cal_pos_emb( method _cal_1d_pos_emb (line 580) | def _cal_1d_pos_emb(self, position_ids: tf.Tensor): method _cal_2d_pos_emb (line 583) | def _cal_2d_pos_emb(self, bbox: tf.Tensor): method call (line 601) | def call( class TFLayoutLMv3MainLayer (line 660) | class TFLayoutLMv3MainLayer(tf.keras.layers.Layer): method __init__ (line 663) | def __init__(self, config: LayoutLMv3Config, **kwargs): method build (line 684) | def build(self, input_shape: tf.TensorShape): method get_input_embeddings (line 704) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 707) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 711) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 718) | def init_visual_bbox(self, image_size: Tuple[int, int], max_len: int =... method calculate_visual_bbox (line 741) | def calculate_visual_bbox(self, batch_size: int, dtype: tf.DType): method embed_image (line 747) | def embed_image(self, pixel_values: tf.Tensor) -> tf.Tensor: method get_extended_attention_mask (line 762) | def get_extended_attention_mask(self, attention_mask: tf.Tensor) -> tf... method get_head_mask (line 789) | def get_head_mask(self, head_mask: Optional[tf.Tensor]) -> Union[tf.Te... method call (line 815) | def call( class TFLayoutLMv3PreTrainedModel (line 978) | class TFLayoutLMv3PreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 988) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 1008) | def serving(self, inputs): class TFLayoutLMv3Model (line 1143) | class TFLayoutLMv3Model(TFLayoutLMv3PreTrainedModel): method __init__ (line 1147) | def __init__(self, config, *inputs, **kwargs): method call (line 1154) | def call( method serving_output (line 1215) | def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput: class TFLayoutLMv3ClassificationHead (line 1226) | class TFLayoutLMv3ClassificationHead(tf.keras.layers.Layer): method __init__ (line 1231) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1252) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFLayoutLMv3ForSequenceClassification (line 1268) | class TFLayoutLMv3ForSequenceClassification(TFLayoutLMv3PreTrainedModel,... method __init__ (line 1272) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1281) | def call( method serving_output (line 1363) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFLayoutLMv3ForTokenClassification (line 1379) | class TFLayoutLMv3ForTokenClassification(TFLayoutLMv3PreTrainedModel, TF... method __init__ (line 1383) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1401) | def call( method serving_output (line 1493) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFLayoutLMv3ForQuestionAnswering (line 1508) | class TFLayoutLMv3ForQuestionAnswering(TFLayoutLMv3PreTrainedModel, TFQu... method __init__ (line 1512) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1523) | def call( method serving_output (line 1628) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/processing_layoutlmv3.py class LayoutLMv3Processor (line 25) | class LayoutLMv3Processor(ProcessorMixin): method __call__ (line 47) | def __call__( method get_overflowing_images (line 132) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 146) | def batch_decode(self, *args, **kwargs): method decode (line 153) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py function bytes_to_unicode (line 161) | def bytes_to_unicode(): function get_pairs (line 186) | def get_pairs(word): class LayoutLMv3Tokenizer (line 200) | class LayoutLMv3Tokenizer(PreTrainedTokenizer): method __init__ (line 276) | def __init__( method vocab_size (line 349) | def vocab_size(self): method get_vocab (line 353) | def get_vocab(self): method bpe (line 357) | def bpe(self, token): method _tokenize (line 400) | def _tokenize(self, text): method _convert_token_to_id (line 411) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 416) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 421) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 428) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 458) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 484) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 512) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 535) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method __call__ (line 549) | def __call__( method batch_encode_plus (line 698) | def batch_encode_plus( method _batch_encode_plus (line 758) | def _batch_encode_plus( method _batch_prepare_for_model (line 816) | def _batch_prepare_for_model( method encode (line 888) | def encode( method encode_plus (line 936) | def encode_plus( method _encode_plus (line 1003) | def _encode_plus( method prepare_for_model (line 1056) | def prepare_for_model( method truncate_sequences (line 1269) | def truncate_sequences( method _pad (line 1396) | def _pad( FILE: benchmark/third_party/transformers/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py class LayoutLMv3TokenizerFast (line 65) | class LayoutLMv3TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 139) | def __init__( method __call__ (line 226) | def __call__( method batch_encode_plus (line 375) | def batch_encode_plus( method tokenize (line 435) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 445) | def encode_plus( method _batch_encode_plus (line 512) | def _batch_encode_plus( method _encode_plus (line 670) | def _encode_plus( method _pad (line 738) | def _pad( method save_vocabulary (line 823) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 827) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 834) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/layoutxlm/processing_layoutxlm.py class LayoutXLMProcessor (line 25) | class LayoutXLMProcessor(ProcessorMixin): method __call__ (line 47) | def __call__( method get_overflowing_images (line 134) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 148) | def batch_decode(self, *args, **kwargs): method decode (line 155) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm.py class LayoutXLMTokenizer (line 149) | class LayoutXLMTokenizer(PreTrainedTokenizer): method __init__ (line 234) | def __init__( method __getstate__ (line 300) | def __getstate__(self): method __setstate__ (line 306) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 316) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 342) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 370) | def create_token_type_ids_from_sequences( method vocab_size (line 396) | def vocab_size(self): method get_vocab (line 399) | def get_vocab(self): method _tokenize (line 404) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 407) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 416) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 422) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 427) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 445) | def __call__( method _batch_encode_plus (line 592) | def _batch_encode_plus( method _batch_prepare_for_model (line 649) | def _batch_prepare_for_model( method _encode_plus (line 719) | def _encode_plus( method prepare_for_model (line 772) | def prepare_for_model( method truncate_sequences (line 969) | def truncate_sequences( method _pad (line 1094) | def _pad( FILE: benchmark/third_party/transformers/src/transformers/models/layoutxlm/tokenization_layoutxlm_fast.py class LayoutXLMTokenizerFast (line 152) | class LayoutXLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 220) | def __init__( method __call__ (line 270) | def __call__( method tokenize (line 417) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method _batch_encode_plus (line 425) | def _batch_encode_plus( method _encode_plus (line 583) | def _encode_plus( method _pad (line 650) | def _pad( method build_inputs_with_special_tokens (line 734) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 760) | def create_token_type_ids_from_sequences( method save_vocabulary (line 785) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/led/configuration_led.py class LEDConfig (line 31) | class LEDConfig(PretrainedConfig): method __init__ (line 108) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/led/modeling_led.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 78) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 93) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LEDLearnedPositionalEmbedding (line 111) | class LEDLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 116) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 119) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class LEDEncoderSelfAttention (line 129) | class LEDEncoderSelfAttention(nn.Module): method __init__ (line 130) | def __init__(self, config, layer_id): method forward (line 165) | def forward( method _pad_and_transpose_last_two_dims (line 334) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 345) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 394) | def _chunk(hidden_states, window_overlap, onnx_export=False): method _mask_invalid_locations (line 438) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 453) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 519) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 564) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 592) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 622) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 658) | def _compute_global_attn_output_from_hidden( class LEDEncoderAttention (line 767) | class LEDEncoderAttention(nn.Module): method __init__ (line 768) | def __init__(self, config, layer_id): method forward (line 773) | def forward( class LEDDecoderAttention (line 801) | class LEDDecoderAttention(nn.Module): method __init__ (line 804) | def __init__( method _shape (line 830) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 833) | def forward( class LEDEncoderLayer (line 944) | class LEDEncoderLayer(nn.Module): method __init__ (line 945) | def __init__(self, config: LEDConfig, layer_id: int): method forward (line 957) | def forward( class LEDDecoderLayer (line 1006) | class LEDDecoderLayer(nn.Module): method __init__ (line 1007) | def __init__(self, config: LEDConfig): method forward (line 1033) | def forward( class LEDClassificationHead (line 1122) | class LEDClassificationHead(nn.Module): method __init__ (line 1125) | def __init__( method forward (line 1137) | def forward(self, hidden_states: torch.Tensor): class LEDPreTrainedModel (line 1146) | class LEDPreTrainedModel(PreTrainedModel): method _init_weights (line 1151) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1162) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 1167) | def dummy_inputs(self): class LEDEncoderBaseModelOutput (line 1179) | class LEDEncoderBaseModelOutput(ModelOutput): class LEDSeq2SeqModelOutput (line 1222) | class LEDSeq2SeqModelOutput(ModelOutput): class LEDSeq2SeqLMOutput (line 1290) | class LEDSeq2SeqLMOutput(ModelOutput): class LEDSeq2SeqSequenceClassifierOutput (line 1357) | class LEDSeq2SeqSequenceClassifierOutput(ModelOutput): class LEDSeq2SeqQuestionAnsweringModelOutput (line 1424) | class LEDSeq2SeqQuestionAnsweringModelOutput(ModelOutput): class LEDEncoder (line 1648) | class LEDEncoder(LEDPreTrainedModel): method __init__ (line 1658) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method _merge_to_attention_mask (line 1697) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method _pad_to_window_size (line 1709) | def _pad_to_window_size( method forward (line 1752) | def forward( class LEDDecoder (line 1943) | class LEDDecoder(LEDPreTrainedModel): method __init__ (line 1952) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method forward (line 1975) | def forward( class LEDModel (line 2213) | class LEDModel(LEDPreTrainedModel): method __init__ (line 2214) | def __init__(self, config: LEDConfig): method get_input_embeddings (line 2226) | def get_input_embeddings(self): method set_input_embeddings (line 2229) | def set_input_embeddings(self, value): method get_encoder (line 2234) | def get_encoder(self): method get_decoder (line 2237) | def get_decoder(self): method forward (line 2247) | def forward( class LEDForConditionalGeneration (line 2336) | class LEDForConditionalGeneration(LEDPreTrainedModel): method __init__ (line 2345) | def __init__(self, config: LEDConfig): method get_encoder (line 2354) | def get_encoder(self): method get_decoder (line 2357) | def get_decoder(self): method resize_token_embeddings (line 2360) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 2365) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2374) | def get_output_embeddings(self): method set_output_embeddings (line 2377) | def set_output_embeddings(self, new_embeddings): method forward (line 2383) | def forward( method prepare_inputs_for_generation (line 2478) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2508) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2512) | def _reorder_cache(past, beam_idx): class LEDForSequenceClassification (line 2529) | class LEDForSequenceClassification(LEDPreTrainedModel): method __init__ (line 2530) | def __init__(self, config: LEDConfig, **kwargs): method forward (line 2549) | def forward( class LEDForQuestionAnswering (line 2657) | class LEDForQuestionAnswering(LEDPreTrainedModel): method __init__ (line 2658) | def __init__(self, config): method forward (line 2676) | def forward( FILE: benchmark/third_party/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(tf.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(tf.keras.layers.Layer): method __init__ (line 135) | def __init__(self, config, layer_id, **kwargs): method call (line 193) | def call( method _sliding_chunks_query_key_matmul (line 389) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 506) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 535) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 609) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 620) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 672) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 702) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 732) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 786) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 827) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 964) | def reshape_and_transpose(self, vector, batch_size): class TFLEDEncoderAttention (line 974) | class TFLEDEncoderAttention(tf.keras.layers.Layer): method __init__ (line 975) | def __init__(self, config, layer_id, **kwargs): method call (line 980) | def call(self, inputs, training=False): class TFLEDDecoderAttention (line 1001) | class TFLEDDecoderAttention(tf.keras.layers.Layer): method __init__ (line 1004) | def __init__( method _shape (line 1028) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 1031) | def call( class TFLEDEncoderLayer (line 1152) | class TFLEDEncoderLayer(tf.keras.layers.Layer): method __init__ (line 1153) | def __init__(self, config: LEDConfig, layer_id: int, **kwargs): method call (line 1165) | def call( class TFLEDDecoderLayer (line 1211) | class TFLEDDecoderLayer(tf.keras.layers.Layer): method __init__ (line 1212) | def __init__(self, config: LEDConfig, **kwargs): method call (line 1239) | def call( class TFLEDPreTrainedModel (line 1320) | class TFLEDPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 1325) | def dummy_inputs(self): method serving (line 1348) | def serving(self, inputs): class TFLEDEncoderBaseModelOutput (line 1356) | class TFLEDEncoderBaseModelOutput(ModelOutput): class TFLEDSeq2SeqModelOutput (line 1399) | class TFLEDSeq2SeqModelOutput(ModelOutput): class TFLEDSeq2SeqLMOutput (line 1467) | class TFLEDSeq2SeqLMOutput(ModelOutput): class TFLEDEncoder (line 1643) | class TFLEDEncoder(tf.keras.layers.Layer): method __init__ (line 1653) | def __init__(self, config: LEDConfig, embed_tokens: Optional[tf.keras.... method get_embed_tokens (line 1682) | def get_embed_tokens(self): method set_embed_tokens (line 1685) | def set_embed_tokens(self, embed_tokens): method call (line 1689) | def call( method compute_hidden_states (line 1865) | def compute_hidden_states(self, hidden_states, padding_len): method _pad_to_window_size (line 1868) | def _pad_to_window_size( class TFLEDDecoder (line 1918) | class TFLEDDecoder(tf.keras.layers.Layer): method __init__ (line 1928) | def __init__(self, config: LEDConfig, embed_tokens: Optional[tf.keras.... method set_embed_tokens (line 1946) | def set_embed_tokens(self, embed_tokens): method call (line 1950) | def call( class TFLEDMainLayer (line 2147) | class TFLEDMainLayer(tf.keras.layers.Layer): method __init__ (line 2150) | def __init__(self, config: LEDConfig, **kwargs): method get_input_embeddings (line 2165) | def get_input_embeddings(self): method set_input_embeddings (line 2168) | def set_input_embeddings(self, new_embeddings): method call (line 2174) | def call( class TFLEDModel (line 2257) | class TFLEDModel(TFLEDPreTrainedModel): method __init__ (line 2258) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 2263) | def get_encoder(self): method get_decoder (line 2266) | def get_decoder(self): method call (line 2277) | def call( method serving_output (line 2319) | def serving_output(self, output): class BiasLayer (line 2342) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 2348) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 2355) | def call(self, x): class TFLEDForConditionalGeneration (line 2363) | class TFLEDForConditionalGeneration(TFLEDPreTrainedModel): method __init__ (line 2369) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 2381) | def get_decoder(self): method get_encoder (line 2384) | def get_encoder(self): method get_bias (line 2387) | def get_bias(self): method set_bias (line 2390) | def set_bias(self, value): method get_output_embeddings (line 2398) | def get_output_embeddings(self): method set_output_embeddings (line 2401) | def set_output_embeddings(self, value): method call (line 2407) | def call( method serving_output (line 2491) | def serving_output(self, output): method prepare_inputs_for_generation (line 2512) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2538) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 2542) | def _reorder_cache(past, beam_idx): method hf_compute_loss (line 2551) | def hf_compute_loss(self, labels, logits): FILE: benchmark/third_party/transformers/src/transformers/models/led/tokenization_led.py function bytes_to_unicode (line 54) | def bytes_to_unicode(): function get_pairs (line 79) | def get_pairs(word): class LEDTokenizer (line 93) | class LEDTokenizer(PreTrainedTokenizer): method __init__ (line 175) | def __init__( method vocab_size (line 231) | def vocab_size(self): method get_vocab (line 235) | def get_vocab(self): method bpe (line 239) | def bpe(self, token): method _tokenize (line 282) | def _tokenize(self, text): method _convert_token_to_id (line 293) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 298) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 303) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 310) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 340) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 366) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 394) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 418) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _pad (line 424) | def _pad( FILE: benchmark/third_party/transformers/src/transformers/models/led/tokenization_led_fast.py class LEDTokenizerFast (line 50) | class LEDTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 136) | def __init__( method mask_token (line 207) | def mask_token(self) -> str: method mask_token (line 222) | def mask_token(self, value): method _batch_encode_plus (line 234) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 246) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 258) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 263) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 271) | def create_token_type_ids_from_sequences( method _pad (line 295) | def _pad( FILE: benchmark/third_party/transformers/src/transformers/models/levit/configuration_levit.py class LevitConfig (line 35) | class LevitConfig(PretrainedConfig): method __init__ (line 92) | def __init__( class LevitOnnxConfig (line 132) | class LevitOnnxConfig(OnnxConfig): method inputs (line 137) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 145) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/levit/convert_levit_timm_to_pytorch.py function convert_weight_and_push (line 36) | def convert_weight_and_push( function convert_weights_and_push (line 83) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: benchmark/third_party/transformers/src/transformers/models/levit/feature_extraction_levit.py class LevitFeatureExtractor (line 38) | class LevitFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtracti... method __init__ (line 68) | def __init__( method __call__ (line 88) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/levit/modeling_levit.py class LevitForImageClassificationWithTeacherOutput (line 58) | class LevitForImageClassificationWithTeacherOutput(ModelOutput): class LevitConvEmbeddings (line 83) | class LevitConvEmbeddings(nn.Module): method __init__ (line 88) | def __init__( method forward (line 97) | def forward(self, embeddings): class LevitPatchEmbeddings (line 103) | class LevitPatchEmbeddings(nn.Module): method __init__ (line 109) | def __init__(self, config): method forward (line 131) | def forward(self, pixel_values): class MLPLayerWithBN (line 147) | class MLPLayerWithBN(nn.Module): method __init__ (line 148) | def __init__(self, input_dim, output_dim, bn_weight_init=1): method forward (line 153) | def forward(self, hidden_state): class LevitSubsample (line 159) | class LevitSubsample(nn.Module): method __init__ (line 160) | def __init__(self, stride, resolution): method forward (line 165) | def forward(self, hidden_state): class LevitAttention (line 173) | class LevitAttention(nn.Module): method __init__ (line 174) | def __init__(self, hidden_sizes, key_dim, num_attention_heads, attenti... method train (line 202) | def train(self, mode=True): method get_attention_biases (line 207) | def get_attention_biases(self, device): method forward (line 216) | def forward(self, hidden_state): class LevitAttentionSubsample (line 233) | class LevitAttentionSubsample(nn.Module): method __init__ (line 234) | def __init__( method train (line 278) | def train(self, mode=True): method get_attention_biases (line 283) | def get_attention_biases(self, device): method forward (line 292) | def forward(self, hidden_state): class LevitMLPLayer (line 314) | class LevitMLPLayer(nn.Module): method __init__ (line 319) | def __init__(self, input_dim, hidden_dim): method forward (line 325) | def forward(self, hidden_state): class LevitResidualLayer (line 332) | class LevitResidualLayer(nn.Module): method __init__ (line 337) | def __init__(self, module, drop_rate): method forward (line 342) | def forward(self, hidden_state): class LevitStage (line 353) | class LevitStage(nn.Module): method __init__ (line 358) | def __init__( method get_resolution (line 413) | def get_resolution(self): method forward (line 416) | def forward(self, hidden_state): class LevitEncoder (line 422) | class LevitEncoder(nn.Module): method __init__ (line 427) | def __init__(self, config): method forward (line 452) | def forward(self, hidden_state, output_hidden_states=False, return_dic... class LevitClassificationLayer (line 468) | class LevitClassificationLayer(nn.Module): method __init__ (line 473) | def __init__(self, input_dim, output_dim): method forward (line 478) | def forward(self, hidden_state): class LevitPreTrainedModel (line 484) | class LevitPreTrainedModel(PreTrainedModel): method _init_weights (line 495) | def _init_weights(self, module): method _set_gradient_checkpointing (line 507) | def _set_gradient_checkpointing(self, module, value=False): class LevitModel (line 541) | class LevitModel(LevitPreTrainedModel): method __init__ (line 542) | def __init__(self, config): method forward (line 559) | def forward( class LevitForImageClassification (line 602) | class LevitForImageClassification(LevitPreTrainedModel): method __init__ (line 603) | def __init__(self, config): method forward (line 627) | def forward( class LevitForImageClassificationWithTeacher (line 690) | class LevitForImageClassificationWithTeacher(LevitPreTrainedModel): method __init__ (line 691) | def __init__(self, config): method forward (line 720) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/lilt/configuration_lilt.py class LiltConfig (line 30) | class LiltConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/lilt/modeling_lilt.py class LiltTextEmbeddings (line 49) | class LiltTextEmbeddings(nn.Module): method __init__ (line 50) | def __init__(self, config): method forward (line 71) | def forward( method create_position_ids_from_input_ids (line 107) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 120) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LiltLayoutEmbeddings (line 136) | class LiltLayoutEmbeddings(nn.Module): method __init__ (line 137) | def __init__(self, config): method forward (line 158) | def forward(self, bbox=None, position_ids=None): class LiltSelfAttention (line 192) | class LiltSelfAttention(nn.Module): method __init__ (line 193) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 229) | def transpose_for_scores(self, x, r=1): method forward (line 234) | def forward( class LiltSelfOutput (line 331) | class LiltSelfOutput(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 LiltAttention (line 345) | class LiltAttention(nn.Module): method __init__ (line 346) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 358) | def prune_heads(self, heads): method forward (line 376) | def forward( class LiltIntermediate (line 398) | class LiltIntermediate(nn.Module): method __init__ (line 399) | def __init__(self, config): method forward (line 407) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltOutput (line 414) | class LiltOutput(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 LiltLayer (line 428) | class LiltLayer(nn.Module): method __init__ (line 429) | def __init__(self, config): method forward (line 446) | def forward( method feed_forward_chunk (line 477) | def feed_forward_chunk(self, attention_output): method layout_feed_forward_chunk (line 482) | def layout_feed_forward_chunk(self, attention_output): class LiltEncoder (line 488) | class LiltEncoder(nn.Module): method __init__ (line 490) | def __init__(self, config): method forward (line 496) | def forward( class LiltPooler (line 566) | class LiltPooler(nn.Module): method __init__ (line 567) | def __init__(self, config): method forward (line 572) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltPreTrainedModel (line 582) | class LiltPreTrainedModel(PreTrainedModel): method _init_weights (line 594) | def _init_weights(self, module): method _set_gradient_checkpointing (line 610) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 614) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class LiltModel (line 700) | class LiltModel(LiltPreTrainedModel): method __init__ (line 703) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 716) | def get_input_embeddings(self): method set_input_embeddings (line 719) | def set_input_embeddings(self, value): method _prune_heads (line 722) | def _prune_heads(self, heads_to_prune): method forward (line 732) | def forward( class LiltForSequenceClassification (line 850) | class LiltForSequenceClassification(LiltPreTrainedModel): method __init__ (line 854) | def __init__(self, config): method forward (line 867) | def forward( class LiltForTokenClassification (line 968) | class LiltForTokenClassification(LiltPreTrainedModel): method __init__ (line 973) | def __init__(self, config): method forward (line 989) | def forward( class LiltClassificationHead (line 1066) | class LiltClassificationHead(nn.Module): method __init__ (line 1069) | def __init__(self, config): method forward (line 1078) | def forward(self, features, **kwargs): class LiltForQuestionAnswering (line 1095) | class LiltForQuestionAnswering(LiltPreTrainedModel): method __init__ (line 1100) | def __init__(self, config): method forward (line 1112) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/longformer/configuration_longformer.py class LongformerConfig (line 46) | class LongformerConfig(PretrainedConfig): method __init__ (line 120) | def __init__( class LongformerOnnxConfig (line 170) | class LongformerOnnxConfig(OnnxConfig): method __init__ (line 171) | def __init__(self, config: "PretrainedConfig", task: str = "default", ... method inputs (line 176) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 190) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 197) | def atol_for_validation(self) -> float: method default_onnx_opset (line 207) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 211) | def generate_dummy_inputs( FILE: benchmark/third_party/transformers/src/transformers/models/longformer/convert_longformer_original_pytorch_lightning_to_pytorch.py class LightningModel (line 27) | class LightningModel(pl.LightningModule): method __init__ (line 28) | def __init__(self, model): method forward (line 35) | def forward(self): function convert_longformer_qa_checkpoint_to_pytorch (line 39) | def convert_longformer_qa_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/longformer/modeling_longformer.py class LongformerBaseModelOutput (line 57) | class LongformerBaseModelOutput(ModelOutput): class LongformerBaseModelOutputWithPooling (line 100) | class LongformerBaseModelOutputWithPooling(ModelOutput): class LongformerMaskedLMOutput (line 148) | class LongformerMaskedLMOutput(ModelOutput): class LongformerQuestionAnsweringModelOutput (line 194) | class LongformerQuestionAnsweringModelOutput(ModelOutput): class LongformerSequenceClassifierOutput (line 243) | class LongformerSequenceClassifierOutput(ModelOutput): class LongformerMultipleChoiceModelOutput (line 289) | class LongformerMultipleChoiceModelOutput(ModelOutput): class LongformerTokenClassifierOutput (line 337) | class LongformerTokenClassifierOutput(ModelOutput): function _get_question_end_index (line 382) | def _get_question_end_index(input_ids, sep_token_id): function _compute_global_attention_mask (line 398) | def _compute_global_attention_mask(input_ids, sep_token_id, before_sep_t... function create_position_ids_from_input_ids (line 418) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LongformerEmbeddings (line 434) | class LongformerEmbeddings(nn.Module): method __init__ (line 439) | def __init__(self, config): method forward (line 457) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... method create_position_ids_from_inputs_embeds (line 483) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LongformerSelfAttention (line 501) | class LongformerSelfAttention(nn.Module): method __init__ (line 502) | def __init__(self, config, layer_id): method forward (line 537) | def forward( method _pad_and_transpose_last_two_dims (line 706) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 717) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 766) | def _chunk(hidden_states, window_overlap, onnx_export=False): method _mask_invalid_locations (line 810) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 825) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 891) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 936) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 964) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 994) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1030) | def _compute_global_attn_output_from_hidden( class LongformerSelfOutput (line 1140) | class LongformerSelfOutput(nn.Module): method __init__ (line 1141) | def __init__(self, config): method forward (line 1147) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerAttention (line 1154) | class LongformerAttention(nn.Module): method __init__ (line 1155) | def __init__(self, config, layer_id=0): method prune_heads (line 1161) | def prune_heads(self, heads): method forward (line 1179) | def forward( class LongformerIntermediate (line 1204) | class LongformerIntermediate(nn.Module): method __init__ (line 1205) | def __init__(self, config): method forward (line 1213) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerOutput (line 1220) | class LongformerOutput(nn.Module): method __init__ (line 1221) | def __init__(self, config): method forward (line 1227) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerLayer (line 1234) | class LongformerLayer(nn.Module): method __init__ (line 1235) | def __init__(self, config, layer_id=0): method forward (line 1243) | def forward( method ff_chunk (line 1271) | def ff_chunk(self, attn_output): class LongformerEncoder (line 1277) | class LongformerEncoder(nn.Module): method __init__ (line 1278) | def __init__(self, config): method forward (line 1284) | def forward( class LongformerPooler (line 1375) | class LongformerPooler(nn.Module): method __init__ (line 1376) | def __init__(self, config): method forward (line 1381) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerLMHead (line 1391) | class LongformerLMHead(nn.Module): method __init__ (line 1394) | def __init__(self, config): method forward (line 1403) | def forward(self, features, **kwargs): method _tie_weights (line 1413) | def _tie_weights(self): class LongformerPreTrainedModel (line 1422) | class LongformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1434) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1450) | def _set_gradient_checkpointing(self, module, value=False): class LongformerModel (line 1542) | class LongformerModel(LongformerPreTrainedModel): method __init__ (line 1558) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1579) | def get_input_embeddings(self): method set_input_embeddings (line 1582) | def set_input_embeddings(self, value): method _prune_heads (line 1585) | def _prune_heads(self, heads_to_prune): method _pad_to_window_size (line 1593) | def _pad_to_window_size( method _merge_to_attention_mask (line 1641) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method forward (line 1655) | def forward( class LongformerForMaskedLM (line 1777) | class LongformerForMaskedLM(LongformerPreTrainedModel): method __init__ (line 1781) | def __init__(self, config): method get_output_embeddings (line 1790) | def get_output_embeddings(self): method set_output_embeddings (line 1793) | def set_output_embeddings(self, new_embeddings): method forward (line 1798) | def forward( class LongformerForSequenceClassification (line 1890) | class LongformerForSequenceClassification(LongformerPreTrainedModel): method __init__ (line 1894) | def __init__(self, config): method forward (line 1914) | def forward( class LongformerClassificationHead (line 1993) | class LongformerClassificationHead(nn.Module): method __init__ (line 1996) | def __init__(self, config): method forward (line 2002) | def forward(self, hidden_states, **kwargs): class LongformerForQuestionAnswering (line 2019) | class LongformerForQuestionAnswering(LongformerPreTrainedModel): method __init__ (line 2023) | def __init__(self, config): method forward (line 2035) | def forward( class LongformerForTokenClassification (line 2159) | class LongformerForTokenClassification(LongformerPreTrainedModel): method __init__ (line 2163) | def __init__(self, config): method forward (line 2186) | def forward( class LongformerForMultipleChoice (line 2249) | class LongformerForMultipleChoice(LongformerPreTrainedModel): method __init__ (line 2250) | def __init__(self, config): method forward (line 2269) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/longformer/modeling_tf_longformer.py class TFLongformerBaseModelOutput (line 68) | class TFLongformerBaseModelOutput(ModelOutput): class TFLongformerBaseModelOutputWithPooling (line 111) | class TFLongformerBaseModelOutputWithPooling(ModelOutput): class TFLongformerMaskedLMOutput (line 159) | class TFLongformerMaskedLMOutput(ModelOutput): class TFLongformerQuestionAnsweringModelOutput (line 205) | class TFLongformerQuestionAnsweringModelOutput(ModelOutput): class TFLongformerSequenceClassifierOutput (line 254) | class TFLongformerSequenceClassifierOutput(ModelOutput): class TFLongformerMultipleChoiceModelOutput (line 300) | class TFLongformerMultipleChoiceModelOutput(ModelOutput): class TFLongformerTokenClassifierOutput (line 348) | class TFLongformerTokenClassifierOutput(ModelOutput): function _compute_global_attention_mask (line 393) | def _compute_global_attention_mask(input_ids_shape, sep_token_indices, b... class TFLongformerLMHead (line 418) | class TFLongformerLMHead(tf.keras.layers.Layer): method __init__ (line 421) | def __init__(self, config, input_embeddings, **kwargs): method build (line 436) | def build(self, input_shape): 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(tf.keras.layers.Layer): method __init__ (line 475) | def __init__(self, config, **kwargs): method build (line 487) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 511) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 525) | def call( class TFLongformerIntermediate (line 582) | class TFLongformerIntermediate(tf.keras.layers.Layer): method __init__ (line 583) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 595) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLongformerOutput (line 603) | class TFLongformerOutput(tf.keras.layers.Layer): method __init__ (line 604) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 613) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLongformerPooler (line 622) | class TFLongformerPooler(tf.keras.layers.Layer): method __init__ (line 623) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 633) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLongformerSelfOutput (line 643) | class TFLongformerSelfOutput(tf.keras.layers.Layer): method __init__ (line 644) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 653) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLongformerSelfAttention (line 661) | class TFLongformerSelfAttention(tf.keras.layers.Layer): method __init__ (line 662) | def __init__(self, config, layer_id, **kwargs): method call (line 720) | def call( method _sliding_chunks_query_key_matmul (line 916) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 1033) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 1062) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 1136) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 1147) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 1199) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 1229) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 1259) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 1313) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1354) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 1491) | def reshape_and_transpose(self, vector, batch_size): class TFLongformerAttention (line 1501) | class TFLongformerAttention(tf.keras.layers.Layer): method __init__ (line 1502) | def __init__(self, config, layer_id=0, **kwargs): method prune_heads (line 1508) | def prune_heads(self, heads): method call (line 1511) | def call(self, inputs, training=False): class TFLongformerLayer (line 1531) | class TFLongformerLayer(tf.keras.layers.Layer): method __init__ (line 1532) | def __init__(self, config, layer_id=0, **kwargs): method call (line 1539) | def call(self, inputs, training=False): class TFLongformerEncoder (line 1561) | class TFLongformerEncoder(tf.keras.layers.Layer): method __init__ (line 1562) | def __init__(self, config, **kwargs): method call (line 1569) | def call( class TFLongformerMainLayer (line 1640) | class TFLongformerMainLayer(tf.keras.layers.Layer): method __init__ (line 1643) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 1668) | def get_input_embeddings(self): method set_input_embeddings (line 1671) | def set_input_embeddings(self, value): method _prune_heads (line 1675) | def _prune_heads(self, heads_to_prune): method call (line 1683) | def call( method _pad_to_window_size (line 1804) | def _pad_to_window_size( method _merge_to_attention_mask (line 1862) | def _merge_to_attention_mask(attention_mask: tf.Tensor, global_attenti... class TFLongformerPreTrainedModel (line 1876) | class TFLongformerPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 1886) | def dummy_inputs(self): method serving (line 1910) | def serving(self, inputs): class TFLongformerModel (line 2030) | class TFLongformerModel(TFLongformerPreTrainedModel): method __init__ (line 2047) | def __init__(self, config, *inputs, **kwargs): method call (line 2054) | def call( method serving_output (line 2085) | def serving_output(self, output): class TFLongformerForMaskedLM (line 2103) | class TFLongformerForMaskedLM(TFLongformerPreTrainedModel, TFMaskedLangu... method __init__ (line 2107) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 2113) | def get_lm_head(self): method get_prefix_bias_name (line 2116) | def get_prefix_bias_name(self): method call (line 2131) | def call( method serving_output (line 2183) | def serving_output(self, output): class TFLongformerForQuestionAnswering (line 2200) | class TFLongformerForQuestionAnswering(TFLongformerPreTrainedModel, TFQu... method __init__ (line 2204) | def __init__(self, config, *inputs, **kwargs): method call (line 2225) | def call( method serving_output (line 2323) | def serving_output(self, output): class TFLongformerClassificationHead (line 2337) | class TFLongformerClassificationHead(tf.keras.layers.Layer): method __init__ (line 2340) | def __init__(self, config, **kwargs): method call (line 2353) | def call(self, hidden_states, training=False): class TFLongformerForSequenceClassification (line 2369) | class TFLongformerForSequenceClassification(TFLongformerPreTrainedModel,... method __init__ (line 2373) | def __init__(self, config, *inputs, **kwargs): method call (line 2391) | def call( method serving_output (line 2468) | def serving_output(self, output): class TFLongformerForMultipleChoice (line 2485) | class TFLongformerForMultipleChoice(TFLongformerPreTrainedModel, TFMulti... method __init__ (line 2489) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 2499) | def dummy_inputs(self): method call (line 2515) | def call( method serving (line 2599) | def serving(self, inputs): method serving_output (line 2604) | def serving_output(self, output): class TFLongformerForTokenClassification (line 2621) | class TFLongformerForTokenClassification(TFLongformerPreTrainedModel, TF... method __init__ (line 2626) | def __init__(self, config, *inputs, **kwargs): method call (line 2650) | def call( method serving_output (line 2700) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/longformer/tokenization_longformer.py function bytes_to_unicode (line 76) | def bytes_to_unicode(): function get_pairs (line 101) | def get_pairs(word): class LongformerTokenizer (line 116) | class LongformerTokenizer(PreTrainedTokenizer): method __init__ (line 197) | def __init__( method vocab_size (line 252) | def vocab_size(self): method get_vocab (line 255) | def get_vocab(self): method bpe (line 258) | def bpe(self, token): method _tokenize (line 300) | def _tokenize(self, text): method _convert_token_to_id (line 310) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 314) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 318) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 324) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 353) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 378) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 405) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 428) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: benchmark/third_party/transformers/src/transformers/models/longformer/tokenization_longformer_fast.py class LongformerTokenizerFast (line 91) | class LongformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 176) | def __init__( method mask_token (line 245) | def mask_token(self) -> str: method mask_token (line 260) | def mask_token(self, value): method _batch_encode_plus (line 271) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 280) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 290) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 294) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 301) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/longt5/configuration_longt5.py class LongT5Config (line 33) | class LongT5Config(PretrainedConfig): method __init__ (line 89) | def __init__( class LongT5OnnxConfig (line 156) | class LongT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 158) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 177) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/longt5/convert_longt5x_checkpoint_to_flax.py function convert_t5x_checkpoint_to_flax (line 26) | def convert_t5x_checkpoint_to_flax(t5x_checkpoint_path, config_name, fla... FILE: benchmark/third_party/transformers/src/transformers/models/longt5/modeling_flax_longt5.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... function _pad_to_multiple (line 73) | def _pad_to_multiple(x: jnp.ndarray, block_len: int, axis: int, pad_valu... function _split_into_blocks (line 82) | def _split_into_blocks(x: jnp.ndarray, block_len: int, axis: int) -> jnp... function _concatenate_3_blocks (line 94) | def _concatenate_3_blocks(x: jnp.ndarray, block_axis: int, sequence_axis... function _make_3block_relative_position_ids (line 116) | def _make_3block_relative_position_ids(block_len: int) -> jnp.ndarray: function _mask_local_attention_mask (line 124) | def _mask_local_attention_mask(local_attention_mask: np.ndarray, block_l... function _get_local_attention_mask (line 132) | def _get_local_attention_mask(attention_mask: np.ndarray, block_len: int... function _make_global_fixed_block_ids (line 148) | def _make_global_fixed_block_ids(attention_mask: np.ndarray, global_bloc... function _make_side_relative_position_ids (line 190) | def _make_side_relative_position_ids(attention_mask: np.ndarray, global_... function _create_global_aggregates (line 199) | def _create_global_aggregates(hidden_states: np.ndarray, block_ids: np.n... class FlaxLongT5LayerNorm (line 207) | class FlaxLongT5LayerNorm(nn.Module): method setup (line 213) | def setup(self): method __call__ (line 216) | def __call__(self, hidden_states): class FlaxLongT5DenseActDense (line 228) | class FlaxLongT5DenseActDense(nn.Module): method setup (line 232) | def setup(self): method __call__ (line 251) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5DenseGatedActDense (line 260) | class FlaxLongT5DenseGatedActDense(nn.Module): method setup (line 264) | def setup(self): method __call__ (line 289) | def __call__(self, hidden_states, deterministic): class FlaxLongT5LayerFF (line 299) | class FlaxLongT5LayerFF(nn.Module): method setup (line 303) | def setup(self): method __call__ (line 314) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5Attention (line 322) | class FlaxLongT5Attention(nn.Module): method setup (line 328) | def setup(self): method _relative_position_bucket (line 374) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 409) | def compute_bias(self, query_length, key_length): method _split_heads (line 426) | def _split_heads(self, hidden_states): method _merge_heads (line 429) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 433) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 465) | def _create_position_bias( method __call__ (line 489) | def __call__( class FlaxLongT5LocalAttention (line 605) | class FlaxLongT5LocalAttention(nn.Module): method setup (line 610) | def setup(self): method _relative_position_bucket (line 659) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 694) | def compute_bias(self, block_length: int): method _split_heads (line 711) | def _split_heads(self, hidden_states): method _merge_heads (line 714) | def _merge_heads(self, hidden_states): method _create_position_bias (line 717) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 728) | def __call__( class FlaxLongT5TransientGlobalAttention (line 816) | class FlaxLongT5TransientGlobalAttention(nn.Module): method setup (line 821) | def setup(self): method _relative_position_bucket (line 882) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 917) | def compute_bias(self, block_length: int): method compute_side_bias (line 934) | def compute_side_bias(self, attention_mask: np.ndarray, global_segment... method _split_heads (line 959) | def _split_heads(self, hidden_states): method _merge_heads (line 962) | def _merge_heads(self, hidden_states): method _create_position_bias (line 965) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 976) | def __call__( class FlaxLongT5LayerLocalSelfAttention (line 1104) | class FlaxLongT5LayerLocalSelfAttention(nn.Module): method setup (line 1111) | def setup(self): method __call__ (line 1120) | def __call__( class FlaxLongT5LayerTransientGlobalSelfAttention (line 1142) | class FlaxLongT5LayerTransientGlobalSelfAttention(nn.Module): method setup (line 1149) | def setup(self): method __call__ (line 1158) | def __call__( class FlaxLongT5LayerSelfAttention (line 1181) | class FlaxLongT5LayerSelfAttention(nn.Module): method setup (line 1186) | def setup(self): method __call__ (line 1198) | def __call__( class FlaxLongT5LayerCrossAttention (line 1222) | class FlaxLongT5LayerCrossAttention(nn.Module): method setup (line 1226) | def setup(self): method __call__ (line 1235) | def __call__( class FlaxLongT5Block (line 1257) | class FlaxLongT5Block(nn.Module): method setup (line 1262) | def setup(self): method __call__ (line 1291) | def __call__( class FlaxLongT5LayerCollection (line 1343) | class FlaxLongT5LayerCollection(nn.Module): method setup (line 1348) | def setup(self): method __call__ (line 1353) | def __call__( class FlaxLongT5BlockCollection (line 1379) | class FlaxLongT5BlockCollection(nn.Module): method setup (line 1384) | def setup(self): method __call__ (line 1408) | def __call__( class FlaxLongT5Stack (line 1466) | class FlaxLongT5Stack(nn.Module): method setup (line 1472) | def setup(self): method __call__ (line 1483) | def __call__( class FlaxLongT5PreTrainedModel (line 1667) | class FlaxLongT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1677) | def __init__( method enable_gradient_checkpointing (line 1689) | def enable_gradient_checkpointing(self): method init_weights (line 1696) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 1726) | def __call__( method init_cache (line 1775) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1813) | def encode( method decode (line 1871) | def decode( class FlaxLongT5Module (line 2019) | class FlaxLongT5Module(nn.Module): method _get_encoder_module (line 2024) | def _get_encoder_module(self): method _get_decoder_module (line 2027) | def _get_decoder_module(self): method setup (line 2030) | def setup(self): method __call__ (line 2056) | def __call__( class FlaxLongT5Model (line 2108) | class FlaxLongT5Model(FlaxLongT5PreTrainedModel): class FlaxLongT5ForConditionalGenerationModule (line 2145) | class FlaxLongT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 2150) | def _get_encoder_module(self): method _get_decoder_module (line 2153) | def _get_decoder_module(self): method setup (line 2156) | def setup(self): method __call__ (line 2188) | def __call__( class FlaxLongT5ForConditionalGeneration (line 2254) | class FlaxLongT5ForConditionalGeneration(FlaxLongT5PreTrainedModel): method decode (line 2259) | def decode( method prepare_inputs_for_generation (line 2388) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 2417) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/longt5/modeling_longt5.py function _pad_to_multiple (line 64) | def _pad_to_multiple(x: torch.Tensor, block_len: int, dim: int, pad_valu... function _split_into_blocks (line 80) | def _split_into_blocks(x: torch.Tensor, block_len: int, dim: int) -> tor... function _concatenate_3_blocks (line 95) | def _concatenate_3_blocks(x: torch.Tensor, block_dim: int, sequence_dim:... function _make_3block_relative_position_ids (line 120) | def _make_3block_relative_position_ids(block_len: int) -> torch.Tensor: function _mask_local_attention_mask (line 129) | def _mask_local_attention_mask(local_attention_mask: torch.Tensor, block... function _get_local_attention_mask (line 138) | def _get_local_attention_mask(attention_mask: torch.Tensor, block_len: i... function _make_global_fixed_block_ids (line 154) | def _make_global_fixed_block_ids( function _make_side_relative_position_ids (line 203) | def _make_side_relative_position_ids(attention_mask: torch.Tensor, globa... function _create_global_aggregates (line 212) | def _create_global_aggregates( class LongT5LayerNorm (line 225) | class LongT5LayerNorm(nn.Module): method __init__ (line 226) | def __init__(self, hidden_size, eps=1e-6): method forward (line 234) | def forward(self, hidden_states): class LongT5DenseActDense (line 268) | class LongT5DenseActDense(nn.Module): method __init__ (line 269) | def __init__(self, config: LongT5Config): method forward (line 276) | def forward(self, hidden_states): class LongT5DenseGatedActDense (line 285) | class LongT5DenseGatedActDense(nn.Module): method __init__ (line 286) | def __init__(self, config: LongT5Config): method forward (line 294) | def forward(self, hidden_states): class LongT5LayerFF (line 304) | class LongT5LayerFF(nn.Module): method __init__ (line 305) | def __init__(self, config: LongT5Config): method forward (line 315) | def forward(self, hidden_states): class LongT5Attention (line 323) | class LongT5Attention(nn.Module): method __init__ (line 324) | def __init__(self, config: LongT5Config, has_relative_attention_bias=F... method prune_heads (line 347) | def prune_heads(self, heads): method _relative_position_bucket (line 364) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 411) | def compute_bias(self, query_length, key_length, device=None): method forward (line 428) | def forward( class LongT5LocalAttention (line 551) | class LongT5LocalAttention(nn.Module): method __init__ (line 552) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 578) | def prune_heads(self, heads): method _relative_position_bucket (line 596) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 643) | def compute_bias(self, block_length: int): method forward (line 664) | def forward( class LongT5TransientGlobalAttention (line 740) | class LongT5TransientGlobalAttention(nn.Module): method __init__ (line 741) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 773) | def prune_heads(self, heads): method _relative_position_bucket (line 791) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 838) | def compute_bias(self, block_length: int): method compute_side_bias (line 859) | def compute_side_bias(self, mask: torch.Tensor, global_segment_ids: to... method forward (line 880) | def forward( class LongT5LayerSelfAttention (line 1002) | class LongT5LayerSelfAttention(nn.Module): method __init__ (line 1003) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1009) | def forward( class LongT5LayerLocalSelfAttention (line 1034) | class LongT5LayerLocalSelfAttention(nn.Module): method __init__ (line 1037) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1043) | def forward( class LongT5LayerTransientGlobalSelfAttention (line 1065) | class LongT5LayerTransientGlobalSelfAttention(nn.Module): method __init__ (line 1068) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1076) | def forward( class LongT5LayerCrossAttention (line 1099) | class LongT5LayerCrossAttention(nn.Module): method __init__ (line 1100) | def __init__(self, config): method forward (line 1106) | def forward( class LongT5Block (line 1135) | class LongT5Block(nn.Module): method __init__ (line 1136) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1157) | def forward( class LongT5PreTrainedModel (line 1259) | class LongT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 1271) | def dummy_inputs(self): method _init_weights (line 1281) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1328) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 1333) | def _shift_right(self, input_ids): class LongT5Stack (line 1359) | class LongT5Stack(LongT5PreTrainedModel): method __init__ (line 1360) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 1381) | def get_input_embeddings(self): method set_input_embeddings (line 1385) | def set_input_embeddings(self, new_embeddings): method forward (line 1388) | def forward( class LongT5Model (line 1745) | 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 get_encoder (line 1781) | def get_encoder(self): method get_decoder (line 1784) | def get_decoder(self): method _prune_heads (line 1787) | def _prune_heads(self, heads_to_prune): method forward (line 1797) | def forward( class LongT5ForConditionalGeneration (line 1898) | class LongT5ForConditionalGeneration(LongT5PreTrainedModel): method __init__ (line 1908) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 1931) | def get_input_embeddings(self): method set_input_embeddings (line 1934) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1939) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1942) | def get_output_embeddings(self): method get_encoder (line 1945) | def get_encoder(self): method get_decoder (line 1948) | def get_decoder(self): method forward (line 1953) | def forward( method prepare_inputs_for_generation (line 2079) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2107) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2110) | def _reorder_cache(self, past, beam_idx): class LongT5EncoderModel (line 2139) | class LongT5EncoderModel(LongT5PreTrainedModel): method __init__ (line 2144) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 2156) | def get_input_embeddings(self): method set_input_embeddings (line 2159) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 2163) | def get_encoder(self): method _prune_heads (line 2166) | def _prune_heads(self, heads_to_prune): method forward (line 2176) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/luke/configuration_luke.py class LukeConfig (line 29) | class LukeConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/luke/modeling_luke.py class BaseLukeModelOutputWithPooling (line 55) | class BaseLukeModelOutputWithPooling(BaseModelOutputWithPooling): class BaseLukeModelOutput (line 86) | class BaseLukeModelOutput(BaseModelOutput): class LukeMaskedLMOutput (line 117) | class LukeMaskedLMOutput(ModelOutput): class EntityClassificationOutput (line 160) | class EntityClassificationOutput(ModelOutput): class EntityPairClassificationOutput (line 191) | class EntityPairClassificationOutput(ModelOutput): class EntitySpanClassificationOutput (line 222) | class EntitySpanClassificationOutput(ModelOutput): class LukeSequenceClassifierOutput (line 253) | class LukeSequenceClassifierOutput(ModelOutput): class LukeTokenClassifierOutput (line 287) | class LukeTokenClassifierOutput(ModelOutput): class LukeQuestionAnsweringModelOutput (line 321) | class LukeQuestionAnsweringModelOutput(ModelOutput): class LukeMultipleChoiceModelOutput (line 358) | class LukeMultipleChoiceModelOutput(ModelOutput): class LukeEmbeddings (line 393) | class LukeEmbeddings(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 415) | def forward( method create_position_ids_from_inputs_embeds (line 448) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LukeEntityEmbeddings (line 466) | class LukeEntityEmbeddings(nn.Module): method __init__ (line 467) | def __init__(self, config: LukeConfig): method forward (line 481) | def forward( class LukeSelfAttention (line 506) | class LukeSelfAttention(nn.Module): method __init__ (line 507) | def __init__(self, config): method transpose_for_scores (line 531) | def transpose_for_scores(self, x): method forward (line 536) | def forward( class LukeSelfOutput (line 620) | class LukeSelfOutput(nn.Module): method __init__ (line 621) | def __init__(self, config): method forward (line 627) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeAttention (line 634) | class LukeAttention(nn.Module): method __init__ (line 635) | def __init__(self, config): method prune_heads (line 641) | def prune_heads(self, heads): method forward (line 644) | def forward( class LukeIntermediate (line 682) | class LukeIntermediate(nn.Module): method __init__ (line 683) | def __init__(self, config): method forward (line 691) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LukeOutput (line 698) | class LukeOutput(nn.Module): method __init__ (line 699) | def __init__(self, config): method forward (line 705) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeLayer (line 712) | class LukeLayer(nn.Module): method __init__ (line 713) | def __init__(self, config): method forward (line 721) | def forward( method feed_forward_chunk (line 758) | def feed_forward_chunk(self, attention_output): class LukeEncoder (line 764) | class LukeEncoder(nn.Module): method __init__ (line 765) | def __init__(self, config): method forward (line 771) | def forward( class LukePooler (line 849) | class LukePooler(nn.Module): method __init__ (line 850) | def __init__(self, config): method forward (line 855) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EntityPredictionHeadTransform (line 864) | class EntityPredictionHeadTransform(nn.Module): method __init__ (line 865) | def __init__(self, config): method forward (line 874) | def forward(self, hidden_states): class EntityPredictionHead (line 881) | class EntityPredictionHead(nn.Module): method __init__ (line 882) | def __init__(self, config): method forward (line 889) | def forward(self, hidden_states): class LukePreTrainedModel (line 896) | class LukePreTrainedModel(PreTrainedModel): method _init_weights (line 907) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 924) | def _set_gradient_checkpointing(self, module, value=False): class LukeModel (line 1025) | class LukeModel(LukePreTrainedModel): method __init__ (line 1029) | def __init__(self, config: LukeConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 1042) | def get_input_embeddings(self): method set_input_embeddings (line 1045) | def set_input_embeddings(self, value): method get_entity_embeddings (line 1048) | def get_entity_embeddings(self): method set_entity_embeddings (line 1051) | def set_entity_embeddings(self, value): method _prune_heads (line 1054) | def _prune_heads(self, heads_to_prune): method forward (line 1059) | def forward( method get_extended_attention_mask (line 1196) | def get_extended_attention_mask( function create_position_ids_from_input_ids (line 1227) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LukeLMHead (line 1244) | class LukeLMHead(nn.Module): method __init__ (line 1247) | def __init__(self, config): method forward (line 1256) | def forward(self, features, **kwargs): method _tie_weights (line 1266) | def _tie_weights(self): class LukeForMaskedLM (line 1282) | class LukeForMaskedLM(LukePreTrainedModel): method __init__ (line 1295) | def __init__(self, config): method tie_weights (line 1308) | def tie_weights(self): method get_output_embeddings (line 1312) | def get_output_embeddings(self): method set_output_embeddings (line 1315) | def set_output_embeddings(self, new_embeddings): method forward (line 1320) | def forward( class LukeForEntityClassification (line 1425) | class LukeForEntityClassification(LukePreTrainedModel): method __init__ (line 1426) | def __init__(self, config): method forward (line 1440) | def forward( class LukeForEntityPairClassification (line 1538) | class LukeForEntityPairClassification(LukePreTrainedModel): method __init__ (line 1539) | def __init__(self, config): method forward (line 1553) | def forward( class LukeForEntitySpanClassification (line 1656) | class LukeForEntitySpanClassification(LukePreTrainedModel): method __init__ (line 1657) | def __init__(self, config): method forward (line 1671) | def forward( class LukeForSequenceClassification (line 1800) | class LukeForSequenceClassification(LukePreTrainedModel): method __init__ (line 1801) | def __init__(self, config): method forward (line 1820) | def forward( class LukeForTokenClassification (line 1913) | class LukeForTokenClassification(LukePreTrainedModel): method __init__ (line 1914) | def __init__(self, config): method forward (line 1934) | def forward( class LukeForQuestionAnswering (line 2008) | class LukeForQuestionAnswering(LukePreTrainedModel): method __init__ (line 2009) | def __init__(self, config): method forward (line 2027) | def forward( class LukeForMultipleChoice (line 2128) | class LukeForMultipleChoice(LukePreTrainedModel): method __init__ (line 2129) | def __init__(self, config): method forward (line 2148) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/luke/tokenization_luke.py class LukeTokenizer (line 150) | class LukeTokenizer(RobertaTokenizer): method __init__ (line 186) | def __init__( method __call__ (line 261) | def __call__( method _encode_plus (line 406) | def _encode_plus( method _batch_encode_plus (line 487) | def _batch_encode_plus( method _check_entity_input_format (line 595) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 614) | def _create_input_sequence( method _batch_prepare_for_model (line 769) | def _batch_prepare_for_model( method prepare_for_model (line 851) | def prepare_for_model( method pad (line 1080) | def pad( method _pad (line 1240) | def _pad( method save_vocabulary (line 1379) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/configuration_lxmert.py class LxmertConfig (line 29) | class LxmertConfig(PretrainedConfig): method __init__ (line 118) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/convert_lxmert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/modeling_lxmert.py class GeLU (line 52) | class GeLU(nn.Module): method __init__ (line 53) | def __init__(self): method forward (line 56) | def forward(self, x): class LxmertModelOutput (line 61) | class LxmertModelOutput(ModelOutput): class LxmertForQuestionAnsweringOutput (line 107) | class LxmertForQuestionAnsweringOutput(ModelOutput): class LxmertForPreTrainingOutput (line 147) | class LxmertForPreTrainingOutput(ModelOutput): function load_tf_weights_in_lxmert (line 194) | def load_tf_weights_in_lxmert(model, config, tf_checkpoint_path): class LxmertEmbeddings (line 273) | class LxmertEmbeddings(nn.Module): method __init__ (line 276) | def __init__(self, config): method forward (line 287) | def forward(self, input_ids, token_type_ids=None, inputs_embeds=None): class LxmertAttention (line 313) | class LxmertAttention(nn.Module): method __init__ (line 314) | def __init__(self, config, ctx_dim=None): method transpose_for_scores (line 334) | def transpose_for_scores(self, x): method forward (line 342) | def forward(self, hidden_states, context, attention_mask=None, output_... class LxmertAttentionOutput (line 374) | class LxmertAttentionOutput(nn.Module): method __init__ (line 375) | def __init__(self, config): method forward (line 381) | def forward(self, hidden_states, input_tensor): class LxmertCrossAttentionLayer (line 388) | class LxmertCrossAttentionLayer(nn.Module): method __init__ (line 389) | def __init__(self, config): method forward (line 394) | def forward(self, input_tensor, ctx_tensor, ctx_att_mask=None, output_... class LxmertSelfAttentionLayer (line 403) | class LxmertSelfAttentionLayer(nn.Module): method __init__ (line 404) | def __init__(self, config): method forward (line 409) | def forward(self, input_tensor, attention_mask, output_attentions=False): class LxmertIntermediate (line 424) | class LxmertIntermediate(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 430) | def forward(self, hidden_states): class LxmertOutput (line 436) | class LxmertOutput(nn.Module): method __init__ (line 437) | def __init__(self, config): method forward (line 443) | def forward(self, hidden_states, input_tensor): class LxmertLayer (line 450) | class LxmertLayer(nn.Module): method __init__ (line 451) | def __init__(self, config): method forward (line 457) | def forward(self, hidden_states, attention_mask=None, output_attention... class LxmertXLayer (line 466) | class LxmertXLayer(nn.Module): method __init__ (line 467) | def __init__(self, config): method cross_att (line 482) | def cross_att( method self_att (line 505) | def self_att(self, lang_input, lang_attention_mask, visual_input, visu... method output_fc (line 511) | def output_fc(self, lang_input, visual_input): method forward (line 522) | def forward( class LxmertVisualFeatureEncoder (line 558) | class LxmertVisualFeatureEncoder(nn.Module): method __init__ (line 559) | def __init__(self, config): method forward (line 574) | def forward(self, visual_feats, visual_pos): class LxmertEncoder (line 585) | class LxmertEncoder(nn.Module): method __init__ (line 586) | def __init__(self, config): method forward (line 604) | def forward( class LxmertPooler (line 667) | class LxmertPooler(nn.Module): method __init__ (line 668) | def __init__(self, config): method forward (line 673) | def forward(self, hidden_states): class LxmertPredictionHeadTransform (line 682) | class LxmertPredictionHeadTransform(nn.Module): method __init__ (line 683) | def __init__(self, config): method forward (line 689) | def forward(self, hidden_states): class LxmertLMPredictionHead (line 696) | class LxmertLMPredictionHead(nn.Module): method __init__ (line 697) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 711) | def forward(self, hidden_states): class LxmertVisualAnswerHead (line 717) | class LxmertVisualAnswerHead(nn.Module): method __init__ (line 718) | def __init__(self, config, num_labels): method forward (line 728) | def forward(self, hidden_states): class LxmertVisualObjHead (line 732) | class LxmertVisualObjHead(nn.Module): method __init__ (line 733) | def __init__(self, config): method forward (line 755) | def forward(self, hidden_states): class LxmertPreTrainingHeads (line 763) | class LxmertPreTrainingHeads(nn.Module): method __init__ (line 764) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 769) | def forward(self, sequence_output, pooled_output): class LxmertPreTrainedModel (line 775) | class LxmertPreTrainedModel(PreTrainedModel): method _init_weights (line 785) | def _init_weights(self, module): class LxmertModel (line 886) | class LxmertModel(LxmertPreTrainedModel): method __init__ (line 887) | def __init__(self, config): method get_input_embeddings (line 895) | def get_input_embeddings(self): method set_input_embeddings (line 898) | def set_input_embeddings(self, new_embeddings): method forward (line 908) | def forward( class LxmertForPreTraining (line 1025) | class LxmertForPreTraining(LxmertPreTrainedModel): method __init__ (line 1026) | def __init__(self, config): method resize_num_qa_labels (line 1081) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1105) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1111) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1122) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1125) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1155) | def forward( class LxmertForQuestionAnswering (line 1292) | class LxmertForQuestionAnswering(LxmertPreTrainedModel): method __init__ (line 1293) | def __init__(self, config): method resize_num_qa_labels (line 1312) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1336) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1342) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1354) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1357) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1392) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/modeling_tf_lxmert.py class TFLxmertModelOutput (line 60) | class TFLxmertModelOutput(ModelOutput): class TFLxmertForPreTrainingOutput (line 106) | class TFLxmertForPreTrainingOutput(ModelOutput): class TFLxmertVisualFeatureEncoder (line 153) | class TFLxmertVisualFeatureEncoder(tf.keras.layers.Layer): method __init__ (line 154) | def __init__(self, config, **kwargs): method call (line 177) | def call(self, visn_input, training=False): class TFLxmertEmbeddings (line 190) | class TFLxmertEmbeddings(tf.keras.layers.Layer): method __init__ (line 193) | def __init__(self, config, **kwargs): method build (line 204) | def build(self, input_shape): method call (line 228) | def call(self, input_ids=None, token_type_ids=None, inputs_embeds=None... class TFLxmertAttention (line 265) | class TFLxmertAttention(tf.keras.layers.Layer): method __init__ (line 266) | def __init__(self, config, **kwargs): method transpose_for_scores (line 297) | def transpose_for_scores(self, x, batch_size): method call (line 302) | def call(self, hidden_states, context, attention_mask, output_attentio... class TFLxmertIntermediate (line 341) | class TFLxmertIntermediate(tf.keras.layers.Layer): method __init__ (line 342) | def __init__(self, config, **kwargs): method call (line 354) | def call(self, hidden_states): class TFLxmertOutput (line 360) | class TFLxmertOutput(tf.keras.layers.Layer): method __init__ (line 361) | def __init__(self, config, **kwargs): method call (line 372) | def call(self, hidden_states, input_tensor, training=False): class TFLxmertAttentionOutput (line 379) | class TFLxmertAttentionOutput(tf.keras.layers.Layer): method __init__ (line 380) | def __init__(self, config, **kwargs): method call (line 390) | def call(self, hidden_states, input_tensor, training=False): class TFLxmertSelfAttentionLayer (line 397) | class TFLxmertSelfAttentionLayer(tf.keras.layers.Layer): method __init__ (line 398) | def __init__(self, config, **kwargs): method call (line 403) | def call(self, input_tensor, attention_mask, output_attentions, traini... class TFLxmertCrossAttentionLayer (line 412) | class TFLxmertCrossAttentionLayer(tf.keras.layers.Layer): method __init__ (line 413) | def __init__(self, config, **kwargs): method call (line 418) | def call( class TFLxmertLayer (line 434) | class TFLxmertLayer(tf.keras.layers.Layer): method __init__ (line 435) | def __init__(self, config, **kwargs): method call (line 441) | def call(self, hidden_states, attention_mask, output_attentions, train... class TFLxmertXLayer (line 450) | class TFLxmertXLayer(tf.keras.layers.Layer): method __init__ (line 451) | def __init__(self, config, **kwargs): method cross_att (line 465) | def cross_att( method self_att (line 498) | def self_att( method output_fc (line 512) | def output_fc(self, lang_input, visn_input, training=False): method call (line 522) | def call( class TFLxmertEncoder (line 555) | class TFLxmertEncoder(tf.keras.layers.Layer): method __init__ (line 556) | def __init__(self, config, **kwargs): method call (line 573) | def call( class TFLxmertMainLayer (line 645) | class TFLxmertMainLayer(tf.keras.layers.Layer): method dummy_inputs (line 649) | def dummy_inputs(self): method __init__ (line 668) | def __init__(self, config, **kwargs): method get_input_embeddings (line 684) | def get_input_embeddings(self): method set_input_embeddings (line 687) | def set_input_embeddings(self, value): method _prune_heads (line 691) | def _prune_heads(self, heads_to_prune): method call (line 695) | def call( class TFLxmertPreTrainedModel (line 804) | class TFLxmertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 814) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 829) | def serving(self, inputs): class TFLxmertModel (line 946) | class TFLxmertModel(TFLxmertPreTrainedModel): method __init__ (line 947) | def __init__(self, config, *inputs, **kwargs): method call (line 959) | def call( method serving_output (line 989) | def serving_output(self, output): class TFLxmertPooler (line 1008) | class TFLxmertPooler(tf.keras.layers.Layer): method __init__ (line 1009) | def __init__(self, config, **kwargs): method call (line 1018) | def call(self, hidden_states): class TFLxmertPredictionHeadTransform (line 1027) | class TFLxmertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 1028) | def __init__(self, config: LxmertConfig, **kwargs): method call (line 1044) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLxmertLMPredictionHead (line 1053) | class TFLxmertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 1054) | def __init__(self, config: LxmertConfig, input_embeddings: tf.keras.la... method build (line 1066) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 1071) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 1074) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 1078) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 1081) | def set_bias(self, value: tf.Variable): method call (line 1085) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLxmertMLMHead (line 1097) | class TFLxmertMLMHead(tf.keras.layers.Layer): method __init__ (line 1098) | def __init__(self, config: LxmertConfig, input_embeddings: tf.keras.la... method call (line 1103) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFLxmertPreTrainingHeads (line 1109) | class TFLxmertPreTrainingHeads(tf.keras.layers.Layer): method __init__ (line 1110) | def __init__(self, config, input_embeddings, **kwargs): method call (line 1120) | def call(self, sequence_output, pooled_output): class TFLxmertVisualAnswerHead (line 1126) | class TFLxmertVisualAnswerHead(tf.keras.layers.Layer): method __init__ (line 1127) | def __init__(self, config, num_labels, **kwargs): method call (line 1143) | def call(self, hidden_states): class TFLxmertVisualObjHead (line 1152) | class TFLxmertVisualObjHead(tf.keras.layers.Layer): method __init__ (line 1153) | def __init__(self, config, **kwargs): method call (line 1178) | def call(self, hidden_states): class TFLxmertForPreTraining (line 1187) | class TFLxmertForPreTraining(TFLxmertPreTrainedModel): method __init__ (line 1188) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1240) | def dummy_inputs(self): method get_lm_head (line 1280) | def get_lm_head(self): method get_prefix_bias_name (line 1283) | def get_prefix_bias_name(self): method call (line 1290) | def call( method serving_output (line 1429) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/tokenization_lxmert.py function load_vocab (line 45) | def load_vocab(vocab_file): function whitespace_tokenize (line 57) | def whitespace_tokenize(text): class LxmertTokenizer (line 67) | class LxmertTokenizer(PreTrainedTokenizer): method __init__ (line 114) | def __init__( method do_lower_case (line 161) | def do_lower_case(self): method vocab_size (line 165) | def vocab_size(self): method get_vocab (line 168) | def get_vocab(self): method _tokenize (line 171) | def _tokenize(self, text): method _convert_token_to_id (line 185) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 189) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 193) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 198) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 223) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 251) | def create_token_type_ids_from_sequences( method save_vocabulary (line 280) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 302) | class BasicTokenizer(object): method __init__ (line 322) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 330) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 367) | def _run_strip_accents(self, text): method _run_split_on_punc (line 378) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 400) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 413) | def _is_chinese_char(self, cp): method _clean_text (line 437) | def _clean_text(self, text): class WordpieceTokenizer (line 452) | class WordpieceTokenizer(object): method __init__ (line 455) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 460) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/lxmert/tokenization_lxmert_fast.py class LxmertTokenizerFast (line 48) | class LxmertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 94) | def __init__( method build_inputs_with_special_tokens (line 136) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 160) | def create_token_type_ids_from_sequences( method save_vocabulary (line 189) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/m2m_100/configuration_m2m_100.py class M2M100Config (line 34) | class M2M100Config(PretrainedConfig): method __init__ (line 106) | def __init__( class M2M100OnnxConfig (line 163) | class M2M100OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 165) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 188) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 215) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/m2m_100/modeling_m2m_100.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 77) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 93) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function create_position_ids_from_input_ids (line 107) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class M2M100SinusoidalPositionalEmbedding (line 118) | class M2M100SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 121) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 128) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 137) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 158) | def forward( method create_position_ids_from_inputs_embeds (line 178) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class M2M100Attention (line 197) | class M2M100Attention(nn.Module): method __init__ (line 200) | def __init__( method _shape (line 227) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 230) | def forward( class M2M100EncoderLayer (line 345) | class M2M100EncoderLayer(nn.Module): method __init__ (line 346) | def __init__(self, config: M2M100Config): method forward (line 362) | def forward( class M2M100DecoderLayer (line 414) | class M2M100DecoderLayer(nn.Module): method __init__ (line 415) | def __init__(self, config: M2M100Config): method forward (line 441) | def forward( class M2M100PreTrainedModel (line 531) | class M2M100PreTrainedModel(PreTrainedModel): method _init_weights (line 537) | def _init_weights(self, module): method _set_gradient_checkpointing (line 548) | def _set_gradient_checkpointing(self, module, value=False): class M2M100Encoder (line 676) | class M2M100Encoder(M2M100PreTrainedModel): method __init__ (line 686) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 714) | def forward( class M2M100Decoder (line 856) | class M2M100Decoder(M2M100PreTrainedModel): method __init__ (line 865) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 890) | def forward( class M2M100Model (line 1130) | class M2M100Model(M2M100PreTrainedModel): method __init__ (line 1131) | def __init__(self, config: M2M100Config): method get_input_embeddings (line 1143) | def get_input_embeddings(self): method set_input_embeddings (line 1146) | def set_input_embeddings(self, value): method get_encoder (line 1151) | def get_encoder(self): method get_decoder (line 1154) | def get_decoder(self): method forward (line 1164) | def forward( class M2M100ForConditionalGeneration (line 1241) | class M2M100ForConditionalGeneration(M2M100PreTrainedModel): method __init__ (line 1255) | def __init__(self, config: M2M100Config): method get_encoder (line 1263) | def get_encoder(self): method get_decoder (line 1266) | def get_decoder(self): method resize_token_embeddings (line 1269) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1273) | def get_output_embeddings(self): method set_output_embeddings (line 1276) | def set_output_embeddings(self, new_embeddings): method forward (line 1282) | def forward( method prepare_inputs_for_generation (line 1357) | def prepare_inputs_for_generation( method _reorder_cache (line 1386) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/m2m_100/tokenization_m2m_100.py class M2M100Tokenizer (line 64) | class M2M100Tokenizer(PreTrainedTokenizer): method __init__ (line 130) | def __init__( method vocab_size (line 195) | def vocab_size(self) -> int: method src_lang (line 199) | def src_lang(self) -> str: method src_lang (line 203) | def src_lang(self, new_src_lang: str) -> None: method _tokenize (line 207) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 210) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 215) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 221) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method get_special_tokens_mask (line 225) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 255) | def build_inputs_with_special_tokens( method get_vocab (line 282) | def get_vocab(self) -> Dict: method __getstate__ (line 287) | def __getstate__(self) -> Dict: method __setstate__ (line 292) | def __setstate__(self, d: Dict) -> None: method save_vocabulary (line 301) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 323) | def prepare_seq2seq_batch( method _build_translation_inputs (line 336) | def _build_translation_inputs(self, raw_inputs, src_lang: Optional[str... method _switch_to_input_mode (line 346) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 349) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 352) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 359) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method get_lang_token (line 366) | def get_lang_token(self, lang: str) -> str: method get_lang_id (line 369) | def get_lang_id(self, lang: str) -> int: function load_spm (line 374) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function load_json (line 380) | def load_json(path: str) -> Union[Dict, List]: function save_json (line 385) | def save_json(data, path: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/marian/configuration_marian.py class MarianConfig (line 34) | class MarianConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class MarianOnnxConfig (line 173) | class MarianOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 176) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 221) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 233) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 301) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_encoder_and_decoder (line 341) | def _generate_dummy_inputs_for_encoder_and_decoder( method generate_dummy_inputs (line 367) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 388) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method atol_for_validation (line 397) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/marian/convert_marian_tatoeba_to_pytorch.py class TatoebaConverter (line 44) | class TatoebaConverter: method __init__ (line 58) | def __init__(self, save_dir="marian_converted"): method convert_models (line 76) | def convert_models(self, tatoeba_ids, dry_run=False): method expand_group_to_two_letter_codes (line 93) | def expand_group_to_two_letter_codes(self, grp_name): method is_group (line 96) | def is_group(self, code, name): method get_tags (line 99) | def get_tags(self, code, name): method resolve_lang_code (line 111) | def resolve_lang_code(self, src, tgt) -> Tuple[str, str]: method model_type_info_from_model_name (line 117) | def model_type_info_from_model_name(name): method write_model_card (line 131) | def write_model_card(self, model_dict, dry_run=False) -> str: method download_lang_info (line 279) | def download_lang_info(self): method parse_metadata (line 288) | def parse_metadata(self, model_name, repo_path=DEFAULT_MODEL_DIR, meth... function l2front_matter (line 1301) | def l2front_matter(langs): function dedup (line 1305) | def dedup(lst): FILE: benchmark/third_party/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 648) | def download_and_unzip(url, dest_dir): function convert (line 659) | def convert(source_dir: Path, dest_dir): function load_yaml (line 677) | def load_yaml(path): function save_json (line 684) | def save_json(content: Union[Dict, List], path: str) -> None: function unzip (line 689) | def unzip(zip_path: str, dest_dir: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/marian/modeling_flax_marian.py function create_sinusoidal_positions (line 221) | def create_sinusoidal_positions(n_pos, dim): function shift_tokens_right (line 232) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxMarianAttention (line 245) | class FlaxMarianAttention(nn.Module): method setup (line 254) | def setup(self) -> None: method _split_heads (line 280) | def _split_heads(self, hidden_states): method _merge_heads (line 283) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 287) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 318) | def __call__( class FlaxMarianEncoderLayer (line 413) | class FlaxMarianEncoderLayer(nn.Module): method setup (line 417) | def setup(self) -> None: method __call__ (line 440) | def __call__( class FlaxMarianEncoderLayerCollection (line 471) | class FlaxMarianEncoderLayerCollection(nn.Module): method setup (line 475) | def setup(self): method __call__ (line 482) | def __call__( class FlaxMarianDecoderLayer (line 526) | class FlaxMarianDecoderLayer(nn.Module): method setup (line 530) | def setup(self) -> None: method __call__ (line 563) | def __call__( class FlaxMarianDecoderLayerCollection (line 615) | class FlaxMarianDecoderLayerCollection(nn.Module): method setup (line 619) | def setup(self): method __call__ (line 626) | def __call__( class FlaxMarianEncoder (line 685) | class FlaxMarianEncoder(nn.Module): method setup (line 690) | def setup(self): method __call__ (line 700) | def __call__( class FlaxMarianDecoder (line 741) | class FlaxMarianDecoder(nn.Module): method setup (line 746) | def setup(self): method __call__ (line 756) | def __call__( class FlaxMarianModule (line 806) | class FlaxMarianModule(nn.Module): method setup (line 810) | 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 FlaxMarianPreTrainedModel (line 875) | class FlaxMarianPreTrainedModel(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 966) | def encode( method decode (line 1030) | def decode( method __call__ (line 1143) | def __call__( class FlaxMarianModel (line 1207) | class FlaxMarianModel(FlaxMarianPreTrainedModel): class FlaxMarianMTModule (line 1218) | class FlaxMarianMTModule(nn.Module): method setup (line 1223) | def setup(self): method _get_encoder_module (line 1233) | def _get_encoder_module(self): method _get_decoder_module (line 1236) | def _get_decoder_module(self): method __call__ (line 1239) | def __call__( class FlaxMarianMTModel (line 1293) | class FlaxMarianMTModel(FlaxMarianPreTrainedModel): method decode (line 1299) | def decode( method _adapt_logits_for_beam_search (line 1434) | def _adapt_logits_for_beam_search(self, logits): 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: benchmark/third_party/transformers/src/transformers/models/marian/modeling_marian.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 79) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 95) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MarianSinusoidalPositionalEmbedding (line 109) | class MarianSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 112) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 117) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 134) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class MarianAttention (line 144) | class MarianAttention(nn.Module): method __init__ (line 147) | def __init__( method _shape (line 174) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 177) | def forward( class MarianEncoderLayer (line 292) | class MarianEncoderLayer(nn.Module): method __init__ (line 293) | def __init__(self, config: MarianConfig): method forward (line 309) | def forward( class MarianDecoderLayer (line 361) | class MarianDecoderLayer(nn.Module): method __init__ (line 362) | def __init__(self, config: MarianConfig): method forward (line 388) | def forward( class MarianPreTrainedModel (line 478) | class MarianPreTrainedModel(PreTrainedModel): method _init_weights (line 483) | def _init_weights(self, module: Union[nn.Linear, nn.Embedding, MarianS... method _set_gradient_checkpointing (line 496) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 501) | def dummy_inputs(self): class MarianEncoder (line 644) | class MarianEncoder(MarianPreTrainedModel): method __init__ (line 654) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 679) | def get_input_embeddings(self): method set_input_embeddings (line 682) | def set_input_embeddings(self, value): method forward (line 685) | def forward( class MarianDecoder (line 814) | class MarianDecoder(MarianPreTrainedModel): method __init__ (line 823) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 845) | def get_input_embeddings(self): method set_input_embeddings (line 848) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 852) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 872) | def forward( class MarianModel (line 1089) | class MarianModel(MarianPreTrainedModel): method __init__ (line 1090) | def __init__(self, config: MarianConfig): method get_input_embeddings (line 1112) | def get_input_embeddings(self): method set_input_embeddings (line 1116) | def set_input_embeddings(self, value): method get_decoder_input_embeddings (line 1124) | def get_decoder_input_embeddings(self): method set_decoder_input_embeddings (line 1132) | def set_decoder_input_embeddings(self, value): method get_encoder (line 1141) | def get_encoder(self): method get_decoder (line 1144) | def get_decoder(self): method resize_decoder_token_embeddings (line 1147) | def resize_decoder_token_embeddings(self, new_num_tokens: int) -> nn.E... method forward (line 1173) | def forward( class MarianMTModel (line 1273) | class MarianMTModel(MarianPreTrainedModel): method __init__ (line 1285) | def __init__(self, config: MarianConfig): method get_encoder (line 1296) | def get_encoder(self): method get_decoder (line 1299) | def get_decoder(self): method resize_token_embeddings (line 1302) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_token_embeddings (line 1308) | def _resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method resize_decoder_token_embeddings (line 1329) | def resize_decoder_token_embeddings(self, new_num_tokens): method _resize_final_logits_bias (line 1361) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1370) | def get_output_embeddings(self): method set_output_embeddings (line 1373) | def set_output_embeddings(self, new_embeddings: nn.Embedding): method tie_weights (line 1376) | def tie_weights(self): method forward (line 1401) | def forward( method prepare_inputs_for_generation (line 1480) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1508) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method adjust_logits_during_generation (line 1511) | def adjust_logits_during_generation(self, logits, cur_len): method _reorder_cache (line 1516) | def _reorder_cache(past, beam_idx): class MarianDecoderWrapper (line 1527) | class MarianDecoderWrapper(MarianPreTrainedModel): method __init__ (line 1533) | def __init__(self, config): method forward (line 1537) | def forward(self, *args, **kwargs): class MarianForCausalLM (line 1542) | class MarianForCausalLM(MarianPreTrainedModel): method __init__ (line 1543) | def __init__(self, config): method get_input_embeddings (line 1555) | def get_input_embeddings(self): method set_input_embeddings (line 1558) | def set_input_embeddings(self, value): method get_output_embeddings (line 1561) | def get_output_embeddings(self): method set_output_embeddings (line 1564) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1567) | def set_decoder(self, decoder): method get_decoder (line 1570) | def get_decoder(self): method forward (line 1574) | def forward( method prepare_inputs_for_generation (line 1717) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1733) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/marian/modeling_tf_marian.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 89) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 107) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFMarianSinusoidalPositionalEmbedding (line 120) | class TFMarianSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 132) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 151) | def _init_weight(n_pos: int, dim: int): method call (line 168) | def call( class TFMarianAttention (line 179) | class TFMarianAttention(tf.keras.layers.Layer): method __init__ (line 182) | def __init__( method _shape (line 210) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 213) | def call( class TFMarianEncoderLayer (line 333) | class TFMarianEncoderLayer(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config: MarianConfig, **kwargs): method call (line 348) | def call( class TFMarianDecoderLayer (line 390) | class TFMarianDecoderLayer(tf.keras.layers.Layer): method __init__ (line 391) | def __init__(self, config: MarianConfig, **kwargs): method call (line 418) | def call( class TFMarianPreTrainedModel (line 499) | class TFMarianPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 504) | def dummy_inputs(self): method serving (line 526) | def serving(self, inputs): class TFMarianEncoder (line 676) | class TFMarianEncoder(tf.keras.layers.Layer): method __init__ (line 686) | def __init__(self, config: MarianConfig, embed_tokens: Optional[tf.ker... method get_embed_tokens (line 703) | def get_embed_tokens(self): method set_embed_tokens (line 706) | def set_embed_tokens(self, embed_tokens): method call (line 710) | def call( class TFMarianDecoder (line 849) | class TFMarianDecoder(tf.keras.layers.Layer): method __init__ (line 859) | def __init__(self, config: MarianConfig, embed_tokens: Optional[tf.ker... method get_embed_tokens (line 875) | def get_embed_tokens(self): method set_embed_tokens (line 878) | def set_embed_tokens(self, embed_tokens): method call (line 882) | def call( class TFMarianMainLayer (line 1090) | class TFMarianMainLayer(tf.keras.layers.Layer): method __init__ (line 1093) | def __init__(self, config: MarianConfig, **kwargs): method get_input_embeddings (line 1109) | def get_input_embeddings(self): method set_input_embeddings (line 1112) | def set_input_embeddings(self, new_embeddings): method call (line 1118) | def call( class TFMarianModel (line 1205) | class TFMarianModel(TFMarianPreTrainedModel): method __init__ (line 1206) | def __init__(self, config: MarianConfig, *inputs, **kwargs): method get_encoder (line 1211) | def get_encoder(self): method get_decoder (line 1214) | def get_decoder(self): method call (line 1225) | def call( method serving_output (line 1269) | def serving_output(self, output): class BiasLayer (line 1290) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1296) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1303) | def call(self, x): class TFMarianMTModel (line 1311) | class TFMarianMTModel(TFMarianPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1317) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1326) | def get_decoder(self): method get_encoder (line 1329) | def get_encoder(self): method get_output_embeddings (line 1332) | def get_output_embeddings(self): method set_output_embeddings (line 1335) | def set_output_embeddings(self, value): method get_bias (line 1338) | def get_bias(self): method set_bias (line 1341) | def set_bias(self, value): method call (line 1353) | def call( method serving_output (line 1435) | def serving_output(self, output): method prepare_inputs_for_generation (line 1455) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1494) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 1499) | def _reorder_cache(past, beam_idx): method adjust_logits_during_generation (line 1508) | def adjust_logits_during_generation( FILE: benchmark/third_party/transformers/src/transformers/models/marian/tokenization_marian.py class MarianTokenizer (line 61) | class MarianTokenizer(PreTrainedTokenizer): method __init__ (line 127) | def __init__( method _setup_normalizer (line 188) | def _setup_normalizer(self): method normalize (line 197) | def normalize(self, x: str) -> str: method _convert_token_to_id (line 201) | def _convert_token_to_id(self, token): method remove_language_code (line 204) | def remove_language_code(self, text: str): method _tokenize (line 210) | def _tokenize(self, text: str) -> List[str]: method _convert_id_to_token (line 215) | def _convert_id_to_token(self, index: int) -> str: method batch_decode (line 219) | def batch_decode(self, sequences, **kwargs): method decode (line 241) | def decode(self, token_ids, **kwargs): method convert_tokens_to_string (line 266) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 273) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _switch_to_input_mode (line 280) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 284) | def _switch_to_target_mode(self): method vocab_size (line 290) | def vocab_size(self) -> int: method save_vocabulary (line 293) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_vocab (line 338) | def get_vocab(self) -> Dict: method get_src_vocab (line 341) | def get_src_vocab(self): method get_tgt_vocab (line 344) | def get_tgt_vocab(self): method __getstate__ (line 347) | def __getstate__(self) -> Dict: method __setstate__ (line 354) | def __setstate__(self, d: Dict) -> None: method num_special_tokens_to_add (line 365) | def num_special_tokens_to_add(self, *args, **kwargs): method _special_token_mask (line 369) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 374) | def get_special_tokens_mask( function load_spm (line 386) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function save_json (line 392) | def save_json(data, path: str) -> None: function load_json (line 397) | def load_json(path: str) -> Union[Dict, List]: FILE: benchmark/third_party/transformers/src/transformers/models/markuplm/configuration_markuplm.py class MarkupLMConfig (line 30) | class MarkupLMConfig(PretrainedConfig): method __init__ (line 105) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/markuplm/modeling_markuplm.py class XPathEmbeddings (line 63) | class XPathEmbeddings(nn.Module): method __init__ (line 69) | def __init__(self, config): method forward (line 95) | def forward(self, xpath_tags_seq=None, xpath_subs_seq=None): function create_position_ids_from_input_ids (line 114) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class MarkupLMEmbeddings (line 130) | class MarkupLMEmbeddings(nn.Module): method __init__ (line 133) | def __init__(self, config): method create_position_ids_from_inputs_embeds (line 156) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 173) | def forward( class MarkupLMSelfOutput (line 227) | class MarkupLMSelfOutput(nn.Module): method __init__ (line 228) | def __init__(self, config): method forward (line 234) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMIntermediate (line 242) | class MarkupLMIntermediate(nn.Module): method __init__ (line 243) | def __init__(self, config): method forward (line 251) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMOutput (line 258) | class MarkupLMOutput(nn.Module): method __init__ (line 259) | def __init__(self, config): method forward (line 265) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMPooler (line 273) | class MarkupLMPooler(nn.Module): method __init__ (line 274) | def __init__(self, config): method forward (line 279) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMPredictionHeadTransform (line 289) | class MarkupLMPredictionHeadTransform(nn.Module): method __init__ (line 290) | def __init__(self, config): method forward (line 299) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMLMPredictionHead (line 307) | class MarkupLMLMPredictionHead(nn.Module): method __init__ (line 308) | def __init__(self, config): method forward (line 321) | def forward(self, hidden_states): class MarkupLMOnlyMLMHead (line 328) | class MarkupLMOnlyMLMHead(nn.Module): method __init__ (line 329) | def __init__(self, config): method forward (line 333) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MarkupLMSelfAttention (line 339) | class MarkupLMSelfAttention(nn.Module): method __init__ (line 340) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 366) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 371) | def forward( class MarkupLMAttention (line 467) | class MarkupLMAttention(nn.Module): method __init__ (line 468) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 474) | def prune_heads(self, heads): method forward (line 492) | def forward( class MarkupLMLayer (line 517) | class MarkupLMLayer(nn.Module): method __init__ (line 518) | def __init__(self, config): method forward (line 532) | def forward( method feed_forward_chunk (line 597) | def feed_forward_chunk(self, attention_output): class MarkupLMEncoder (line 604) | class MarkupLMEncoder(nn.Module): method __init__ (line 605) | def __init__(self, config): method forward (line 611) | def forward( class MarkupLMPreTrainedModel (line 701) | class MarkupLMPreTrainedModel(PreTrainedModel): method _init_weights (line 713) | def _init_weights(self, module): method from_pretrained (line 730) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... class MarkupLMModel (line 800) | class MarkupLMModel(MarkupLMPreTrainedModel): method __init__ (line 802) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 814) | def get_input_embeddings(self): method set_input_embeddings (line 817) | def set_input_embeddings(self, value): method _prune_heads (line 820) | def _prune_heads(self, heads_to_prune): method forward (line 830) | def forward( method prepare_inputs_for_generation (line 933) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 946) | def _reorder_cache(self, past, beam_idx): class MarkupLMForQuestionAnswering (line 960) | class MarkupLMForQuestionAnswering(MarkupLMPreTrainedModel): method __init__ (line 964) | def __init__(self, config): method forward (line 976) | def forward( class MarkupLMForTokenClassification (line 1082) | class MarkupLMForTokenClassification(MarkupLMPreTrainedModel): method __init__ (line 1084) | def __init__(self, config): method forward (line 1100) | def forward( class MarkupLMForSequenceClassification (line 1188) | class MarkupLMForSequenceClassification(MarkupLMPreTrainedModel): method __init__ (line 1190) | def __init__(self, config): method forward (line 1207) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/markuplm/processing_markuplm.py class MarkupLMProcessor (line 25) | class MarkupLMProcessor(ProcessorMixin): method __call__ (line 48) | def __call__( method batch_decode (line 128) | def batch_decode(self, *args, **kwargs): method decode (line 135) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/markuplm/tokenization_markuplm.py function bytes_to_unicode (line 110) | def bytes_to_unicode(): function get_pairs (line 132) | def get_pairs(word): class MarkupLMTokenizer (line 145) | class MarkupLMTokenizer(PreTrainedTokenizer): method __init__ (line 204) | def __init__( method get_xpath_seq (line 285) | def get_xpath_seq(self, xpath): method vocab_size (line 311) | def vocab_size(self): method get_vocab (line 314) | def get_vocab(self): method bpe (line 317) | def bpe(self, token): method _tokenize (line 359) | def _tokenize(self, text): method _convert_token_to_id (line 369) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 373) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 377) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 386) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 417) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 423) | def build_inputs_with_special_tokens( method build_xpath_tags_with_special_tokens (line 445) | def build_xpath_tags_with_special_tokens( method build_xpath_subs_with_special_tokens (line 453) | def build_xpath_subs_with_special_tokens( method get_special_tokens_mask (line 461) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 486) | def create_token_type_ids_from_sequences( method __call__ (line 509) | def __call__( method batch_encode_plus (line 654) | def batch_encode_plus( method _batch_encode_plus (line 712) | def _batch_encode_plus( method _batch_prepare_for_model (line 768) | def _batch_prepare_for_model( method encode (line 839) | def encode( method encode_plus (line 886) | def encode_plus( method _encode_plus (line 952) | def _encode_plus( method prepare_for_model (line 1005) | def prepare_for_model( method truncate_sequences (line 1233) | def truncate_sequences( method _pad (line 1370) | def _pad( FILE: benchmark/third_party/transformers/src/transformers/models/markuplm/tokenization_markuplm_fast.py function bytes_to_unicode (line 64) | def bytes_to_unicode(): function get_pairs (line 86) | def get_pairs(word): class MarkupLMTokenizerFast (line 99) | class MarkupLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 162) | def __init__( method get_xpath_seq (line 259) | def get_xpath_seq(self, xpath): method __call__ (line 285) | def __call__( method batch_encode_plus (line 429) | def batch_encode_plus( method tokenize (line 487) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 496) | def encode_plus( method _batch_encode_plus (line 562) | def _batch_encode_plus( method _encode_plus (line 719) | def _encode_plus( method _pad (line 785) | def _pad( method build_inputs_with_special_tokens (line 878) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 900) | def create_token_type_ids_from_sequences( method save_vocabulary (line 922) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/maskformer/configuration_maskformer.py class MaskFormerConfig (line 36) | class MaskFormerConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method from_backbone_and_decoder_configs (line 173) | def from_backbone_and_decoder_configs( method to_dict (line 194) | def to_dict(self) -> Dict[str, any]: FILE: benchmark/third_party/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 OriginalMaskFormerConfigToFeatureExtractorConverter (line 168) | class OriginalMaskFormerConfigToFeatureExtractorConverter: method __call__ (line 169) | def __call__(self, original_config: object) -> MaskFormerFeatureExtrac... class OriginalMaskFormerCheckpointToOursConverter (line 185) | class OriginalMaskFormerCheckpointToOursConverter: method __init__ (line 186) | def __init__(self, original_model: nn.Module, config: MaskFormerConfig): method pop_all (line 190) | def pop_all(self, renamed_keys: List[Tuple[str, str]], dst_state_dict:... method replace_backbone (line 194) | def replace_backbone(self, dst_state_dict: StateDict, src_state_dict: ... method replace_pixel_module (line 351) | def replace_pixel_module(self, dst_state_dict: StateDict, src_state_di... method rename_keys_in_detr_decoder (line 384) | def rename_keys_in_detr_decoder(self, dst_state_dict: StateDict, src_s... method replace_q_k_v_in_detr_decoder (line 441) | def replace_q_k_v_in_detr_decoder(self, dst_state_dict: StateDict, src... method replace_detr_decoder (line 468) | def replace_detr_decoder(self, dst_state_dict: StateDict, src_state_di... method replace_transformer_module (line 484) | def replace_transformer_module(self, dst_state_dict: StateDict, src_st... method replace_instance_segmentation_module (line 498) | def replace_instance_segmentation_module(self, dst_state_dict: StateDi... method convert (line 519) | def convert(self, mask_former: MaskFormerModel) -> MaskFormerModel: method convert_instance_segmentation (line 534) | def convert_instance_segmentation( method using_dirs (line 547) | def using_dirs(checkpoints_dir: Path, config_dir: Path) -> Iterator[Tu... function test (line 558) | def test(original_model, our_model: MaskFormerForInstanceSegmentation, f... function get_name (line 615) | def get_name(checkpoint_file: Path): FILE: benchmark/third_party/transformers/src/transformers/models/maskformer/feature_extraction_maskformer.py function binary_mask_to_rle (line 41) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 63) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 85) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 114) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 133) | def compute_segments( class MaskFormerFeatureExtractor (line 193) | class MaskFormerFeatureExtractor(FeatureExtractionMixin, ImageFeatureExt... method __init__ (line 239) | def __init__( method _resize_with_size_divisibility (line 265) | def _resize_with_size_divisibility(self, image, size, target=None, max... method __call__ (line 317) | def __call__( method _max_by_axis (line 470) | def _max_by_axis(self, the_list: List[List[int]]) -> List[int]: method convert_segmentation_map_to_binary_masks (line 477) | def convert_segmentation_map_to_binary_masks( method encode_inputs (line 509) | def encode_inputs( method post_process_segmentation (line 629) | def post_process_segmentation( method post_process_semantic_segmentation (line 677) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 727) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 810) | def post_process_panoptic_segmentation( FILE: benchmark/third_party/transformers/src/transformers/models/maskformer/modeling_maskformer.py class MaskFormerSwinModelOutputWithPooling (line 65) | class MaskFormerSwinModelOutputWithPooling(ModelOutput): class MaskFormerSwinBaseModelOutput (line 99) | class MaskFormerSwinBaseModelOutput(ModelOutput): class DetrDecoderOutput (line 131) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class MaskFormerPixelLevelModuleOutput (line 161) | class MaskFormerPixelLevelModuleOutput(ModelOutput): class MaskFormerPixelDecoderOutput (line 191) | class MaskFormerPixelDecoderOutput(ModelOutput): class MaskFormerModelOutput (line 215) | class MaskFormerModelOutput(ModelOutput): class MaskFormerForInstanceSegmentationOutput (line 258) | class MaskFormerForInstanceSegmentationOutput(ModelOutput): function upsample_like (line 317) | def upsample_like(pixel_values: Tensor, like: Tensor, mode: str = "bilin... function dice_loss (line 338) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_focal_loss (line 369) | def sigmoid_focal_loss( function pair_wise_dice_loss (line 413) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_focal_loss (line 436) | def pair_wise_sigmoid_focal_loss(inputs: Tensor, labels: Tensor, alpha: ... function window_partition (line 476) | def window_partition(input_feature, window_size): function window_reverse (line 489) | def window_reverse(windows, window_size, height, width): function drop_path (line 500) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class MaskFormerSwinEmbeddings (line 520) | class MaskFormerSwinEmbeddings(nn.Module): method __init__ (line 525) | def __init__(self, config): method forward (line 540) | def forward(self, pixel_values): class MaskFormerSwinPatchEmbeddings (line 552) | class MaskFormerSwinPatchEmbeddings(nn.Module): method __init__ (line 557) | def __init__(self, config): method maybe_pad (line 573) | def maybe_pad(self, pixel_values, height, width): method forward (line 582) | def forward(self, pixel_values): class MaskFormerSwinPatchMerging (line 598) | class MaskFormerSwinPatchMerging(nn.Module): method __init__ (line 611) | def __init__(self, input_resolution, dim, norm_layer=nn.LayerNorm): method maybe_pad (line 617) | def maybe_pad(self, input_feature, width, height): method forward (line 625) | def forward(self, input_feature, input_dimensions): class MaskFormerSwinDropPath (line 652) | class MaskFormerSwinDropPath(nn.Module): method __init__ (line 655) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 659) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 662) | def extra_repr(self) -> str: class MaskFormerSwinSelfAttention (line 667) | class MaskFormerSwinSelfAttention(nn.Module): method __init__ (line 668) | def __init__(self, config, dim, num_heads): method transpose_for_scores (line 706) | def transpose_for_scores(self, x): method forward (line 711) | def forward( class MaskFormerSwinSelfOutput (line 769) | class MaskFormerSwinSelfOutput(nn.Module): method __init__ (line 770) | def __init__(self, config, dim): method forward (line 775) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MaskFormerSwinAttention (line 783) | class MaskFormerSwinAttention(nn.Module): method __init__ (line 784) | def __init__(self, config, dim, num_heads): method prune_heads (line 790) | def prune_heads(self, heads): method forward (line 808) | def forward( class MaskFormerSwinIntermediate (line 822) | class MaskFormerSwinIntermediate(nn.Module): method __init__ (line 823) | def __init__(self, config, dim): method forward (line 831) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinOutput (line 838) | class MaskFormerSwinOutput(nn.Module): method __init__ (line 839) | def __init__(self, config, dim): method forward (line 844) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinBlock (line 850) | class MaskFormerSwinBlock(nn.Module): method __init__ (line 851) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method get_attn_mask (line 866) | def get_attn_mask(self, input_resolution): method maybe_pad (line 895) | def maybe_pad(self, hidden_states, height, width): method forward (line 903) | def forward(self, hidden_states, input_dimensions, head_mask=None, out... class MaskFormerSwinLayer (line 963) | class MaskFormerSwinLayer(nn.Module): method __init__ (line 964) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 989) | def forward( class MaskFormerSwinEncoder (line 1018) | class MaskFormerSwinEncoder(nn.Module): method __init__ (line 1019) | def __init__(self, config, grid_size): method forward (line 1041) | def forward( class MaskFormerSwinModel (line 1101) | class MaskFormerSwinModel(nn.Module, ModuleUtilsMixin): method __init__ (line 1102) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1114) | def get_input_embeddings(self): method _prune_heads (line 1117) | def _prune_heads(self, heads_to_prune): method forward (line 1125) | def forward( class DetrAttention (line 1183) | class DetrAttention(nn.Module): method __init__ (line 1190) | def __init__( method _shape (line 1215) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 1218) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1221) | def forward( class DetrDecoderLayer (line 1315) | class DetrDecoderLayer(nn.Module): method __init__ (line 1316) | def __init__(self, config: DetrConfig): method forward (line 1342) | def forward( function _expand_mask (line 1423) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DetrDecoder (line 1437) | class DetrDecoder(nn.Module): method __init__ (line 1452) | def __init__(self, config: DetrConfig): method forward (line 1464) | def forward( class MaskFormerHungarianMatcher (line 1616) | class MaskFormerHungarianMatcher(nn.Module): method __init__ (line 1624) | def __init__(self, cost_class: float = 1.0, cost_mask: float = 1.0, co... method forward (line 1643) | def forward(self, masks_queries_logits, class_queries_logits, mask_lab... method __repr__ (line 1701) | def __repr__(self): class MaskFormerLoss (line 1714) | class MaskFormerLoss(nn.Module): method __init__ (line 1715) | def __init__( method _max_by_axis (line 1748) | def _max_by_axis(self, the_list: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 1755) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_labels (line 1774) | def loss_labels( method loss_masks (line 1809) | def loss_masks( method _get_predictions_permutation_indices (line 1851) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 1857) | def _get_targets_permutation_indices(self, indices): method forward (line 1863) | def forward( method get_num_masks (line 1917) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... class MaskFormerSwinTransformerBackbone (line 1926) | class MaskFormerSwinTransformerBackbone(nn.Module): method __init__ (line 1936) | def __init__(self, config: SwinConfig): method forward (line 1941) | def forward(self, *args, **kwargs) -> List[Tensor]: method input_resolutions (line 1964) | def input_resolutions(self) -> List[int]: method outputs_shapes (line 1968) | def outputs_shapes(self) -> List[int]: class MaskFormerFPNConvLayer (line 1972) | class MaskFormerFPNConvLayer(nn.Module): method __init__ (line 1973) | def __init__(self, in_features: int, out_features: int, kernel_size: i... method forward (line 1998) | def forward(self, input: Tensor) -> Tensor: class MaskFormerFPNLayer (line 2005) | class MaskFormerFPNLayer(nn.Module): method __init__ (line 2006) | def __init__(self, in_features: int, lateral_features: int): method forward (line 2025) | def forward(self, down: Tensor, left: Tensor) -> Tensor: class MaskFormerFPNModel (line 2033) | class MaskFormerFPNModel(nn.Module): method __init__ (line 2034) | def __init__(self, in_features: int, lateral_widths: List[int], featur... method forward (line 2053) | def forward(self, features: List[Tensor]) -> List[Tensor]: class MaskFormerPixelDecoder (line 2064) | class MaskFormerPixelDecoder(nn.Module): method __init__ (line 2065) | def __init__(self, *args, feature_size: int = 256, mask_feature_size: ... method forward (line 2081) | def forward(self, features: List[Tensor], output_hidden_states: bool =... class MaskFormerSinePositionEmbedding (line 2091) | class MaskFormerSinePositionEmbedding(nn.Module): method __init__ (line 2097) | def __init__( method forward (line 2108) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class PredictionBlock (line 2130) | class PredictionBlock(nn.Module): method __init__ (line 2131) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 2138) | def forward(self, input: Tensor) -> Tensor: class MaskformerMLPPredictionHead (line 2145) | class MaskformerMLPPredictionHead(nn.Module): method __init__ (line 2146) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 2177) | def forward(self, input: Tensor) -> Tensor: class MaskFormerPixelLevelModule (line 2184) | class MaskFormerPixelLevelModule(nn.Module): method __init__ (line 2185) | def __init__(self, config: MaskFormerConfig): method forward (line 2204) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class MaskFormerTransformerModule (line 2216) | class MaskFormerTransformerModule(nn.Module): method __init__ (line 2221) | def __init__(self, in_features: int, config: MaskFormerConfig): method forward (line 2230) | def forward( class MaskFormerPreTrainedModel (line 2293) | class MaskFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 2298) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 2337) | def _set_gradient_checkpointing(self, module, value=False): class MaskFormerModel (line 2348) | class MaskFormerModel(MaskFormerPreTrainedModel): method __init__ (line 2349) | def __init__(self, config: MaskFormerConfig): method forward (line 2366) | def forward( class MaskFormerForInstanceSegmentation (line 2428) | class MaskFormerForInstanceSegmentation(MaskFormerPreTrainedModel): method __init__ (line 2429) | def __init__(self, config: MaskFormerConfig): method get_loss_dict (line 2456) | def get_loss_dict( method get_loss (line 2475) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method get_logits (line 2478) | def get_logits(self, outputs: MaskFormerModelOutput) -> Tuple[Tensor, ... method forward (line 2511) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/mbart/configuration_mbart.py class MBartConfig (line 34) | class MBartConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class MBartOnnxConfig (line 170) | class MBartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 216) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 228) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 296) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 334) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 360) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 384) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/mbart/modeling_flax_mbart.py function shift_tokens_right (line 223) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int) -> jnp... class FlaxMBartAttention (line 247) | class FlaxMBartAttention(nn.Module): method setup (line 256) | def setup(self) -> None: method _split_heads (line 282) | def _split_heads(self, hidden_states): method _merge_heads (line 285) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 289) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 320) | def __call__( class FlaxMBartEncoderLayer (line 414) | class FlaxMBartEncoderLayer(nn.Module): method setup (line 418) | def setup(self) -> None: method __call__ (line 441) | def __call__( class FlaxMBartEncoderLayerCollection (line 471) | class FlaxMBartEncoderLayerCollection(nn.Module): method setup (line 475) | def setup(self): method __call__ (line 482) | def __call__( class FlaxMBartDecoderLayer (line 525) | class FlaxMBartDecoderLayer(nn.Module): method setup (line 529) | def setup(self) -> None: method __call__ (line 562) | def __call__( class FlaxMBartDecoderLayerCollection (line 614) | class FlaxMBartDecoderLayerCollection(nn.Module): method setup (line 618) | def setup(self): method __call__ (line 625) | def __call__( class FlaxMBartClassificationHead (line 685) | class FlaxMBartClassificationHead(nn.Module): method setup (line 694) | def setup(self): method __call__ (line 705) | def __call__(self, hidden_states: jnp.ndarray, deterministic: bool): class FlaxMBartEncoder (line 714) | class FlaxMBartEncoder(nn.Module): method setup (line 719) | def setup(self): method __call__ (line 739) | def __call__( class FlaxMBartDecoder (line 789) | class FlaxMBartDecoder(nn.Module): method setup (line 794) | def setup(self): method __call__ (line 815) | def __call__( class FlaxMBartModule (line 875) | class FlaxMBartModule(nn.Module): method setup (line 879) | def setup(self): method _get_encoder_module (line 889) | def _get_encoder_module(self): method _get_decoder_module (line 892) | def _get_decoder_module(self): method __call__ (line 895) | def __call__( class FlaxMBartPreTrainedModel (line 944) | class FlaxMBartPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 949) | def __init__( method init_weights (line 961) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 998) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1041) | def encode( method decode (line 1104) | def decode( method __call__ (line 1216) | def __call__( class FlaxMBartModel (line 1278) | class FlaxMBartModel(FlaxMBartPreTrainedModel): class FlaxMBartForConditionalGenerationModule (line 1290) | class FlaxMBartForConditionalGenerationModule(nn.Module): method setup (line 1295) | def setup(self): method _get_encoder_module (line 1305) | def _get_encoder_module(self): method _get_decoder_module (line 1308) | def _get_decoder_module(self): method __call__ (line 1311) | def __call__( class FlaxMBartForConditionalGeneration (line 1365) | class FlaxMBartForConditionalGeneration(FlaxMBartPreTrainedModel): method decode (line 1371) | def decode( method prepare_inputs_for_generation (line 1505) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1536) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxMBartForSequenceClassificationModule (line 1591) | class FlaxMBartForSequenceClassificationModule(nn.Module): method setup (line 1596) | def setup(self): method _get_encoder_module (line 1605) | def _get_encoder_module(self): method _get_decoder_module (line 1608) | def _get_decoder_module(self): method __call__ (line 1611) | def __call__( class FlaxMBartForSequenceClassification (line 1678) | class FlaxMBartForSequenceClassification(FlaxMBartPreTrainedModel): class FlaxMBartForQuestionAnsweringModule (line 1693) | class FlaxMBartForQuestionAnsweringModule(nn.Module): method setup (line 1698) | def setup(self): method _get_encoder_module (line 1704) | def _get_encoder_module(self): method _get_decoder_module (line 1707) | def _get_decoder_module(self): method __call__ (line 1710) | def __call__( class FlaxMBartForQuestionAnswering (line 1766) | class FlaxMBartForQuestionAnswering(FlaxMBartPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/mbart/modeling_mbart.py function shift_tokens_right (line 74) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): function _make_causal_mask (line 95) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 111) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MBartLearnedPositionalEmbedding (line 126) | class MBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 131) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 137) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MBartAttention (line 149) | class MBartAttention(nn.Module): method __init__ (line 152) | def __init__( method _shape (line 179) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 182) | def forward( class MBartEncoderLayer (line 296) | class MBartEncoderLayer(nn.Module): method __init__ (line 297) | def __init__(self, config: MBartConfig): method forward (line 313) | def forward( class MBartDecoderLayer (line 364) | class MBartDecoderLayer(nn.Module): method __init__ (line 365) | def __init__(self, config: MBartConfig): method forward (line 391) | def forward( class MBartClassificationHead (line 482) | class MBartClassificationHead(nn.Module): method __init__ (line 485) | def __init__( method forward (line 497) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MBartPreTrainedModel (line 506) | class MBartPreTrainedModel(PreTrainedModel): method _init_weights (line 511) | def _init_weights(self, module): method _set_gradient_checkpointing (line 522) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 527) | def dummy_inputs(self): class MBartEncoder (line 689) | class MBartEncoder(MBartPreTrainedModel): method __init__ (line 699) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method _backward_compatibility_gradient_checkpointing (line 727) | def _backward_compatibility_gradient_checkpointing(self): method forward (line 732) | def forward( class MBartDecoder (line 867) | class MBartDecoder(MBartPreTrainedModel): method __init__ (line 876) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method get_input_embeddings (line 901) | def get_input_embeddings(self): method set_input_embeddings (line 904) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 908) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 928) | def forward( class MBartModel (line 1152) | class MBartModel(MBartPreTrainedModel): method __init__ (line 1153) | def __init__(self, config: MBartConfig): method get_input_embeddings (line 1165) | def get_input_embeddings(self): method set_input_embeddings (line 1168) | def set_input_embeddings(self, value): method get_encoder (line 1173) | def get_encoder(self): method get_decoder (line 1176) | def get_decoder(self): method forward (line 1187) | def forward( class MBartForConditionalGeneration (line 1269) | class MBartForConditionalGeneration(MBartPreTrainedModel): method __init__ (line 1278) | def __init__(self, config: MBartConfig): method get_encoder (line 1287) | def get_encoder(self): method get_decoder (line 1290) | def get_decoder(self): method resize_token_embeddings (line 1293) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1298) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1307) | def get_output_embeddings(self): method set_output_embeddings (line 1310) | def set_output_embeddings(self, new_embeddings): method forward (line 1316) | def forward( method prepare_inputs_for_generation (line 1393) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1421) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1425) | def _reorder_cache(past, beam_idx): class MBartForSequenceClassification (line 1442) | class MBartForSequenceClassification(MBartPreTrainedModel): method __init__ (line 1443) | def __init__(self, config: MBartConfig, **kwargs): method forward (line 1465) | def forward( class MBartForQuestionAnswering (line 1570) | class MBartForQuestionAnswering(MBartPreTrainedModel): method __init__ (line 1571) | def __init__(self, config): method forward (line 1592) | def forward( class MBartDecoderWrapper (line 1688) | class MBartDecoderWrapper(MBartPreTrainedModel): method __init__ (line 1694) | def __init__(self, config): method forward (line 1698) | def forward(self, *args, **kwargs): class MBartForCausalLM (line 1703) | class MBartForCausalLM(MBartPreTrainedModel): method __init__ (line 1704) | def __init__(self, config): method get_input_embeddings (line 1716) | def get_input_embeddings(self): method set_input_embeddings (line 1719) | def set_input_embeddings(self, value): method get_output_embeddings (line 1722) | def get_output_embeddings(self): method set_output_embeddings (line 1725) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1728) | def set_decoder(self, decoder): method get_decoder (line 1731) | def get_decoder(self): method forward (line 1735) | def forward( method prepare_inputs_for_generation (line 1878) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1894) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/mbart/modeling_tf_mbart.py function shift_tokens_right (line 63) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int): function _make_causal_mask (line 88) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 106) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFMBartLearnedPositionalEmbedding (line 120) | class TFMBartLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 131) | def call( class TFMBartAttention (line 148) | class TFMBartAttention(tf.keras.layers.Layer): method __init__ (line 151) | def __init__( method _shape (line 179) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 182) | def call( class TFMBartEncoderLayer (line 301) | class TFMBartEncoderLayer(tf.keras.layers.Layer): method __init__ (line 302) | def __init__(self, config: MBartConfig, **kwargs): method call (line 316) | def call( class TFMBartDecoderLayer (line 357) | class TFMBartDecoderLayer(tf.keras.layers.Layer): method __init__ (line 358) | def __init__(self, config: MBartConfig, **kwargs): method call (line 385) | def call( class TFMBartPreTrainedModel (line 466) | class TFMBartPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 471) | def dummy_inputs(self): method serving (line 493) | def serving(self, inputs): class TFMBartEncoder (line 659) | class TFMBartEncoder(tf.keras.layers.Layer): method __init__ (line 669) | def __init__(self, config: MBartConfig, embed_tokens: Optional[tf.kera... method get_embed_tokens (line 688) | def get_embed_tokens(self): method set_embed_tokens (line 691) | def set_embed_tokens(self, embed_tokens): method call (line 695) | def call( class TFMBartDecoder (line 837) | class TFMBartDecoder(tf.keras.layers.Layer): method __init__ (line 847) | def __init__(self, config: MBartConfig, embed_tokens: Optional[tf.kera... method get_embed_tokens (line 865) | def get_embed_tokens(self): method set_embed_tokens (line 868) | def set_embed_tokens(self, embed_tokens): method call (line 872) | def call( class TFMBartMainLayer (line 1085) | class TFMBartMainLayer(tf.keras.layers.Layer): method __init__ (line 1088) | def __init__(self, config: MBartConfig, **kwargs): method get_input_embeddings (line 1104) | def get_input_embeddings(self): method set_input_embeddings (line 1107) | def set_input_embeddings(self, new_embeddings): method call (line 1113) | def call( class TFMBartModel (line 1203) | class TFMBartModel(TFMBartPreTrainedModel): method __init__ (line 1204) | def __init__(self, config: MBartConfig, *inputs, **kwargs): method get_encoder (line 1209) | def get_encoder(self): method get_decoder (line 1212) | def get_decoder(self): method call (line 1223) | def call( method serving_output (line 1268) | def serving_output(self, output): class BiasLayer (line 1289) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1295) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1302) | def call(self, x): class TFMBartForConditionalGeneration (line 1310) | class TFMBartForConditionalGeneration(TFMBartPreTrainedModel, TFCausalLa... method __init__ (line 1316) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1325) | def get_decoder(self): method get_encoder (line 1328) | def get_encoder(self): method get_output_embeddings (line 1331) | def get_output_embeddings(self): method set_output_embeddings (line 1334) | def set_output_embeddings(self, value): method get_bias (line 1337) | def get_bias(self): method set_bias (line 1340) | def set_bias(self, value): method call (line 1352) | def call( method serving_output (line 1432) | def serving_output(self, output): method prepare_inputs_for_generation (line 1452) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1491) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 1496) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/mbart/tokenization_mbart.py class MBartTokenizer (line 53) | class MBartTokenizer(PreTrainedTokenizer): method __init__ (line 82) | def __init__( method __getstate__ (line 159) | def __getstate__(self): method __setstate__ (line 165) | def __setstate__(self, d): method vocab_size (line 176) | def vocab_size(self): method src_lang (line 180) | def src_lang(self) -> str: method src_lang (line 184) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 188) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 218) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 245) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 270) | def _build_translation_inputs( method get_vocab (line 282) | def get_vocab(self): method _tokenize (line 287) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 290) | 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 305) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 310) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 327) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 339) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 342) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 345) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 351) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/mbart/tokenization_mbart_fast.py class MBartTokenizerFast (line 63) | class MBartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 96) | def __init__( method src_lang (line 153) | def src_lang(self) -> str: method src_lang (line 157) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 161) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 190) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 215) | def _build_translation_inputs( method prepare_seq2seq_batch (line 227) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 239) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 242) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 245) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 260) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 275) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/mbart50/tokenization_mbart50.py class MBart50Tokenizer (line 49) | class MBart50Tokenizer(PreTrainedTokenizer): method __init__ (line 116) | def __init__( method vocab_size (line 185) | def vocab_size(self) -> int: method src_lang (line 189) | def src_lang(self) -> str: method src_lang (line 193) | def src_lang(self, new_src_lang: str) -> None: method __getstate__ (line 197) | def __getstate__(self) -> Dict: method __setstate__ (line 202) | def __setstate__(self, d: Dict) -> None: method get_vocab (line 212) | def get_vocab(self) -> Dict: method _tokenize (line 217) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 220) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 229) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 235) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 239) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 256) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 286) | def build_inputs_with_special_tokens( method _build_translation_inputs (line 313) | def _build_translation_inputs( method prepare_seq2seq_batch (line 325) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 337) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 340) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 343) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 349) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/mbart50/tokenization_mbart50_fast.py class MBart50TokenizerFast (line 59) | class MBart50TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 113) | def __init__( method src_lang (line 162) | def src_lang(self) -> str: method src_lang (line 166) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 170) | def build_inputs_with_special_tokens( method prepare_seq2seq_batch (line 199) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 211) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 214) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 217) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 232) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _build_translation_inputs (line 247) | def _build_translation_inputs( method save_vocabulary (line 259) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/mctct/configuration_mctct.py class MCTCTConfig (line 29) | class MCTCTConfig(PretrainedConfig): method __init__ (line 119) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/mctct/feature_extraction_mctct.py class MCTCTFeatureExtractor (line 42) | class MCTCTFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 79) | def __init__( method _num_frames_calc (line 117) | def _num_frames_calc(in_size, frame_size, frame_stride): method _frame_signal (line 121) | def _frame_signal(one_waveform, n_frames, frame_signal_scale, window_l... method _apply_preemphasis_inplace (line 134) | def _apply_preemphasis_inplace(frames, window_length, preemphasis_coeff): method _windowing (line 149) | def _windowing(frames, window_length, window): method _dft (line 161) | def _dft(frames, K, n_frames, n_samples, n_fft): method _extract_mfsc_features (line 175) | def _extract_mfsc_features(self, one_waveform: np.array) -> np.ndarray: method _normalize_one (line 217) | def _normalize_one(self, x, input_length, padding_value): method normalize (line 234) | def normalize( method __call__ (line 240) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/mctct/modeling_mctct.py function _expand_mask (line 63) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MCTCTConv1dSubsampler (line 77) | class MCTCTConv1dSubsampler(nn.Module): method __init__ (line 83) | def __init__(self, config): method forward (line 122) | def forward(self, input_features): class MCTCTEmbeddings (line 138) | class MCTCTEmbeddings(nn.Module): method __init__ (line 141) | def __init__(self, config): method forward (line 161) | def forward( class MCTCTSelfAttention (line 194) | class MCTCTSelfAttention(nn.Module): method __init__ (line 195) | def __init__(self, config): method transpose_for_scores (line 218) | def transpose_for_scores(self, x): method reshape_fortran (line 223) | def reshape_fortran(self, x, shape): method relative_position_embedding_rotate (line 228) | def relative_position_embedding_rotate(self, scores): method forward (line 253) | def forward( class MCTCTLayerNorm (line 302) | class MCTCTLayerNorm(nn.Module): method __init__ (line 303) | def __init__(self): method forward (line 308) | def forward(self, hidden_states): class MCTCTSelfOutput (line 312) | class MCTCTSelfOutput(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 320) | def forward(self, hidden_states, input_tensor): class MCTCTAttention (line 327) | class MCTCTAttention(nn.Module): method __init__ (line 328) | def __init__(self, config): method prune_heads (line 334) | def prune_heads(self, heads): method forward (line 352) | def forward( class MCTCTIntermediate (line 371) | class MCTCTIntermediate(nn.Module): method __init__ (line 372) | def __init__(self, config): method forward (line 380) | def forward(self, hidden_states): class MCTCTOutput (line 386) | class MCTCTOutput(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 393) | def forward(self, hidden_states, input_tensor): class MCTCTLayer (line 400) | class MCTCTLayer(nn.Module): method __init__ (line 401) | def __init__(self, config: MCTCTConfig): method forward (line 412) | def forward( method feed_forward_chunk (line 433) | def feed_forward_chunk(self, attention_output): class MCTCTPreTrainedModel (line 439) | class MCTCTPreTrainedModel(PreTrainedModel): method _init_weights (line 451) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 475) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 489) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... method _set_gradient_checkpointing (line 508) | def _set_gradient_checkpointing(self, module, value=False): class MCTCTEncoder (line 556) | class MCTCTEncoder(MCTCTPreTrainedModel): method __init__ (line 557) | def __init__(self, config: MCTCTConfig): method forward (line 567) | def forward( class MCTCTModel (line 662) | class MCTCTModel(MCTCTPreTrainedModel): method __init__ (line 663) | def __init__(self, config): method forward (line 681) | def forward( class MCTCTForCTC (line 723) | class MCTCTForCTC(MCTCTPreTrainedModel): method __init__ (line 724) | def __init__(self, config): method forward (line 752) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/mctct/processing_mctct.py class MCTCTProcessor (line 24) | class MCTCTProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 45) | def __call__(self, *args, **kwargs): method batch_decode (line 82) | def batch_decode(self, *args, **kwargs): method pad (line 89) | def pad(self, *args, **kwargs): method decode (line 119) | def decode(self, *args, **kwargs): method as_target_processor (line 127) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/megatron_bert/configuration_megatron_bert.py class MegatronBertConfig (line 28) | class MegatronBertConfig(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: benchmark/third_party/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 279) | def main(): FILE: benchmark/third_party/transformers/src/transformers/models/megatron_bert/modeling_megatron_bert.py function load_tf_weights_in_megatron_bert (line 67) | def load_tf_weights_in_megatron_bert(model, config, tf_checkpoint_path): class MegatronBertEmbeddings (line 136) | class MegatronBertEmbeddings(nn.Module): method __init__ (line 139) | def __init__(self, config): method forward (line 156) | def forward( class MegatronBertSelfAttention (line 193) | class MegatronBertSelfAttention(nn.Module): method __init__ (line 194) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 220) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 225) | def forward( class MegatronBertSelfOutput (line 321) | class MegatronBertSelfOutput(nn.Module): method __init__ (line 322) | def __init__(self, config): method forward (line 327) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class MegatronBertAttention (line 334) | class MegatronBertAttention(nn.Module): method __init__ (line 335) | def __init__(self, config): method prune_heads (line 342) | def prune_heads(self, heads): method forward (line 360) | def forward( class MegatronBertIntermediate (line 386) | class MegatronBertIntermediate(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 395) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertOutput (line 402) | class MegatronBertOutput(nn.Module): method __init__ (line 403) | def __init__(self, config): method forward (line 408) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MegatronBertLayer (line 415) | class MegatronBertLayer(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 431) | def forward( method feed_forward_chunk (line 496) | def feed_forward_chunk(self, attention_output): class MegatronBertEncoder (line 503) | class MegatronBertEncoder(nn.Module): method __init__ (line 504) | def __init__(self, config): method forward (line 514) | def forward( class MegatronBertPooler (line 611) | class MegatronBertPooler(nn.Module): method __init__ (line 612) | def __init__(self, config): method forward (line 617) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertPredictionHeadTransform (line 627) | class MegatronBertPredictionHeadTransform(nn.Module): method __init__ (line 628) | def __init__(self, config): method forward (line 637) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertLMPredictionHead (line 645) | class MegatronBertLMPredictionHead(nn.Module): method __init__ (line 646) | def __init__(self, config): 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 712) | def _init_weights(self, module): method _set_gradient_checkpointing (line 724) | def _set_gradient_checkpointing(self, module, value=False): class MegatronBertForPreTrainingOutput (line 731) | class MegatronBertForPreTrainingOutput(ModelOutput): class MegatronBertModel (line 834) | class MegatronBertModel(MegatronBertPreTrainedModel): 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 880) | def forward( class MegatronBertForPreTraining (line 1011) | class MegatronBertForPreTraining(MegatronBertPreTrainedModel): method __init__ (line 1012) | def __init__(self, config, add_binary_head=True): method get_output_embeddings (line 1021) | def get_output_embeddings(self): method set_output_embeddings (line 1024) | def set_output_embeddings(self, new_embeddings): method forward (line 1029) | def forward( class MegatronBertForCausalLM (line 1115) | class MegatronBertForCausalLM(MegatronBertPreTrainedModel): method __init__ (line 1120) | def __init__(self, config): method get_output_embeddings (line 1132) | def get_output_embeddings(self): method set_output_embeddings (line 1135) | def set_output_embeddings(self, new_embeddings): method forward (line 1140) | def forward( method prepare_inputs_for_generation (line 1241) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1253) | def _reorder_cache(self, past, beam_idx): class MegatronBertForMaskedLM (line 1261) | class MegatronBertForMaskedLM(MegatronBertPreTrainedModel): method __init__ (line 1266) | def __init__(self, config): 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 forward (line 1294) | def forward( method prepare_inputs_for_generation (line 1351) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class MegatronBertForNextSentencePrediction (line 1371) | class MegatronBertForNextSentencePrediction(MegatronBertPreTrainedModel): method __init__ (line 1375) | def __init__(self, config): method forward (line 1386) | def forward( class MegatronBertForSequenceClassification (line 1478) | class MegatronBertForSequenceClassification(MegatronBertPreTrainedModel): method __init__ (line 1479) | def __init__(self, config): method forward (line 1497) | def forward( class MegatronBertForMultipleChoice (line 1576) | class MegatronBertForMultipleChoice(MegatronBertPreTrainedModel): method __init__ (line 1577) | def __init__(self, config): method forward (line 1596) | def forward( class MegatronBertForTokenClassification (line 1670) | class MegatronBertForTokenClassification(MegatronBertPreTrainedModel): method __init__ (line 1674) | def __init__(self, config): method forward (line 1692) | def forward( class MegatronBertForQuestionAnswering (line 1752) | class MegatronBertForQuestionAnswering(MegatronBertPreTrainedModel): method __init__ (line 1756) | def __init__(self, config): method forward (line 1773) | def forward( FILE: benchmark/third_party/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 301) | def get_element_from_dict_by_path(d, path): function convert_checkpoint_from_megatron_to_transformers (line 317) | def convert_checkpoint_from_megatron_to_transformers(args): function convert_checkpoint_from_transformers_to_megatron (line 596) | def convert_checkpoint_from_transformers_to_megatron(args): function main (line 887) | def main(): FILE: benchmark/third_party/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 245) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/mluke/tokenization_mluke.py class MLukeTokenizer (line 148) | class MLukeTokenizer(PreTrainedTokenizer): method __init__ (line 238) | def __init__( method __getstate__ (line 349) | def __getstate__(self): method __setstate__ (line 355) | def __setstate__(self, d): method __call__ (line 367) | def __call__( method _encode_plus (line 513) | def _encode_plus( method _batch_encode_plus (line 595) | def _batch_encode_plus( method _check_entity_input_format (line 704) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 724) | def _create_input_sequence( method _batch_prepare_for_model (line 880) | def _batch_prepare_for_model( method prepare_for_model (line 963) | def prepare_for_model( method pad (line 1193) | def pad( method _pad (line 1354) | def _pad( method save_vocabulary (line 1493) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 1515) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 1542) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 1571) | def create_token_type_ids_from_sequences( method vocab_size (line 1598) | def vocab_size(self): method get_vocab (line 1602) | def get_vocab(self): method _tokenize (line 1608) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 1612) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 1621) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 1627) | def convert_tokens_to_string(self, tokens): FILE: benchmark/third_party/transformers/src/transformers/models/mmbt/configuration_mmbt.py class MMBTConfig (line 24) | class MMBTConfig(object): method __init__ (line 38) | def __init__(self, config, num_labels=None, modal_hidden_size=2048): FILE: benchmark/third_party/transformers/src/transformers/models/mmbt/modeling_mmbt.py class ModalEmbeddings (line 33) | class ModalEmbeddings(nn.Module): method __init__ (line 36) | def __init__(self, config, encoder, embeddings): method forward (line 47) | def forward(self, input_modal, start_token=None, end_token=None, posit... class MMBTModel (line 181) | class MMBTModel(nn.Module, ModuleUtilsMixin): method __init__ (line 182) | def __init__(self, config, transformer, encoder): method forward (line 190) | def forward( method get_input_embeddings (line 299) | def get_input_embeddings(self): method set_input_embeddings (line 302) | def set_input_embeddings(self, value): class MMBTForClassification (line 313) | class MMBTForClassification(nn.Module): method __init__ (line 343) | def __init__(self, config, transformer, encoder): method forward (line 351) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/mobilebert/configuration_mobilebert.py class MobileBertConfig (line 31) | class MobileBertConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class MobileBertOnnxConfig (line 174) | class MobileBertOnnxConfig(OnnxConfig): method inputs (line 176) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/mobilebert/modeling_mobilebert.py function load_tf_weights_in_mobilebert (line 83) | def load_tf_weights_in_mobilebert(model, config, tf_checkpoint_path): class NoNorm (line 161) | class NoNorm(nn.Module): method __init__ (line 162) | def __init__(self, feat_size, eps=None): method forward (line 167) | def forward(self, input_tensor: torch.Tensor) -> torch.Tensor: class MobileBertEmbeddings (line 174) | class MobileBertEmbeddings(nn.Module): method __init__ (line 177) | def __init__(self, config): method forward (line 197) | def forward( class MobileBertSelfAttention (line 248) | class MobileBertSelfAttention(nn.Module): method __init__ (line 249) | def __init__(self, config): method transpose_for_scores (line 262) | def transpose_for_scores(self, x): method forward (line 267) | def forward( class MobileBertSelfOutput (line 306) | class MobileBertSelfOutput(nn.Module): method __init__ (line 307) | def __init__(self, config): method forward (line 315) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class MobileBertAttention (line 323) | class MobileBertAttention(nn.Module): method __init__ (line 324) | def __init__(self, config): method prune_heads (line 330) | def prune_heads(self, heads): method forward (line 348) | def forward( class MobileBertIntermediate (line 373) | class MobileBertIntermediate(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 382) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OutputBottleneck (line 388) | class OutputBottleneck(nn.Module): method __init__ (line 389) | def __init__(self, config): method forward (line 395) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class MobileBertOutput (line 402) | class MobileBertOutput(nn.Module): method __init__ (line 403) | def __init__(self, config): method forward (line 413) | def forward( class BottleneckLayer (line 426) | class BottleneckLayer(nn.Module): method __init__ (line 427) | def __init__(self, config): method forward (line 432) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Bottleneck (line 438) | class Bottleneck(nn.Module): method __init__ (line 439) | def __init__(self, config): method forward (line 447) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class FFNOutput (line 474) | class FFNOutput(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 480) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class FFNLayer (line 486) | class FFNLayer(nn.Module): method __init__ (line 487) | def __init__(self, config): method forward (line 492) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertLayer (line 498) | class MobileBertLayer(nn.Module): method __init__ (line 499) | def __init__(self, config): method forward (line 512) | def forward( class MobileBertEncoder (line 561) | class MobileBertEncoder(nn.Module): method __init__ (line 562) | def __init__(self, config): method forward (line 566) | def forward( class MobileBertPooler (line 603) | class MobileBertPooler(nn.Module): method __init__ (line 604) | def __init__(self, config): method forward (line 610) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertPredictionHeadTransform (line 622) | class MobileBertPredictionHeadTransform(nn.Module): method __init__ (line 623) | def __init__(self, config): method forward (line 632) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertLMPredictionHead (line 639) | class MobileBertLMPredictionHead(nn.Module): method __init__ (line 640) | def __init__(self, config): method forward (line 651) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertOnlyMLMHead (line 658) | class MobileBertOnlyMLMHead(nn.Module): method __init__ (line 659) | def __init__(self, config): method forward (line 663) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MobileBertPreTrainingHeads (line 668) | class MobileBertPreTrainingHeads(nn.Module): method __init__ (line 669) | def __init__(self, config): method forward (line 674) | def forward(self, sequence_output: torch.Tensor, pooled_output: torch.... class MobileBertPreTrainedModel (line 680) | 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 850) | def forward( class MobileBertForPreTraining (line 927) | class MobileBertForPreTraining(MobileBertPreTrainedModel): method __init__ (line 928) | def __init__(self, config): method get_output_embeddings (line 936) | def get_output_embeddings(self): method set_output_embeddings (line 939) | def set_output_embeddings(self, new_embeddigs): method resize_token_embeddings (line 942) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 952) | def forward( class MobileBertForMaskedLM (line 1033) | class MobileBertForMaskedLM(MobileBertPreTrainedModel): method __init__ (line 1037) | def __init__(self, config): method get_output_embeddings (line 1046) | def get_output_embeddings(self): method set_output_embeddings (line 1049) | def set_output_embeddings(self, new_embeddigs): method resize_token_embeddings (line 1052) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 1068) | def forward( class MobileBertOnlyNSPHead (line 1121) | class MobileBertOnlyNSPHead(nn.Module): method __init__ (line 1122) | def __init__(self, config): method forward (line 1126) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class MobileBertForNextSentencePrediction (line 1135) | class MobileBertForNextSentencePrediction(MobileBertPreTrainedModel): method __init__ (line 1136) | def __init__(self, config): method forward (line 1147) | def forward( class MobileBertForSequenceClassification (line 1239) | class MobileBertForSequenceClassification(MobileBertPreTrainedModel): method __init__ (line 1240) | def __init__(self, config): method forward (line 1264) | def forward( class MobileBertForQuestionAnswering (line 1344) | class MobileBertForQuestionAnswering(MobileBertPreTrainedModel): method __init__ (line 1348) | def __init__(self, config): method forward (line 1369) | def forward( class MobileBertForMultipleChoice (line 1452) | class MobileBertForMultipleChoice(MobileBertPreTrainedModel): method __init__ (line 1453) | def __init__(self, config): method forward (line 1475) | def forward( class MobileBertForTokenClassification (line 1550) | class MobileBertForTokenClassification(MobileBertPreTrainedModel): method __init__ (line 1554) | def __init__(self, config): method forward (line 1577) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/mobilebert/modeling_tf_mobilebert.py class TFMobileBertPreTrainingLoss (line 92) | class TFMobileBertPreTrainingLoss: method hf_compute_loss (line 99) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFMobileBertIntermediate (line 122) | class TFMobileBertIntermediate(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, config, **kwargs): method call (line 133) | def call(self, hidden_states): class TFLayerNorm (line 140) | class TFLayerNorm(tf.keras.layers.LayerNormalization): method __init__ (line 141) | def __init__(self, feat_size, *args, **kwargs): class TFNoNorm (line 145) | class TFNoNorm(tf.keras.layers.Layer): method __init__ (line 146) | def __init__(self, feat_size, epsilon=None, **kwargs): method build (line 150) | def build(self, input_shape): method call (line 154) | def call(self, inputs: tf.Tensor): class TFMobileBertEmbeddings (line 161) | class TFMobileBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 164) | def __init__(self, config, **kwargs): method build (line 183) | def build(self, input_shape): method call (line 207) | def call(self, input_ids=None, position_ids=None, token_type_ids=None,... class TFMobileBertSelfAttention (line 266) | class TFMobileBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 267) | def __init__(self, config, **kwargs): method transpose_for_scores (line 293) | def transpose_for_scores(self, x, batch_size): method call (line 298) | def call( class TFMobileBertSelfOutput (line 344) | class TFMobileBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 345) | def __init__(self, config, **kwargs): method call (line 357) | def call(self, hidden_states, residual_tensor, training=False): class TFMobileBertAttention (line 365) | class TFMobileBertAttention(tf.keras.layers.Layer): method __init__ (line 366) | def __init__(self, config, **kwargs): method prune_heads (line 371) | def prune_heads(self, heads): method call (line 374) | def call( class TFOutputBottleneck (line 394) | class TFOutputBottleneck(tf.keras.layers.Layer): method __init__ (line 395) | def __init__(self, config, **kwargs): method call (line 403) | def call(self, hidden_states, residual_tensor, training=False): class TFMobileBertOutput (line 410) | class TFMobileBertOutput(tf.keras.layers.Layer): method __init__ (line 411) | def __init__(self, config, **kwargs): method call (line 425) | def call(self, hidden_states, residual_tensor_1, residual_tensor_2, tr... class TFBottleneckLayer (line 436) | class TFBottleneckLayer(tf.keras.layers.Layer): method __init__ (line 437) | def __init__(self, config, **kwargs): method call (line 444) | def call(self, inputs): class TFBottleneck (line 450) | class TFBottleneck(tf.keras.layers.Layer): method __init__ (line 451) | def __init__(self, config, **kwargs): method call (line 459) | def call(self, hidden_states): class TFFFNOutput (line 486) | class TFFFNOutput(tf.keras.layers.Layer): method __init__ (line 487) | def __init__(self, config, **kwargs): method call (line 494) | def call(self, hidden_states, residual_tensor): class TFFFNLayer (line 500) | class TFFFNLayer(tf.keras.layers.Layer): method __init__ (line 501) | def __init__(self, config, **kwargs): method call (line 506) | def call(self, hidden_states): class TFMobileBertLayer (line 512) | class TFMobileBertLayer(tf.keras.layers.Layer): method __init__ (line 513) | def __init__(self, config, **kwargs): method call (line 526) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMobileBertEncoder (line 572) | class TFMobileBertEncoder(tf.keras.layers.Layer): method __init__ (line 573) | def __init__(self, config, **kwargs): method call (line 579) | def call( class TFMobileBertPooler (line 615) | class TFMobileBertPooler(tf.keras.layers.Layer): method __init__ (line 616) | def __init__(self, config, **kwargs): method call (line 627) | def call(self, hidden_states): class TFMobileBertPredictionHeadTransform (line 638) | class TFMobileBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 639) | def __init__(self, config, **kwargs): method call (line 650) | def call(self, hidden_states): class TFMobileBertLMPredictionHead (line 657) | class TFMobileBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 658) | def __init__(self, config, **kwargs): method build (line 664) | def build(self, input_shape): method get_output_embeddings (line 680) | def get_output_embeddings(self): method set_output_embeddings (line 683) | def set_output_embeddings(self, value): method get_bias (line 687) | def get_bias(self): method set_bias (line 690) | def set_bias(self, value): method call (line 694) | def call(self, hidden_states): class TFMobileBertMLMHead (line 701) | class TFMobileBertMLMHead(tf.keras.layers.Layer): method __init__ (line 702) | def __init__(self, config, **kwargs): method call (line 706) | def call(self, sequence_output): class TFMobileBertMainLayer (line 712) | class TFMobileBertMainLayer(tf.keras.layers.Layer): method __init__ (line 715) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 728) | def get_input_embeddings(self): method set_input_embeddings (line 731) | def set_input_embeddings(self, value): method _prune_heads (line 735) | def _prune_heads(self, heads_to_prune): method call (line 743) | def call( class TFMobileBertPreTrainedModel (line 827) | class TFMobileBertPreTrainedModel(TFPreTrainedModel): class TFMobileBertForPreTrainingOutput (line 838) | class TFMobileBertForPreTrainingOutput(ModelOutput): class TFMobileBertModel (line 970) | class TFMobileBertModel(TFMobileBertPreTrainedModel): method __init__ (line 971) | def __init__(self, config, *inputs, **kwargs): method call (line 983) | def call( method serving_output (line 1011) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFMobileBertForPreTraining (line 1030) | class TFMobileBertForPreTraining(TFMobileBertPreTrainedModel, TFMobileBe... method __init__ (line 1031) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1037) | def get_lm_head(self): method get_prefix_bias_name (line 1040) | def get_prefix_bias_name(self): method call (line 1047) | def call( method serving_output (line 1112) | def serving_output(self, output): class TFMobileBertForMaskedLM (line 1125) | class TFMobileBertForMaskedLM(TFMobileBertPreTrainedModel, TFMaskedLangu... method __init__ (line 1133) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1139) | def get_lm_head(self): method get_prefix_bias_name (line 1142) | def get_prefix_bias_name(self): method call (line 1156) | def call( method serving_output (line 1205) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFMobileBertOnlyNSPHead (line 1212) | class TFMobileBertOnlyNSPHead(tf.keras.layers.Layer): method __init__ (line 1213) | def __init__(self, config, **kwargs): method call (line 1217) | def call(self, pooled_output): class TFMobileBertForNextSentencePrediction (line 1226) | class TFMobileBertForNextSentencePrediction(TFMobileBertPreTrainedModel,... method __init__ (line 1230) | def __init__(self, config, *inputs, **kwargs): method call (line 1239) | def call( method serving_output (line 1304) | def serving_output(self, output: TFNextSentencePredictorOutput) -> TFN... class TFMobileBertForSequenceClassification (line 1318) | class TFMobileBertForSequenceClassification(TFMobileBertPreTrainedModel,... method __init__ (line 1328) | def __init__(self, config, *inputs, **kwargs): method call (line 1351) | def call( method serving_output (line 1402) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFMobileBertForQuestionAnswering (line 1416) | class TFMobileBertForQuestionAnswering(TFMobileBertPreTrainedModel, TFQu... method __init__ (line 1426) | def __init__(self, config, *inputs, **kwargs): method call (line 1447) | def call( method serving_output (line 1509) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... class TFMobileBertForMultipleChoice (line 1525) | class TFMobileBertForMultipleChoice(TFMobileBertPreTrainedModel, TFMulti... method __init__ (line 1535) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1545) | def dummy_inputs(self): method call (line 1564) | def call( method serving (line 1639) | def serving(self, inputs: Dict[str, tf.Tensor]): method serving_output (line 1645) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFMobileBertForTokenClassification (line 1659) | class TFMobileBertForTokenClassification(TFMobileBertPreTrainedModel, TF... method __init__ (line 1670) | def __init__(self, config, *inputs, **kwargs): method call (line 1693) | def call( method serving_output (line 1742) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... FILE: benchmark/third_party/transformers/src/transformers/models/mobilebert/tokenization_mobilebert.py function load_vocab (line 43) | def load_vocab(vocab_file): function whitespace_tokenize (line 55) | def whitespace_tokenize(text): class MobileBertTokenizer (line 65) | class MobileBertTokenizer(PreTrainedTokenizer): method __init__ (line 112) | def __init__( method do_lower_case (line 159) | def do_lower_case(self): method vocab_size (line 163) | def vocab_size(self): method get_vocab (line 166) | def get_vocab(self): method _tokenize (line 169) | def _tokenize(self, text): method _convert_token_to_id (line 183) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 187) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 191) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 196) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 221) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 249) | def create_token_type_ids_from_sequences( method save_vocabulary (line 278) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 300) | class BasicTokenizer(object): 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 450) | class WordpieceTokenizer(object): 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: benchmark/third_party/transformers/src/transformers/models/mobilebert/tokenization_mobilebert_fast.py class MobileBertTokenizerFast (line 46) | class MobileBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 92) | def __init__( method build_inputs_with_special_tokens (line 134) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 158) | def create_token_type_ids_from_sequences( method save_vocabulary (line 187) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/mobilevit/configuration_mobilevit.py class MobileViTConfig (line 46) | class MobileViTConfig(PretrainedConfig): method __init__ (line 116) | def __init__( class MobileViTOnnxConfig (line 168) | class MobileViTOnnxConfig(OnnxConfig): method inputs (line 173) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 177) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 184) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/mobilevit/convert_mlcvnets_to_pytorch.py function get_mobilevit_config (line 40) | def get_mobilevit_config(mobilevit_name): function rename_key (line 74) | def rename_key(name, base_model=False): function convert_state_dict (line 153) | def convert_state_dict(orig_state_dict, model, base_model=False): function prepare_img (line 189) | def prepare_img(): function convert_movilevit_checkpoint (line 196) | def convert_movilevit_checkpoint(mobilevit_name, checkpoint_path, pytorc... FILE: benchmark/third_party/transformers/src/transformers/models/mobilevit/feature_extraction_mobilevit.py class MobileViTFeatureExtractor (line 35) | class MobileViTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtr... method __init__ (line 65) | def __init__( method __call__ (line 83) | def __call__( method post_process_semantic_segmentation (line 161) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: benchmark/third_party/transformers/src/transformers/models/mobilevit/modeling_mobilevit.py function make_divisible (line 74) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class MobileViTConvLayer (line 89) | class MobileViTConvLayer(nn.Module): method __init__ (line 90) | def __init__( method forward (line 144) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTInvertedResidual (line 153) | class MobileViTInvertedResidual(nn.Module): method __init__ (line 158) | def __init__( method forward (line 191) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTMobileNetLayer (line 201) | class MobileViTMobileNetLayer(nn.Module): method __init__ (line 202) | def __init__( method forward (line 218) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTSelfAttention (line 224) | class MobileViTSelfAttention(nn.Module): method __init__ (line 225) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method transpose_for_scores (line 244) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 249) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTSelfOutput (line 275) | class MobileViTSelfOutput(nn.Module): method __init__ (line 276) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method forward (line 281) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTAttention (line 287) | class MobileViTAttention(nn.Module): method __init__ (line 288) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method prune_heads (line 294) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 312) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTIntermediate (line 318) | class MobileViTIntermediate(nn.Module): method __init__ (line 319) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 327) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTOutput (line 333) | class MobileViTOutput(nn.Module): method __init__ (line 334) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 339) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MobileViTTransformerLayer (line 346) | class MobileViTTransformerLayer(nn.Module): method __init__ (line 347) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 355) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTTransformer (line 365) | class MobileViTTransformer(nn.Module): method __init__ (line 366) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method forward (line 378) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTLayer (line 384) | class MobileViTLayer(nn.Module): method __init__ (line 389) | def __init__( method unfolding (line 447) | def unfolding(self, features: torch.Tensor) -> Tuple[torch.Tensor, Dict]: method folding (line 490) | def folding(self, patches: torch.Tensor, info_dict: Dict) -> torch.Ten... method forward (line 519) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTEncoder (line 545) | class MobileViTEncoder(nn.Module): method __init__ (line 546) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 620) | def forward( class MobileViTPreTrainedModel (line 653) | class MobileViTPreTrainedModel(PreTrainedModel): method _init_weights (line 664) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 676) | def _set_gradient_checkpointing(self, module, value=False): class MobileViTModel (line 709) | class MobileViTModel(MobileViTPreTrainedModel): method __init__ (line 710) | def __init__(self, config: MobileViTConfig, expand_output: bool = True): method _prune_heads (line 736) | def _prune_heads(self, heads_to_prune): method forward (line 755) | def forward( class MobileViTForImageClassification (line 804) | class MobileViTForImageClassification(MobileViTPreTrainedModel): method __init__ (line 805) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 828) | def forward( class MobileViTASPPPooling (line 883) | class MobileViTASPPPooling(nn.Module): method __init__ (line 884) | def __init__(self, config: MobileViTConfig, in_channels: int, out_chan... method forward (line 899) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTASPP (line 907) | class MobileViTASPP(nn.Module): method __init__ (line 912) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 955) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTDeepLabV3 (line 966) | class MobileViTDeepLabV3(nn.Module): method __init__ (line 971) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 987) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTForSemanticSegmentation (line 1000) | class MobileViTForSemanticSegmentation(MobileViTPreTrainedModel): method __init__ (line 1001) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 1013) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/mobilevit/modeling_tf_mobilevit.py function make_divisible (line 68) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class TFMobileViTConvLayer (line 83) | class TFMobileViTConvLayer(tf.keras.layers.Layer): method __init__ (line 84) | def __init__( method call (line 135) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTInvertedResidual (line 145) | class TFMobileViTInvertedResidual(tf.keras.layers.Layer): method __init__ (line 150) | def __init__( method call (line 183) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTMobileNetLayer (line 193) | class TFMobileViTMobileNetLayer(tf.keras.layers.Layer): method __init__ (line 194) | def __init__( method call (line 217) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTSelfAttention (line 223) | class TFMobileViTSelfAttention(tf.keras.layers.Layer): method __init__ (line 224) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method transpose_for_scores (line 245) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 250) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTSelfOutput (line 275) | class TFMobileViTSelfOutput(tf.keras.layers.Layer): method __init__ (line 276) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method call (line 281) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTAttention (line 287) | class TFMobileViTAttention(tf.keras.layers.Layer): method __init__ (line 288) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method prune_heads (line 293) | def prune_heads(self, heads): method call (line 296) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTIntermediate (line 302) | class TFMobileViTIntermediate(tf.keras.layers.Layer): method __init__ (line 303) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 311) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMobileViTOutput (line 317) | class TFMobileViTOutput(tf.keras.layers.Layer): method __init__ (line 318) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 323) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFMobileViTTransformerLayer (line 330) | class TFMobileViTTransformerLayer(tf.keras.layers.Layer): method __init__ (line 331) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 343) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTTransformer (line 353) | class TFMobileViTTransformer(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method call (line 367) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTLayer (line 373) | class TFMobileViTLayer(tf.keras.layers.Layer): method __init__ (line 378) | def __init__( method unfolding (line 433) | def unfolding(self, features: tf.Tensor) -> Tuple[tf.Tensor, Dict]: method folding (line 477) | def folding(self, patches: tf.Tensor, info_dict: Dict) -> tf.Tensor: method call (line 505) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTEncoder (line 531) | class TFMobileViTEncoder(tf.keras.layers.Layer): method __init__ (line 532) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 610) | def call( class TFMobileViTMainLayer (line 632) | class TFMobileViTMainLayer(tf.keras.layers.Layer): method __init__ (line 635) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method _prune_heads (line 657) | def _prune_heads(self, heads_to_prune): method call (line 665) | def call( class TFMobileViTPreTrainedModel (line 727) | class TFMobileViTPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 738) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 758) | def serving(self, inputs): class TFMobileViTModel (line 831) | class TFMobileViTModel(TFMobileViTPreTrainedModel): method __init__ (line 832) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method call (line 849) | def call( method serving_output (line 860) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFMobileViTForImageClassification (line 876) | class TFMobileViTForImageClassification(TFMobileViTPreTrainedModel, TFSe... method __init__ (line 877) | def __init__(self, config: MobileViTConfig, *inputs, **kwargs) -> None: method call (line 898) | def call( method serving_output (line 929) | def serving_output(self, output: TFImageClassifierOutputWithNoAttentio... class TFMobileViTASPPPooling (line 934) | class TFMobileViTASPPPooling(tf.keras.layers.Layer): method __init__ (line 935) | def __init__(self, config: MobileViTConfig, out_channels: int, **kwarg... method call (line 950) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTASPP (line 958) | class TFMobileViTASPP(tf.keras.layers.Layer): method __init__ (line 963) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 1009) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTDeepLabV3 (line 1023) | class TFMobileViTDeepLabV3(tf.keras.layers.Layer): method __init__ (line 1028) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 1044) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTForSemanticSegmentation (line 1057) | class TFMobileViTForSemanticSegmentation(TFMobileViTPreTrainedModel): method __init__ (line 1058) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method hf_compute_loss (line 1065) | def hf_compute_loss(self, logits, labels): method call (line 1088) | def call( method serving_output (line 1163) | def serving_output( FILE: benchmark/third_party/transformers/src/transformers/models/mpnet/configuration_mpnet.py class MPNetConfig (line 29) | class MPNetConfig(PretrainedConfig): method __init__ (line 84) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/mpnet/modeling_mpnet.py class MPNetPreTrainedModel (line 54) | class MPNetPreTrainedModel(PreTrainedModel): method _init_weights (line 59) | def _init_weights(self, module): class MPNetEmbeddings (line 76) | class MPNetEmbeddings(nn.Module): method __init__ (line 77) | def __init__(self, config): method forward (line 89) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... method create_position_ids_from_inputs_embeds (line 115) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class MPNetSelfAttention (line 133) | class MPNetSelfAttention(nn.Module): method __init__ (line 134) | def __init__(self, config): method transpose_for_scores (line 153) | def transpose_for_scores(self, x): method forward (line 158) | def forward( class MPNetAttention (line 207) | class MPNetAttention(nn.Module): method __init__ (line 208) | def __init__(self, config): method prune_heads (line 216) | def prune_heads(self, heads): method forward (line 232) | def forward( class MPNetIntermediate (line 254) | class MPNetIntermediate(nn.Module): method __init__ (line 255) | def __init__(self, config): method forward (line 263) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetOutput (line 270) | class MPNetOutput(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 MPNetLayer (line 284) | class MPNetLayer(nn.Module): method __init__ (line 285) | def __init__(self, config): method forward (line 291) | def forward( class MPNetEncoder (line 316) | class MPNetEncoder(nn.Module): method __init__ (line 317) | def __init__(self, config): method forward (line 324) | def forward( method compute_position_bias (line 366) | def compute_position_bias(self, x, position_ids=None, num_buckets=32): method relative_position_bucket (line 385) | def relative_position_bucket(relative_position, num_buckets=32, max_di... class MPNetPooler (line 406) | class MPNetPooler(nn.Module): method __init__ (line 407) | def __init__(self, config): method forward (line 412) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetModel (line 483) | class MPNetModel(MPNetPreTrainedModel): method __init__ (line 487) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 498) | def get_input_embeddings(self): method set_input_embeddings (line 501) | def set_input_embeddings(self, value): method _prune_heads (line 504) | def _prune_heads(self, heads_to_prune): method forward (line 519) | def forward( class MPNetForMaskedLM (line 576) | class MPNetForMaskedLM(MPNetPreTrainedModel): method __init__ (line 580) | def __init__(self, config): method get_output_embeddings (line 589) | def get_output_embeddings(self): method set_output_embeddings (line 592) | def set_output_embeddings(self, new_embeddings): method forward (line 602) | def forward( class MPNetLMHead (line 653) | class MPNetLMHead(nn.Module): method __init__ (line 656) | def __init__(self, config): method forward (line 667) | def forward(self, features, **kwargs): class MPNetForSequenceClassification (line 685) | class MPNetForSequenceClassification(MPNetPreTrainedModel): method __init__ (line 688) | def __init__(self, config): method forward (line 705) | def forward( class MPNetForMultipleChoice (line 780) | class MPNetForMultipleChoice(MPNetPreTrainedModel): method __init__ (line 783) | def __init__(self, config): method forward (line 800) | def forward( class MPNetForTokenClassification (line 871) | class MPNetForTokenClassification(MPNetPreTrainedModel): method __init__ (line 875) | def __init__(self, config): method forward (line 893) | def forward( class MPNetClassificationHead (line 945) | class MPNetClassificationHead(nn.Module): method __init__ (line 948) | def __init__(self, config): method forward (line 954) | def forward(self, features, **kwargs): class MPNetForQuestionAnswering (line 971) | class MPNetForQuestionAnswering(MPNetPreTrainedModel): method __init__ (line 975) | def __init__(self, config): method forward (line 992) | def forward( function create_position_ids_from_input_ids (line 1066) | def create_position_ids_from_input_ids(input_ids, padding_idx): FILE: benchmark/third_party/transformers/src/transformers/models/mpnet/modeling_tf_mpnet.py class TFMPNetPreTrainedModel (line 70) | class TFMPNetPreTrainedModel(TFPreTrainedModel): method serving (line 87) | def serving(self, inputs): class TFMPNetEmbeddings (line 93) | class TFMPNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 96) | def __init__(self, config, **kwargs): method build (line 107) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 124) | def create_position_ids_from_input_ids(self, input_ids): method call (line 138) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMPNetPooler (line 180) | class TFMPNetPooler(tf.keras.layers.Layer): method __init__ (line 181) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 191) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMPNetSelfAttention (line 200) | class TFMPNetSelfAttention(tf.keras.layers.Layer): method __init__ (line 201) | def __init__(self, config, **kwargs): method transpose_for_scores (line 229) | def transpose_for_scores(self, x, batch_size): method call (line 235) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMPNetAttention (line 273) | class TFMPNetAttention(tf.keras.layers.Layer): method __init__ (line 274) | def __init__(self, config, **kwargs): method prune_heads (line 281) | def prune_heads(self, heads): method call (line 284) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... class TFMPNetIntermediate (line 294) | class TFMPNetIntermediate(tf.keras.layers.Layer): method __init__ (line 295) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 307) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMPNetOutput (line 315) | class TFMPNetOutput(tf.keras.layers.Layer): method __init__ (line 316) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 325) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFMPNetLayer (line 333) | class TFMPNetLayer(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config, **kwargs): method call (line 341) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMPNetEncoder (line 355) | class TFMPNetEncoder(tf.keras.layers.Layer): method __init__ (line 356) | def __init__(self, config, **kwargs): method build (line 369) | def build(self, input_shape): method call (line 379) | def call( method _relative_position_bucket (line 422) | def _relative_position_bucket(relative_position, num_buckets=32, max_d... method compute_position_bias (line 443) | def compute_position_bias(self, x, position_ids=None): class TFMPNetMainLayer (line 467) | class TFMPNetMainLayer(tf.keras.layers.Layer): method __init__ (line 470) | def __init__(self, config, **kwargs): method get_input_embeddings (line 485) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 489) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 494) | def _prune_heads(self, heads_to_prune): method call (line 502) | def call( class TFMPNetModel (line 682) | class TFMPNetModel(TFMPNetPreTrainedModel): method __init__ (line 683) | def __init__(self, config, *inputs, **kwargs): method call (line 695) | def call( method serving_output (line 720) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFMPNetLMHead (line 732) | class TFMPNetLMHead(tf.keras.layers.Layer): method __init__ (line 735) | def __init__(self, config, input_embeddings, **kwargs): method build (line 750) | def build(self, input_shape): method get_output_embeddings (line 755) | def get_output_embeddings(self): method set_output_embeddings (line 758) | def set_output_embeddings(self, value): method get_bias (line 762) | def get_bias(self): method set_bias (line 765) | def set_bias(self, value): method call (line 769) | def call(self, hidden_states): class TFMPNetForMaskedLM (line 785) | class TFMPNetForMaskedLM(TFMPNetPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 789) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 795) | def get_lm_head(self): method get_prefix_bias_name (line 798) | def get_prefix_bias_name(self): method call (line 810) | def call( method serving_output (line 857) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFMPNetClassificationHead (line 864) | class TFMPNetClassificationHead(tf.keras.layers.Layer): method __init__ (line 867) | def __init__(self, config, **kwargs): method call (line 880) | def call(self, features, training=False): class TFMPNetForSequenceClassification (line 896) | class TFMPNetForSequenceClassification(TFMPNetPreTrainedModel, TFSequenc... method __init__ (line 900) | def __init__(self, config, *inputs, **kwargs): method call (line 915) | def call( method serving_output (line 963) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFMPNetForMultipleChoice (line 977) | class TFMPNetForMultipleChoice(TFMPNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 978) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 988) | def dummy_inputs(self): method call (line 1005) | def call( method serving (line 1074) | def serving(self, inputs): method serving_output (line 1080) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFMPNetForTokenClassification (line 1094) | class TFMPNetForTokenClassification(TFMPNetPreTrainedModel, TFTokenClass... method __init__ (line 1098) | def __init__(self, config, *inputs, **kwargs): method call (line 1116) | def call( method serving_output (line 1163) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFMPNetForQuestionAnswering (line 1177) | class TFMPNetForQuestionAnswering(TFMPNetPreTrainedModel, TFQuestionAnsw... method __init__ (line 1181) | def __init__(self, config, *inputs, **kwargs): method call (line 1198) | def call( method serving_output (line 1259) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/mpnet/tokenization_mpnet.py function load_vocab (line 46) | def load_vocab(vocab_file): function whitespace_tokenize (line 57) | def whitespace_tokenize(text): class MPNetTokenizer (line 66) | class MPNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method do_lower_case (line 194) | def do_lower_case(self): method vocab_size (line 198) | def vocab_size(self): method get_vocab (line 201) | def get_vocab(self): method _tokenize (line 204) | def _tokenize(self, text): method _convert_token_to_id (line 218) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 222) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 226) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 231) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 256) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 283) | def create_token_type_ids_from_sequences( method save_vocabulary (line 306) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 328) | class BasicTokenizer(object): method __init__ (line 348) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 356) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 393) | def _run_strip_accents(self, text): method _run_split_on_punc (line 404) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 426) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 439) | def _is_chinese_char(self, cp): method _clean_text (line 463) | def _clean_text(self, text): class WordpieceTokenizer (line 478) | class WordpieceTokenizer(object): method __init__ (line 481) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 486) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/mpnet/tokenization_mpnet_fast.py class MPNetTokenizerFast (line 51) | class MPNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 113) | def __init__( method mask_token (line 158) | def mask_token(self) -> str: method mask_token (line 173) | def mask_token(self, value): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 191) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/mt5/configuration_mt5.py class MT5Config (line 26) | class MT5Config(PretrainedConfig): method __init__ (line 72) | def __init__( method hidden_size (line 138) | def hidden_size(self): method num_attention_heads (line 142) | def num_attention_heads(self): method num_hidden_layers (line 146) | def num_hidden_layers(self): class MT5OnnxConfig (line 150) | class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 173) | def default_onnx_opset(self) -> int: method atol_for_validation (line 177) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/mt5/modeling_flax_mt5.py function shift_tokens_right (line 31) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxMT5Model (line 43) | class FlaxMT5Model(FlaxT5Model): class FlaxMT5EncoderModel (line 69) | class FlaxMT5EncoderModel(FlaxT5EncoderModel): class FlaxMT5ForConditionalGeneration (line 95) | class FlaxMT5ForConditionalGeneration(FlaxT5ForConditionalGeneration): FILE: benchmark/third_party/transformers/src/transformers/models/mt5/modeling_mt5.py class MT5Model (line 28) | class MT5Model(T5Model): class MT5ForConditionalGeneration (line 61) | class MT5ForConditionalGeneration(T5ForConditionalGeneration): class MT5EncoderModel (line 91) | class MT5EncoderModel(T5EncoderModel): FILE: benchmark/third_party/transformers/src/transformers/models/mt5/modeling_tf_mt5.py class TFMT5Model (line 28) | class TFMT5Model(TFT5Model): class TFMT5ForConditionalGeneration (line 52) | class TFMT5ForConditionalGeneration(TFT5ForConditionalGeneration): class TFMT5EncoderModel (line 76) | class TFMT5EncoderModel(TFT5EncoderModel): FILE: benchmark/third_party/transformers/src/transformers/models/mvp/configuration_mvp.py class MvpConfig (line 29) | class MvpConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/mvp/modeling_mvp.py function shift_tokens_right (line 78) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 95) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 111) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MvpLearnedPositionalEmbedding (line 126) | class MvpLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 131) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 137) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MvpAttention (line 148) | class MvpAttention(nn.Module): method __init__ (line 151) | def __init__( method _shape (line 178) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 181) | def forward( class MvpEncoderLayer (line 303) | class MvpEncoderLayer(nn.Module): method __init__ (line 304) | def __init__(self, config: MvpConfig): method forward (line 320) | def forward( class MvpDecoderLayer (line 375) | class MvpDecoderLayer(nn.Module): method __init__ (line 376) | def __init__(self, config: MvpConfig): method forward (line 402) | def forward( class MvpClassificationHead (line 501) | class MvpClassificationHead(nn.Module): method __init__ (line 504) | def __init__( method forward (line 516) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MvpPrompt (line 525) | class MvpPrompt(nn.Module): method __init__ (line 528) | def __init__(self, config, num_layers, num_heads): method forward (line 542) | def forward(self, prompt_ids: torch.Tensor) -> Tuple[torch.Tensor]: class MvpPreTrainedModel (line 550) | class MvpPreTrainedModel(PreTrainedModel): method _init_weights (line 556) | def _init_weights(self, module): method _set_gradient_checkpointing (line 567) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 572) | def dummy_inputs(self): class MvpEncoder (line 789) | class MvpEncoder(MvpPreTrainedModel): method __init__ (line 800) | def __init__( method get_input_embeddings (line 838) | def get_input_embeddings(self): method set_input_embeddings (line 841) | def set_input_embeddings(self, value): method forward (line 844) | def forward( class MvpDecoder (line 986) | class MvpDecoder(MvpPreTrainedModel): method __init__ (line 996) | def __init__( method get_input_embeddings (line 1036) | def get_input_embeddings(self): method set_input_embeddings (line 1039) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 1042) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1060) | def forward( class MvpModel (line 1293) | class MvpModel(MvpPreTrainedModel): method __init__ (line 1296) | def __init__(self, config: MvpConfig): method get_input_embeddings (line 1309) | def get_input_embeddings(self): method set_input_embeddings (line 1312) | def set_input_embeddings(self, value): method get_encoder (line 1317) | def get_encoder(self): method get_decoder (line 1320) | def get_decoder(self): method set_lightweight_tuning (line 1323) | def set_lightweight_tuning(self): method forward (line 1339) | def forward( class MvpForConditionalGeneration (line 1431) | class MvpForConditionalGeneration(MvpPreTrainedModel): method __init__ (line 1432) | def __init__(self, config: MvpConfig): method get_encoder (line 1441) | def get_encoder(self): method get_decoder (line 1444) | def get_decoder(self): method resize_token_embeddings (line 1447) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1452) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1461) | def get_output_embeddings(self): method set_output_embeddings (line 1464) | def set_output_embeddings(self, new_embeddings): method set_lightweight_tuning (line 1467) | def set_lightweight_tuning(self): method forward (line 1474) | def forward( method prepare_inputs_for_generation (line 1552) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1580) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1584) | def _reorder_cache(past, beam_idx): class MvpForSequenceClassification (line 1601) | class MvpForSequenceClassification(MvpPreTrainedModel): method __init__ (line 1604) | def __init__(self, config: MvpConfig, **kwargs): method set_lightweight_tuning (line 1617) | def set_lightweight_tuning(self): method forward (line 1623) | def forward( class MvpForQuestionAnswering (line 1728) | class MvpForQuestionAnswering(MvpPreTrainedModel): method __init__ (line 1731) | def __init__(self, config): method set_lightweight_tuning (line 1742) | def set_lightweight_tuning(self): method forward (line 1748) | def forward( class MvpDecoderWrapper (line 1844) | class MvpDecoderWrapper(MvpPreTrainedModel): method __init__ (line 1850) | def __init__(self, config): method forward (line 1854) | def forward(self, *args, **kwargs): class MvpForCausalLM (line 1858) | class MvpForCausalLM(MvpPreTrainedModel): method __init__ (line 1859) | def __init__(self, config): method get_input_embeddings (line 1871) | def get_input_embeddings(self): method set_input_embeddings (line 1874) | def set_input_embeddings(self, value): method get_output_embeddings (line 1877) | def get_output_embeddings(self): method set_output_embeddings (line 1880) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1883) | def set_decoder(self, decoder): method get_decoder (line 1886) | def get_decoder(self): method set_lightweight_tuning (line 1889) | def set_lightweight_tuning(self): method forward (line 1894) | def forward( method prepare_inputs_for_generation (line 2036) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 2052) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/mvp/tokenization_mvp.py function bytes_to_unicode (line 51) | def bytes_to_unicode(): function get_pairs (line 75) | def get_pairs(word): class MvpTokenizer (line 89) | class MvpTokenizer(PreTrainedTokenizer): method __init__ (line 170) | def __init__( method vocab_size (line 224) | def vocab_size(self): method get_vocab (line 227) | def get_vocab(self): method bpe (line 230) | def bpe(self, token): method _tokenize (line 272) | def _tokenize(self, text): method _convert_token_to_id (line 282) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 286) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 290) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 296) | 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 350) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 377) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 400) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: benchmark/third_party/transformers/src/transformers/models/mvp/tokenization_mvp_fast.py class MvpTokenizerFast (line 53) | class MvpTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 137) | def __init__( method mask_token (line 207) | def mask_token(self) -> str: method mask_token (line 222) | def mask_token(self, value): method _batch_encode_plus (line 233) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 244) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 255) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 259) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 266) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/nezha/configuration_nezha.py class NezhaConfig (line 9) | class NezhaConfig(PretrainedConfig): method __init__ (line 69) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/nezha/modeling_nezha.py function load_tf_weights_in_nezha (line 68) | def load_tf_weights_in_nezha(model, config, tf_checkpoint_path): class NezhaRelativePositionsEncoding (line 141) | class NezhaRelativePositionsEncoding(nn.Module): method __init__ (line 144) | def __init__(self, length, depth, max_relative_position=127): method forward (line 169) | def forward(self, length): class NezhaEmbeddings (line 173) | class NezhaEmbeddings(nn.Module): method __init__ (line 176) | def __init__(self, config): method forward (line 189) | def forward( class NezhaSelfAttention (line 224) | class NezhaSelfAttention(nn.Module): method __init__ (line 225) | def __init__(self, config): method transpose_for_scores (line 249) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 254) | def forward( class NezhaSelfOutput (line 360) | class NezhaSelfOutput(nn.Module): method __init__ (line 361) | def __init__(self, config): method forward (line 367) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NezhaAttention (line 374) | class NezhaAttention(nn.Module): method __init__ (line 375) | def __init__(self, config): method prune_heads (line 381) | def prune_heads(self, heads): method forward (line 399) | def forward( class NezhaIntermediate (line 424) | class NezhaIntermediate(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 433) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaOutput (line 440) | class NezhaOutput(nn.Module): method __init__ (line 441) | def __init__(self, config): method forward (line 447) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NezhaLayer (line 454) | class NezhaLayer(nn.Module): method __init__ (line 455) | def __init__(self, config): method forward (line 469) | def forward( method feed_forward_chunk (line 534) | def feed_forward_chunk(self, attention_output): class NezhaEncoder (line 541) | class NezhaEncoder(nn.Module): method __init__ (line 542) | def __init__(self, config): method forward (line 548) | def forward( class NezhaPooler (line 639) | class NezhaPooler(nn.Module): method __init__ (line 640) | def __init__(self, config): method forward (line 645) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaPredictionHeadTransform (line 655) | class NezhaPredictionHeadTransform(nn.Module): method __init__ (line 656) | def __init__(self, config): method forward (line 665) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaLMPredictionHead (line 673) | class NezhaLMPredictionHead(nn.Module): method __init__ (line 674) | def __init__(self, config): method forward (line 687) | def forward(self, hidden_states): class NezhaOnlyMLMHead (line 694) | class NezhaOnlyMLMHead(nn.Module): method __init__ (line 695) | def __init__(self, config): method forward (line 699) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NezhaOnlyNSPHead (line 705) | class NezhaOnlyNSPHead(nn.Module): method __init__ (line 706) | def __init__(self, config): method forward (line 710) | def forward(self, pooled_output): class NezhaPreTrainingHeads (line 716) | class NezhaPreTrainingHeads(nn.Module): method __init__ (line 717) | def __init__(self, config): method forward (line 722) | def forward(self, sequence_output, pooled_output): class NezhaPreTrainedModel (line 728) | class NezhaPreTrainedModel(PreTrainedModel): method _init_weights (line 740) | def _init_weights(self, module): method _set_gradient_checkpointing (line 756) | def _set_gradient_checkpointing(self, module, value=False): class NezhaForPreTrainingOutput (line 762) | class NezhaForPreTrainingOutput(ModelOutput): class NezhaModel (line 860) | class NezhaModel(NezhaPreTrainedModel): method __init__ (line 873) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 885) | def get_input_embeddings(self): method set_input_embeddings (line 888) | def set_input_embeddings(self, value): method _prune_heads (line 891) | def _prune_heads(self, heads_to_prune): method forward (line 906) | def forward( class NezhaForPreTraining (line 1040) | class NezhaForPreTraining(NezhaPreTrainedModel): method __init__ (line 1041) | def __init__(self, config): method get_output_embeddings (line 1050) | def get_output_embeddings(self): method set_output_embeddings (line 1053) | def set_output_embeddings(self, new_embeddings): method forward (line 1058) | def forward( class NezhaForMaskedLM (line 1140) | class NezhaForMaskedLM(NezhaPreTrainedModel): method __init__ (line 1145) | def __init__(self, config): method get_output_embeddings (line 1160) | def get_output_embeddings(self): method set_output_embeddings (line 1163) | def set_output_embeddings(self, new_embeddings): method forward (line 1173) | def forward( method prepare_inputs_for_generation (line 1228) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class NezhaForNextSentencePrediction (line 1249) | class NezhaForNextSentencePrediction(NezhaPreTrainedModel): method __init__ (line 1250) | def __init__(self, config): method forward (line 1261) | def forward( class NezhaForSequenceClassification (line 1352) | class NezhaForSequenceClassification(NezhaPreTrainedModel): method __init__ (line 1353) | def __init__(self, config): method forward (line 1375) | def forward( class NezhaForMultipleChoice (line 1452) | class NezhaForMultipleChoice(NezhaPreTrainedModel): method __init__ (line 1453) | def __init__(self, config): method forward (line 1473) | def forward( class NezhaForTokenClassification (line 1545) | class NezhaForTokenClassification(NezhaPreTrainedModel): method __init__ (line 1549) | def __init__(self, config): method forward (line 1570) | def forward( class NezhaForQuestionAnswering (line 1628) | class NezhaForQuestionAnswering(NezhaPreTrainedModel): method __init__ (line 1632) | def __init__(self, config): method forward (line 1649) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/nllb/tokenization_nllb.py class NllbTokenizer (line 49) | class NllbTokenizer(PreTrainedTokenizer): method __init__ (line 128) | def __init__( method __getstate__ (line 205) | def __getstate__(self): method __setstate__ (line 211) | def __setstate__(self, d): method vocab_size (line 222) | def vocab_size(self): method src_lang (line 226) | def src_lang(self) -> str: method src_lang (line 230) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 234) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 264) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 291) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 316) | def _build_translation_inputs( method get_vocab (line 328) | def get_vocab(self): method _tokenize (line 333) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 336) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 345) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 351) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 356) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 373) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 385) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 388) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 391) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 397) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/nllb/tokenization_nllb_fast.py class NllbTokenizerFast (line 61) | class NllbTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 140) | def __init__( method src_lang (line 197) | def src_lang(self) -> str: method src_lang (line 201) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 205) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 234) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 259) | def _build_translation_inputs( method prepare_seq2seq_batch (line 271) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 283) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 286) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 289) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 304) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 319) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/nystromformer/configuration_nystromformer.py class NystromformerConfig (line 29) | class NystromformerConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/nystromformer/modeling_nystromformer.py class NystromformerEmbeddings (line 53) | class NystromformerEmbeddings(nn.Module): method __init__ (line 56) | def __init__(self, config): method forward (line 76) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class NystromformerSelfAttention (line 111) | class NystromformerSelfAttention(nn.Module): method __init__ (line 112) | def __init__(self, config, position_embedding_type=None): method iterative_inv (line 153) | def iterative_inv(self, mat, n_iter=6): method transpose_for_scores (line 174) | def transpose_for_scores(self, layer): method forward (line 179) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerSelfOutput (line 242) | class NystromformerSelfOutput(nn.Module): method __init__ (line 243) | def __init__(self, config): method forward (line 249) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NystromformerAttention (line 256) | class NystromformerAttention(nn.Module): method __init__ (line 257) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 263) | def prune_heads(self, heads): method forward (line 281) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerIntermediate (line 289) | class NystromformerIntermediate(nn.Module): method __init__ (line 290) | def __init__(self, config): method forward (line 298) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerOutput (line 305) | class NystromformerOutput(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 312) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NystromformerLayer (line 319) | class NystromformerLayer(nn.Module): method __init__ (line 320) | def __init__(self, config): method forward (line 329) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 342) | def feed_forward_chunk(self, attention_output): class NystromformerEncoder (line 348) | class NystromformerEncoder(nn.Module): method __init__ (line 349) | def __init__(self, config): method forward (line 355) | def forward( class NystromformerPredictionHeadTransform (line 404) | class NystromformerPredictionHeadTransform(nn.Module): method __init__ (line 405) | def __init__(self, config): method forward (line 414) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerLMPredictionHead (line 422) | class NystromformerLMPredictionHead(nn.Module): method __init__ (line 423) | def __init__(self, config): method forward (line 436) | def forward(self, hidden_states): class NystromformerOnlyMLMHead (line 443) | class NystromformerOnlyMLMHead(nn.Module): method __init__ (line 444) | def __init__(self, config): method forward (line 448) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NystromformerPreTrainedModel (line 453) | class NystromformerPreTrainedModel(PreTrainedModel): method _init_weights (line 464) | def _init_weights(self, module): method _set_gradient_checkpointing (line 480) | def _set_gradient_checkpointing(self, module, value=False): class NystromformerModel (line 550) | class NystromformerModel(NystromformerPreTrainedModel): method __init__ (line 551) | def __init__(self, config): method get_input_embeddings (line 561) | def get_input_embeddings(self): method set_input_embeddings (line 564) | def set_input_embeddings(self, value): method _prune_heads (line 567) | def _prune_heads(self, heads_to_prune): method forward (line 582) | def forward( class NystromformerForMaskedLM (line 662) | class NystromformerForMaskedLM(NystromformerPreTrainedModel): method __init__ (line 663) | def __init__(self, config): method get_output_embeddings (line 672) | def get_output_embeddings(self): method set_output_embeddings (line 675) | def set_output_embeddings(self, new_embeddings): method forward (line 685) | def forward( class NystromformerClassificationHead (line 738) | class NystromformerClassificationHead(nn.Module): method __init__ (line 741) | def __init__(self, config): method forward (line 749) | def forward(self, features, **kwargs): class NystromformerForSequenceClassification (line 766) | class NystromformerForSequenceClassification(NystromformerPreTrainedModel): method __init__ (line 767) | def __init__(self, config): method forward (line 783) | def forward( class NystromformerForMultipleChoice (line 860) | class NystromformerForMultipleChoice(NystromformerPreTrainedModel): method __init__ (line 861) | def __init__(self, config): method forward (line 880) | def forward( class NystromformerForTokenClassification (line 956) | class NystromformerForTokenClassification(NystromformerPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method forward (line 975) | def forward( class NystromformerForQuestionAnswering (line 1035) | class NystromformerForQuestionAnswering(NystromformerPreTrainedModel): method __init__ (line 1036) | def __init__(self, config): method forward (line 1055) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/openai/configuration_openai.py class OpenAIGPTConfig (line 27) | class OpenAIGPTConfig(PretrainedConfig): method __init__ (line 123) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/openai/convert_openai_original_tf_checkpoint_to_pytorch.py function convert_openai_checkpoint_to_pytorch (line 29) | def convert_openai_checkpoint_to_pytorch(openai_checkpoint_folder_path, ... FILE: benchmark/third_party/transformers/src/transformers/models/openai/modeling_openai.py function load_tf_weights_in_openai_gpt (line 56) | def load_tf_weights_in_openai_gpt(model, config, openai_checkpoint_folde... class Attention (line 137) | class Attention(nn.Module): method __init__ (line 138) | def __init__(self, nx, n_positions, config, scale=False): method prune_heads (line 157) | def prune_heads(self, heads): method _attn (line 172) | def _attn(self, q, k, v, attention_mask=None, head_mask=None, output_a... method merge_heads (line 197) | def merge_heads(self, x): method split_heads (line 202) | def split_heads(self, x, k=False): method forward (line 210) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class MLP (line 228) | class MLP(nn.Module): method __init__ (line 229) | def __init__(self, n_state, config): # in MLP: n_state=3072 (4 * n_embd) method forward (line 237) | def forward(self, x): class Block (line 243) | class Block(nn.Module): method __init__ (line 244) | def __init__(self, n_positions, config, scale=False): method forward (line 252) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class OpenAIGPTPreTrainedModel (line 269) | class OpenAIGPTPreTrainedModel(PreTrainedModel): method _init_weights (line 280) | def _init_weights(self, module): class OpenAIGPTDoubleHeadsModelOutput (line 298) | class OpenAIGPTDoubleHeadsModelOutput(ModelOutput): class OpenAIGPTModel (line 402) | class OpenAIGPTModel(OpenAIGPTPreTrainedModel): method __init__ (line 403) | def __init__(self, config): method get_input_embeddings (line 415) | def get_input_embeddings(self): method set_input_embeddings (line 418) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 421) | def _prune_heads(self, heads_to_prune): method forward (line 435) | def forward( class OpenAIGPTLMHeadModel (line 533) | class OpenAIGPTLMHeadModel(OpenAIGPTPreTrainedModel): method __init__ (line 534) | def __init__(self, config): method get_output_embeddings (line 542) | def get_output_embeddings(self): method set_output_embeddings (line 545) | def set_output_embeddings(self, new_embeddings): method forward (line 555) | def forward( method prepare_inputs_for_generation (line 610) | def prepare_inputs_for_generation(self, input_ids: torch.LongTensor, *... class OpenAIGPTDoubleHeadsModel (line 623) | class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel): method __init__ (line 624) | def __init__(self, config): method get_output_embeddings (line 635) | def get_output_embeddings(self): method set_output_embeddings (line 638) | def set_output_embeddings(self, new_embeddings): method forward (line 643) | def forward( class OpenAIGPTForSequenceClassification (line 749) | class OpenAIGPTForSequenceClassification(OpenAIGPTPreTrainedModel): method __init__ (line 750) | def __init__(self, config): method forward (line 766) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/openai/modeling_tf_openai.py class TFAttention (line 62) | class TFAttention(tf.keras.layers.Layer): method __init__ (line 63) | def __init__(self, nx, config, scale=False, **kwargs): method prune_heads (line 82) | def prune_heads(self, heads): method causal_attention_mask (line 86) | def causal_attention_mask(nd, ns): method _attn (line 96) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 126) | def merge_heads(self, x): method split_heads (line 132) | def split_heads(self, x): method call (line 138) | def call(self, x, attention_mask, head_mask, output_attentions, traini... class TFMLP (line 156) | class TFMLP(tf.keras.layers.Layer): method __init__ (line 157) | def __init__(self, n_state, config, **kwargs): method call (line 165) | def call(self, x, training=False): class TFBlock (line 172) | class TFBlock(tf.keras.layers.Layer): method __init__ (line 173) | def __init__(self, config, scale=False, **kwargs): method call (line 181) | def call(self, x, attention_mask, head_mask, output_attentions, traini... class TFOpenAIGPTMainLayer (line 194) | class TFOpenAIGPTMainLayer(tf.keras.layers.Layer): method __init__ (line 197) | def __init__(self, config, *inputs, **kwargs): method build (line 216) | def build(self, input_shape): method get_input_embeddings (line 226) | def get_input_embeddings(self): method set_input_embeddings (line 229) | def set_input_embeddings(self, value): method _prune_heads (line 233) | def _prune_heads(self, heads_to_prune): method call (line 240) | def call( class TFOpenAIGPTPreTrainedModel (line 370) | class TFOpenAIGPTPreTrainedModel(TFPreTrainedModel): method serving (line 387) | def serving(self, inputs): class TFOpenAIGPTDoubleHeadsModelOutput (line 394) | class TFOpenAIGPTDoubleHeadsModelOutput(ModelOutput): class TFOpenAIGPTModel (line 524) | class TFOpenAIGPTModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 525) | def __init__(self, config, *inputs, **kwargs): method call (line 537) | def call( method serving_output (line 566) | def serving_output(self, output): class TFOpenAIGPTLMHeadModel (line 580) | class TFOpenAIGPTLMHeadModel(TFOpenAIGPTPreTrainedModel, TFCausalLanguag... method __init__ (line 581) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 587) | def get_output_embeddings(self): method set_output_embeddings (line 590) | def set_output_embeddings(self, value): method call (line 601) | def call( method serving_output (line 655) | def serving_output(self, output: TFCausalLMOutput) -> TFCausalLMOutput: method prepare_inputs_for_generation (line 661) | def prepare_inputs_for_generation(self, inputs, **kwargs): class TFOpenAIGPTDoubleHeadsModel (line 674) | class TFOpenAIGPTDoubleHeadsModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 675) | def __init__(self, config, *inputs, **kwargs): method call (line 686) | def call( method serving (line 780) | def serving(self, inputs): method serving_output (line 785) | def serving_output(self, output): class TFOpenAIGPTForSequenceClassification (line 809) | class TFOpenAIGPTForSequenceClassification(TFOpenAIGPTPreTrainedModel, T... method __init__ (line 810) | def __init__(self, config, *inputs, **kwargs): method call (line 829) | def call( method serving_output (line 916) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... FILE: benchmark/third_party/transformers/src/transformers/models/openai/tokenization_openai.py function whitespace_tokenize (line 46) | def whitespace_tokenize(text): class BasicTokenizer (line 56) | class BasicTokenizer(object): method __init__ (line 76) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 84) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 121) | def _run_strip_accents(self, text): method _run_split_on_punc (line 132) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 154) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 167) | def _is_chinese_char(self, cp): method _clean_text (line 191) | def _clean_text(self, text): function get_pairs (line 205) | def get_pairs(word): function text_standardize (line 218) | def text_standardize(text): class OpenAIGPTTokenizer (line 233) | class OpenAIGPTTokenizer(PreTrainedTokenizer): method __init__ (line 259) | def __init__(self, vocab_file, merges_file, unk_token="", **kwargs): method do_lower_case (line 284) | def do_lower_case(self): method vocab_size (line 288) | def vocab_size(self): method get_vocab (line 291) | def get_vocab(self): method bpe (line 294) | def bpe(self, token): method _tokenize (line 338) | def _tokenize(self, text): method _convert_token_to_id (line 353) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 357) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 361) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 366) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/openai/tokenization_openai_fast.py class OpenAIGPTTokenizerFast (line 40) | class OpenAIGPTTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 67) | def __init__(self, vocab_file=None, merges_file=None, tokenizer_file=N... method do_lower_case (line 71) | def do_lower_case(self): method save_vocabulary (line 74) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/opt/configuration_opt.py class OPTConfig (line 32) | class OPTConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/opt/convert_opt_original_pytorch_checkpoint_to_pytorch.py function load_checkpoint (line 31) | def load_checkpoint(checkpoint_path): function convert_opt_checkpoint (line 60) | def convert_opt_checkpoint(checkpoint_path, pytorch_dump_folder_path, co... FILE: benchmark/third_party/transformers/src/transformers/models/opt/modeling_flax_opt.py class FlaxOPTAttention (line 109) | class FlaxOPTAttention(nn.Module): method setup (line 118) | def setup(self) -> None: method _split_heads (line 144) | def _split_heads(self, hidden_states): method _merge_heads (line 147) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 151) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 182) | def __call__( class FlaxOPTDecoderLayer (line 276) | class FlaxOPTDecoderLayer(nn.Module): method setup (line 280) | def setup(self) -> None: method __call__ (line 305) | def __call__( class FlaxOPTDecoderLayerCollection (line 362) | class FlaxOPTDecoderLayerCollection(nn.Module): method setup (line 366) | def setup(self): method __call__ (line 373) | def __call__( class FlaxOPTLearnedPositionalEmbedding (line 406) | class FlaxOPTLearnedPositionalEmbedding(nn.Embed): method setup (line 411) | def setup(self): method __call__ (line 417) | def __call__(self, positions): class FlaxOPTDecoder (line 423) | class FlaxOPTDecoder(nn.Module): method setup (line 428) | 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 691) | class FlaxOPTModel(FlaxOPTPreTrainedModel): class FlaxOPTForCausalLMModule (line 706) | class FlaxOPTForCausalLMModule(nn.Module): method setup (line 710) | def setup(self): method __call__ (line 719) | def __call__( class FlaxOPTForCausalLM (line 767) | class FlaxOPTForCausalLM(FlaxOPTPreTrainedModel): method prepare_inputs_for_generation (line 770) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 792) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/opt/modeling_opt.py function _make_causal_mask (line 68) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 83) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class OPTLearnedPositionalEmbedding (line 97) | class OPTLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 102) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 108) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... class OPTAttention (line 121) | class OPTAttention(nn.Module): method __init__ (line 124) | def __init__( method _shape (line 151) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 154) | def forward( class OPTDecoderLayer (line 279) | class OPTDecoderLayer(nn.Module): method __init__ (line 280) | def __init__(self, config: OPTConfig): method forward (line 298) | def forward( class OPTPreTrainedModel (line 397) | class OPTPreTrainedModel(PreTrainedModel): method _init_weights (line 405) | def _init_weights(self, module): method _set_gradient_checkpointing (line 416) | def _set_gradient_checkpointing(self, module, value=False): class OPTDecoder (line 483) | class OPTDecoder(OPTPreTrainedModel): method __init__ (line 491) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 526) | def get_input_embeddings(self): method set_input_embeddings (line 529) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 533) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 553) | def forward( class OPTModel (line 741) | class OPTModel(OPTPreTrainedModel): method __init__ (line 742) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 748) | def get_input_embeddings(self): method set_input_embeddings (line 751) | def set_input_embeddings(self, value): method get_decoder (line 754) | def get_decoder(self): method forward (line 765) | def forward( class OPTForCausalLM (line 809) | class OPTForCausalLM(OPTPreTrainedModel): method __init__ (line 812) | def __init__(self, config): method get_input_embeddings (line 822) | def get_input_embeddings(self): method set_input_embeddings (line 825) | def set_input_embeddings(self, value): method get_output_embeddings (line 828) | def get_output_embeddings(self): method set_output_embeddings (line 831) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 834) | def set_decoder(self, decoder): method get_decoder (line 837) | def get_decoder(self): method forward (line 841) | def forward( method prepare_inputs_for_generation (line 970) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 986) | def _reorder_cache(past, beam_idx): class OPTForSequenceClassification (line 1008) | class OPTForSequenceClassification(OPTPreTrainedModel): method __init__ (line 1011) | def __init__(self, config: OPTConfig): method forward (line 1029) | def forward( method get_input_embeddings (line 1117) | def get_input_embeddings(self): method set_input_embeddings (line 1120) | def set_input_embeddings(self, value): class OPTForQuestionAnswering (line 1131) | class OPTForQuestionAnswering(OPTPreTrainedModel): method __init__ (line 1134) | def __init__(self, config: OPTConfig): method forward (line 1144) | def forward( method get_input_embeddings (line 1246) | def get_input_embeddings(self): method set_input_embeddings (line 1249) | def set_input_embeddings(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/opt/modeling_tf_opt.py function _make_causal_mask (line 63) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 81) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFOPTLearnedPositionalEmbedding (line 94) | class TFOPTLearnedPositionalEmbedding(TFSharedEmbeddings): method __init__ (line 99) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 105) | def call(self, attention_mask, past_key_values_length: int = 0): class TFOPTAttention (line 119) | class TFOPTAttention(tf.keras.layers.Layer): method __init__ (line 122) | def __init__( method _shape (line 150) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 153) | def call( class TFOPTDecoderLayer (line 272) | class TFOPTDecoderLayer(tf.keras.layers.Layer): method __init__ (line 273) | def __init__(self, config: OPTConfig, **kwargs): method call (line 292) | def call( class TFOPTPreTrainedModel (line 404) | class TFOPTPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 416) | def dummy_inputs(self): method serving (line 433) | def serving(self, inputs): class TFOPTDecoder (line 487) | class TFOPTDecoder(tf.keras.layers.Layer): method __init__ (line 490) | def __init__(self, config: OPTConfig, load_weight_prefix=None, **kwargs): method get_embed_tokens (line 524) | def get_embed_tokens(self): method set_embed_tokens (line 527) | def set_embed_tokens(self, embed_tokens): method set_input_embeddings (line 530) | def set_input_embeddings(self, new_embeddings): method get_input_embeddings (line 534) | def get_input_embeddings(self): method _prepare_decoder_attention_mask (line 537) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 554) | def call( class TFOPTMainLayer (line 719) | class TFOPTMainLayer(tf.keras.layers.Layer): method __init__ (line 722) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 727) | def get_input_embeddings(self): method set_input_embeddings (line 730) | def set_input_embeddings(self, new_embeddings): method call (line 734) | def call( class TFOPTModel (line 785) | class TFOPTModel(TFOPTPreTrainedModel): method __init__ (line 788) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 793) | def get_input_embeddings(self): method set_input_embeddings (line 796) | def set_input_embeddings(self, new_embeddings): method call (line 808) | def call( method serving_output (line 853) | def serving_output(self, output): class TFOPTForCausalLM (line 873) | class TFOPTForCausalLM(TFOPTPreTrainedModel, TFCausalLanguageModelingLoss): method __init__ (line 876) | def __init__(self, config: OPTConfig, **kwargs): method get_output_embeddings (line 881) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 884) | def prepare_inputs_for_generation(self, inputs, past=None, use_cache=N... method call (line 907) | def call( method serving_output (line 1019) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/owlvit/configuration_owlvit.py class OwlViTTextConfig (line 41) | class OwlViTTextConfig(PretrainedConfig): method __init__ (line 97) | def __init__( method from_pretrained (line 132) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class OwlViTVisionConfig (line 149) | class OwlViTVisionConfig(PretrainedConfig): method __init__ (line 203) | def __init__( method from_pretrained (line 235) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class OwlViTConfig (line 252) | class OwlViTConfig(PretrainedConfig): method __init__ (line 279) | def __init__( method from_pretrained (line 307) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_text_vision_configs (line 319) | def from_text_vision_configs(cls, text_config: Dict, vision_config: Di... method to_dict (line 333) | def to_dict(self): class OwlViTOnnxConfig (line 347) | class OwlViTOnnxConfig(OnnxConfig): method inputs (line 349) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 359) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 370) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 373) | def generate_dummy_inputs( method default_onnx_opset (line 390) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/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 327) | def convert_owlvit_checkpoint(pt_backbone, flax_params, attn_params, pyt... FILE: benchmark/third_party/transformers/src/transformers/models/owlvit/feature_extraction_owlvit.py function center_to_corners_format (line 35) | def center_to_corners_format(x): class OwlViTFeatureExtractor (line 45) | class OwlViTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtract... method __init__ (line 79) | def __init__( method post_process (line 108) | def post_process(self, outputs, target_sizes): method __call__ (line 146) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/owlvit/modeling_owlvit.py function _expand_mask (line 52) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 67) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function owlvit_loss (line 72) | def owlvit_loss(similarity: torch.Tensor) -> torch.Tensor: class OwlViTOutput (line 79) | class OwlViTOutput(ModelOutput): method to_tuple (line 109) | def to_tuple(self) -> Tuple[Any]: class OwlViTObjectDetectionOutput (line 117) | class OwlViTObjectDetectionOutput(ModelOutput): class OwlViTVisionEmbeddings (line 161) | class OwlViTVisionEmbeddings(nn.Module): method __init__ (line 162) | def __init__(self, config: OwlViTVisionConfig): method forward (line 181) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class OwlViTTextEmbeddings (line 193) | class OwlViTTextEmbeddings(nn.Module): method __init__ (line 194) | def __init__(self, config: OwlViTTextConfig): method forward (line 202) | def forward( class OwlViTAttention (line 223) | class OwlViTAttention(nn.Module): method __init__ (line 226) | def __init__(self, config): method _shape (line 245) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 248) | def forward( class OwlViTMLP (line 328) | class OwlViTMLP(nn.Module): method __init__ (line 329) | def __init__(self, config): method forward (line 336) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OwlViTEncoderLayer (line 344) | class OwlViTEncoderLayer(nn.Module): method __init__ (line 345) | def __init__(self, config: OwlViTConfig): method forward (line 353) | def forward( class OwlViTPreTrainedModel (line 394) | class OwlViTPreTrainedModel(PreTrainedModel): method _init_weights (line 405) | def _init_weights(self, module): method _set_gradient_checkpointing (line 447) | def _set_gradient_checkpointing(self, module, value=False): class OwlViTEncoder (line 542) | class OwlViTEncoder(nn.Module): method __init__ (line 551) | def __init__(self, config: OwlViTConfig): method forward (line 556) | def forward( class OwlViTTextTransformer (line 637) | class OwlViTTextTransformer(nn.Module): method __init__ (line 638) | def __init__(self, config: OwlViTTextConfig): method forward (line 648) | def forward( method _build_causal_attention_mask (line 708) | def _build_causal_attention_mask(self, bsz, seq_len): class OwlViTTextModel (line 718) | class OwlViTTextModel(OwlViTPreTrainedModel): method __init__ (line 721) | def __init__(self, config: OwlViTTextConfig): method get_input_embeddings (line 727) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 730) | def set_input_embeddings(self, value): method forward (line 735) | def forward( class OwlViTVisionTransformer (line 770) | class OwlViTVisionTransformer(nn.Module): method __init__ (line 771) | def __init__(self, config: OwlViTVisionConfig): method forward (line 782) | def forward( class OwlViTVisionModel (line 828) | class OwlViTVisionModel(OwlViTPreTrainedModel): method __init__ (line 832) | def __init__(self, config: OwlViTVisionConfig): method get_input_embeddings (line 838) | def get_input_embeddings(self) -> nn.Module: method forward (line 843) | def forward( class OwlViTModel (line 879) | class OwlViTModel(OwlViTPreTrainedModel): method __init__ (line 882) | def __init__(self, config: OwlViTConfig): method get_text_features (line 915) | def get_text_features( method get_image_features (line 960) | def get_image_features( method forward (line 1011) | def forward( class OwlViTBoxPredictionHead (line 1107) | class OwlViTBoxPredictionHead(nn.Module): method __init__ (line 1108) | def __init__(self, config: OwlViTConfig): method forward (line 1117) | def forward(self, image_features: torch.Tensor) -> torch.FloatTensor: class OwlViTClassPredictionHead (line 1126) | class OwlViTClassPredictionHead(nn.Module): method __init__ (line 1127) | def __init__(self, config: OwlViTConfig): method forward (line 1138) | def forward( class OwlViTForObjectDetection (line 1171) | class OwlViTForObjectDetection(OwlViTPreTrainedModel): method __init__ (line 1174) | def __init__(self, config: OwlViTConfig): method normalize_grid_corner_coordinates (line 1184) | def normalize_grid_corner_coordinates(self, feature_map: torch.FloatTe... method compute_box_bias (line 1205) | def compute_box_bias(self, feature_map: torch.FloatTensor) -> torch.Fl... method box_predictor (line 1221) | def box_predictor( method class_predictor (line 1244) | def class_predictor( method image_text_embedder (line 1263) | def image_text_embedder( method forward (line 1309) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/owlvit/processing_owlvit.py class OwlViTProcessor (line 28) | class OwlViTProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 46) | def __call__(self, text=None, images=None, padding="max_length", retur... method post_process (line 142) | def post_process(self, *args, **kwargs): method batch_decode (line 149) | def batch_decode(self, *args, **kwargs): method decode (line 156) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/configuration_pegasus.py class PegasusConfig (line 29) | class PegasusConfig(PretrainedConfig): method __init__ (line 106) | def __init__( method num_attention_heads (line 164) | def num_attention_heads(self) -> int: method hidden_size (line 168) | def hidden_size(self) -> int: FILE: benchmark/third_party/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 58) | def convert_pegasus(tf_weights: dict, cfg_updates: dict) -> PegasusForCo... function get_tf_weights_as_numpy (line 89) | def get_tf_weights_as_numpy(path="./ckpt/aeslc/model.ckpt-32000") -> Dict: function convert_pegasus_ckpt_to_pytorch (line 102) | def convert_pegasus_ckpt_to_pytorch(ckpt_path: str, save_dir: str): FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py function shift_tokens_right (line 215) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... function create_sinusoidal_positions (line 228) | def create_sinusoidal_positions(n_pos, dim, dtype): class FlaxPegasusAttention (line 239) | class FlaxPegasusAttention(nn.Module): method setup (line 248) | def setup(self) -> None: method _split_heads (line 274) | def _split_heads(self, hidden_states): method _merge_heads (line 277) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 281) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 312) | def __call__( class FlaxPegasusEncoderLayer (line 407) | class FlaxPegasusEncoderLayer(nn.Module): method setup (line 411) | def setup(self) -> None: method __call__ (line 434) | def __call__( class FlaxPegasusEncoderLayerCollection (line 464) | class FlaxPegasusEncoderLayerCollection(nn.Module): method setup (line 468) | def setup(self): method __call__ (line 475) | def __call__( class FlaxPegasusDecoderLayer (line 519) | class FlaxPegasusDecoderLayer(nn.Module): method setup (line 523) | def setup(self) -> None: method __call__ (line 556) | def __call__( class FlaxPegasusDecoderLayerCollection (line 608) | class FlaxPegasusDecoderLayerCollection(nn.Module): method setup (line 612) | def setup(self): method __call__ (line 619) | def __call__( class FlaxPegasusEncoder (line 678) | class FlaxPegasusEncoder(nn.Module): method setup (line 683) | def setup(self): method __call__ (line 697) | def __call__( class FlaxPegasusDecoder (line 747) | class FlaxPegasusDecoder(nn.Module): method setup (line 752) | def setup(self): method __call__ (line 767) | def __call__( class FlaxPegasusModule (line 825) | class FlaxPegasusModule(nn.Module): method setup (line 829) | def setup(self): method _get_encoder_module (line 839) | def _get_encoder_module(self): method _get_decoder_module (line 842) | def _get_decoder_module(self): method __call__ (line 845) | def __call__( class FlaxPegasusPreTrainedModel (line 894) | class FlaxPegasusPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 899) | def __init__( method init_weights (line 911) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 945) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 988) | def encode( method decode (line 1051) | def decode( method __call__ (line 1164) | def __call__( class FlaxPegasusModel (line 1228) | class FlaxPegasusModel(FlaxPegasusPreTrainedModel): class FlaxPegasusForConditionalGenerationModule (line 1240) | class FlaxPegasusForConditionalGenerationModule(nn.Module): method setup (line 1245) | def setup(self): method _get_encoder_module (line 1255) | def _get_encoder_module(self): method _get_decoder_module (line 1258) | def _get_decoder_module(self): method __call__ (line 1261) | def __call__( class FlaxPegasusForConditionalGeneration (line 1315) | class FlaxPegasusForConditionalGeneration(FlaxPegasusPreTrainedModel): method decode (line 1321) | def decode( method prepare_inputs_for_generation (line 1456) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1487) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/modeling_pegasus.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 78) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 94) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PegasusSinusoidalPositionalEmbedding (line 109) | class PegasusSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 112) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 117) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 134) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class PegasusAttention (line 144) | class PegasusAttention(nn.Module): method __init__ (line 147) | def __init__( method _shape (line 174) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 177) | def forward( class PegasusEncoderLayer (line 292) | class PegasusEncoderLayer(nn.Module): method __init__ (line 293) | def __init__(self, config: PegasusConfig): method forward (line 309) | def forward( class PegasusDecoderLayer (line 361) | class PegasusDecoderLayer(nn.Module): method __init__ (line 362) | def __init__(self, config: PegasusConfig): method forward (line 388) | def forward( class PegasusPreTrainedModel (line 478) | class PegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 483) | def _init_weights(self, module): method _set_gradient_checkpointing (line 496) | def _set_gradient_checkpointing(self, module, value=False): class PegasusEncoder (line 630) | class PegasusEncoder(PegasusPreTrainedModel): method __init__ (line 640) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method resize_position_embeddings (line 668) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 691) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 697) | def forward( class PegasusDecoder (line 831) | class PegasusDecoder(PegasusPreTrainedModel): method __init__ (line 840) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method get_input_embeddings (line 865) | def get_input_embeddings(self): method set_input_embeddings (line 868) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 872) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method resize_position_embeddings (line 892) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 915) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 921) | def forward( class PegasusModel (line 1142) | class PegasusModel(PegasusPreTrainedModel): method __init__ (line 1143) | def __init__(self, config: PegasusConfig): method get_input_embeddings (line 1155) | def get_input_embeddings(self): method set_input_embeddings (line 1158) | def set_input_embeddings(self, value): method get_encoder (line 1163) | def get_encoder(self): method get_decoder (line 1166) | def get_decoder(self): method resize_position_embeddings (line 1169) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1186) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1194) | def forward( class PegasusForConditionalGeneration (line 1291) | class PegasusForConditionalGeneration(PegasusPreTrainedModel): method __init__ (line 1301) | def __init__(self, config: PegasusConfig): method get_encoder (line 1310) | def get_encoder(self): method get_decoder (line 1313) | def get_decoder(self): method resize_token_embeddings (line 1316) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1321) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1330) | def get_output_embeddings(self): method set_output_embeddings (line 1333) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1336) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1353) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1362) | def forward( method prepare_inputs_for_generation (line 1441) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1469) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1473) | def _reorder_cache(past, beam_idx): class PegasusDecoderWrapper (line 1484) | class PegasusDecoderWrapper(PegasusPreTrainedModel): method __init__ (line 1490) | def __init__(self, config): method forward (line 1494) | def forward(self, *args, **kwargs): class PegasusForCausalLM (line 1498) | class PegasusForCausalLM(PegasusPreTrainedModel): method __init__ (line 1499) | def __init__(self, config): method get_input_embeddings (line 1511) | def get_input_embeddings(self): method set_input_embeddings (line 1514) | def set_input_embeddings(self, value): method get_output_embeddings (line 1517) | def get_output_embeddings(self): method set_output_embeddings (line 1520) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1523) | def set_decoder(self, decoder): method get_decoder (line 1526) | def get_decoder(self): method get_position_embeddings (line 1529) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1535) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1553) | def forward( method prepare_inputs_for_generation (line 1696) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1712) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/modeling_tf_pegasus.py function shift_tokens_right (line 65) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 90) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 108) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFPegasusSinusoidalPositionalEmbedding (line 122) | class TFPegasusSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 125) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 134) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 153) | def _init_weight(n_pos: int, dim: int): method call (line 170) | def call( class TFPegasusAttention (line 181) | class TFPegasusAttention(tf.keras.layers.Layer): method __init__ (line 184) | def __init__( method _shape (line 212) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 215) | def call( class TFPegasusEncoderLayer (line 335) | class TFPegasusEncoderLayer(tf.keras.layers.Layer): method __init__ (line 336) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 350) | def call( class TFPegasusDecoderLayer (line 392) | class TFPegasusDecoderLayer(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 420) | def call( class TFPegasusPreTrainedModel (line 501) | class TFPegasusPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 506) | def dummy_inputs(self): method serving (line 528) | def serving(self, inputs): class TFPegasusEncoder (line 679) | class TFPegasusEncoder(tf.keras.layers.Layer): method __init__ (line 689) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[tf.ke... method get_embed_tokens (line 707) | def get_embed_tokens(self): method set_embed_tokens (line 710) | def set_embed_tokens(self, embed_tokens): method call (line 714) | def call( class TFPegasusDecoder (line 855) | class TFPegasusDecoder(tf.keras.layers.Layer): method __init__ (line 865) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[tf.ke... method get_embed_tokens (line 882) | def get_embed_tokens(self): method set_embed_tokens (line 885) | def set_embed_tokens(self, embed_tokens): method call (line 889) | def call( class TFPegasusMainLayer (line 1099) | class TFPegasusMainLayer(tf.keras.layers.Layer): method __init__ (line 1102) | def __init__(self, config: PegasusConfig, **kwargs): method get_input_embeddings (line 1118) | def get_input_embeddings(self): method set_input_embeddings (line 1121) | def set_input_embeddings(self, new_embeddings): method call (line 1127) | def call( class TFPegasusModel (line 1214) | class TFPegasusModel(TFPegasusPreTrainedModel): method __init__ (line 1215) | def __init__(self, config: PegasusConfig, *inputs, **kwargs): method get_encoder (line 1220) | def get_encoder(self): method get_decoder (line 1223) | def get_decoder(self): method call (line 1234) | def call( method serving_output (line 1279) | def serving_output(self, output): class BiasLayer (line 1300) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1306) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1313) | def call(self, x): class TFPegasusForConditionalGeneration (line 1321) | class TFPegasusForConditionalGeneration(TFPegasusPreTrainedModel, TFCaus... method __init__ (line 1327) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1336) | def get_decoder(self): method get_encoder (line 1339) | def get_encoder(self): method get_output_embeddings (line 1342) | def get_output_embeddings(self): method set_output_embeddings (line 1345) | def set_output_embeddings(self, value): method get_bias (line 1348) | def get_bias(self): method set_bias (line 1351) | def set_bias(self, value): method call (line 1363) | def call( method serving_output (line 1445) | def serving_output(self, output): method prepare_inputs_for_generation (line 1465) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1504) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 1509) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/tokenization_pegasus.py class PegasusTokenizer (line 41) | class PegasusTokenizer(PreTrainedTokenizer): method __init__ (line 105) | def __init__( method vocab_size (line 186) | def vocab_size(self) -> int: method get_vocab (line 189) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 194) | def __getstate__(self): method __setstate__ (line 199) | def __setstate__(self, d): method _tokenize (line 209) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 213) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 222) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 232) | def convert_tokens_to_string(self, tokens): method num_special_tokens_to_add (line 237) | def num_special_tokens_to_add(self, pair=False): method _special_token_mask (line 241) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 247) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 258) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 283) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/pegasus/tokenization_pegasus_fast.py class PegasusTokenizerFast (line 51) | class PegasusTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 100) | def __init__( method _special_token_mask (line 157) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 169) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 180) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 201) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/pegasus_x/configuration_pegasus_x.py class PegasusXConfig (line 30) | class PegasusXConfig(PretrainedConfig): method __init__ (line 112) | def __init__( method num_attention_heads (line 178) | def num_attention_heads(self) -> int: method hidden_size (line 182) | def hidden_size(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/pegasus_x/modeling_pegasus_x.py class DimensionInfo (line 61) | class DimensionInfo: function shift_tokens_right (line 79) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 96) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 112) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PegasusXSinusoidalPositionalEmbedding (line 126) | class PegasusXSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 129) | def __init__(self, embed_dim, max_scale: int = 10000.0): method forward (line 135) | def forward(self, input_embeds: torch.Tensor, past_key_values_length: ... class PegasusXAttention (line 153) | class PegasusXAttention(nn.Module): method __init__ (line 156) | def __init__( method _shape (line 183) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 186) | def forward( class PegasusXGlobalLocalAttention (line 300) | class PegasusXGlobalLocalAttention(nn.Module): method __init__ (line 303) | def __init__( method _shape (line 331) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 334) | def forward( method compute_global_attention_representations (line 427) | def compute_global_attention_representations( method compute_local_attention_representations (line 470) | def compute_local_attention_representations( class PegasusXEncoderLayer (line 534) | class PegasusXEncoderLayer(nn.Module): method __init__ (line 535) | def __init__(self, stagger_blocks_this_layer: bool, config: PegasusXCo... method forward (line 555) | def forward( method pad_local_tokens (line 627) | def pad_local_tokens(cls, hidden_states, attention_mask, block_size): method unpad_local_tokens (line 643) | def unpad_local_tokens(cls, padded_hidden_states, block_size): class PegasusXDecoderLayer (line 649) | class PegasusXDecoderLayer(nn.Module): method __init__ (line 650) | def __init__(self, config: PegasusXConfig): method forward (line 678) | def forward( class PegasusXPreTrainedModel (line 761) | class PegasusXPreTrainedModel(PreTrainedModel): method _init_weights (line 766) | def _init_weights(self, module): method _set_gradient_checkpointing (line 775) | def _set_gradient_checkpointing(self, module, value=False): class PegasusXEncoder (line 893) | class PegasusXEncoder(PegasusXPreTrainedModel): method __init__ (line 903) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method resize_position_embeddings (line 934) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 953) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 959) | def forward( class PegasusXDecoder (line 1102) | class PegasusXDecoder(PegasusXPreTrainedModel): method __init__ (line 1111) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method get_input_embeddings (line 1131) | def get_input_embeddings(self): method set_input_embeddings (line 1134) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 1138) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method resize_position_embeddings (line 1158) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1177) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 1183) | def forward( class PegasusXModel (line 1377) | class PegasusXModel(PegasusXPreTrainedModel): method __init__ (line 1378) | def __init__(self, config: PegasusXConfig): method get_input_embeddings (line 1390) | def get_input_embeddings(self): method set_input_embeddings (line 1393) | def set_input_embeddings(self, value): method get_encoder (line 1398) | def get_encoder(self): method get_decoder (line 1401) | def get_decoder(self): method resize_position_embeddings (line 1404) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1421) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1429) | def forward( class PegasusXForConditionalGeneration (line 1518) | class PegasusXForConditionalGeneration(PegasusXPreTrainedModel): method __init__ (line 1527) | def __init__(self, config: PegasusXConfig): method get_encoder (line 1535) | def get_encoder(self): method get_decoder (line 1538) | def get_decoder(self): method resize_token_embeddings (line 1541) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1545) | def get_output_embeddings(self): method set_output_embeddings (line 1548) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1551) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1568) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1577) | def forward( method prepare_inputs_for_generation (line 1650) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1666) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1670) | def _reorder_cache(past, beam_idx): class PegasusXDecoderWrapper (line 1681) | class PegasusXDecoderWrapper(PegasusXPreTrainedModel): method __init__ (line 1687) | def __init__(self, config): method forward (line 1691) | def forward(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/perceiver/configuration_perceiver.py class PerceiverConfig (line 36) | class PerceiverConfig(PretrainedConfig): method __init__ (line 120) | 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: benchmark/third_party/transformers/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py function prepare_img (line 48) | def prepare_img(): function rename_keys (line 55) | def rename_keys(state_dict, architecture): function convert_perceiver_checkpoint (line 264) | def convert_perceiver_checkpoint(pickle_file, pytorch_dump_folder_path, ... FILE: benchmark/third_party/transformers/src/transformers/models/perceiver/feature_extraction_perceiver.py class PerceiverFeatureExtractor (line 38) | class PerceiverFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtr... method __init__ (line 72) | def __init__( method center_crop (line 94) | def center_crop(self, image): method __call__ (line 123) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/perceiver/modeling_perceiver.py class PerceiverModelOutput (line 62) | class PerceiverModelOutput(ModelOutput): class PerceiverDecoderOutput (line 93) | class PerceiverDecoderOutput(ModelOutput): class PerceiverMaskedLMOutput (line 111) | class PerceiverMaskedLMOutput(ModelOutput): class PerceiverClassifierOutput (line 142) | class PerceiverClassifierOutput(ModelOutput): class PerceiverEmbeddings (line 173) | class PerceiverEmbeddings(nn.Module): method __init__ (line 176) | def __init__(self, config): method forward (line 180) | def forward(self, batch_size: int): class PerceiverSelfAttention (line 184) | class PerceiverSelfAttention(nn.Module): method __init__ (line 187) | def __init__( method transpose_for_scores (line 228) | def transpose_for_scores(self, x, channels_per_head): method forward (line 233) | def forward( class PerceiverSelfOutput (line 299) | class PerceiverSelfOutput(nn.Module): method __init__ (line 300) | def __init__(self, config, input_channels, output_channels): method forward (line 304) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverAttention (line 309) | class PerceiverAttention(nn.Module): method __init__ (line 312) | def __init__( method prune_heads (line 360) | def prune_heads(self, heads): method forward (line 378) | def forward( class PerceiverMLP (line 409) | class PerceiverMLP(nn.Module): method __init__ (line 412) | def __init__(self, config, input_size, widening_factor): method forward (line 421) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverLayer (line 428) | class PerceiverLayer(nn.Module): method __init__ (line 429) | def __init__( method forward (line 457) | def forward( method feed_forward_chunk (line 488) | def feed_forward_chunk(self, attention_output): class PerceiverEncoder (line 494) | class PerceiverEncoder(nn.Module): method __init__ (line 497) | def __init__(self, config, kv_dim=None): method forward (line 544) | def forward( class PerceiverPreTrainedModel (line 609) | class PerceiverPreTrainedModel(PreTrainedModel): method _init_weights (line 619) | def _init_weights(self, module): class PerceiverModel (line 717) | class PerceiverModel(PerceiverPreTrainedModel): method __init__ (line 718) | def __init__( method get_input_embeddings (line 739) | def get_input_embeddings(self): method set_input_embeddings (line 742) | def set_input_embeddings(self, value): method _prune_heads (line 745) | def _prune_heads(self, heads_to_prune): method forward (line 755) | def forward( class PerceiverForMaskedLM (line 955) | class PerceiverForMaskedLM(PerceiverPreTrainedModel): method __init__ (line 956) | def __init__(self, config): method forward (line 988) | def forward( class PerceiverForSequenceClassification (line 1089) | class PerceiverForSequenceClassification(PerceiverPreTrainedModel): method __init__ (line 1090) | def __init__(self, config): method forward (line 1112) | def forward( class PerceiverForImageClassificationLearned (line 1214) | class PerceiverForImageClassificationLearned(PerceiverPreTrainedModel): method __init__ (line 1215) | def __init__(self, config): method forward (line 1247) | def forward( class PerceiverForImageClassificationFourier (line 1357) | class PerceiverForImageClassificationFourier(PerceiverPreTrainedModel): method __init__ (line 1358) | def __init__(self, config): method forward (line 1388) | def forward( class PerceiverForImageClassificationConvProcessing (line 1497) | class PerceiverForImageClassificationConvProcessing(PerceiverPreTrainedM... method __init__ (line 1498) | def __init__(self, config): method forward (line 1529) | def forward( class PerceiverForOpticalFlow (line 1638) | class PerceiverForOpticalFlow(PerceiverPreTrainedModel): method __init__ (line 1639) | def __init__(self, config): method forward (line 1687) | def forward( class PerceiverForMultimodalAutoencoding (line 1780) | class PerceiverForMultimodalAutoencoding(PerceiverPreTrainedModel): method __init__ (line 1781) | def __init__(self, config): method forward (line 1898) | def forward( function build_position_encoding (line 1988) | def build_position_encoding( class PerceiverAbstractDecoder (line 2025) | class PerceiverAbstractDecoder(nn.Module, metaclass=abc.ABCMeta): method decoder_query (line 2029) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method num_query_channels (line 2034) | def num_query_channels(self): method forward (line 2038) | def forward(self, query, z, query_mask=None): class PerceiverProjectionDecoder (line 2042) | class PerceiverProjectionDecoder(PerceiverAbstractDecoder): method __init__ (line 2051) | def __init__(self, config): method decoder_query (line 2055) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2058) | def forward( class PerceiverBasicDecoder (line 2068) | class PerceiverBasicDecoder(PerceiverAbstractDecoder): method __init__ (line 2104) | def __init__( method num_query_channels (line 2162) | def num_query_channels(self) -> int: method decoder_query (line 2175) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2223) | def forward( class PerceiverClassificationDecoder (line 2254) | class PerceiverClassificationDecoder(PerceiverAbstractDecoder): method __init__ (line 2265) | def __init__(self, config, **decoder_kwargs): method num_query_channels (line 2277) | def num_query_channels(self) -> int: method decoder_query (line 2280) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2285) | def forward( class PerceiverOpticalFlowDecoder (line 2300) | class PerceiverOpticalFlowDecoder(PerceiverAbstractDecoder): method __init__ (line 2303) | def __init__(self, config, output_image_shape, output_num_channels=2, ... method num_query_channels (line 2312) | def num_query_channels(self) -> int: method decoder_query (line 2315) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2320) | def forward( class PerceiverBasicVideoAutoencodingDecoder (line 2335) | class PerceiverBasicVideoAutoencodingDecoder(PerceiverAbstractDecoder): method __init__ (line 2349) | def __init__( method num_query_channels (line 2367) | def num_query_channels(self) -> int: method decoder_query (line 2370) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2378) | def forward( function restructure (line 2388) | def restructure(modality_sizes: ModalitySizeType, inputs: torch.Tensor) ... class PerceiverMultimodalDecoder (line 2412) | class PerceiverMultimodalDecoder(PerceiverAbstractDecoder): method __init__ (line 2438) | def __init__( method num_query_channels (line 2470) | def num_query_channels(self) -> int: method decoder_query (line 2475) | def decoder_query(self, inputs, modality_sizes, inputs_without_pos=Non... method forward (line 2509) | def forward( function space_to_depth (line 2523) | def space_to_depth(frames: torch.Tensor, temporal_block_size: int = 1, s... class Conv2dSamePadding (line 2583) | class Conv2dSamePadding(nn.Conv2d): method __init__ (line 2589) | def __init__(self, *args, **kwargs): method forward (line 2595) | def forward(self, input): class Conv2DDownsample (line 2599) | class Conv2DDownsample(nn.Module): method __init__ (line 2602) | def __init__( method forward (line 2629) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: function generate_fourier_features (line 2637) | def generate_fourier_features(pos, num_bands, max_resolution=(224, 224),... function build_linear_positions (line 2689) | def build_linear_positions(index_dims, output_range=(-1.0, 1.0)): class PerceiverAbstractPositionEncoding (line 2712) | class PerceiverAbstractPositionEncoding(nn.Module, metaclass=abc.ABCMeta): method num_dimensions (line 2717) | def num_dimensions(self) -> int: method output_size (line 2721) | def output_size(self, *args, **kwargs) -> int: method forward (line 2725) | def forward(self, batch_size, pos): class PerceiverTrainablePositionEncoding (line 2729) | class PerceiverTrainablePositionEncoding(PerceiverAbstractPositionEncodi... method __init__ (line 2732) | def __init__(self, index_dims, num_channels=128): method num_dimensions (line 2740) | def num_dimensions(self) -> int: method output_size (line 2745) | def output_size(self, *args, **kwargs) -> int: method forward (line 2748) | def forward(self, batch_size: int) -> torch.Tensor: function _check_or_build_spatial_positions (line 2756) | def _check_or_build_spatial_positions(pos, index_dims, batch_size): class PerceiverFourierPositionEncoding (line 2786) | class PerceiverFourierPositionEncoding(PerceiverAbstractPositionEncoding): method __init__ (line 2789) | def __init__(self, num_bands, max_resolution, concat_pos=True, sine_on... method num_dimensions (line 2797) | def num_dimensions(self) -> int: method output_size (line 2800) | def output_size(self): method forward (line 2811) | def forward( class AbstractPreprocessor (line 2825) | class AbstractPreprocessor(nn.Module): method num_channels (line 2827) | def num_channels(self) -> int: class PerceiverTextPreprocessor (line 2832) | class PerceiverTextPreprocessor(AbstractPreprocessor): method __init__ (line 2843) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 2850) | def num_channels(self) -> int: method forward (line 2853) | def forward(self, inputs: torch.LongTensor) -> torch.FloatTensor: class PerceiverEmbeddingDecoder (line 2863) | class PerceiverEmbeddingDecoder(nn.Module): method __init__ (line 2872) | def __init__(self, config: PerceiverConfig) -> None: method forward (line 2878) | def forward(self, hidden_states: torch.Tensor, embedding_layer: torch.... class PerceiverMultimodalPostprocessor (line 2887) | class PerceiverMultimodalPostprocessor(nn.Module): method __init__ (line 2900) | def __init__(self, modalities: Mapping[str, PostprocessorType], input_... method forward (line 2905) | def forward( class PerceiverClassificationPostprocessor (line 2921) | class PerceiverClassificationPostprocessor(nn.Module): method __init__ (line 2932) | def __init__(self, config: PerceiverConfig, in_channels: int) -> None: method forward (line 2936) | def forward(self, inputs, pos: Optional[torch.Tensor] = None, modality... class PerceiverAudioPostprocessor (line 2941) | class PerceiverAudioPostprocessor(nn.Module): method __init__ (line 2954) | def __init__(self, config: PerceiverConfig, in_channels: int, postproc... method forward (line 2963) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverProjectionPostprocessor (line 2968) | class PerceiverProjectionPostprocessor(nn.Module): method __init__ (line 2980) | def __init__(self, in_channels: int, out_channels: int) -> None: method forward (line 2984) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverImagePreprocessor (line 2989) | class PerceiverImagePreprocessor(AbstractPreprocessor): method __init__ (line 3026) | def __init__( method num_channels (line 3101) | def num_channels(self) -> int: method _build_network_inputs (line 3133) | def _build_network_inputs(self, inputs: torch.Tensor, network_input_is... method forward (line 3168) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverOneHotPreprocessor (line 3218) | class PerceiverOneHotPreprocessor(AbstractPreprocessor): method __init__ (line 3227) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 3232) | def num_channels(self) -> int: method forward (line 3235) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverAudioPreprocessor (line 3244) | class PerceiverAudioPreprocessor(AbstractPreprocessor): method __init__ (line 3267) | def __init__( method num_channels (line 3301) | def num_channels(self) -> int: method _build_network_inputs (line 3311) | def _build_network_inputs(self, inputs): method forward (line 3332) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverMultimodalPreprocessor (line 3341) | class PerceiverMultimodalPreprocessor(AbstractPreprocessor): method __init__ (line 3358) | def __init__( method num_channels (line 3379) | def num_channels(self) -> int: method forward (line 3384) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/perceiver/tokenization_perceiver.py class PerceiverTokenizer (line 27) | class PerceiverTokenizer(PreTrainedTokenizer): method __init__ (line 60) | def __init__( method get_vocab (line 104) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 113) | def vocab_size(self): method get_special_tokens_mask (line 116) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 144) | def build_inputs_with_special_tokens( method _tokenize (line 168) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 173) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 185) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 195) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/phobert/tokenization_phobert.py function get_pairs (line 52) | def get_pairs(word): class PhobertTokenizer (line 68) | class PhobertTokenizer(PreTrainedTokenizer): method __init__ (line 121) | def __init__( method build_inputs_with_special_tokens (line 164) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 190) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 218) | def create_token_type_ids_from_sequences( method vocab_size (line 243) | def vocab_size(self): method get_vocab (line 246) | def get_vocab(self): method bpe (line 249) | def bpe(self, token): method _tokenize (line 293) | def _tokenize(self, text): method _convert_token_to_id (line 303) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 307) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 311) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 316) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method add_from_file (line 341) | def add_from_file(self, f): FILE: benchmark/third_party/transformers/src/transformers/models/plbart/configuration_plbart.py class PLBartConfig (line 32) | class PLBartConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class PLBartOnnxConfig (line 167) | class PLBartOnnxConfig(OnnxConfigWithPast): method inputs (line 169) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 178) | def outputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/plbart/modeling_plbart.py function shift_tokens_right (line 71) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): function _make_causal_mask (line 92) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 108) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PLBartLearnedPositionalEmbedding (line 123) | class PLBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 128) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 134) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class PLBartAttention (line 146) | class PLBartAttention(nn.Module): method __init__ (line 149) | def __init__( method _shape (line 176) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 179) | def forward( class PLBartEncoderLayer (line 294) | class PLBartEncoderLayer(nn.Module): method __init__ (line 295) | def __init__(self, config: PLBartConfig): method forward (line 311) | def forward( class PLBartDecoderLayer (line 363) | class PLBartDecoderLayer(nn.Module): method __init__ (line 364) | def __init__(self, config: PLBartConfig): method forward (line 390) | def forward( class PLBartClassificationHead (line 481) | class PLBartClassificationHead(nn.Module): method __init__ (line 484) | def __init__( method forward (line 496) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PLBartPreTrainedModel (line 505) | class PLBartPreTrainedModel(PreTrainedModel): method _init_weights (line 511) | def _init_weights(self, module): method _set_gradient_checkpointing (line 522) | def _set_gradient_checkpointing(self, module, value=False): class PLBartEncoder (line 666) | class PLBartEncoder(PLBartPreTrainedModel): method __init__ (line 676) | def __init__(self, config: PLBartConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 703) | def get_input_embeddings(self): method set_input_embeddings (line 706) | def set_input_embeddings(self, value): method forward (line 709) | def forward( class PLBartDecoder (line 844) | class PLBartDecoder(PLBartPreTrainedModel): method __init__ (line 853) | def __init__(self, config: PLBartConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 877) | def get_input_embeddings(self): method set_input_embeddings (line 880) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 883) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 903) | def forward( class PLBartModel (line 1127) | class PLBartModel(PLBartPreTrainedModel): method __init__ (line 1128) | def __init__(self, config: PLBartConfig): method get_input_embeddings (line 1139) | def get_input_embeddings(self): method set_input_embeddings (line 1142) | def set_input_embeddings(self, value): method get_encoder (line 1147) | def get_encoder(self): method get_decoder (line 1150) | def get_decoder(self): method forward (line 1160) | def forward( class PLBartForConditionalGeneration (line 1243) | class PLBartForConditionalGeneration(PLBartPreTrainedModel): method __init__ (line 1252) | def __init__(self, config: PLBartConfig): method get_encoder (line 1260) | def get_encoder(self): method get_decoder (line 1263) | def get_decoder(self): method resize_token_embeddings (line 1266) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1271) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1280) | def get_output_embeddings(self): method set_output_embeddings (line 1283) | def set_output_embeddings(self, new_embeddings): method forward (line 1289) | def forward( method prepare_inputs_for_generation (line 1364) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1392) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1396) | def _reorder_cache(past, beam_idx): class PLBartForSequenceClassification (line 1413) | class PLBartForSequenceClassification(PLBartPreTrainedModel): method __init__ (line 1414) | def __init__(self, config: PLBartConfig, **kwargs): method forward (line 1436) | def forward( class PLBartDecoderWrapper (line 1535) | class PLBartDecoderWrapper(PLBartPreTrainedModel): method __init__ (line 1541) | def __init__(self, config): method forward (line 1545) | def forward(self, *args, **kwargs): class PLBartForCausalLM (line 1550) | class PLBartForCausalLM(PLBartPreTrainedModel): method __init__ (line 1551) | 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 get_output_embeddings (line 1569) | def get_output_embeddings(self): method set_output_embeddings (line 1572) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1575) | def set_decoder(self, decoder): method get_decoder (line 1578) | def get_decoder(self): method forward (line 1582) | def forward( method prepare_inputs_for_generation (line 1725) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1741) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/plbart/tokenization_plbart.py class PLBartTokenizer (line 96) | class PLBartTokenizer(PreTrainedTokenizer): method __init__ (line 166) | def __init__( method __getstate__ (line 256) | def __getstate__(self): method __setstate__ (line 262) | def __setstate__(self, d): method vocab_size (line 273) | def vocab_size(self): method src_lang (line 282) | def src_lang(self) -> str: method src_lang (line 286) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 290) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 320) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 347) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 371) | def _build_translation_inputs( method get_vocab (line 383) | def get_vocab(self): method _tokenize (line 388) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 391) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 400) | 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 411) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 428) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 440) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 443) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 446) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 455) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: benchmark/third_party/transformers/src/transformers/models/poolformer/configuration_poolformer.py class PoolFormerConfig (line 29) | class PoolFormerConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/poolformer/feature_extraction_poolformer.py class PoolFormerFeatureExtractor (line 39) | class PoolFormerFeatureExtractor(FeatureExtractionMixin, ImageFeatureExt... method __init__ (line 71) | def __init__( method __call__ (line 91) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/poolformer/modeling_poolformer.py function drop_path (line 54) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class PoolFormerDropPath (line 75) | class PoolFormerDropPath(nn.Module): method __init__ (line 78) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 82) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 85) | def extra_repr(self) -> str: class PoolFormerEmbeddings (line 89) | class PoolFormerEmbeddings(nn.Module): method __init__ (line 94) | def __init__(self, hidden_size, num_channels, patch_size, stride, padd... method forward (line 103) | def forward(self, pixel_values): class PoolFormerGroupNorm (line 109) | class PoolFormerGroupNorm(nn.GroupNorm): method __init__ (line 114) | def __init__(self, num_channels, **kwargs): class PoolFormerPooling (line 118) | class PoolFormerPooling(nn.Module): method __init__ (line 119) | def __init__(self, pool_size): method forward (line 123) | def forward(self, hidden_states): class PoolFormerOutput (line 127) | class PoolFormerOutput(nn.Module): method __init__ (line 128) | def __init__(self, config, dropout_prob, hidden_size, intermediate_size): method forward (line 138) | def forward(self, hidden_states): class PoolFormerLayer (line 148) | class PoolFormerLayer(nn.Module): method __init__ (line 151) | def __init__(self, config, num_channels, pool_size, hidden_size, inter... method forward (line 169) | def forward(self, hidden_states): class PoolFormerEncoder (line 199) | class PoolFormerEncoder(nn.Module): method __init__ (line 200) | def __init__(self, config): method forward (line 243) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class PoolFormerPreTrainedModel (line 265) | class PoolFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 276) | def _init_weights(self, module): method _set_gradient_checkpointing (line 286) | def _set_gradient_checkpointing(self, module, value=False): class PoolFormerModel (line 314) | class PoolFormerModel(PoolFormerPreTrainedModel): method __init__ (line 315) | def __init__(self, config): method get_input_embeddings (line 324) | def get_input_embeddings(self): method forward (line 336) | def forward( class PoolFormerFinalPooler (line 366) | class PoolFormerFinalPooler(nn.Module): method __init__ (line 367) | def __init__(self, config): method forward (line 371) | def forward(self, hidden_states): class PoolFormerForImageClassification (line 382) | class PoolFormerForImageClassification(PoolFormerPreTrainedModel): method __init__ (line 383) | def __init__(self, config): method forward (line 406) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/prophetnet/configuration_prophetnet.py class ProphetNetConfig (line 32) | class ProphetNetConfig(PretrainedConfig): method __init__ (line 107) | def __init__( method num_hidden_layers (line 174) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 178) | def num_hidden_layers(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py function convert_prophetnet_checkpoint_to_pytorch (line 38) | def convert_prophetnet_checkpoint_to_pytorch(prophetnet_checkpoint_path:... FILE: benchmark/third_party/transformers/src/transformers/models/prophetnet/modeling_prophetnet.py function softmax (line 179) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 186) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 203) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 230) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class ProphetNetSeq2SeqLMOutput (line 254) | class ProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 329) | def decoder_cross_attentions(self): class ProphetNetSeq2SeqModelOutput (line 339) | class ProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 415) | def decoder_cross_attentions(self): class ProphetNetDecoderModelOutput (line 425) | class ProphetNetDecoderModelOutput(ModelOutput): class ProphetNetDecoderLMOutput (line 485) | class ProphetNetDecoderLMOutput(ModelOutput): class ProphetNetPreTrainedModel (line 546) | class ProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 551) | def _init_weights(self, module): method _set_gradient_checkpointing (line 561) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 565) | def _shift_right(self, input_ids): class ProphetNetPositionalEmbeddings (line 588) | class ProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 595) | def __init__(self, config: ProphetNetConfig) -> None: method forward (line 599) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 627) | def _forward(self, position_ids): class ProphetNetAttention (line 631) | class ProphetNetAttention(nn.Module): method __init__ (line 634) | def __init__( method _shape (line 658) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 661) | def forward( class ProphetNetFeedForward (line 790) | class ProphetNetFeedForward(nn.Module): method __init__ (line 795) | def __init__(self, config: ProphetNetConfig, ffn_dim: int): method forward (line 803) | def forward(self, hidden_states): class ProphetNetNgramSelfAttention (line 813) | class ProphetNetNgramSelfAttention(nn.Module): method __init__ (line 814) | def __init__(self, config: ProphetNetConfig): method _shape (line 843) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 846) | def prepare_for_onnx_export_(self): method forward (line 849) | def forward( method get_main_relative_pos_embeddings (line 1042) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1084) | def get_predict_relative_pos_embeddings( class ProphetNetEncoderLayer (line 1134) | class ProphetNetEncoderLayer(nn.Module): method __init__ (line 1139) | def __init__(self, config: ProphetNetConfig): method forward (line 1149) | def forward( class ProphetNetDecoderLayer (line 1177) | class ProphetNetDecoderLayer(nn.Module): method __init__ (line 1182) | def __init__(self, config: ProphetNetConfig): method forward (line 1197) | def forward( class ProphetNetEncoder (line 1265) | class ProphetNetEncoder(ProphetNetPreTrainedModel): method __init__ (line 1272) | def __init__(self, config: ProphetNetConfig, word_embeddings: nn.Embed... method get_input_embeddings (line 1289) | def get_input_embeddings(self): method set_input_embeddings (line 1292) | def set_input_embeddings(self, value): method forward (line 1297) | def forward( class ProphetNetDecoder (line 1405) | class ProphetNetDecoder(ProphetNetPreTrainedModel): method __init__ (line 1412) | def __init__(self, config: ProphetNetConfig, word_embeddings: Optional... method get_input_embeddings (line 1436) | def get_input_embeddings(self): method set_input_embeddings (line 1439) | def set_input_embeddings(self, value): method forward (line 1444) | def forward( method compute_buffered_relative_buckets (line 1691) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1713) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1736) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class ProphetNetModel (line 1776) | class ProphetNetModel(ProphetNetPreTrainedModel): method __init__ (line 1777) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 1794) | def get_input_embeddings(self): method set_input_embeddings (line 1797) | def set_input_embeddings(self, value): method get_encoder (line 1802) | def get_encoder(self): method get_decoder (line 1805) | def get_decoder(self): method forward (line 1810) | def forward( class ProphetNetForConditionalGeneration (line 1903) | class ProphetNetForConditionalGeneration(ProphetNetPreTrainedModel): method __init__ (line 1904) | def __init__(self, config: ProphetNetConfig): method get_output_embeddings (line 1915) | def get_output_embeddings(self): method set_output_embeddings (line 1918) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1921) | def get_input_embeddings(self): method forward (line 1926) | def forward( method _compute_loss (line 2030) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2058) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2087) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2092) | def _reorder_cache(past, beam_idx): method get_encoder (line 2101) | def get_encoder(self): method get_decoder (line 2104) | def get_decoder(self): class ProphetNetForCausalLM (line 2113) | class ProphetNetForCausalLM(ProphetNetPreTrainedModel): method __init__ (line 2114) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 2130) | def get_input_embeddings(self): method set_input_embeddings (line 2133) | def set_input_embeddings(self, value): method get_output_embeddings (line 2136) | def get_output_embeddings(self): method set_output_embeddings (line 2139) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2142) | def set_decoder(self, decoder): method get_decoder (line 2145) | def get_decoder(self): method forward (line 2150) | def forward( method _compute_loss (line 2282) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2310) | def prepare_inputs_for_generation( method _reorder_cache (line 2336) | def _reorder_cache(past, beam_idx): class ProphetNetDecoderWrapper (line 2343) | class ProphetNetDecoderWrapper(ProphetNetPreTrainedModel): method __init__ (line 2349) | def __init__(self, config: ProphetNetConfig): method forward (line 2353) | def forward(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/prophetnet/tokenization_prophetnet.py function whitespace_tokenize (line 47) | def whitespace_tokenize(text): class BasicTokenizer (line 57) | class BasicTokenizer(object): method __init__ (line 77) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 85) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 122) | def _run_strip_accents(self, text): method _run_split_on_punc (line 133) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 155) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 168) | def _is_chinese_char(self, cp): method _clean_text (line 192) | def _clean_text(self, text): class WordpieceTokenizer (line 207) | class WordpieceTokenizer(object): method __init__ (line 210) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 215) | def tokenize(self, text): function load_vocab (line 264) | def load_vocab(vocab_file): class ProphetNetTokenizer (line 275) | class ProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 330) | def __init__( method vocab_size (line 378) | def vocab_size(self): method get_vocab (line 381) | def get_vocab(self): method _tokenize (line 384) | def _tokenize(self, text): method _convert_token_to_id (line 398) | def _convert_token_to_id(self, token: str): method _convert_id_to_token (line 402) | def _convert_id_to_token(self, index: int): method convert_tokens_to_string (line 406) | def convert_tokens_to_string(self, tokens: str): method get_special_tokens_mask (line 411) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 441) | def create_token_type_ids_from_sequences( method save_vocabulary (line 469) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 489) | def build_inputs_with_special_tokens( FILE: benchmark/third_party/transformers/src/transformers/models/qdqbert/configuration_qdqbert.py class QDQBertConfig (line 29) | class QDQBertConfig(PretrainedConfig): method __init__ (line 88) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/qdqbert/modeling_qdqbert.py function load_tf_weights_in_qdqbert (line 79) | def load_tf_weights_in_qdqbert(model, tf_checkpoint_path): class QDQBertEmbeddings (line 153) | class QDQBertEmbeddings(nn.Module): method __init__ (line 156) | def __init__(self, config): method forward (line 173) | def forward( class QDQBertSelfAttention (line 215) | class QDQBertSelfAttention(nn.Module): method __init__ (line 216) | def __init__(self, config): method transpose_for_scores (line 245) | def transpose_for_scores(self, x): method forward (line 250) | def forward( class QDQBertSelfOutput (line 349) | class QDQBertSelfOutput(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states, input_tensor): class QDQBertAttention (line 373) | class QDQBertAttention(nn.Module): method __init__ (line 374) | def __init__(self, config): method prune_heads (line 380) | def prune_heads(self, heads): method forward (line 398) | def forward( class QDQBertIntermediate (line 422) | class QDQBertIntermediate(nn.Module): method __init__ (line 423) | def __init__(self, config): method forward (line 432) | def forward(self, hidden_states): class QDQBertOutput (line 438) | class QDQBertOutput(nn.Module): method __init__ (line 439) | def __init__(self, config): method forward (line 450) | def forward(self, hidden_states, input_tensor): class QDQBertLayer (line 461) | class QDQBertLayer(nn.Module): method __init__ (line 462) | def __init__(self, config): method forward (line 475) | def forward( method feed_forward_chunk (line 538) | def feed_forward_chunk(self, attention_output): class QDQBertEncoder (line 545) | class QDQBertEncoder(nn.Module): method __init__ (line 546) | def __init__(self, config): method forward (line 552) | def forward( class QDQBertPooler (line 643) | class QDQBertPooler(nn.Module): method __init__ (line 644) | def __init__(self, config): method forward (line 649) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertPredictionHeadTransform (line 659) | class QDQBertPredictionHeadTransform(nn.Module): method __init__ (line 660) | def __init__(self, config): method forward (line 669) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertLMPredictionHead (line 677) | class QDQBertLMPredictionHead(nn.Module): method __init__ (line 678) | def __init__(self, config): method forward (line 691) | def forward(self, hidden_states): class QDQBertOnlyMLMHead (line 698) | class QDQBertOnlyMLMHead(nn.Module): method __init__ (line 699) | def __init__(self, config): method forward (line 703) | def forward(self, sequence_output): class QDQBertOnlyNSPHead (line 709) | class QDQBertOnlyNSPHead(nn.Module): method __init__ (line 710) | def __init__(self, config): method forward (line 714) | def forward(self, pooled_output): class QDQBertPreTrainingHeads (line 720) | class QDQBertPreTrainingHeads(nn.Module): method __init__ (line 721) | def __init__(self, config): method forward (line 726) | def forward(self, sequence_output, pooled_output): class QDQBertPreTrainedModel (line 733) | class QDQBertPreTrainedModel(PreTrainedModel): method _init_weights (line 745) | def _init_weights(self, module): method _set_gradient_checkpointing (line 761) | def _set_gradient_checkpointing(self, module, value=False): class QDQBertModel (line 836) | class QDQBertModel(QDQBertPreTrainedModel): method __init__ (line 849) | def __init__(self, config, add_pooling_layer: bool = True): method get_input_embeddings (line 862) | def get_input_embeddings(self): method set_input_embeddings (line 865) | def set_input_embeddings(self, value): method _prune_heads (line 868) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]): method forward (line 883) | def forward( class QDQBertLMHeadModel (line 1017) | class QDQBertLMHeadModel(QDQBertPreTrainedModel): method __init__ (line 1022) | def __init__(self, config): method get_output_embeddings (line 1034) | def get_output_embeddings(self): method set_output_embeddings (line 1037) | def set_output_embeddings(self, new_embeddings): method forward (line 1042) | def forward( method prepare_inputs_for_generation (line 1145) | def prepare_inputs_for_generation( method _reorder_cache (line 1163) | def _reorder_cache(self, past, beam_idx): class QDQBertForMaskedLM (line 1171) | class QDQBertForMaskedLM(QDQBertPreTrainedModel): method __init__ (line 1176) | def __init__(self, config): method get_output_embeddings (line 1191) | def get_output_embeddings(self): method set_output_embeddings (line 1194) | def set_output_embeddings(self, new_embeddings): method forward (line 1204) | def forward( method prepare_inputs_for_generation (line 1261) | def prepare_inputs_for_generation( class QDQBertForNextSentencePrediction (line 1284) | class QDQBertForNextSentencePrediction(QDQBertPreTrainedModel): method __init__ (line 1285) | def __init__(self, config): method forward (line 1296) | def forward( class QDQBertForSequenceClassification (line 1388) | class QDQBertForSequenceClassification(QDQBertPreTrainedModel): method __init__ (line 1389) | def __init__(self, config): method forward (line 1407) | def forward( class QDQBertForMultipleChoice (line 1486) | class QDQBertForMultipleChoice(QDQBertPreTrainedModel): method __init__ (line 1487) | def __init__(self, config): method forward (line 1504) | def forward( class QDQBertForTokenClassification (line 1578) | class QDQBertForTokenClassification(QDQBertPreTrainedModel): method __init__ (line 1582) | def __init__(self, config): method forward (line 1600) | def forward( class QDQBertForQuestionAnswering (line 1660) | class QDQBertForQuestionAnswering(QDQBertPreTrainedModel): method __init__ (line 1664) | def __init__(self, config): method forward (line 1681) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/rag/configuration_rag.py class RagConfig (line 82) | class RagConfig(PretrainedConfig): method __init__ (line 86) | def __init__( method from_question_encoder_generator_configs (line 171) | def from_question_encoder_generator_configs( method to_dict (line 183) | def to_dict(self): FILE: benchmark/third_party/transformers/src/transformers/models/rag/modeling_rag.py class RetrievAugLMMarginOutput (line 40) | class RetrievAugLMMarginOutput(ModelOutput): class RetrievAugLMOutput (line 135) | class RetrievAugLMOutput(ModelOutput): class RagPreTrainedModel (line 224) | class RagPreTrainedModel(PreTrainedModel): method from_pretrained (line 238) | def from_pretrained(cls, *args, **kwargs): method from_pretrained_question_encoder_generator (line 245) | def from_pretrained_question_encoder_generator( class RagModel (line 495) | class RagModel(RagPreTrainedModel): method __init__ (line 496) | def __init__( method forward (line 540) | def forward( class RagSequenceForGeneration (line 743) | class RagSequenceForGeneration(RagPreTrainedModel): method __init__ (line 744) | def __init__( method set_retriever (line 765) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 768) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method forward (line 774) | def forward( method retriever (line 902) | def retriever(self): method generator (line 906) | def generator(self): method question_encoder (line 910) | def question_encoder(self): method generate (line 914) | def generate( method get_nll (line 1064) | def get_nll( method _cat_and_pad (line 1124) | def _cat_and_pad(tensors, pad_token_id): class RagTokenForGeneration (line 1141) | class RagTokenForGeneration(RagPreTrainedModel): method __init__ (line 1142) | def __init__( method set_retriever (line 1164) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 1167) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method prepare_inputs_for_generation (line 1171) | def prepare_inputs_for_generation( method retriever (line 1199) | def retriever(self): method generator (line 1203) | def generator(self): method question_encoder (line 1207) | def question_encoder(self): method _reorder_cache (line 1211) | def _reorder_cache(past, beam_idx): method marginalize (line 1228) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method forward (line 1242) | def forward( method generate (line 1382) | def generate( method get_input_embeddings (line 1676) | def get_input_embeddings(self): method get_output_embeddings (line 1679) | def get_output_embeddings(self): method set_output_embeddings (line 1682) | def set_output_embeddings(self, new_embeddings): method shift_tokens_right (line 1685) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1694) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... FILE: benchmark/third_party/transformers/src/transformers/models/rag/modeling_tf_rag.py class TFRetrievAugLMMarginOutput (line 43) | class TFRetrievAugLMMarginOutput(ModelOutput): class TFRetrievAugLMOutput (line 131) | class TFRetrievAugLMOutput(ModelOutput): class TFRagPreTrainedModel (line 213) | class TFRagPreTrainedModel(TFPreTrainedModel): method from_pretrained_question_encoder_generator (line 227) | def from_pretrained_question_encoder_generator( class TFRagModel (line 491) | class TFRagModel(TFRagPreTrainedModel): method __init__ (line 495) | def __init__( method set_retriever (line 539) | def set_retriever(self, retriever: RagRetriever): method call (line 545) | def call( class TFRagTokenForGeneration (line 726) | class TFRagTokenForGeneration(TFRagPreTrainedModel, TFCausalLanguageMode... method __init__ (line 730) | def __init__( method set_retriever (line 759) | def set_retriever(self, retriever: RagRetriever): method prepare_inputs_for_generation (line 763) | def prepare_inputs_for_generation( method retriever (line 791) | def retriever(self): method generator (line 795) | def generator(self): method question_encoder (line 799) | def question_encoder(self): method _reorder_cache (line 803) | def _reorder_cache(past, beam_idx): method marginalize (line 820) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method call (line 835) | def call( method generate (line 987) | def generate( method get_input_embeddings (line 1291) | def get_input_embeddings(self): method get_output_embeddings (line 1294) | def get_output_embeddings(self): method shift_tokens_right (line 1298) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1331) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... method hf_compute_loss (line 1345) | def hf_compute_loss(self, labels, y_pred, smooth_epsilon=0.0, from_log... class TFRagSequenceForGeneration (line 1382) | class TFRagSequenceForGeneration(TFRagPreTrainedModel, TFCausalLanguageM... method __init__ (line 1386) | def __init__( method set_retriever (line 1415) | def set_retriever(self, retriever: RagRetriever): method retriever (line 1419) | def retriever(self): method generator (line 1423) | def generator(self): method question_encoder (line 1427) | def question_encoder(self): method call (line 1433) | def call( method get_nll (line 1581) | def get_nll( method generate (line 1665) | def generate( method _cat_and_pad (line 1808) | def _cat_and_pad(tensors, pad_token_id): FILE: benchmark/third_party/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 138) | def _deserialize_index(self): method is_initialized (line 149) | def is_initialized(self): method init_index (line 152) | def init_index(self): method get_doc_dicts (line 160) | def get_doc_dicts(self, doc_ids: np.array): method get_top_docs (line 174) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class HFIndexBase (line 183) | class HFIndexBase(Index): method __init__ (line 184) | def __init__(self, vector_size, dataset, index_initialized=False): method _check_dataset_format (line 191) | def _check_dataset_format(self, with_index: bool): method init_index (line 206) | def init_index(self): method is_initialized (line 209) | def is_initialized(self): method get_doc_dicts (line 212) | def get_doc_dicts(self, doc_ids: np.ndarray) -> List[dict]: method get_top_docs (line 215) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class CanonicalHFIndex (line 225) | class CanonicalHFIndex(HFIndexBase): method __init__ (line 247) | def __init__( method init_index (line 269) | def init_index(self): class CustomHFIndex (line 287) | class CustomHFIndex(HFIndexBase): method __init__ (line 301) | def __init__(self, vector_size: int, dataset, index_path=None): method load_from_disk (line 306) | def load_from_disk(cls, vector_size, dataset_path, index_path): method init_index (line 316) | def init_index(self): class RagRetriever (line 323) | class RagRetriever: method __init__ (line 377) | def __init__(self, config, question_encoder_tokenizer, generator_token... method _build_index (line 396) | def _build_index(config): method from_pretrained (line 419) | def from_pretrained(cls, retriever_name_or_path, indexed_dataset=None,... method save_pretrained (line 437) | def save_pretrained(self, save_directory): method init_retrieval (line 457) | def init_retrieval(self): method postprocess_docs (line 465) | def postprocess_docs(self, docs, input_strings, prefix, n_docs, return... method _chunk_tensor (line 517) | def _chunk_tensor(self, t: Iterable, chunk_size: int) -> List[Iterable]: method _main_retrieve (line 520) | def _main_retrieve(self, question_hidden_states: np.ndarray, n_docs: i... method retrieve (line 537) | def retrieve(self, question_hidden_states: np.ndarray, n_docs: int) ->... method set_ctx_encoder_tokenizer (line 559) | def set_ctx_encoder_tokenizer(self, ctx_encoder_tokenizer: PreTrainedT... method __call__ (line 564) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/rag/tokenization_rag.py class RagTokenizer (line 28) | class RagTokenizer: method __init__ (line 29) | def __init__(self, question_encoder, generator): method save_pretrained (line 34) | def save_pretrained(self, save_directory): method from_pretrained (line 44) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 61) | def __call__(self, *args, **kwargs): method batch_decode (line 64) | def batch_decode(self, *args, **kwargs): method decode (line 67) | def decode(self, *args, **kwargs): method _switch_to_input_mode (line 70) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 73) | def _switch_to_target_mode(self): method prepare_seq2seq_batch (line 76) | def prepare_seq2seq_batch( FILE: benchmark/third_party/transformers/src/transformers/models/realm/configuration_realm.py class RealmConfig (line 44) | class RealmConfig(PretrainedConfig): method __init__ (line 132) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/realm/modeling_realm.py function load_tf_weights_in_realm (line 59) | def load_tf_weights_in_realm(model, config, tf_checkpoint_path): class RealmEmbeddings (line 167) | class RealmEmbeddings(nn.Module): method __init__ (line 170) | def __init__(self, config): method forward (line 187) | def forward( class RealmSelfAttention (line 230) | class RealmSelfAttention(nn.Module): method __init__ (line 231) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 257) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 262) | def forward( class RealmSelfOutput (line 358) | class RealmSelfOutput(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 RealmAttention (line 373) | class RealmAttention(nn.Module): method __init__ (line 374) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 380) | def prune_heads(self, heads): method forward (line 398) | def forward( class RealmIntermediate (line 423) | class RealmIntermediate(nn.Module): method __init__ (line 424) | def __init__(self, config): method forward (line 432) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmOutput (line 439) | class RealmOutput(nn.Module): method __init__ (line 440) | def __init__(self, config): method forward (line 446) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RealmLayer (line 454) | class RealmLayer(nn.Module): method __init__ (line 455) | def __init__(self, config): method forward (line 469) | def forward( method feed_forward_chunk (line 534) | def feed_forward_chunk(self, attention_output): class RealmEncoder (line 541) | class RealmEncoder(nn.Module): method __init__ (line 542) | def __init__(self, config): method forward (line 548) | def forward( class RealmPooler (line 639) | class RealmPooler(nn.Module): method __init__ (line 640) | def __init__(self, config): method forward (line 645) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmEmbedderOutput (line 655) | class RealmEmbedderOutput(ModelOutput): class RealmScorerOutput (line 682) | class RealmScorerOutput(ModelOutput): class RealmReaderOutput (line 701) | class RealmReaderOutput(ModelOutput): class RealmForOpenQAOutput (line 751) | class RealmForOpenQAOutput(ModelOutput): class RealmPredictionHeadTransform (line 767) | class RealmPredictionHeadTransform(nn.Module): method __init__ (line 768) | def __init__(self, config): method forward (line 777) | def forward(self, hidden_states): class RealmLMPredictionHead (line 784) | class RealmLMPredictionHead(nn.Module): method __init__ (line 785) | def __init__(self, config): method forward (line 798) | def forward(self, hidden_states): class RealmOnlyMLMHead (line 804) | class RealmOnlyMLMHead(nn.Module): method __init__ (line 805) | def __init__(self, config): method forward (line 809) | def forward(self, sequence_output): class RealmScorerProjection (line 814) | class RealmScorerProjection(nn.Module): method __init__ (line 815) | def __init__(self, config): method forward (line 821) | def forward(self, hidden_states): class RealmReaderProjection (line 827) | class RealmReaderProjection(nn.Module): method __init__ (line 828) | def __init__(self, config): method forward (line 836) | def forward(self, hidden_states, block_mask): class RealmPreTrainedModel (line 955) | class RealmPreTrainedModel(PreTrainedModel): method _init_weights (line 966) | def _init_weights(self, module): method _flatten_inputs (line 982) | def _flatten_inputs(self, *inputs): class RealmBertModel (line 996) | class RealmBertModel(RealmPreTrainedModel): method __init__ (line 1001) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1014) | def get_input_embeddings(self): method set_input_embeddings (line 1017) | def set_input_embeddings(self, value): method _prune_heads (line 1020) | def _prune_heads(self, heads_to_prune): method forward (line 1028) | def forward( class RealmEmbedder (line 1142) | class RealmEmbedder(RealmPreTrainedModel): method __init__ (line 1143) | def __init__(self, config): method get_input_embeddings (line 1150) | def get_input_embeddings(self): method set_input_embeddings (line 1153) | def set_input_embeddings(self, value): method forward (line 1158) | def forward( class RealmScorer (line 1222) | class RealmScorer(RealmPreTrainedModel): method __init__ (line 1229) | def __init__(self, config, query_embedder=None): method forward (line 1240) | def forward( class RealmKnowledgeAugEncoder (line 1370) | class RealmKnowledgeAugEncoder(RealmPreTrainedModel): method __init__ (line 1371) | def __init__(self, config): method get_input_embeddings (line 1377) | def get_input_embeddings(self): method set_input_embeddings (line 1380) | def set_input_embeddings(self, value): method get_output_embeddings (line 1383) | def get_output_embeddings(self): method set_output_embeddings (line 1386) | def set_output_embeddings(self, new_embeddings): method forward (line 1393) | def forward( class RealmReader (line 1518) | class RealmReader(RealmPreTrainedModel): method __init__ (line 1522) | def __init__(self, config): method forward (line 1534) | def forward( class RealmForOpenQA (line 1725) | class RealmForOpenQA(RealmPreTrainedModel): method __init__ (line 1726) | def __init__(self, config, retriever=None): method searcher_beam_size (line 1743) | def searcher_beam_size(self): method block_embedding_to (line 1748) | def block_embedding_to(self, device): method forward (line 1760) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/realm/retrieval_realm.py function convert_tfrecord_to_np (line 34) | def convert_tfrecord_to_np(block_records_path: str, num_block_records: i... class ScaNNSearcher (line 44) | class ScaNNSearcher: method __init__ (line 47) | def __init__( method search_batched (line 68) | def search_batched(self, question_projection): class RealmRetriever (line 73) | class RealmRetriever: method __init__ (line 84) | def __init__(self, block_records, tokenizer): method __call__ (line 89) | def __call__(self, retrieved_block_ids, question_input_ids, answer_ids... method from_pretrained (line 111) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method save_pretrained (line 124) | def save_pretrained(self, save_directory): method block_has_answer (line 130) | def block_has_answer(self, concat_inputs, answer_ids): FILE: benchmark/third_party/transformers/src/transformers/models/realm/tokenization_realm.py function load_vocab (line 75) | def load_vocab(vocab_file): function whitespace_tokenize (line 86) | def whitespace_tokenize(text): class RealmTokenizer (line 95) | class RealmTokenizer(PreTrainedTokenizer): method __init__ (line 145) | def __init__( method do_lower_case (line 192) | def do_lower_case(self): method vocab_size (line 196) | def vocab_size(self): method get_vocab (line 199) | def get_vocab(self): method _tokenize (line 202) | def _tokenize(self, text): method _convert_token_to_id (line 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 batch_encode_candidates (line 229) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 302) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 327) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 355) | def create_token_type_ids_from_sequences( method save_vocabulary (line 384) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 405) | class BasicTokenizer(object): method __init__ (line 425) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 433) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 470) | def _run_strip_accents(self, text): method _run_split_on_punc (line 481) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 503) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 516) | def _is_chinese_char(self, cp): method _clean_text (line 540) | def _clean_text(self, text): class WordpieceTokenizer (line 554) | class WordpieceTokenizer(object): method __init__ (line 557) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 562) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/realm/tokenization_realm_fast.py class RealmTokenizerFast (line 102) | class RealmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 151) | def __init__( method batch_encode_candidates (line 193) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 266) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 290) | def create_token_type_ids_from_sequences( method save_vocabulary (line 319) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/reformer/configuration_reformer.py class ReformerConfig (line 32) | class ReformerConfig(PretrainedConfig): method __init__ (line 165) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/reformer/convert_reformer_trax_checkpoint_to_pytorch.py function set_param (line 32) | def set_param(torch_layer, weight, bias=None): function set_layer_weights_in_torch_lsh (line 41) | def set_layer_weights_in_torch_lsh(weights, torch_layer, hidden_size): function set_layer_weights_in_torch_local (line 61) | def set_layer_weights_in_torch_local(weights, torch_layer, hidden_size): function set_block_weights_in_torch (line 86) | def set_block_weights_in_torch(weights, torch_block, hidden_size): function set_model_weights_in_torch (line 139) | def set_model_weights_in_torch(weights, torch_model, hidden_size): function convert_trax_checkpoint_to_pytorch (line 186) | def convert_trax_checkpoint_to_pytorch(trax_model_pkl_path, config_file,... FILE: benchmark/third_party/transformers/src/transformers/models/reformer/modeling_reformer.py function _stable_argsort (line 75) | def _stable_argsort(vector, dim): function _get_least_common_mult_chunk_len (line 84) | def _get_least_common_mult_chunk_len(config): function _get_min_chunk_len (line 100) | def _get_min_chunk_len(config): class AxialPositionEmbeddings (line 116) | class AxialPositionEmbeddings(nn.Module): method __init__ (line 121) | def __init__(self, config): method forward (line 146) | def forward(self, position_ids): class PositionEmbeddings (line 212) | class PositionEmbeddings(nn.Module): method __init__ (line 215) | def __init__(self, config): method forward (line 220) | def forward(self, position_ids): class ReformerEmbeddings (line 226) | class ReformerEmbeddings(nn.Module): method __init__ (line 229) | def __init__(self, config): method forward (line 239) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class EfficientAttentionMixin (line 272) | class EfficientAttentionMixin: method _look_adjacent (line 277) | def _look_adjacent(self, vectors, num_chunks_before, num_chunks_after): method _split_hidden_size_dim (line 300) | def _split_hidden_size_dim(self, x, num_attn_heads, attn_head_size): method _merge_hidden_size_dims (line 308) | def _merge_hidden_size_dims(self, x, num_attn_heads, attn_head_size): method _split_seq_length_dim_to (line 315) | def _split_seq_length_dim_to(self, vectors, dim_factor_1, dim_factor_2... class LSHSelfAttention (line 330) | class LSHSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 331) | def __init__(self, config): method forward (line 361) | def forward( method _query_per_attn_head (line 597) | def _query_per_attn_head(self, hidden_states): method _value_per_attn_head (line 605) | def _value_per_attn_head(self, hidden_states): method _hash_vectors (line 613) | def _hash_vectors(self, vectors, num_hashes, attention_mask, increase_... method _get_sorted_bucket_idx_and_undo_sorted_bucket_idx (line 687) | def _get_sorted_bucket_idx_and_undo_sorted_bucket_idx(self, sequence_l... method _set_num_buckets (line 706) | def _set_num_buckets(self, sequence_length): method _attend (line 726) | def _attend( method _compute_attn_mask (line 838) | def _compute_attn_mask( method _get_relevant_hid_states_and_buckets (line 866) | def _get_relevant_hid_states_and_buckets( method _expand_to_indices_in_relevant_chunk (line 953) | def _expand_to_indices_in_relevant_chunk(self, indices, sequence_length): method _len_and_dim_norm (line 973) | def _len_and_dim_norm(self, vectors): method _len_norm (line 983) | def _len_norm(self, x, epsilon=1e-6): method _gather_by_expansion (line 991) | def _gather_by_expansion(self, vectors, idxs, num_hashes): class ReverseSort (line 1000) | class ReverseSort(Function): method forward (line 1007) | def forward(ctx, out_vectors, logits, sorted_bucket_idx, undo_sorted_b... method backward (line 1019) | def backward(ctx, grad_out_vectors, grad_logits): class LocalSelfAttention (line 1032) | class LocalSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 1033) | def __init__(self, config): method forward (line 1058) | def forward( method _compute_attn_mask (line 1227) | def _compute_attn_mask( method _retrieve_relevant_hidden_states (line 1254) | def _retrieve_relevant_hidden_states(previous_hidden_states, chunk_len... class ReformerSelfOutput (line 1259) | class ReformerSelfOutput(nn.Module): method __init__ (line 1260) | def __init__(self, config): method forward (line 1267) | def forward(self, hidden_states): class ReformerAttention (line 1273) | class ReformerAttention(nn.Module): method __init__ (line 1274) | def __init__(self, config, layer_id=0): method forward (line 1298) | def forward( class ReformerFeedForwardDense (line 1365) | class ReformerFeedForwardDense(nn.Module): method __init__ (line 1366) | def __init__(self, config): method forward (line 1377) | def forward(self, hidden_states): class ReformerFeedForwardOutput (line 1384) | class ReformerFeedForwardOutput(nn.Module): method __init__ (line 1385) | def __init__(self, config): method forward (line 1391) | def forward(self, hidden_states): class ChunkReformerFeedForward (line 1397) | class ChunkReformerFeedForward(nn.Module): method __init__ (line 1398) | def __init__(self, config): method forward (line 1407) | def forward(self, attention_output): method forward_chunk (line 1415) | def forward_chunk(self, hidden_states): class ReformerLayer (line 1421) | class ReformerLayer(nn.Module): method __init__ (line 1422) | def __init__(self, config, layer_id=0): method _init_attention_seed (line 1432) | def _init_attention_seed(self): method _init_feed_forward_seed (line 1450) | def _init_feed_forward_seed(self): method forward (line 1467) | def forward( method backward_pass (line 1520) | def backward_pass( class _ReversibleFunction (line 1589) | class _ReversibleFunction(Function): method forward (line 1597) | def forward( method backward (line 1655) | def backward(ctx, grad_hidden_states): class ReformerEncoder (line 1701) | class ReformerEncoder(nn.Module): method __init__ (line 1702) | def __init__(self, config): method forward (line 1711) | def forward( class ReformerOnlyLMHead (line 1762) | class ReformerOnlyLMHead(nn.Module): method __init__ (line 1763) | def __init__(self, config): method forward (line 1773) | def forward(self, hidden_states): method forward_chunk (line 1776) | def forward_chunk(self, hidden_states): method _tie_weights (line 1780) | def _tie_weights(self): class ReformerPreTrainedModel (line 1785) | class ReformerPreTrainedModel(PreTrainedModel): method dummy_inputs (line 1795) | def dummy_inputs(self): method _init_weights (line 1804) | def _init_weights(self, module): class ReformerModelOutput (line 1825) | class ReformerModelOutput(ModelOutput): class ReformerModelWithLMHeadOutput (line 1862) | class ReformerModelWithLMHeadOutput(ModelOutput): class ReformerModel (line 1982) | class ReformerModel(ReformerPreTrainedModel): method __init__ (line 1983) | def __init__(self, config): method get_input_embeddings (line 1996) | def get_input_embeddings(self): method set_input_embeddings (line 1999) | def set_input_embeddings(self, value): method _prune_heads (line 2002) | def _prune_heads(self, heads_to_prune): method forward (line 2017) | def forward( method _pad_to_mult_of_chunk_length (line 2137) | def _pad_to_mult_of_chunk_length( class ReformerModelWithLMHead (line 2194) | class ReformerModelWithLMHead(ReformerPreTrainedModel): method __init__ (line 2195) | def __init__(self, config): method get_output_embeddings (line 2213) | def get_output_embeddings(self): method set_output_embeddings (line 2216) | def set_output_embeddings(self, new_embeddings): method forward (line 2226) | def forward( method prepare_inputs_for_generation (line 2287) | def prepare_inputs_for_generation(self, input_ids, past=None, use_cach... method _reorder_cache (line 2301) | def _reorder_cache(self, past, beam_idx): class ReformerForMaskedLM (line 2317) | class ReformerForMaskedLM(ReformerPreTrainedModel): method __init__ (line 2318) | def __init__(self, config): method get_output_embeddings (line 2330) | def get_output_embeddings(self): method set_output_embeddings (line 2333) | def set_output_embeddings(self, new_embeddings): method forward (line 2338) | def forward( class ReformerForSequenceClassification (line 2437) | class ReformerForSequenceClassification(ReformerPreTrainedModel): method __init__ (line 2438) | def __init__(self, config): method forward (line 2453) | def forward( class ReformerClassificationHead (line 2597) | class ReformerClassificationHead(nn.Module): method __init__ (line 2600) | def __init__(self, config): method forward (line 2609) | def forward(self, hidden_states, **kwargs): class ReformerForQuestionAnswering (line 2626) | class ReformerForQuestionAnswering(ReformerPreTrainedModel): method __init__ (line 2627) | def __init__(self, config): method forward (line 2647) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/reformer/tokenization_reformer.py class ReformerTokenizer (line 48) | class ReformerTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method vocab_size (line 122) | def vocab_size(self): method get_vocab (line 125) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 130) | def __getstate__(self): method __setstate__ (line 135) | def __setstate__(self, d): method _tokenize (line 145) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 149) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 153) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 159) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 164) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/reformer/tokenization_reformer_fast.py class ReformerTokenizerFast (line 57) | class ReformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 94) | def __init__( method save_vocabulary (line 115) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/regnet/configuration_regnet.py class RegNetConfig (line 28) | class RegNetConfig(PretrainedConfig): method __init__ (line 72) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/regnet/convert_regnet_to_pytorch.py class Tracker (line 42) | class Tracker: method _forward_hook (line 47) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 52) | def __call__(self, x: Tensor): method parametrized (line 60) | def parametrized(self): class ModuleTransfer (line 66) | class ModuleTransfer: method __call__ (line 74) | def __call__(self, x: Tensor): class FakeRegNetVisslWrapper (line 97) | class FakeRegNetVisslWrapper(nn.Module): method __init__ (line 102) | def __init__(self, model: nn.Module): method forward (line 116) | def forward(self, x: Tensor): class NameToFromModelFuncMap (line 124) | class NameToFromModelFuncMap(dict): method convert_name_to_timm (line 129) | def convert_name_to_timm(self, x: str) -> str: method __getitem__ (line 133) | def __getitem__(self, x: str) -> Callable[[], Tuple[nn.Module, Dict]]: class NameToOurModelFuncMap (line 145) | class NameToOurModelFuncMap(dict): method __getitem__ (line 150) | def __getitem__(self, x: str) -> Callable[[], nn.Module]: function manually_copy_vissl_head (line 158) | def manually_copy_vissl_head(from_state_dict, to_state_dict, keys: List[... function convert_weight_and_push (line 165) | def convert_weight_and_push( function convert_weights_and_push (line 222) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: benchmark/third_party/transformers/src/transformers/models/regnet/modeling_regnet.py class RegNetConvLayer (line 56) | class RegNetConvLayer(nn.Module): method __init__ (line 57) | def __init__( method forward (line 79) | def forward(self, hidden_state): class RegNetEmbeddings (line 86) | class RegNetEmbeddings(nn.Module): method __init__ (line 91) | def __init__(self, config: RegNetConfig): method forward (line 98) | def forward(self, pixel_values): class RegNetShortCut (line 109) | class RegNetShortCut(nn.Module): method __init__ (line 115) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 120) | def forward(self, input: Tensor) -> Tensor: class RegNetSELayer (line 126) | class RegNetSELayer(nn.Module): method __init__ (line 131) | def __init__(self, in_channels: int, reduced_channels: int): method forward (line 142) | def forward(self, hidden_state): class RegNetXLayer (line 150) | class RegNetXLayer(nn.Module): method __init__ (line 155) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 169) | def forward(self, hidden_state): class RegNetYLayer (line 178) | class RegNetYLayer(nn.Module): method __init__ (line 183) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 198) | def forward(self, hidden_state): class RegNetStage (line 207) | class RegNetStage(nn.Module): method __init__ (line 212) | def __init__( method forward (line 235) | def forward(self, hidden_state): class RegNetEncoder (line 240) | class RegNetEncoder(nn.Module): method __init__ (line 241) | def __init__(self, config: RegNetConfig): method forward (line 258) | def forward( class RegNetPreTrainedModel (line 279) | class RegNetPreTrainedModel(PreTrainedModel): method _init_weights (line 290) | def _init_weights(self, module): method _set_gradient_checkpointing (line 297) | def _set_gradient_checkpointing(self, module, value=False): class RegNetModel (line 332) | class RegNetModel(RegNetPreTrainedModel): method __init__ (line 333) | def __init__(self, config): method forward (line 351) | def forward( class RegNetForImageClassification (line 387) | class RegNetForImageClassification(RegNetPreTrainedModel): method __init__ (line 388) | def __init__(self, config): method forward (line 408) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/regnet/modeling_tf_regnet.py class TFRegNetConvLayer (line 54) | class TFRegNetConvLayer(tf.keras.layers.Layer): method __init__ (line 55) | def __init__( method call (line 80) | def call(self, hidden_state): class TFRegNetEmbeddings (line 87) | class TFRegNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 92) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 103) | def call(self, pixel_values): class TFRegNetShortCut (line 118) | class TFRegNetShortCut(tf.keras.layers.Layer): method __init__ (line 124) | def __init__(self, out_channels: int, stride: int = 2, **kwargs): method call (line 131) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFRegNetSELayer (line 135) | class TFRegNetSELayer(tf.keras.layers.Layer): method __init__ (line 140) | def __init__(self, in_channels: int, reduced_channels: int, **kwargs): method call (line 148) | def call(self, hidden_state): class TFRegNetXLayer (line 157) | class TFRegNetXLayer(tf.keras.layers.Layer): method __init__ (line 162) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 181) | def call(self, hidden_state): class TFRegNetYLayer (line 191) | class TFRegNetYLayer(tf.keras.layers.Layer): method __init__ (line 196) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 215) | def call(self, hidden_state): class TFRegNetStage (line 225) | class TFRegNetStage(tf.keras.layers.Layer): method __init__ (line 230) | def __init__( method call (line 242) | def call(self, hidden_state): class TFRegNetEncoder (line 248) | class TFRegNetEncoder(tf.keras.layers.Layer): method __init__ (line 249) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 267) | def call( class TFRegNetMainLayer (line 288) | class TFRegNetMainLayer(tf.keras.layers.Layer): method __init__ (line 291) | def __init__(self, config, **kwargs): method call (line 299) | def call( class TFRegNetPreTrainedModel (line 338) | class TFRegNetPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 349) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 366) | def serving(self, inputs): class TFRegNetModel (line 406) | class TFRegNetModel(TFRegNetPreTrainedModel): method __init__ (line 407) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 421) | def call( method serving_output (line 448) | def serving_output( class TFRegNetForImageClassification (line 466) | class TFRegNetForImageClassification(TFRegNetPreTrainedModel, TFSequence... method __init__ (line 467) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 486) | def call( method serving_output (line 521) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... FILE: benchmark/third_party/transformers/src/transformers/models/rembert/configuration_rembert.py class RemBertConfig (line 29) | class RemBertConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/rembert/convert_rembert_tf_checkpoint_to_pytorch.py function convert_rembert_tf_checkpoint_to_pytorch (line 29) | def convert_rembert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_co... FILE: benchmark/third_party/transformers/src/transformers/models/rembert/modeling_rembert.py function load_tf_weights_in_rembert (line 62) | def load_tf_weights_in_rembert(model, config, tf_checkpoint_path): class RemBertEmbeddings (line 145) | class RemBertEmbeddings(nn.Module): method __init__ (line 148) | def __init__(self, config): method forward (line 164) | def forward( class RemBertPooler (line 198) | class RemBertPooler(nn.Module): method __init__ (line 199) | def __init__(self, config): method forward (line 204) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertSelfAttention (line 213) | class RemBertSelfAttention(nn.Module): method __init__ (line 214) | def __init__(self, config): method transpose_for_scores (line 234) | def transpose_for_scores(self, x): method forward (line 239) | def forward( class RemBertSelfOutput (line 319) | class RemBertSelfOutput(nn.Module): method __init__ (line 320) | def __init__(self, config): method forward (line 326) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertAttention (line 333) | class RemBertAttention(nn.Module): method __init__ (line 334) | def __init__(self, config): method prune_heads (line 341) | def prune_heads(self, heads): method forward (line 360) | def forward( class RemBertIntermediate (line 385) | class RemBertIntermediate(nn.Module): method __init__ (line 386) | def __init__(self, config): method forward (line 394) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOutput (line 401) | class RemBertOutput(nn.Module): method __init__ (line 402) | def __init__(self, config): method forward (line 408) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertLayer (line 415) | class RemBertLayer(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 431) | def forward( method feed_forward_chunk (line 497) | def feed_forward_chunk(self, attention_output): class RemBertEncoder (line 503) | class RemBertEncoder(nn.Module): method __init__ (line 504) | def __init__(self, config): method forward (line 512) | def forward( class RemBertPredictionHeadTransform (line 605) | class RemBertPredictionHeadTransform(nn.Module): method __init__ (line 606) | def __init__(self, config): method forward (line 615) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertLMPredictionHead (line 622) | class RemBertLMPredictionHead(nn.Module): method __init__ (line 623) | def __init__(self, config): method forward (line 630) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOnlyMLMHead (line 639) | class RemBertOnlyMLMHead(nn.Module): method __init__ (line 640) | def __init__(self, config): method forward (line 644) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RemBertPreTrainedModel (line 649) | class RemBertPreTrainedModel(PreTrainedModel): method _init_weights (line 661) | def _init_weights(self, module): method _set_gradient_checkpointing (line 677) | def _set_gradient_checkpointing(self, module, value=False): class RemBertModel (line 747) | class RemBertModel(RemBertPreTrainedModel): method __init__ (line 760) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 772) | def get_input_embeddings(self): method set_input_embeddings (line 775) | def set_input_embeddings(self, value): method _prune_heads (line 778) | def _prune_heads(self, heads_to_prune): method forward (line 793) | def forward( class RemBertForMaskedLM (line 917) | class RemBertForMaskedLM(RemBertPreTrainedModel): method __init__ (line 918) | def __init__(self, config): method get_output_embeddings (line 933) | def get_output_embeddings(self): method set_output_embeddings (line 936) | def set_output_embeddings(self, new_embeddings): method forward (line 946) | def forward( method prepare_inputs_for_generation (line 1002) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RemBertForCausalLM (line 1020) | class RemBertForCausalLM(RemBertPreTrainedModel): method __init__ (line 1024) | def __init__(self, config): method get_output_embeddings (line 1036) | def get_output_embeddings(self): method set_output_embeddings (line 1039) | def set_output_embeddings(self, new_embeddings): method forward (line 1044) | def forward( method prepare_inputs_for_generation (line 1144) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1157) | def _reorder_cache(self, past, beam_idx): class RemBertForSequenceClassification (line 1173) | class RemBertForSequenceClassification(RemBertPreTrainedModel): method __init__ (line 1174) | def __init__(self, config): method forward (line 1191) | def forward( class RemBertForMultipleChoice (line 1270) | class RemBertForMultipleChoice(RemBertPreTrainedModel): method __init__ (line 1271) | def __init__(self, config): method forward (line 1288) | def forward( class RemBertForTokenClassification (line 1362) | class RemBertForTokenClassification(RemBertPreTrainedModel): method __init__ (line 1363) | def __init__(self, config): method forward (line 1381) | def forward( class RemBertForQuestionAnswering (line 1441) | class RemBertForQuestionAnswering(RemBertPreTrainedModel): method __init__ (line 1442) | def __init__(self, config): method forward (line 1460) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/rembert/modeling_tf_rembert.py class TFRemBertEmbeddings (line 71) | class TFRemBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 74) | def __init__(self, config: RemBertConfig, **kwargs): method build (line 85) | def build(self, input_shape: tf.TensorShape): method call (line 109) | def call( class TFRemBertSelfAttention (line 159) | class TFRemBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 160) | def __init__(self, config: RemBertConfig, **kwargs): method transpose_for_scores (line 187) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 194) | def call( class TFRemBertSelfOutput (line 277) | class TFRemBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 278) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 287) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRemBertAttention (line 296) | class TFRemBertAttention(tf.keras.layers.Layer): method __init__ (line 297) | def __init__(self, config: RemBertConfig, **kwargs): method prune_heads (line 303) | def prune_heads(self, heads): method call (line 306) | def call( class TFRemBertIntermediate (line 337) | class TFRemBertIntermediate(tf.keras.layers.Layer): method __init__ (line 338) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 350) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertOutput (line 358) | class TFRemBertOutput(tf.keras.layers.Layer): method __init__ (line 359) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 368) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRemBertLayer (line 377) | class TFRemBertLayer(tf.keras.layers.Layer): method __init__ (line 378) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 391) | def call( class TFRemBertEncoder (line 463) | class TFRemBertEncoder(tf.keras.layers.Layer): method __init__ (line 464) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 475) | def call( class TFRemBertPooler (line 540) | class TFRemBertPooler(tf.keras.layers.Layer): method __init__ (line 541) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 551) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertLMPredictionHead (line 560) | class TFRemBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 561) | def __init__(self, config: RemBertConfig, input_embeddings: tf.keras.l... method build (line 576) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 588) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 591) | def set_output_embeddings(self, value): method get_bias (line 595) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 598) | def set_bias(self, value: tf.Variable): method call (line 602) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertMLMHead (line 615) | class TFRemBertMLMHead(tf.keras.layers.Layer): method __init__ (line 616) | def __init__(self, config: RemBertConfig, input_embeddings: tf.keras.l... method call (line 621) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFRemBertMainLayer (line 628) | class TFRemBertMainLayer(tf.keras.layers.Layer): method __init__ (line 631) | def __init__(self, config: RemBertConfig, add_pooling_layer: bool = Tr... method get_input_embeddings (line 641) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 644) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 648) | def _prune_heads(self, heads_to_prune): method call (line 657) | def call( class TFRemBertPreTrainedModel (line 816) | class TFRemBertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 826) | def dummy_inputs(self): class TFRemBertModel (line 946) | class TFRemBertModel(TFRemBertPreTrainedModel): method __init__ (line 947) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 960) | def call( method serving_output (line 1017) | def serving_output( class TFRemBertForMaskedLM (line 1039) | class TFRemBertForMaskedLM(TFRemBertPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1040) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1052) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1063) | def call( method serving_output (line 1110) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFRemBertForCausalLM (line 1120) | class TFRemBertForCausalLM(TFRemBertPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1121) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1130) | def get_lm_head(self) -> tf.keras.layers.Layer: method prepare_inputs_for_generation (line 1134) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method call (line 1153) | def call( method serving_output (line 1234) | def serving_output(self, output: TFCausalLMOutputWithCrossAttentions) ... method _reorder_cache (line 1249) | def _reorder_cache(past, beam_idx): class TFRemBertForSequenceClassification (line 1262) | class TFRemBertForSequenceClassification(TFRemBertPreTrainedModel, TFSeq... method __init__ (line 1263) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1284) | def call( method serving_output (line 1332) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFRemBertForMultipleChoice (line 1346) | class TFRemBertForMultipleChoice(TFRemBertPreTrainedModel, TFMultipleCho... method __init__ (line 1347) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method dummy_inputs (line 1357) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method call (line 1374) | def call( method serving (line 1454) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceMod... method serving_output (line 1459) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFRemBertForTokenClassification (line 1473) | class TFRemBertForTokenClassification(TFRemBertPreTrainedModel, TFTokenC... method __init__ (line 1474) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1493) | def call( method serving_output (line 1539) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFRemBertForQuestionAnswering (line 1553) | class TFRemBertForQuestionAnswering(TFRemBertPreTrainedModel, TFQuestion... method __init__ (line 1554) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1572) | def call( method serving_output (line 1633) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/rembert/tokenization_rembert.py class RemBertTokenizer (line 43) | class RemBertTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method vocab_size (line 137) | def vocab_size(self): method get_vocab (line 140) | def get_vocab(self): method __getstate__ (line 145) | def __getstate__(self): method __setstate__ (line 150) | def __setstate__(self, d): method _tokenize (line 155) | def _tokenize(self, text, sample=False): method _convert_token_to_id (line 160) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 164) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 168) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 172) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 197) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 228) | def create_token_type_ids_from_sequences( method save_vocabulary (line 258) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/rembert/tokenization_rembert_fast.py class RemBertTokenizerFast (line 51) | class RemBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method build_inputs_with_special_tokens (line 144) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 169) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 200) | def create_token_type_ids_from_sequences( method save_vocabulary (line 230) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/resnet/configuration_resnet.py class ResNetConfig (line 34) | class ResNetConfig(PretrainedConfig): method __init__ (line 79) | def __init__( class ResNetOnnxConfig (line 102) | class ResNetOnnxConfig(OnnxConfig): method inputs (line 107) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 115) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/resnet/convert_resnet_to_pytorch.py class Tracker (line 40) | class Tracker: method _forward_hook (line 45) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 50) | def __call__(self, x: Tensor): method parametrized (line 58) | def parametrized(self): class ModuleTransfer (line 64) | class ModuleTransfer: method __call__ (line 71) | def __call__(self, x: Tensor): function convert_weight_and_push (line 94) | def convert_weight_and_push(name: str, config: ResNetConfig, save_direct... function convert_weights_and_push (line 126) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: benchmark/third_party/transformers/src/transformers/models/resnet/modeling_resnet.py class ResNetConvLayer (line 55) | class ResNetConvLayer(nn.Module): method __init__ (line 56) | def __init__( method forward (line 66) | def forward(self, input: Tensor) -> Tensor: class ResNetEmbeddings (line 73) | class ResNetEmbeddings(nn.Module): method __init__ (line 78) | def __init__(self, config: ResNetConfig): method forward (line 86) | def forward(self, pixel_values: Tensor) -> Tensor: class ResNetShortCut (line 97) | class ResNetShortCut(nn.Module): method __init__ (line 103) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 108) | def forward(self, input: Tensor) -> Tensor: class ResNetBasicLayer (line 114) | class ResNetBasicLayer(nn.Module): method __init__ (line 119) | def __init__(self, in_channels: int, out_channels: int, stride: int = ... method forward (line 131) | def forward(self, hidden_state): class ResNetBottleNeckLayer (line 140) | class ResNetBottleNeckLayer(nn.Module): method __init__ (line 148) | def __init__( method forward (line 164) | def forward(self, hidden_state): class ResNetStage (line 173) | class ResNetStage(nn.Module): method __init__ (line 178) | def __init__( method forward (line 196) | def forward(self, input: Tensor) -> Tensor: class ResNetEncoder (line 203) | class ResNetEncoder(nn.Module): method __init__ (line 204) | def __init__(self, config: ResNetConfig): method forward (line 221) | def forward( class ResNetPreTrainedModel (line 244) | class ResNetPreTrainedModel(PreTrainedModel): method _init_weights (line 255) | def _init_weights(self, module): method _set_gradient_checkpointing (line 262) | def _set_gradient_checkpointing(self, module, value=False): class ResNetModel (line 296) | class ResNetModel(ResNetPreTrainedModel): method __init__ (line 297) | def __init__(self, config): method forward (line 315) | def forward( class ResNetForImageClassification (line 350) | class ResNetForImageClassification(ResNetPreTrainedModel): method __init__ (line 351) | def __init__(self, config): method forward (line 371) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/resnet/modeling_tf_resnet.py class TFResNetConvLayer (line 53) | class TFResNetConvLayer(tf.keras.layers.Layer): method __init__ (line 54) | def __init__( method convolution (line 66) | def convolution(self, hidden_state: tf.Tensor) -> tf.Tensor: method call (line 73) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetEmbeddings (line 80) | class TFResNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 85) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 97) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFResNetShortCut (line 110) | class TFResNetShortCut(tf.keras.layers.Layer): method __init__ (line 116) | def __init__(self, out_channels: int, stride: int = 2, **kwargs) -> None: method call (line 124) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: class TFResNetBasicLayer (line 131) | class TFResNetBasicLayer(tf.keras.layers.Layer): method __init__ (line 136) | def __init__( method call (line 150) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetBottleNeckLayer (line 160) | class TFResNetBottleNeckLayer(tf.keras.layers.Layer): method __init__ (line 168) | def __init__( method call (line 190) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetStage (line 201) | class TFResNetStage(tf.keras.layers.Layer): method __init__ (line 206) | def __init__( method call (line 220) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetEncoder (line 226) | class TFResNetEncoder(tf.keras.layers.Layer): method __init__ (line 227) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 245) | def call( class TFResNetPreTrainedModel (line 269) | class TFResNetPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 280) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 295) | def serving(self, inputs): class TFResNetMainLayer (line 328) | class TFResNetMainLayer(tf.keras.layers.Layer): method __init__ (line 331) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 339) | def call( class TFResNetModel (line 389) | class TFResNetModel(TFResNetPreTrainedModel): method __init__ (line 390) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 404) | def call( method serving_output (line 424) | def serving_output( class TFResNetForImageClassification (line 442) | class TFResNetForImageClassification(TFResNetPreTrainedModel, TFSequence... method __init__ (line 443) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method classifier (line 454) | def classifier(self, x: tf.Tensor) -> tf.Tensor: method call (line 468) | def call( method serving_output (line 499) | def serving_output(self, output: TFImageClassifierOutputWithNoAttentio... FILE: benchmark/third_party/transformers/src/transformers/models/retribert/configuration_retribert.py class RetriBertConfig (line 31) | class RetriBertConfig(PretrainedConfig): method __init__ (line 77) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/retribert/modeling_retribert.py class RetriBertPreTrainedModel (line 42) | class RetriBertPreTrainedModel(PreTrainedModel): method _init_weights (line 52) | def _init_weights(self, module): class RetriBertModel (line 88) | class RetriBertModel(RetriBertPreTrainedModel): method __init__ (line 89) | def __init__(self, config: RetriBertConfig) -> None: method embed_sentences_checkpointed (line 104) | def embed_sentences_checkpointed( method embed_questions (line 148) | def embed_questions( method embed_answers (line 162) | def embed_answers( method forward (line 176) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/retribert/tokenization_retribert.py function load_vocab (line 49) | def load_vocab(vocab_file): function whitespace_tokenize (line 61) | def whitespace_tokenize(text): class RetriBertTokenizer (line 70) | class RetriBertTokenizer(PreTrainedTokenizer): method __init__ (line 121) | def __init__( method do_lower_case (line 169) | def do_lower_case(self): method vocab_size (line 174) | def vocab_size(self): method get_vocab (line 178) | def get_vocab(self): method _tokenize (line 182) | def _tokenize(self, text): 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): method convert_tokens_to_string (line 207) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 213) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 239) | 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 298) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 320) | class BasicTokenizer(object): method __init__ (line 340) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 348) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 385) | def _run_strip_accents(self, text): method _run_split_on_punc (line 396) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 418) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 431) | def _is_chinese_char(self, cp): method _clean_text (line 455) | def _clean_text(self, text): class WordpieceTokenizer (line 470) | class WordpieceTokenizer(object): method __init__ (line 473) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 478) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/retribert/tokenization_retribert_fast.py class RetriBertTokenizerFast (line 54) | class RetriBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 105) | def __init__( method build_inputs_with_special_tokens (line 148) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 173) | def create_token_type_ids_from_sequences( method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/roberta/configuration_roberta.py class RobertaConfig (line 37) | class RobertaConfig(BertConfig): method __init__ (line 66) | def __init__(self, pad_token_id=1, bos_token_id=0, eos_token_id=2, **k... class RobertaOnnxConfig (line 71) | class RobertaOnnxConfig(OnnxConfig): method inputs (line 73) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/roberta/convert_roberta_original_pytorch_checkpoint_to_pytorch.py function convert_roberta_checkpoint_to_pytorch (line 48) | def convert_roberta_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/roberta/modeling_flax_roberta.py function create_position_ids_from_input_ids (line 54) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxRobertaEmbeddings (line 139) | class FlaxRobertaEmbeddings(nn.Module): method setup (line 145) | def setup(self): method __call__ (line 164) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxRobertaSelfAttention (line 180) | class FlaxRobertaSelfAttention(nn.Module): method setup (line 185) | def setup(self): method _split_heads (line 214) | def _split_heads(self, hidden_states): method _merge_heads (line 217) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 222) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 253) | def __call__( class FlaxRobertaSelfOutput (line 352) | class FlaxRobertaSelfOutput(nn.Module): method setup (line 356) | def setup(self): method __call__ (line 365) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRobertaAttention (line 373) | class FlaxRobertaAttention(nn.Module): method setup (line 378) | def setup(self): method __call__ (line 382) | def __call__( class FlaxRobertaIntermediate (line 416) | class FlaxRobertaIntermediate(nn.Module): method setup (line 420) | def setup(self): method __call__ (line 428) | def __call__(self, hidden_states): class FlaxRobertaOutput (line 435) | class FlaxRobertaOutput(nn.Module): method setup (line 439) | def setup(self): method __call__ (line 448) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRobertaLayer (line 456) | class FlaxRobertaLayer(nn.Module): method setup (line 460) | def setup(self): method __call__ (line 467) | def __call__( class FlaxRobertaLayerCollection (line 514) | class FlaxRobertaLayerCollection(nn.Module): method setup (line 519) | def setup(self): method __call__ (line 532) | def __call__( class FlaxRobertaEncoder (line 597) | class FlaxRobertaEncoder(nn.Module): method setup (line 602) | def setup(self): method __call__ (line 609) | def __call__( class FlaxRobertaPooler (line 637) | class FlaxRobertaPooler(nn.Module): method setup (line 641) | def setup(self): method __call__ (line 648) | def __call__(self, hidden_states): class FlaxRobertaLMHead (line 654) | class FlaxRobertaLMHead(nn.Module): method setup (line 659) | def setup(self): method __call__ (line 674) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRobertaClassificationHead (line 689) | class FlaxRobertaClassificationHead(nn.Module): method setup (line 693) | def setup(self): method __call__ (line 711) | def __call__(self, hidden_states, deterministic=True): class FlaxRobertaPreTrainedModel (line 721) | class FlaxRobertaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 732) | def __init__( method enable_gradient_checkpointing (line 746) | def enable_gradient_checkpointing(self): method init_weights (line 753) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 796) | def init_cache(self, batch_size, max_length): method __call__ (line 816) | def __call__( class FlaxRobertaModule (line 914) | class FlaxRobertaModule(nn.Module): method setup (line 920) | def setup(self): method __call__ (line 929) | def __call__( class FlaxRobertaModel (line 989) | 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 1071) | class FlaxRobertaForSequenceClassificationModule(nn.Module): method setup (line 1076) | def setup(self): method __call__ (line 1085) | def __call__( class FlaxRobertaForSequenceClassification (line 1130) | class FlaxRobertaForSequenceClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForMultipleChoiceModule (line 1144) | class FlaxRobertaForMultipleChoiceModule(nn.Module): method setup (line 1149) | def setup(self): method __call__ (line 1158) | def __call__( class FlaxRobertaForMultipleChoice (line 1212) | class FlaxRobertaForMultipleChoice(FlaxRobertaPreTrainedModel): class FlaxRobertaForTokenClassificationModule (line 1229) | class FlaxRobertaForTokenClassificationModule(nn.Module): method setup (line 1234) | def setup(self): method __call__ (line 1249) | def __call__( class FlaxRobertaForTokenClassification (line 1295) | class FlaxRobertaForTokenClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForQuestionAnsweringModule (line 1309) | class FlaxRobertaForQuestionAnsweringModule(nn.Module): method setup (line 1314) | def setup(self): method __call__ (line 1323) | def __call__( class FlaxRobertaForQuestionAnswering (line 1373) | class FlaxRobertaForQuestionAnswering(FlaxRobertaPreTrainedModel): class FlaxRobertaForCausalLMModule (line 1386) | class FlaxRobertaForCausalLMModule(nn.Module): method setup (line 1391) | def setup(self): method __call__ (line 1400) | def __call__( class FlaxRobertaForCausalLM (line 1458) | class FlaxRobertaForCausalLM(FlaxRobertaPreTrainedModel): method prepare_inputs_for_generation (line 1461) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1482) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/roberta/modeling_roberta.py class RobertaEmbeddings (line 66) | class RobertaEmbeddings(nn.Module): method __init__ (line 72) | def __init__(self, config): method forward (line 95) | def forward( method create_position_ids_from_inputs_embeds (line 135) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class RobertaSelfAttention (line 154) | class RobertaSelfAttention(nn.Module): method __init__ (line 155) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 181) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 186) | def forward( class RobertaSelfOutput (line 282) | class RobertaSelfOutput(nn.Module): method __init__ (line 283) | def __init__(self, config): method forward (line 289) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaAttention (line 297) | class RobertaAttention(nn.Module): method __init__ (line 298) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 304) | def prune_heads(self, heads): method forward (line 322) | def forward( class RobertaIntermediate (line 347) | class RobertaIntermediate(nn.Module): method __init__ (line 348) | def __init__(self, config): method forward (line 356) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaOutput (line 363) | class RobertaOutput(nn.Module): method __init__ (line 364) | def __init__(self, config): method forward (line 370) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaLayer (line 378) | class RobertaLayer(nn.Module): method __init__ (line 379) | def __init__(self, config): method forward (line 393) | def forward( method feed_forward_chunk (line 458) | def feed_forward_chunk(self, attention_output): class RobertaEncoder (line 465) | class RobertaEncoder(nn.Module): method __init__ (line 466) | def __init__(self, config): method forward (line 472) | def forward( class RobertaPooler (line 563) | class RobertaPooler(nn.Module): method __init__ (line 564) | def __init__(self, config): method forward (line 569) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreTrainedModel (line 578) | class RobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 590) | def _init_weights(self, module): method _set_gradient_checkpointing (line 606) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 610) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class RobertaModel (line 691) | class RobertaModel(RobertaPreTrainedModel): method __init__ (line 710) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 722) | def get_input_embeddings(self): method set_input_embeddings (line 725) | def set_input_embeddings(self, value): method _prune_heads (line 728) | def _prune_heads(self, heads_to_prune): method forward (line 744) | def forward( class RobertaForCausalLM (line 877) | class RobertaForCausalLM(RobertaPreTrainedModel): method __init__ (line 882) | def __init__(self, config): 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 forward (line 905) | def forward( method prepare_inputs_for_generation (line 1009) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1021) | def _reorder_cache(self, past, beam_idx): class RobertaForMaskedLM (line 1029) | class RobertaForMaskedLM(RobertaPreTrainedModel): method __init__ (line 1034) | def __init__(self, config): method get_output_embeddings (line 1052) | def get_output_embeddings(self): method set_output_embeddings (line 1055) | def set_output_embeddings(self, new_embeddings): method forward (line 1068) | def forward( class RobertaLMHead (line 1126) | class RobertaLMHead(nn.Module): method __init__ (line 1129) | def __init__(self, config): method forward (line 1138) | def forward(self, features, **kwargs): method _tie_weights (line 1148) | def _tie_weights(self): class RobertaForSequenceClassification (line 1164) | class RobertaForSequenceClassification(RobertaPreTrainedModel): method __init__ (line 1167) | def __init__(self, config): method forward (line 1187) | def forward( class RobertaForMultipleChoice (line 1264) | class RobertaForMultipleChoice(RobertaPreTrainedModel): method __init__ (line 1267) | def __init__(self, config): method forward (line 1284) | def forward( class RobertaForTokenClassification (line 1357) | class RobertaForTokenClassification(RobertaPreTrainedModel): method __init__ (line 1361) | def __init__(self, config): method forward (line 1384) | def forward( class RobertaClassificationHead (line 1437) | class RobertaClassificationHead(nn.Module): method __init__ (line 1440) | def __init__(self, config): method forward (line 1449) | def forward(self, features, **kwargs): class RobertaForQuestionAnswering (line 1466) | class RobertaForQuestionAnswering(RobertaPreTrainedModel): method __init__ (line 1470) | def __init__(self, config): method forward (line 1489) | def forward( function create_position_ids_from_input_ids (line 1564) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/roberta/modeling_tf_roberta.py class TFRobertaEmbeddings (line 76) | class TFRobertaEmbeddings(tf.keras.layers.Layer): method __init__ (line 81) | def __init__(self, config, **kwargs): method build (line 93) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 117) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 131) | def call( class TFRobertaPooler (line 187) | class TFRobertaPooler(tf.keras.layers.Layer): method __init__ (line 188) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 198) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaSelfAttention (line 208) | class TFRobertaSelfAttention(tf.keras.layers.Layer): method __init__ (line 209) | def __init__(self, config: RobertaConfig, **kwargs): method transpose_for_scores (line 236) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 243) | def call( class TFRobertaSelfOutput (line 326) | class TFRobertaSelfOutput(tf.keras.layers.Layer): method __init__ (line 327) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 336) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaAttention (line 345) | class TFRobertaAttention(tf.keras.layers.Layer): method __init__ (line 346) | def __init__(self, config: RobertaConfig, **kwargs): method prune_heads (line 352) | def prune_heads(self, heads): method call (line 355) | def call( class TFRobertaIntermediate (line 386) | class TFRobertaIntermediate(tf.keras.layers.Layer): method __init__ (line 387) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 399) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaOutput (line 407) | class TFRobertaOutput(tf.keras.layers.Layer): method __init__ (line 408) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 417) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaLayer (line 426) | class TFRobertaLayer(tf.keras.layers.Layer): method __init__ (line 427) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 440) | def call( class TFRobertaEncoder (line 513) | class TFRobertaEncoder(tf.keras.layers.Layer): method __init__ (line 514) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 519) | def call( class TFRobertaMainLayer (line 583) | class TFRobertaMainLayer(tf.keras.layers.Layer): method __init__ (line 586) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 603) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 607) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 612) | def _prune_heads(self, heads_to_prune): method call (line 621) | def call( class TFRobertaPreTrainedModel (line 780) | class TFRobertaPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 791) | def dummy_inputs(self): method serving (line 816) | def serving(self, inputs): class TFRobertaModel (line 924) | class TFRobertaModel(TFRobertaPreTrainedModel): method __init__ (line 925) | def __init__(self, config, *inputs, **kwargs): method call (line 937) | def call( method serving_output (line 994) | def serving_output( class TFRobertaLMHead (line 1015) | class TFRobertaLMHead(tf.keras.layers.Layer): method __init__ (line 1018) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1033) | def build(self, input_shape): method get_output_embeddings (line 1038) | def get_output_embeddings(self): method set_output_embeddings (line 1041) | def set_output_embeddings(self, value): method get_bias (line 1045) | def get_bias(self): method set_bias (line 1048) | def set_bias(self, value): method call (line 1052) | def call(self, hidden_states): class TFRobertaForMaskedLM (line 1068) | class TFRobertaForMaskedLM(TFRobertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1072) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1078) | def get_lm_head(self): method get_prefix_bias_name (line 1081) | def get_prefix_bias_name(self): method call (line 1096) | def call( method serving_output (line 1146) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFRobertaForCausalLM (line 1153) | class TFRobertaForCausalLM(TFRobertaPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1157) | def __init__(self, config: RobertaConfig, *inputs, **kwargs): method get_lm_head (line 1166) | def get_lm_head(self): method get_prefix_bias_name (line 1169) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1174) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method call (line 1194) | def call( method serving_output (line 1276) | def serving_output(self, output: TFCausalLMOutputWithCrossAttentions) ... method _reorder_cache (line 1291) | def _reorder_cache(past, beam_idx): class TFRobertaClassificationHead (line 1298) | class TFRobertaClassificationHead(tf.keras.layers.Layer): method __init__ (line 1301) | def __init__(self, config, **kwargs): method call (line 1317) | def call(self, features, training=False): class TFRobertaForSequenceClassification (line 1333) | class TFRobertaForSequenceClassification(TFRobertaPreTrainedModel, TFSeq... method __init__ (line 1337) | def __init__(self, config, *inputs, **kwargs): method call (line 1354) | def call( method serving_output (line 1403) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFRobertaForMultipleChoice (line 1417) | class TFRobertaForMultipleChoice(TFRobertaPreTrainedModel, TFMultipleCho... method __init__ (line 1422) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1432) | def dummy_inputs(self): method call (line 1449) | def call( method serving (line 1518) | def serving(self, inputs): method serving_output (line 1524) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFRobertaForTokenClassification (line 1538) | class TFRobertaForTokenClassification(TFRobertaPreTrainedModel, TFTokenC... method __init__ (line 1543) | def __init__(self, config, *inputs, **kwargs): method call (line 1566) | def call( method serving_output (line 1615) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFRobertaForQuestionAnswering (line 1629) | class TFRobertaForQuestionAnswering(TFRobertaPreTrainedModel, TFQuestion... method __init__ (line 1633) | def __init__(self, config, *inputs, **kwargs): method call (line 1652) | def call( method serving_output (line 1715) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/roberta/tokenization_roberta.py function bytes_to_unicode (line 69) | def bytes_to_unicode(): function get_pairs (line 93) | def get_pairs(word): class RobertaTokenizer (line 107) | class RobertaTokenizer(PreTrainedTokenizer): method __init__ (line 188) | def __init__( method vocab_size (line 243) | def vocab_size(self): method get_vocab (line 246) | def get_vocab(self): method bpe (line 249) | def bpe(self, token): method _tokenize (line 291) | def _tokenize(self, text): method _convert_token_to_id (line 301) | 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 309) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 315) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 344) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 369) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 396) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 419) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: benchmark/third_party/transformers/src/transformers/models/roberta/tokenization_roberta_fast.py class RobertaTokenizerFast (line 76) | class RobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 161) | def __init__( method mask_token (line 230) | def mask_token(self) -> str: method mask_token (line 245) | def mask_token(self, value): method _batch_encode_plus (line 256) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 265) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 275) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 279) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 286) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/roformer/configuration_roformer.py class RoFormerConfig (line 46) | class RoFormerConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class RoFormerOnnxConfig (line 148) | class RoFormerOnnxConfig(OnnxConfig): method inputs (line 150) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: benchmark/third_party/transformers/src/transformers/models/roformer/modeling_flax_roformer.py function create_sinusoidal_positions (line 132) | def create_sinusoidal_positions(n_pos, dim): class FlaxRoFormerEmbeddings (line 142) | class FlaxRoFormerEmbeddings(nn.Module): method setup (line 148) | def setup(self): method __call__ (line 162) | def __call__(self, input_ids, token_type_ids, attention_mask, determin... class FlaxRoFormerSelfAttention (line 176) | class FlaxRoFormerSelfAttention(nn.Module): method setup (line 180) | def setup(self) -> None: method __call__ (line 205) | def __call__( method apply_rotary_position_embeddings (line 275) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class FlaxRoFormerSelfOutput (line 295) | class FlaxRoFormerSelfOutput(nn.Module): method setup (line 299) | def setup(self): method __call__ (line 308) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRoFormerAttention (line 315) | class FlaxRoFormerAttention(nn.Module): method setup (line 319) | def setup(self): method __call__ (line 323) | def __call__( class FlaxRoFormerIntermediate (line 355) | class FlaxRoFormerIntermediate(nn.Module): method setup (line 359) | def setup(self): method __call__ (line 367) | def __call__(self, hidden_states): class FlaxRoFormerOutput (line 374) | class FlaxRoFormerOutput(nn.Module): method setup (line 378) | def setup(self): method __call__ (line 387) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRoFormerLayer (line 394) | class FlaxRoFormerLayer(nn.Module): method setup (line 398) | def setup(self): method __call__ (line 403) | def __call__( class FlaxRoFormerLayerCollection (line 432) | class FlaxRoFormerLayerCollection(nn.Module): method setup (line 436) | def setup(self): method __call__ (line 441) | def __call__( class FlaxRoFormerEncoder (line 494) | class FlaxRoFormerEncoder(nn.Module): method setup (line 498) | def setup(self): method __call__ (line 504) | def __call__( class FlaxRoFormerPredictionHeadTransform (line 529) | class FlaxRoFormerPredictionHeadTransform(nn.Module): method setup (line 533) | def setup(self): method __call__ (line 538) | def __call__(self, hidden_states): class FlaxRoFormerLMPredictionHead (line 545) | class FlaxRoFormerLMPredictionHead(nn.Module): method setup (line 550) | def setup(self): method __call__ (line 555) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerOnlyMLMHead (line 569) | class FlaxRoFormerOnlyMLMHead(nn.Module): method setup (line 573) | def setup(self): method __call__ (line 576) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerClassificationHead (line 581) | class FlaxRoFormerClassificationHead(nn.Module): method setup (line 585) | def setup(self): method __call__ (line 599) | def __call__(self, hidden_states, deterministic=True): class FlaxRoFormerPreTrainedModel (line 609) | class FlaxRoFormerPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 619) | def __init__( method init_weights (line 631) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 656) | def __call__( class FlaxRoFormerModule (line 704) | class FlaxRoFormerModule(nn.Module): method setup (line 708) | def setup(self): method __call__ (line 712) | def __call__( class FlaxRoFormerModel (line 749) | class FlaxRoFormerModel(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMaskedLMModule (line 758) | class FlaxRoFormerForMaskedLMModule(nn.Module): method setup (line 762) | def setup(self): method __call__ (line 766) | def __call__( class FlaxRoFormerForMaskedLM (line 809) | class FlaxRoFormerForMaskedLM(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForSequenceClassificationModule (line 823) | class FlaxRoFormerForSequenceClassificationModule(nn.Module): method setup (line 827) | def setup(self): method __call__ (line 831) | def __call__( class FlaxRoFormerForSequenceClassification (line 874) | class FlaxRoFormerForSequenceClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMultipleChoiceModule (line 887) | class FlaxRoFormerForMultipleChoiceModule(nn.Module): method setup (line 891) | def setup(self): method __call__ (line 896) | def __call__( class FlaxRoFormerForMultipleChoice (line 950) | class FlaxRoFormerForMultipleChoice(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForTokenClassificationModule (line 966) | class FlaxRoFormerForTokenClassificationModule(nn.Module): method setup (line 970) | def setup(self): method __call__ (line 975) | def __call__( class FlaxRoFormerForTokenClassification (line 1019) | class FlaxRoFormerForTokenClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForQuestionAnsweringModule (line 1032) | class FlaxRoFormerForQuestionAnsweringModule(nn.Module): method setup (line 1036) | def setup(self): method __call__ (line 1040) | def __call__( class FlaxRoFormerForQuestionAnswering (line 1088) | class FlaxRoFormerForQuestionAnswering(FlaxRoFormerPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/roformer/modeling_roformer.py class RoFormerSinusoidalPositionalEmbedding (line 68) | class RoFormerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 71) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 76) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 93) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... function load_tf_weights_in_roformer (line 102) | def load_tf_weights_in_roformer(model, config, tf_checkpoint_path): class RoFormerEmbeddings (line 175) | class RoFormerEmbeddings(nn.Module): method __init__ (line 178) | def __init__(self, config): method forward (line 188) | def forward(self, input_ids=None, token_type_ids=None, inputs_embeds=N... class RoFormerSelfAttention (line 209) | class RoFormerSelfAttention(nn.Module): method __init__ (line 210) | def __init__(self, config): method transpose_for_scores (line 231) | def transpose_for_scores(self, x): method forward (line 236) | def forward( method apply_rotary_position_embeddings (line 322) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class RoFormerSelfOutput (line 350) | class RoFormerSelfOutput(nn.Module): method __init__ (line 351) | def __init__(self, config): method forward (line 357) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerAttention (line 364) | class RoFormerAttention(nn.Module): method __init__ (line 365) | def __init__(self, config): method prune_heads (line 372) | def prune_heads(self, heads): method forward (line 391) | def forward( class RoFormerIntermediate (line 418) | class RoFormerIntermediate(nn.Module): method __init__ (line 419) | def __init__(self, config): method forward (line 427) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoFormerOutput (line 434) | class RoFormerOutput(nn.Module): method __init__ (line 435) | def __init__(self, config): method forward (line 441) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerLayer (line 448) | class RoFormerLayer(nn.Module): method __init__ (line 449) | def __init__(self, config): method forward (line 463) | def forward( method feed_forward_chunk (line 531) | def feed_forward_chunk(self, attention_output): class RoFormerEncoder (line 537) | class RoFormerEncoder(nn.Module): method __init__ (line 538) | def __init__(self, config): method forward (line 547) | def forward( class RoFormerPredictionHeadTransform (line 642) | class RoFormerPredictionHeadTransform(nn.Module): method __init__ (line 643) | def __init__(self, config): method forward (line 652) | def forward(self, hidden_states): class RoFormerLMPredictionHead (line 659) | class RoFormerLMPredictionHead(nn.Module): method __init__ (line 660) | def __init__(self, config): method forward (line 673) | def forward(self, hidden_states): class RoFormerOnlyMLMHead (line 680) | class RoFormerOnlyMLMHead(nn.Module): method __init__ (line 681) | def __init__(self, config): method forward (line 685) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RoFormerPreTrainedModel (line 690) | class RoFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 706) | def _init_weights(self, module): method _set_gradient_checkpointing (line 724) | def _set_gradient_checkpointing(self, module, value=False): class RoFormerModel (line 789) | class RoFormerModel(RoFormerPreTrainedModel): method __init__ (line 802) | def __init__(self, config): method get_input_embeddings (line 815) | def get_input_embeddings(self): method set_input_embeddings (line 818) | def set_input_embeddings(self, value): method _prune_heads (line 821) | def _prune_heads(self, heads_to_prune): method forward (line 836) | def forward( class RoFormerForMaskedLM (line 956) | class RoFormerForMaskedLM(RoFormerPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method get_output_embeddings (line 972) | def get_output_embeddings(self): method set_output_embeddings (line 975) | def set_output_embeddings(self, new_embeddings): method forward (line 985) | def forward( method prepare_inputs_for_generation (line 1039) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RoFormerForCausalLM (line 1057) | class RoFormerForCausalLM(RoFormerPreTrainedModel): method __init__ (line 1061) | def __init__(self, config): method get_output_embeddings (line 1073) | def get_output_embeddings(self): method set_output_embeddings (line 1076) | def set_output_embeddings(self, new_embeddings): method forward (line 1081) | def forward( method prepare_inputs_for_generation (line 1180) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1193) | def _reorder_cache(self, past, beam_idx): class RoFormerClassificationHead (line 1202) | class RoFormerClassificationHead(nn.Module): method __init__ (line 1205) | def __init__(self, config): method forward (line 1213) | def forward(self, features, **kwargs): class RoFormerForSequenceClassification (line 1230) | class RoFormerForSequenceClassification(RoFormerPreTrainedModel): method __init__ (line 1231) | def __init__(self, config): method forward (line 1247) | def forward( class RoFormerForMultipleChoice (line 1322) | class RoFormerForMultipleChoice(RoFormerPreTrainedModel): method __init__ (line 1323) | def __init__(self, config): method forward (line 1342) | def forward( class RoFormerForTokenClassification (line 1414) | class RoFormerForTokenClassification(RoFormerPreTrainedModel): method __init__ (line 1415) | def __init__(self, config): method forward (line 1433) | def forward( class RoFormerForQuestionAnswering (line 1491) | class RoFormerForQuestionAnswering(RoFormerPreTrainedModel): method __init__ (line 1492) | def __init__(self, config): method forward (line 1511) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/roformer/modeling_tf_roformer.py class TFRoFormerSinusoidalPositionalEmbedding (line 77) | class TFRoFormerSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 89) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 108) | def _init_weight(n_pos: int, dim: int): method call (line 125) | def call(self, input_shape: tf.TensorShape, past_key_values_length: in... class TFRoFormerEmbeddings (line 133) | class TFRoFormerEmbeddings(tf.keras.layers.Layer): method __init__ (line 136) | def __init__(self, config: RoFormerConfig, **kwargs): method build (line 146) | def build(self, input_shape: tf.TensorShape): method call (line 163) | def call( class TFRoFormerSelfAttention (line 205) | class TFRoFormerSelfAttention(tf.keras.layers.Layer): method __init__ (line 206) | def __init__(self, config: RoFormerConfig, **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 apply_rotary_position_embeddings (line 295) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class TFRoFormerSelfOutput (line 322) | class TFRoFormerSelfOutput(tf.keras.layers.Layer): method __init__ (line 323) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 332) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRoFormerAttention (line 340) | class TFRoFormerAttention(tf.keras.layers.Layer): method __init__ (line 341) | def __init__(self, config: RoFormerConfig, **kwargs): method prune_heads (line 347) | def prune_heads(self, heads): method call (line 350) | def call( class TFRoFormerIntermediate (line 376) | class TFRoFormerIntermediate(tf.keras.layers.Layer): method __init__ (line 377) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 389) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerOutput (line 397) | class TFRoFormerOutput(tf.keras.layers.Layer): method __init__ (line 398) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 407) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRoFormerLayer (line 415) | class TFRoFormerLayer(tf.keras.layers.Layer): method __init__ (line 416) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 423) | def call( class TFRoFormerEncoder (line 450) | class TFRoFormerEncoder(tf.keras.layers.Layer): method __init__ (line 451) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 460) | def call( class TFRoFormerPredictionHeadTransform (line 505) | class TFRoFormerPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 506) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 522) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerLMPredictionHead (line 530) | class TFRoFormerLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 531) | def __init__(self, config: RoFormerConfig, input_embeddings: tf.keras.... method build (line 543) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 548) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 551) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 555) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 558) | def set_bias(self, value: tf.Variable): method call (line 562) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerMLMHead (line 574) | class TFRoFormerMLMHead(tf.keras.layers.Layer): method __init__ (line 575) | def __init__(self, config: RoFormerConfig, input_embeddings: tf.keras.... method call (line 580) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFRoFormerMainLayer (line 587) | class TFRoFormerMainLayer(tf.keras.layers.Layer): method __init__ (line 590) | def __init__(self, config: RoFormerConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 601) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 604) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 608) | def _prune_heads(self, heads_to_prune): method call (line 616) | def call( class TFRoFormerPreTrainedModel (line 702) | class TFRoFormerPreTrainedModel(TFPreTrainedModel): class TFRoFormerModel (line 809) | class TFRoFormerModel(TFRoFormerPreTrainedModel): method __init__ (line 810) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 823) | def call( method serving_output (line 849) | def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput: class TFRoFormerForMaskedLM (line 857) | class TFRoFormerForMaskedLM(TFRoFormerPreTrainedModel, TFMaskedLanguageM... method __init__ (line 858) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 870) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 881) | def call( method serving_output (line 926) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFRoFormerForCausalLM (line 936) | class TFRoFormerForCausalLM(TFRoFormerPreTrainedModel, TFCausalLanguageM... method __init__ (line 937) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 946) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 956) | def call( method serving_output (line 1006) | def serving_output(self, output: TFCausalLMOutput) -> TFCausalLMOutput: class TFRoFormerClassificationHead (line 1013) | class TFRoFormerClassificationHead(tf.keras.layers.Layer): method __init__ (line 1016) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1032) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFRoFormerForSequenceClassification (line 1049) | class TFRoFormerForSequenceClassification(TFRoFormerPreTrainedModel, TFS... method __init__ (line 1050) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1066) | def call( method serving_output (line 1111) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFRoFormerForMultipleChoice (line 1125) | class TFRoFormerForMultipleChoice(TFRoFormerPreTrainedModel, TFMultipleC... method __init__ (line 1126) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method dummy_inputs (line 1136) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method call (line 1156) | def call( method serving (line 1230) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceMod... method serving_output (line 1235) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFRoFormerForTokenClassification (line 1249) | class TFRoFormerForTokenClassification(TFRoFormerPreTrainedModel, TFToke... method __init__ (line 1250) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1269) | def call( method serving_output (line 1313) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFRoFormerForQuestionAnswering (line 1327) | class TFRoFormerForQuestionAnswering(TFRoFormerPreTrainedModel, TFQuesti... method __init__ (line 1328) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1346) | def call( method serving_output (line 1404) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/roformer/tokenization_roformer.py function load_vocab (line 70) | def load_vocab(vocab_file): function whitespace_tokenize (line 82) | def whitespace_tokenize(text): class BasicTokenizer (line 92) | class BasicTokenizer(object): method __init__ (line 112) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 120) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 157) | def _run_strip_accents(self, text): method _run_split_on_punc (line 168) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 190) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 203) | def _is_chinese_char(self, cp): method _clean_text (line 227) | def _clean_text(self, text): class WordpieceTokenizer (line 242) | class WordpieceTokenizer(object): method __init__ (line 245) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 250) | def tokenize(self, text): class RoFormerTokenizer (line 299) | class RoFormerTokenizer(PreTrainedTokenizer): method __init__ (line 354) | def __init__( method do_lower_case (line 409) | def do_lower_case(self): method vocab_size (line 413) | def vocab_size(self): method __getstate__ (line 416) | def __getstate__(self): method __setstate__ (line 421) | def __setstate__(self, d): method get_vocab (line 427) | def get_vocab(self): method _tokenize (line 430) | def _tokenize(self, text, use_jieba=True): method _convert_token_to_id (line 452) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 456) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 460) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 465) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 490) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 518) | def create_token_type_ids_from_sequences( method save_vocabulary (line 547) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/roformer/tokenization_roformer_fast.py class RoFormerTokenizerFast (line 71) | class RoFormerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 97) | def __init__( method __getstate__ (line 137) | def __getstate__(self): method __setstate__ (line 142) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 147) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 171) | def create_token_type_ids_from_sequences( method save_vocabulary (line 200) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method save_pretrained (line 204) | def save_pretrained( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/segformer/configuration_segformer.py class SegformerConfig (line 38) | class SegformerConfig(PretrainedConfig): method __init__ (line 105) | def __init__( class SegformerOnnxConfig (line 158) | class SegformerOnnxConfig(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: method default_onnx_opset (line 175) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/segformer/convert_segformer_original_to_pytorch.py function rename_keys (line 41) | def rename_keys(state_dict, encoder_only=False): function read_in_k_v (line 92) | def read_in_k_v(state_dict, config): function prepare_img (line 113) | def prepare_img(): function convert_segformer_checkpoint (line 121) | def convert_segformer_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: benchmark/third_party/transformers/src/transformers/models/segformer/feature_extraction_segformer.py class SegformerFeatureExtractor (line 41) | class SegformerFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtr... method __init__ (line 75) | def __init__( method __call__ (line 95) | def __call__( method post_process_semantic_segmentation (line 221) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: benchmark/third_party/transformers/src/transformers/models/segformer/modeling_segformer.py class SegFormerImageClassifierOutput (line 61) | class SegFormerImageClassifierOutput(ImageClassifierOutput): function drop_path (line 89) | def drop_path(input, drop_prob: float = 0.0, training: bool = False, sca... class SegformerDropPath (line 110) | class SegformerDropPath(nn.Module): method __init__ (line 113) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 117) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 120) | def extra_repr(self) -> str: class SegformerOverlapPatchEmbeddings (line 124) | class SegformerOverlapPatchEmbeddings(nn.Module): method __init__ (line 127) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 139) | def forward(self, pixel_values): class SegformerEfficientSelfAttention (line 149) | class SegformerEfficientSelfAttention(nn.Module): method __init__ (line 153) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 180) | def transpose_for_scores(self, hidden_states): method forward (line 185) | def forward( class SegformerSelfOutput (line 230) | class SegformerSelfOutput(nn.Module): method __init__ (line 231) | def __init__(self, config, hidden_size): method forward (line 236) | def forward(self, hidden_states, input_tensor): class SegformerAttention (line 242) | class SegformerAttention(nn.Module): method __init__ (line 243) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 254) | def prune_heads(self, heads): method forward (line 272) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerDWConv (line 280) | class SegformerDWConv(nn.Module): method __init__ (line 281) | def __init__(self, dim=768): method forward (line 285) | def forward(self, hidden_states, height, width): class SegformerMixFFN (line 294) | class SegformerMixFFN(nn.Module): method __init__ (line 295) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 307) | def forward(self, hidden_states, height, width): class SegformerLayer (line 317) | class SegformerLayer(nn.Module): method __init__ (line 320) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 334) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerEncoder (line 360) | class SegformerEncoder(nn.Module): method __init__ (line 361) | def __init__(self, config): method forward (line 409) | def forward( class SegformerPreTrainedModel (line 451) | class SegformerPreTrainedModel(PreTrainedModel): method _init_weights (line 461) | def _init_weights(self, module): class SegformerModel (line 511) | class SegformerModel(SegformerPreTrainedModel): method __init__ (line 512) | def __init__(self, config): method _prune_heads (line 522) | def _prune_heads(self, heads_to_prune): method forward (line 539) | def forward( class SegformerForImageClassification (line 577) | class SegformerForImageClassification(SegformerPreTrainedModel): method __init__ (line 578) | def __init__(self, config): method forward (line 598) | def forward( class SegformerMLP (line 669) | class SegformerMLP(nn.Module): method __init__ (line 674) | def __init__(self, config: SegformerConfig, input_dim): method forward (line 678) | def forward(self, hidden_states: torch.Tensor): class SegformerDecodeHead (line 684) | class SegformerDecodeHead(SegformerPreTrainedModel): method __init__ (line 685) | def __init__(self, config): method forward (line 709) | def forward(self, encoder_hidden_states): class SegformerForSemanticSegmentation (line 746) | class SegformerForSemanticSegmentation(SegformerPreTrainedModel): method __init__ (line 747) | def __init__(self, config): method forward (line 757) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/segformer/modeling_tf_segformer.py class TFSegformerDropPath (line 57) | class TFSegformerDropPath(tf.keras.layers.Layer): method __init__ (line 63) | def __init__(self, drop_path, **kwargs): method call (line 67) | def call(self, x, training=None): class TFSegformerOverlapPatchEmbeddings (line 77) | class TFSegformerOverlapPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, patch_size, stride, hidden_size, **kwargs): method call (line 89) | def call(self, pixel_values: tf.Tensor) -> Tuple[tf.Tensor, int, int]: class TFSegformerEfficientSelfAttention (line 101) | class TFSegformerEfficientSelfAttention(tf.keras.layers.Layer): method __init__ (line 105) | def __init__( method transpose_for_scores (line 140) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 150) | def call( class TFSegformerSelfOutput (line 198) | class TFSegformerSelfOutput(tf.keras.layers.Layer): method __init__ (line 199) | def __init__(self, config: SegformerConfig, hidden_size: int, **kwargs): method call (line 204) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFSegformerAttention (line 210) | class TFSegformerAttention(tf.keras.layers.Layer): method __init__ (line 211) | def __init__( method call (line 229) | def call( class TFSegformerDWConv (line 239) | class TFSegformerDWConv(tf.keras.layers.Layer): method __init__ (line 240) | def __init__(self, dim: int = 768, **kwargs): method call (line 246) | def call(self, hidden_states: tf.Tensor, height: int, width: int) -> t... class TFSegformerMixFFN (line 259) | class TFSegformerMixFFN(tf.keras.layers.Layer): method __init__ (line 260) | def __init__( method call (line 279) | def call(self, hidden_states: tf.Tensor, height: int, width: int, trai... class TFSegformerLayer (line 289) | class TFSegformerLayer(tf.keras.layers.Layer): method __init__ (line 292) | def __init__( method call (line 316) | def call( class TFSegformerEncoder (line 349) | class TFSegformerEncoder(tf.keras.layers.Layer): method __init__ (line 350) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 400) | def call( class TFSegformerMainLayer (line 452) | class TFSegformerMainLayer(tf.keras.layers.Layer): method __init__ (line 455) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 463) | def call( class TFSegformerPreTrainedModel (line 511) | class TFSegformerPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 522) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 539) | def serving(self, inputs): class TFSegformerModel (line 598) | class TFSegformerModel(TFSegformerPreTrainedModel): method __init__ (line 599) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 616) | def call( method serving_output (line 633) | def serving_output(self, output: TFBaseModelOutput) -> TFBaseModelOutput: class TFSegformerForImageClassification (line 649) | class TFSegformerForImageClassification(TFSegformerPreTrainedModel, TFSe... method __init__ (line 650) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 668) | def call( method serving_output (line 705) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFSegformerMLP (line 712) | class TFSegformerMLP(tf.keras.layers.Layer): method __init__ (line 717) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 721) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFSegformerDecodeHead (line 730) | class TFSegformerDecodeHead(TFSegformerPreTrainedModel): method __init__ (line 731) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 752) | def call(self, encoder_hidden_states, training: bool = False): class TFSegformerForSemanticSegmentation (line 790) | class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel): method __init__ (line 791) | def __init__(self, config: SegformerConfig, **kwargs): method hf_compute_loss (line 796) | def hf_compute_loss(self, logits, labels): method call (line 819) | def call( method serving_output (line 896) | def serving_output(self, output: TFSemanticSegmenterOutput) -> TFSeman... FILE: benchmark/third_party/transformers/src/transformers/models/sew/configuration_sew.py class SEWConfig (line 32) | class SEWConfig(PretrainedConfig): method __init__ (line 154) | def __init__( method inputs_to_logits_ratio (line 251) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/sew/modeling_sew.py function _compute_mask_indices (line 75) | def _compute_mask_indices( class SEWNoLayerNormConvLayer (line 195) | class SEWNoLayerNormConvLayer(nn.Module): method __init__ (line 196) | def __init__(self, config, layer_id=0): method forward (line 210) | def forward(self, hidden_states): class SEWLayerNormConvLayer (line 217) | class SEWLayerNormConvLayer(nn.Module): method __init__ (line 218) | def __init__(self, config, layer_id=0): method forward (line 233) | def forward(self, hidden_states): class SEWGroupNormConvLayer (line 245) | class SEWGroupNormConvLayer(nn.Module): method __init__ (line 246) | def __init__(self, config, layer_id=0): method forward (line 262) | def forward(self, hidden_states): class SEWPositionalConvEmbedding (line 269) | class SEWPositionalConvEmbedding(nn.Module): method __init__ (line 270) | def __init__(self, config): method forward (line 294) | def forward(self, hidden_states): class SEWSamePadLayer (line 303) | class SEWSamePadLayer(nn.Module): method __init__ (line 304) | def __init__(self, num_conv_pos_embeddings): method forward (line 308) | def forward(self, hidden_states): class SEWUpsampling (line 314) | class SEWUpsampling(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 321) | def forward(self, hidden_states): class SEWFeatureEncoder (line 337) | class SEWFeatureEncoder(nn.Module): method __init__ (line 340) | def __init__(self, config): method _freeze_parameters (line 357) | def _freeze_parameters(self): method forward (line 362) | def forward(self, input_values): class SEWFeatureExtractor (line 388) | class SEWFeatureExtractor(SEWFeatureEncoder): method __init__ (line 389) | def __init__(self, config): class SEWAttention (line 400) | class SEWAttention(nn.Module): method __init__ (line 403) | def __init__( method _shape (line 430) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 433) | def forward( class SEWFeedForward (line 548) | class SEWFeedForward(nn.Module): method __init__ (line 549) | def __init__(self, config): method forward (line 562) | def forward(self, hidden_states): class SEWEncoderLayer (line 573) | class SEWEncoderLayer(nn.Module): method __init__ (line 574) | def __init__(self, config): method forward (line 587) | def forward(self, hidden_states, attention_mask=None, output_attention... class SEWEncoder (line 607) | class SEWEncoder(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 619) | def forward( class SEWPreTrainedModel (line 717) | class SEWPreTrainedModel(PreTrainedModel): method _init_weights (line 729) | def _init_weights(self, module): method _set_gradient_checkpointing (line 761) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 765) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 780) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class SEWModel (line 843) | class SEWModel(SEWPreTrainedModel): method __init__ (line 844) | def __init__(self, config: SEWConfig): method _mask_hidden_states (line 864) | def _mask_hidden_states( method forward (line 919) | def forward( class SEWForCTC (line 973) | class SEWForCTC(SEWPreTrainedModel): method __init__ (line 974) | def __init__(self, config): method freeze_feature_extractor (line 995) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1007) | def freeze_feature_encoder(self): method forward (line 1023) | def forward( class SEWForSequenceClassification (line 1104) | class SEWForSequenceClassification(SEWPreTrainedModel): method __init__ (line 1105) | def __init__(self, config): method freeze_feature_extractor (line 1122) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1134) | def freeze_feature_encoder(self): method freeze_base_model (line 1141) | def freeze_base_model(self): method forward (line 1159) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/sew_d/configuration_sew_d.py class SEWDConfig (line 32) | class SEWDConfig(PretrainedConfig): method __init__ (line 174) | def __init__( method inputs_to_logits_ratio (line 287) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/sew_d/modeling_sew_d.py function _compute_mask_indices (line 76) | def _compute_mask_indices( function make_log_bucket_position (line 196) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 212) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 243) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 249) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 255) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function get_mask (line 260) | def get_mask(input, local_context): class SEWDNoLayerNormConvLayer (line 280) | class SEWDNoLayerNormConvLayer(nn.Module): method __init__ (line 281) | def __init__(self, config, layer_id=0): method forward (line 295) | def forward(self, hidden_states): class SEWDLayerNormConvLayer (line 302) | class SEWDLayerNormConvLayer(nn.Module): method __init__ (line 303) | def __init__(self, config, layer_id=0): method forward (line 318) | def forward(self, hidden_states): class SEWDGroupNormConvLayer (line 330) | class SEWDGroupNormConvLayer(nn.Module): method __init__ (line 331) | def __init__(self, config, layer_id=0): method forward (line 347) | def forward(self, hidden_states): class SEWDPositionalConvEmbedding (line 355) | class SEWDPositionalConvEmbedding(nn.Module): method __init__ (line 356) | def __init__(self, config): method forward (line 380) | def forward(self, hidden_states): class SEWDSamePadLayer (line 389) | class SEWDSamePadLayer(nn.Module): method __init__ (line 390) | def __init__(self, num_conv_pos_embeddings): method forward (line 394) | def forward(self, hidden_states): class SEWDUpsampling (line 401) | class SEWDUpsampling(nn.Module): method __init__ (line 402) | def __init__(self, config): method forward (line 408) | def forward(self, hidden_states): class SEWDFeatureEncoder (line 424) | class SEWDFeatureEncoder(nn.Module): method __init__ (line 427) | def __init__(self, config): method _freeze_parameters (line 444) | def _freeze_parameters(self): method forward (line 449) | def forward(self, input_values): class SEWDFeatureExtractor (line 475) | class SEWDFeatureExtractor(SEWDFeatureEncoder): method __init__ (line 476) | def __init__(self, config): class ContextPooler (line 487) | class ContextPooler(nn.Module): method __init__ (line 488) | def __init__(self, config): method forward (line 494) | def forward(self, hidden_states): method output_dim (line 505) | def output_dim(self): class XSoftmax (line 510) | class XSoftmax(torch.autograd.Function): method forward (line 539) | def forward(self, input, mask, dim): method backward (line 550) | def backward(self, grad_output): method symbolic (line 556) | def symbolic(g, self, mask, dim): class DropoutContext (line 574) | class DropoutContext(object): method __init__ (line 575) | def __init__(self): class XDropout (line 583) | class XDropout(torch.autograd.Function): method forward (line 587) | def forward(ctx, input, local_ctx): method backward (line 597) | def backward(ctx, grad_output): method symbolic (line 605) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 623) | class StableDropout(nn.Module): method __init__ (line 631) | def __init__(self, drop_prob): method forward (line 637) | def forward(self, x): method clear_context (line 648) | def clear_context(self): method init_context (line 652) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 660) | def get_context(self): class SEWDSelfOutput (line 673) | class SEWDSelfOutput(nn.Module): method __init__ (line 674) | def __init__(self, config): method forward (line 680) | def forward(self, hidden_states, input_tensor): class DisentangledSelfAttention (line 688) | class DisentangledSelfAttention(nn.Module): method __init__ (line 699) | def __init__(self, config): method transpose_for_scores (line 737) | def transpose_for_scores(self, x, attention_heads): method forward (line 742) | def forward( method disentangled_attention_bias (line 826) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class SEWDAttention (line 905) | class SEWDAttention(nn.Module): method __init__ (line 906) | def __init__(self, config): method forward (line 912) | def forward( class SEWDIntermediate (line 942) | class SEWDIntermediate(nn.Module): method __init__ (line 943) | def __init__(self, config): method forward (line 951) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SEWDOutput (line 958) | class SEWDOutput(nn.Module): method __init__ (line 959) | def __init__(self, config): method forward (line 966) | def forward(self, hidden_states, input_tensor): class SEWDLayer (line 974) | class SEWDLayer(nn.Module): method __init__ (line 975) | def __init__(self, config): method forward (line 981) | def forward( class ConvLayer (line 1009) | class ConvLayer(nn.Module): method __init__ (line 1010) | def __init__(self, config): method forward (line 1022) | def forward(self, hidden_states, residual_states, input_mask): class SEWDTransformerEncoder (line 1046) | class SEWDTransformerEncoder(nn.Module): method __init__ (line 1049) | def __init__(self, config): method get_rel_embedding (line 1076) | def get_rel_embedding(self): method get_attention_mask (line 1082) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 1092) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 1100) | def forward( class SEWDEncoder (line 1183) | class SEWDEncoder(nn.Module): method __init__ (line 1184) | def __init__(self, config): method forward (line 1193) | def forward( class SEWDPreTrainedModel (line 1246) | class SEWDPreTrainedModel(PreTrainedModel): method _init_weights (line 1258) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1294) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1309) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1321) | def _set_gradient_checkpointing(self, module, value=False): class SEWDModel (line 1377) | class SEWDModel(SEWDPreTrainedModel): method __init__ (line 1378) | def __init__(self, config: SEWDConfig): method _mask_hidden_states (line 1398) | def _mask_hidden_states( method forward (line 1453) | def forward( class SEWDForCTC (line 1507) | class SEWDForCTC(SEWDPreTrainedModel): method __init__ (line 1508) | def __init__(self, config): method freeze_feature_extractor (line 1529) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1541) | def freeze_feature_encoder(self): method forward (line 1557) | def forward( class SEWDForSequenceClassification (line 1638) | class SEWDForSequenceClassification(SEWDPreTrainedModel): method __init__ (line 1639) | def __init__(self, config): method freeze_feature_extractor (line 1656) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1668) | def freeze_feature_encoder(self): method freeze_base_model (line 1675) | def freeze_base_model(self): method forward (line 1693) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/speech_encoder_decoder/configuration_speech_encoder_decoder.py class SpeechEncoderDecoderConfig (line 27) | class SpeechEncoderDecoderConfig(PretrainedConfig): method __init__ (line 76) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 94) | def from_encoder_decoder_configs( method to_dict (line 110) | def to_dict(self): FILE: benchmark/third_party/transformers/src/transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 69) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 97) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 143) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function load_adapter (line 183) | def load_adapter(full_name, value, adapter, unused_weights): function make_linear_from_emb (line 237) | def make_linear_from_emb(emb): function convert_wav2vec2_checkpoint (line 245) | def convert_wav2vec2_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/speech_encoder_decoder/convert_speech_to_text_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 71) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 99) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 149) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function make_linear_from_emb (line 189) | def make_linear_from_emb(emb): function create_vocab_dict (line 196) | def create_vocab_dict(dict_path): function convert_wav2vec2_checkpoint (line 215) | def convert_wav2vec2_checkpoint( FILE: benchmark/third_party/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 378) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 421) | def init_cache(self, batch_size, max_length, encoder_outputs): method _get_feat_extract_output_lengths (line 462) | def _get_feat_extract_output_lengths( method encode (line 469) | def encode( method decode (line 539) | def decode( method __call__ (line 664) | def __call__( method prepare_inputs_for_generation (line 746) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 779) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 785) | def from_encoder_decoder_pretrained( FILE: benchmark/third_party/transformers/src/transformers/models/speech_encoder_decoder/modeling_speech_encoder_decoder.py function shift_tokens_right (line 154) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class SpeechEncoderDecoderModel (line 173) | class SpeechEncoderDecoderModel(PreTrainedModel): method __init__ (line 185) | def __init__( method _set_gradient_checkpointing (line 252) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 257) | def get_encoder(self): method get_decoder (line 260) | def get_decoder(self): method get_output_embeddings (line 263) | def get_output_embeddings(self): method set_output_embeddings (line 266) | def set_output_embeddings(self, new_embeddings): method freeze_feature_encoder (line 269) | def freeze_feature_encoder(self): method from_pretrained (line 277) | def from_pretrained(cls, *args, **kwargs): method from_encoder_decoder_pretrained (line 288) | def from_encoder_decoder_pretrained( method forward (line 444) | def forward( method prepare_decoder_input_ids_from_labels (line 582) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 585) | def prepare_inputs_for_generation( method resize_token_embeddings (line 600) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 606) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text/configuration_speech_to_text.py class Speech2TextConfig (line 31) | class Speech2TextConfig(PretrainedConfig): method __init__ (line 118) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/speech_to_text/feature_extraction_speech_to_text.py class Speech2TextFeatureExtractor (line 33) | class Speech2TextFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 62) | def __init__( method _extract_fbank_features (line 80) | def _extract_fbank_features( method utterance_cmvn (line 94) | def utterance_cmvn( method normalize (line 117) | def normalize( method __call__ (line 126) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text/modeling_speech_to_text.py function shift_tokens_right (line 50) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 67) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 83) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class Conv1dSubsampler (line 97) | class Conv1dSubsampler(nn.Module): method __init__ (line 103) | def __init__(self, config): method forward (line 123) | def forward(self, input_features): class Speech2TextSinusoidalPositionalEmbedding (line 132) | class Speech2TextSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 135) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 142) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 153) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 171) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 185) | def create_position_ids_from_input_ids( class Speech2TextAttention (line 203) | class Speech2TextAttention(nn.Module): method __init__ (line 206) | def __init__( method _shape (line 233) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 236) | def forward( class Speech2TextEncoderLayer (line 350) | class Speech2TextEncoderLayer(nn.Module): method __init__ (line 351) | def __init__(self, config: Speech2TextConfig): method forward (line 367) | def forward( class Speech2TextDecoderLayer (line 418) | class Speech2TextDecoderLayer(nn.Module): method __init__ (line 419) | def __init__(self, config: Speech2TextConfig): method forward (line 445) | def forward( class Speech2TextPreTrainedModel (line 535) | class Speech2TextPreTrainedModel(PreTrainedModel): method _init_weights (line 541) | def _init_weights(self, module): method _set_gradient_checkpointing (line 552) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 556) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 565) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... class Speech2TextEncoder (line 689) | class Speech2TextEncoder(Speech2TextPreTrainedModel): method __init__ (line 699) | def __init__(self, config: Speech2TextConfig): method forward (line 724) | def forward( class Speech2TextDecoder (line 845) | class Speech2TextDecoder(Speech2TextPreTrainedModel): method __init__ (line 854) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 878) | def get_input_embeddings(self): method set_input_embeddings (line 881) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 884) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 902) | def forward( class Speech2TextModel (line 1121) | class Speech2TextModel(Speech2TextPreTrainedModel): method __init__ (line 1122) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 1131) | def get_input_embeddings(self): method set_input_embeddings (line 1134) | def set_input_embeddings(self, value): method get_encoder (line 1137) | def get_encoder(self): method get_decoder (line 1140) | def get_decoder(self): method forward (line 1145) | def forward( class Speech2TextForConditionalGeneration (line 1252) | class Speech2TextForConditionalGeneration(Speech2TextPreTrainedModel): method __init__ (line 1265) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1273) | def get_encoder(self): method get_decoder (line 1276) | def get_decoder(self): method resize_token_embeddings (line 1279) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: 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( method prepare_inputs_for_generation (line 1388) | def prepare_inputs_for_generation( method _reorder_cache (line 1416) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py function shift_tokens_right (line 67) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 92) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 110) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFConv1dSubsampler (line 123) | class TFConv1dSubsampler(tf.keras.layers.Layer): method __init__ (line 129) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 148) | def call(self, input_features: tf.Tensor) -> tf.Tensor: class TFSpeech2TextSinusoidalPositionalEmbedding (line 169) | class TFSpeech2TextSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 172) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _get_embedding (line 180) | def _get_embedding(num_embeddings: int, embedding_dim: int, padding_id... method build (line 197) | def build(self, input_shape: tf.TensorShape): method call (line 210) | def call(self, input_ids: tf.Tensor, past_key_values_length: int = 0) ... method create_position_ids_from_input_ids (line 223) | def create_position_ids_from_input_ids( class TFSpeech2TextAttention (line 240) | class TFSpeech2TextAttention(tf.keras.layers.Layer): method __init__ (line 243) | def __init__( method _shape (line 271) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 274) | def call( class TFSpeech2TextEncoderLayer (line 393) | class TFSpeech2TextEncoderLayer(tf.keras.layers.Layer): method __init__ (line 394) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 408) | def call( class TFSpeech2TextDecoderLayer (line 448) | class TFSpeech2TextDecoderLayer(tf.keras.layers.Layer): method __init__ (line 449) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 477) | def call( class TFSpeech2TextPreTrainedModel (line 560) | class TFSpeech2TextPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 567) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method _get_feat_extract_output_lengths (line 585) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method serving (line 604) | def serving(self, inputs): class TFSpeech2TextEncoder (line 728) | class TFSpeech2TextEncoder(tf.keras.layers.Layer): method __init__ (line 738) | def __init__(self, config: Speech2TextConfig, **kwargs): method _get_feat_extract_output_lengths (line 761) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _get_feature_vector_attention_mask (line 770) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... method call (line 790) | def call( class TFSpeech2TextDecoder (line 897) | class TFSpeech2TextDecoder(tf.keras.layers.Layer): method __init__ (line 906) | def __init__(self, config: Speech2TextConfig, **kwargs): method get_embed_tokens (line 928) | def get_embed_tokens(self): method set_embed_tokens (line 931) | def set_embed_tokens(self, embed_tokens): method call (line 935) | def call( class TFSpeech2TextMainLayer (line 1128) | class TFSpeech2TextMainLayer(tf.keras.layers.Layer): method __init__ (line 1131) | def __init__(self, config: Speech2TextConfig, **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 1145) | def call( class TFSpeech2TextModel (line 1236) | class TFSpeech2TextModel(TFSpeech2TextPreTrainedModel): method __init__ (line 1237) | def __init__(self, config: Speech2TextConfig, *inputs, **kwargs): method get_encoder (line 1242) | def get_encoder(self): method get_decoder (line 1245) | def get_decoder(self): method call (line 1256) | def call( method serving_output (line 1295) | def serving_output(self, output): class TFSpeech2TextForConditionalGeneration (line 1319) | class TFSpeech2TextForConditionalGeneration(TFSpeech2TextPreTrainedModel... method __init__ (line 1320) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1327) | def get_encoder(self): method get_decoder (line 1330) | def get_decoder(self): method resize_token_embeddings (line 1333) | def resize_token_embeddings(self, new_num_tokens: int) -> tf.Variable: method get_output_embeddings (line 1337) | def get_output_embeddings(self): method set_output_embeddings (line 1340) | def set_output_embeddings(self, new_embeddings): method call (line 1346) | def call( method serving_output (line 1449) | def serving_output(self, output): method prepare_inputs_for_generation (line 1468) | def prepare_inputs_for_generation( method _reorder_cache (line 1497) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text/processing_speech_to_text.py class Speech2TextProcessor (line 24) | class Speech2TextProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 47) | def __call__(self, *args, **kwargs): method batch_decode (line 85) | def batch_decode(self, *args, **kwargs): method decode (line 92) | def decode(self, *args, **kwargs): method as_target_processor (line 100) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text/tokenization_speech_to_text.py class Speech2TextTokenizer (line 59) | class Speech2TextTokenizer(PreTrainedTokenizer): method __init__ (line 113) | def __init__( method vocab_size (line 164) | def vocab_size(self) -> int: method tgt_lang (line 168) | def tgt_lang(self) -> str: method tgt_lang (line 172) | def tgt_lang(self, new_tgt_lang) -> None: method set_tgt_lang_special_tokens (line 176) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _tokenize (line 181) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 184) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 187) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 191) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 199) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 206) | def get_special_tokens_mask( method get_vocab (line 236) | def get_vocab(self) -> Dict: 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: benchmark/third_party/transformers/src/transformers/models/speech_to_text_2/configuration_speech_to_text_2.py class Speech2Text2Config (line 31) | class Speech2Text2Config(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py function _make_causal_mask (line 47) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 63) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class Speech2Text2SinusoidalPositionalEmbedding (line 78) | class Speech2Text2SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 81) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 88) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 99) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 117) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 131) | def create_position_ids_from_input_ids( class Speech2Text2Attention (line 149) | class Speech2Text2Attention(nn.Module): method __init__ (line 152) | def __init__( method _shape (line 179) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 182) | def forward( class Speech2Text2DecoderLayer (line 296) | class Speech2Text2DecoderLayer(nn.Module): method __init__ (line 297) | def __init__(self, config: Speech2Text2Config): method forward (line 326) | def forward( class Speech2Text2PreTrainedModel (line 416) | class Speech2Text2PreTrainedModel(PreTrainedModel): method _init_weights (line 421) | def _init_weights(self, module): method _set_gradient_checkpointing (line 432) | def _set_gradient_checkpointing(self, module, value=False): class Speech2Text2Decoder (line 454) | class Speech2Text2Decoder(Speech2Text2PreTrainedModel): method __init__ (line 463) | def __init__(self, config: Speech2Text2Config): method get_input_embeddings (line 485) | def get_input_embeddings(self): method set_input_embeddings (line 488) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 491) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 509) | def forward( class Speech2Text2DecoderWrapper (line 728) | class Speech2Text2DecoderWrapper(Speech2Text2PreTrainedModel): method __init__ (line 734) | def __init__(self, config): method forward (line 738) | def forward(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 747) | class Speech2Text2ForCausalLM(Speech2Text2PreTrainedModel): method __init__ (line 748) | def __init__(self, config): method get_input_embeddings (line 760) | def get_input_embeddings(self): method set_input_embeddings (line 763) | def set_input_embeddings(self, value): method get_output_embeddings (line 766) | def get_output_embeddings(self): method set_output_embeddings (line 769) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 772) | def set_decoder(self, decoder): method get_decoder (line 775) | def get_decoder(self): method forward (line 779) | def forward( method prepare_inputs_for_generation (line 945) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 961) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py class Speech2Text2Processor (line 24) | class Speech2Text2Processor(ProcessorMixin): method __init__ (line 41) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 46) | def __call__(self, *args, **kwargs): method batch_decode (line 84) | def batch_decode(self, *args, **kwargs): method decode (line 91) | def decode(self, *args, **kwargs): method as_target_processor (line 99) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py function get_pairs (line 56) | def get_pairs(word): class Speech2Text2Tokenizer (line 73) | class Speech2Text2Tokenizer(PreTrainedTokenizer): method __init__ (line 102) | def __init__( method vocab_size (line 142) | def vocab_size(self) -> int: method get_vocab (line 145) | def get_vocab(self) -> Dict: method bpe (line 148) | def bpe(self, token): method _tokenize (line 197) | def _tokenize(self, text): method _convert_token_to_id (line 220) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 224) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 229) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 241) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/splinter/configuration_splinter.py class SplinterConfig (line 32) | class SplinterConfig(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/splinter/modeling_splinter.py class SplinterEmbeddings (line 50) | class SplinterEmbeddings(nn.Module): method __init__ (line 53) | def __init__(self, config): method forward (line 68) | def forward( class SplinterSelfAttention (line 103) | class SplinterSelfAttention(nn.Module): method __init__ (line 104) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 130) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 135) | def forward( class SplinterSelfOutput (line 231) | class SplinterSelfOutput(nn.Module): method __init__ (line 232) | def __init__(self, config): method forward (line 238) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SplinterAttention (line 246) | class SplinterAttention(nn.Module): method __init__ (line 247) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 253) | def prune_heads(self, heads): method forward (line 271) | def forward( class SplinterIntermediate (line 296) | class SplinterIntermediate(nn.Module): method __init__ (line 297) | def __init__(self, config): method forward (line 305) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SplinterOutput (line 312) | class SplinterOutput(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 319) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SplinterLayer (line 327) | class SplinterLayer(nn.Module): method __init__ (line 328) | def __init__(self, config): method forward (line 342) | def forward( method feed_forward_chunk (line 407) | def feed_forward_chunk(self, attention_output): class SplinterEncoder (line 414) | class SplinterEncoder(nn.Module): method __init__ (line 415) | def __init__(self, config): method forward (line 421) | def forward( class SplinterPreTrainedModel (line 511) | class SplinterPreTrainedModel(PreTrainedModel): method _init_weights (line 523) | def _init_weights(self, module): method _set_gradient_checkpointing (line 539) | def _set_gradient_checkpointing(self, module, value=False): class SplinterModel (line 609) | class SplinterModel(SplinterPreTrainedModel): method __init__ (line 616) | def __init__(self, config): method get_input_embeddings (line 626) | def get_input_embeddings(self): method set_input_embeddings (line 629) | def set_input_embeddings(self, value): method _prune_heads (line 632) | def _prune_heads(self, heads_to_prune): method forward (line 647) | def forward( class SplinterFullyConnectedLayer (line 768) | class SplinterFullyConnectedLayer(nn.Module): method __init__ (line 769) | def __init__(self, input_dim, output_dim, hidden_act="gelu"): method forward (line 779) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: class QuestionAwareSpanSelectionHead (line 786) | class QuestionAwareSpanSelectionHead(nn.Module): method __init__ (line 792) | def __init__(self, config): method forward (line 803) | def forward(self, inputs, positions): class SplinterForQuestionAnswering (line 831) | class SplinterForQuestionAnswering(SplinterPreTrainedModel): method __init__ (line 832) | def __init__(self, config): method forward (line 849) | def forward( class SplinterForPreTrainingOutput (line 947) | class SplinterForPreTrainingOutput(ModelOutput): class SplinterForPreTraining (line 986) | class SplinterForPreTraining(SplinterPreTrainedModel): method __init__ (line 987) | def __init__(self, config): method forward (line 1000) | def forward( method _prepare_question_positions (line 1100) | def _prepare_question_positions(self, input_ids: torch.Tensor) -> torc... FILE: benchmark/third_party/transformers/src/transformers/models/splinter/tokenization_splinter.py function load_vocab (line 55) | def load_vocab(vocab_file): function whitespace_tokenize (line 66) | def whitespace_tokenize(text): class SplinterTokenizer (line 75) | class SplinterTokenizer(PreTrainedTokenizer): method __init__ (line 124) | def __init__( method question_token_id (line 173) | def question_token_id(self): method do_lower_case (line 181) | def do_lower_case(self): method vocab_size (line 185) | def vocab_size(self): method get_vocab (line 188) | def get_vocab(self): method _tokenize (line 191) | def _tokenize(self, text): method _convert_token_to_id (line 205) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 209) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 213) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 218) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 250) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 278) | def create_token_type_ids_from_sequences( method save_vocabulary (line 307) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 328) | class BasicTokenizer(object): method __init__ (line 348) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 356) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 393) | def _run_strip_accents(self, text): method _run_split_on_punc (line 404) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 426) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 439) | def _is_chinese_char(self, cp): method _clean_text (line 463) | def _clean_text(self, text): class WordpieceTokenizer (line 477) | class WordpieceTokenizer(object): method __init__ (line 480) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 485) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/splinter/tokenization_splinter_fast.py class SplinterTokenizerFast (line 55) | class SplinterTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method question_token_id (line 146) | def question_token_id(self): method build_inputs_with_special_tokens (line 153) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 185) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/squeezebert/configuration_squeezebert.py class SqueezeBertConfig (line 37) | class SqueezeBertConfig(PretrainedConfig): method __init__ (line 115) | def __init__( class SqueezeBertOnnxConfig (line 163) | class SqueezeBertOnnxConfig(OnnxConfig): method inputs (line 165) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/squeezebert/modeling_squeezebert.py class SqueezeBertEmbeddings (line 53) | class SqueezeBertEmbeddings(nn.Module): method __init__ (line 56) | def __init__(self, config): method forward (line 70) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class MatMulWrapper (line 95) | class MatMulWrapper(nn.Module): method __init__ (line 101) | def __init__(self): method forward (line 104) | def forward(self, mat1, mat2): class SqueezeBertLayerNorm (line 115) | class SqueezeBertLayerNorm(nn.LayerNorm): method __init__ (line 122) | def __init__(self, hidden_size, eps=1e-12): method forward (line 125) | def forward(self, x): class ConvDropoutLayerNorm (line 131) | class ConvDropoutLayerNorm(nn.Module): method __init__ (line 136) | def __init__(self, cin, cout, groups, dropout_prob): method forward (line 143) | def forward(self, hidden_states, input_tensor): class ConvActivation (line 151) | class ConvActivation(nn.Module): method __init__ (line 156) | def __init__(self, cin, cout, groups, act): method forward (line 161) | def forward(self, x): class SqueezeBertSelfAttention (line 166) | class SqueezeBertSelfAttention(nn.Module): method __init__ (line 167) | def __init__(self, config, cin, q_groups=1, k_groups=1, v_groups=1): method transpose_for_scores (line 191) | def transpose_for_scores(self, x): method transpose_key_for_scores (line 200) | def transpose_key_for_scores(self, x): method transpose_output (line 210) | def transpose_output(self, x): method forward (line 220) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertModule (line 256) | class SqueezeBertModule(nn.Module): method __init__ (line 257) | def __init__(self, config): method forward (line 283) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertEncoder (line 298) | class SqueezeBertEncoder(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 310) | def forward( class SqueezeBertPooler (line 361) | class SqueezeBertPooler(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 367) | def forward(self, hidden_states): class SqueezeBertPredictionHeadTransform (line 376) | class SqueezeBertPredictionHeadTransform(nn.Module): method __init__ (line 377) | def __init__(self, config): method forward (line 386) | def forward(self, hidden_states): class SqueezeBertLMPredictionHead (line 393) | class SqueezeBertLMPredictionHead(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 407) | def forward(self, hidden_states): class SqueezeBertOnlyMLMHead (line 413) | class SqueezeBertOnlyMLMHead(nn.Module): method __init__ (line 414) | def __init__(self, config): method forward (line 418) | def forward(self, sequence_output): class SqueezeBertPreTrainedModel (line 423) | class SqueezeBertPreTrainedModel(PreTrainedModel): method _init_weights (line 433) | def _init_weights(self, module): class SqueezeBertModel (line 549) | class SqueezeBertModel(SqueezeBertPreTrainedModel): method __init__ (line 550) | def __init__(self, config): method get_input_embeddings (line 560) | def get_input_embeddings(self): method set_input_embeddings (line 563) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 566) | def _prune_heads(self, heads_to_prune): method forward (line 581) | def forward( class SqueezeBertForMaskedLM (line 649) | class SqueezeBertForMaskedLM(SqueezeBertPreTrainedModel): method __init__ (line 653) | def __init__(self, config): method get_output_embeddings (line 662) | def get_output_embeddings(self): method set_output_embeddings (line 665) | def set_output_embeddings(self, new_embeddings): method forward (line 675) | def forward( class SqueezeBertForSequenceClassification (line 735) | class SqueezeBertForSequenceClassification(SqueezeBertPreTrainedModel): method __init__ (line 736) | def __init__(self, config): method forward (line 755) | def forward( class SqueezeBertForMultipleChoice (line 835) | class SqueezeBertForMultipleChoice(SqueezeBertPreTrainedModel): method __init__ (line 836) | def __init__(self, config): method forward (line 855) | def forward( class SqueezeBertForTokenClassification (line 929) | class SqueezeBertForTokenClassification(SqueezeBertPreTrainedModel): method __init__ (line 930) | def __init__(self, config): method forward (line 948) | def forward( class SqueezeBertForQuestionAnswering (line 1008) | class SqueezeBertForQuestionAnswering(SqueezeBertPreTrainedModel): method __init__ (line 1009) | def __init__(self, config): method forward (line 1026) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/squeezebert/tokenization_squeezebert.py function load_vocab (line 57) | def load_vocab(vocab_file): function whitespace_tokenize (line 69) | def whitespace_tokenize(text): class SqueezeBertTokenizer (line 79) | class SqueezeBertTokenizer(PreTrainedTokenizer): method __init__ (line 126) | def __init__( method do_lower_case (line 173) | def do_lower_case(self): method vocab_size (line 177) | def vocab_size(self): method get_vocab (line 180) | def get_vocab(self): method _tokenize (line 183) | def _tokenize(self, text): method _convert_token_to_id (line 197) | 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 205) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 210) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 235) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 263) | def create_token_type_ids_from_sequences( method save_vocabulary (line 292) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 314) | class BasicTokenizer(object): method __init__ (line 334) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 342) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 379) | def _run_strip_accents(self, text): method _run_split_on_punc (line 390) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 412) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 425) | def _is_chinese_char(self, cp): method _clean_text (line 449) | def _clean_text(self, text): class WordpieceTokenizer (line 463) | class WordpieceTokenizer(object): method __init__ (line 466) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 471) | def tokenize(self, text): FILE: benchmark/third_party/transformers/src/transformers/models/squeezebert/tokenization_squeezebert_fast.py class SqueezeBertTokenizerFast (line 69) | class SqueezeBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 115) | def __init__( method build_inputs_with_special_tokens (line 157) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 181) | def create_token_type_ids_from_sequences( method save_vocabulary (line 210) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/swin/configuration_swin.py class SwinConfig (line 37) | class SwinConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class SwinOnnxConfig (line 156) | class SwinOnnxConfig(OnnxConfig): method inputs (line 161) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 169) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/swin/modeling_swin.py class SwinEncoderOutput (line 66) | class SwinEncoderOutput(ModelOutput): class SwinModelOutput (line 99) | class SwinModelOutput(ModelOutput): class SwinMaskedImageModelingOutput (line 135) | class SwinMaskedImageModelingOutput(ModelOutput): class SwinImageClassifierOutput (line 171) | class SwinImageClassifierOutput(ModelOutput): function window_partition (line 206) | def window_partition(input_feature, window_size): function window_reverse (line 218) | def window_reverse(windows, window_size, height, width): class SwinEmbeddings (line 228) | class SwinEmbeddings(nn.Module): method __init__ (line 233) | def __init__(self, config, use_mask_token=False): method forward (line 249) | def forward( class SwinPatchEmbeddings (line 270) | class SwinPatchEmbeddings(nn.Module): method __init__ (line 277) | def __init__(self, config): method maybe_pad (line 292) | def maybe_pad(self, pixel_values, height, width): method forward (line 301) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class SwinPatchMerging (line 317) | class SwinPatchMerging(nn.Module): method __init__ (line 330) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 337) | def maybe_pad(self, input_feature, height, width): method forward (line 345) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 372) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class SwinDropPath (line 393) | class SwinDropPath(nn.Module): method __init__ (line 396) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 400) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 403) | def extra_repr(self) -> str: class SwinSelfAttention (line 407) | class SwinSelfAttention(nn.Module): method __init__ (line 408) | def __init__(self, config, dim, num_heads): method transpose_for_scores (line 446) | def transpose_for_scores(self, x): method forward (line 451) | def forward( class SwinSelfOutput (line 508) | class SwinSelfOutput(nn.Module): method __init__ (line 509) | def __init__(self, config, dim): method forward (line 514) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SwinAttention (line 521) | class SwinAttention(nn.Module): method __init__ (line 522) | def __init__(self, config, dim, num_heads): method prune_heads (line 528) | def prune_heads(self, heads): method forward (line 546) | def forward( class SwinIntermediate (line 559) | class SwinIntermediate(nn.Module): method __init__ (line 560) | def __init__(self, config, dim): method forward (line 568) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinOutput (line 574) | class SwinOutput(nn.Module): method __init__ (line 575) | def __init__(self, config, dim): method forward (line 580) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinLayer (line 586) | class SwinLayer(nn.Module): method __init__ (line 587) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 601) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 607) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 635) | def maybe_pad(self, hidden_states, height, width): method forward (line 642) | def forward( class SwinStage (line 704) | class SwinStage(nn.Module): method __init__ (line 705) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 730) | def forward( class SwinEncoder (line 760) | class SwinEncoder(nn.Module): method __init__ (line 761) | def __init__(self, config, grid_size): method forward (line 783) | def forward( class SwinPreTrainedModel (line 850) | class SwinPreTrainedModel(PreTrainedModel): method _init_weights (line 861) | def _init_weights(self, module): method _set_gradient_checkpointing (line 873) | def _set_gradient_checkpointing(self, module, value=False): class SwinModel (line 915) | class SwinModel(SwinPreTrainedModel): method __init__ (line 916) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 931) | def get_input_embeddings(self): method _prune_heads (line 934) | def _prune_heads(self, heads_to_prune): method forward (line 951) | def forward( class SwinForMaskedImageModeling (line 1021) | class SwinForMaskedImageModeling(SwinPreTrainedModel): method __init__ (line 1022) | def __init__(self, config): method forward (line 1040) | def forward( class SwinForImageClassification (line 1132) | class SwinForImageClassification(SwinPreTrainedModel): method __init__ (line 1133) | def __init__(self, config): method forward (line 1155) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/swin/modeling_tf_swin.py class TFSwinEncoderOutput (line 71) | class TFSwinEncoderOutput(ModelOutput): class TFSwinModelOutput (line 104) | class TFSwinModelOutput(ModelOutput): class TFSwinMaskedImageModelingOutput (line 140) | class TFSwinMaskedImageModelingOutput(ModelOutput): class TFSwinImageClassifierOutput (line 176) | class TFSwinImageClassifierOutput(ModelOutput): function window_partition (line 211) | def window_partition(input_feature: tf.Tensor, window_size: int) -> tf.T... function window_reverse (line 225) | def window_reverse(windows: tf.Tensor, window_size: int, height: int, wi... function drop_path (line 240) | def drop_path( class TFSwinEmbeddings (line 259) | class TFSwinEmbeddings(tf.keras.layers.Layer): method __init__ (line 264) | def __init__(self, config: SwinConfig, use_mask_token: bool = False, *... method build (line 276) | def build(self, input_shape: tf.TensorShape) -> None: method call (line 290) | def call( class TFSwinPatchEmbeddings (line 314) | class TFSwinPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 319) | def __init__(self, config, **kwargs): method maybe_pad (line 340) | def maybe_pad(self, pixel_values: tf.Tensor, height: int, width: int) ... method call (line 349) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> Tup... class TFSwinPatchMerging (line 374) | class TFSwinPatchMerging(tf.keras.layers.Layer): method __init__ (line 387) | def __init__( method maybe_pad (line 400) | def maybe_pad(self, input_feature: tf.Tensor, height: int, width: int)... method call (line 408) | def call(self, input_feature: tf.Tensor, input_dimensions: Tuple[int, ... class TFSwinDropPath (line 436) | class TFSwinDropPath(tf.keras.layers.Layer): method __init__ (line 439) | def __init__(self, drop_prob: float = None, scale_by_keep: bool = True... method call (line 444) | def call(self, input: tf.Tensor, training: bool = False) -> tf.Tensor: class TFSwinSelfAttention (line 448) | class TFSwinSelfAttention(tf.keras.layers.Layer): method __init__ (line 449) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method build (line 485) | def build(self, input_shape: tf.TensorShape) -> None: method transpose_for_scores (line 515) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 520) | def call( class TFSwinSelfOutput (line 584) | class TFSwinSelfOutput(tf.keras.layers.Layer): method __init__ (line 585) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 590) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFSwinAttention (line 596) | class TFSwinAttention(tf.keras.layers.Layer): method __init__ (line 597) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method prune_heads (line 603) | def prune_heads(self, heads): method call (line 610) | def call( class TFSwinIntermediate (line 624) | class TFSwinIntermediate(tf.keras.layers.Layer): method __init__ (line 625) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 633) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFSwinOutput (line 639) | class TFSwinOutput(tf.keras.layers.Layer): method __init__ (line 640) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 645) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFSwinLayer (line 651) | class TFSwinLayer(tf.keras.layers.Layer): method __init__ (line 652) | def __init__( method get_attn_mask (line 677) | def get_attn_mask(self, height: int, width: int, window_size: int, shi... method maybe_pad (line 705) | def maybe_pad( method call (line 715) | def call( class TFSwinStage (line 782) | class TFSwinStage(tf.keras.layers.Layer): method __init__ (line 783) | def __init__( method call (line 822) | def call( class TFSwinEncoder (line 854) | class TFSwinEncoder(tf.keras.layers.Layer): method __init__ (line 855) | def __init__(self, config: SwinConfig, grid_size: Tuple[int, int], **k... method call (line 876) | def call( class TFSwinPreTrainedModel (line 934) | class TFSwinPreTrainedModel(TFPreTrainedModel): method _set_gradient_checkpointing (line 945) | def _set_gradient_checkpointing(self, module, value=False) -> None: method dummy_inputs (line 950) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 968) | def serving(self, inputs): function normalize_data_format (line 1007) | def normalize_data_format(value: str) -> str: class AdaptiveAveragePooling1D (line 1022) | class AdaptiveAveragePooling1D(tf.keras.layers.Layer): method __init__ (line 1044) | def __init__( method call (line 1056) | def call(self, inputs: tf.Tensor, *args) -> None: method compute_output_shape (line 1068) | def compute_output_shape(self, input_shape: Iterable[int]) -> tf.Tenso... method get_config (line 1076) | def get_config(self) -> Dict[str, Any]: class TFSwinMainLayer (line 1086) | class TFSwinMainLayer(tf.keras.layers.Layer): method __init__ (line 1089) | def __init__( method get_input_embeddings (line 1103) | def get_input_embeddings(self) -> TFSwinPatchEmbeddings: method _prune_heads (line 1106) | def _prune_heads(self, heads_to_prune: Dict[int, List]): method get_head_mask (line 1114) | def get_head_mask(self, head_mask: Optional[Any]) -> List: method call (line 1120) | def call( class TFSwinModel (line 1185) | class TFSwinModel(TFSwinPreTrainedModel): method __init__ (line 1186) | def __init__( method call (line 1203) | def call( method serving_output (line 1234) | def serving_output(self, output: TFSwinModelOutput) -> TFSwinModelOutput: class TFSwinPixelShuffle (line 1245) | class TFSwinPixelShuffle(tf.keras.layers.Layer): method __init__ (line 1248) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 1254) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwinDecoder (line 1271) | class TFSwinDecoder(tf.keras.layers.Layer): method __init__ (line 1272) | def __init__(self, config: SwinConfig, **kwargs): method call (line 1279) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwinForMaskedImageModeling (line 1295) | class TFSwinForMaskedImageModeling(TFSwinPreTrainedModel): method __init__ (line 1296) | def __init__(self, config: SwinConfig): method call (line 1306) | def call( method serving_output (line 1399) | def serving_output(self, output: TFSwinMaskedImageModelingOutput) -> T... class TFSwinForImageClassification (line 1416) | class TFSwinForImageClassification(TFSwinPreTrainedModel, TFSequenceClas... method __init__ (line 1417) | def __init__(self, config: SwinConfig): method call (line 1439) | def call( method serving_output (line 1484) | def serving_output(self, output: TFSwinImageClassifierOutput) -> TFSwi... FILE: benchmark/third_party/transformers/src/transformers/models/swinv2/configuration_swinv2.py class Swinv2Config (line 30) | class Swinv2Config(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/swinv2/modeling_swinv2.py class Swinv2EncoderOutput (line 69) | class Swinv2EncoderOutput(ModelOutput): class Swinv2ModelOutput (line 103) | class Swinv2ModelOutput(ModelOutput): class Swinv2MaskedImageModelingOutput (line 140) | class Swinv2MaskedImageModelingOutput(ModelOutput): class Swinv2ImageClassifierOutput (line 177) | class Swinv2ImageClassifierOutput(ModelOutput): function window_partition (line 213) | def window_partition(input_feature, window_size): function window_reverse (line 226) | def window_reverse(windows, window_size, height, width): function drop_path (line 237) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class Swinv2DropPath (line 258) | class Swinv2DropPath(nn.Module): method __init__ (line 261) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 265) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 268) | def extra_repr(self) -> str: class Swinv2Embeddings (line 273) | class Swinv2Embeddings(nn.Module): method __init__ (line 278) | def __init__(self, config, use_mask_token=False): method forward (line 294) | def forward( class Swinv2PatchEmbeddings (line 316) | class Swinv2PatchEmbeddings(nn.Module): method __init__ (line 323) | def __init__(self, config): method maybe_pad (line 338) | def maybe_pad(self, pixel_values, height, width): method forward (line 347) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class Swinv2PatchMerging (line 363) | class Swinv2PatchMerging(nn.Module): method __init__ (line 376) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 383) | def maybe_pad(self, input_feature, height, width): method forward (line 391) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class Swinv2SelfAttention (line 417) | class Swinv2SelfAttention(nn.Module): method __init__ (line 418) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method transpose_for_scores (line 477) | def transpose_for_scores(self, x): method forward (line 482) | def forward( class Swinv2SelfOutput (line 543) | class Swinv2SelfOutput(nn.Module): method __init__ (line 544) | def __init__(self, config, dim): method forward (line 549) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Swinv2Attention (line 556) | class Swinv2Attention(nn.Module): method __init__ (line 557) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method prune_heads (line 571) | def prune_heads(self, heads): method forward (line 589) | def forward( class Swinv2Intermediate (line 603) | class Swinv2Intermediate(nn.Module): method __init__ (line 604) | def __init__(self, config, dim): method forward (line 612) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Output (line 619) | class Swinv2Output(nn.Module): method __init__ (line 620) | def __init__(self, config, dim): method forward (line 625) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Layer (line 631) | class Swinv2Layer(nn.Module): method __init__ (line 632) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 654) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 679) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 707) | def maybe_pad(self, hidden_states, height, width): method forward (line 714) | def forward( class Swinv2Stage (line 774) | class Swinv2Stage(nn.Module): method __init__ (line 775) | def __init__( method forward (line 804) | def forward( class Swinv2Encoder (line 834) | class Swinv2Encoder(nn.Module): method __init__ (line 835) | def __init__(self, config, grid_size, pretrained_window_sizes=(0, 0, 0... method forward (line 861) | def forward( class Swinv2PreTrainedModel (line 929) | class Swinv2PreTrainedModel(PreTrainedModel): method _init_weights (line 940) | def _init_weights(self, module): method _set_gradient_checkpointing (line 952) | def _set_gradient_checkpointing(self, module, value=False): class Swinv2Model (line 995) | class Swinv2Model(Swinv2PreTrainedModel): method __init__ (line 996) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 1011) | def get_input_embeddings(self): method _prune_heads (line 1014) | def _prune_heads(self, heads_to_prune): method forward (line 1031) | def forward( class Swinv2ForMaskedImageModeling (line 1103) | class Swinv2ForMaskedImageModeling(Swinv2PreTrainedModel): method __init__ (line 1104) | def __init__(self, config): method forward (line 1122) | def forward( class Swinv2ForImageClassification (line 1215) | class Swinv2ForImageClassification(Swinv2PreTrainedModel): method __init__ (line 1216) | def __init__(self, config): method forward (line 1238) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/t5/configuration_t5.py class T5Config (line 34) | class T5Config(PretrainedConfig): method __init__ (line 82) | def __init__( class T5OnnxConfig (line 143) | class T5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 145) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 164) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/t5/convert_t5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: benchmark/third_party/transformers/src/transformers/models/t5/convert_t5x_checkpoint_to_flax.py function convert_t5x_checkpoint_to_flax (line 24) | def convert_t5x_checkpoint_to_flax(t5x_checkpoint_path, config_name, fla... FILE: benchmark/third_party/transformers/src/transformers/models/t5/modeling_flax_t5.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxT5LayerNorm (line 73) | class FlaxT5LayerNorm(nn.Module): method setup (line 79) | def setup(self): method __call__ (line 82) | def __call__(self, hidden_states): class FlaxT5DenseActDense (line 93) | class FlaxT5DenseActDense(nn.Module): method setup (line 97) | def setup(self): method __call__ (line 116) | def __call__(self, hidden_states, deterministic=True): class FlaxT5DenseGatedActDense (line 124) | class FlaxT5DenseGatedActDense(nn.Module): method setup (line 128) | def setup(self): method __call__ (line 153) | def __call__(self, hidden_states, deterministic): class FlaxT5LayerFF (line 162) | class FlaxT5LayerFF(nn.Module): method setup (line 166) | def setup(self): method __call__ (line 175) | def __call__(self, hidden_states, deterministic=True): class FlaxT5Attention (line 182) | class FlaxT5Attention(nn.Module): method setup (line 188) | def setup(self): method _relative_position_bucket (line 234) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 269) | def compute_bias(self, query_length, key_length): method _split_heads (line 286) | def _split_heads(self, hidden_states): method _merge_heads (line 289) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 293) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 325) | def _create_position_bias( method __call__ (line 349) | def __call__( class FlaxT5LayerSelfAttention (line 465) | class FlaxT5LayerSelfAttention(nn.Module): method setup (line 470) | def setup(self): method __call__ (line 480) | def __call__( class FlaxT5LayerCrossAttention (line 503) | class FlaxT5LayerCrossAttention(nn.Module): method setup (line 507) | def setup(self): method __call__ (line 514) | def __call__( class FlaxT5Block (line 536) | class FlaxT5Block(nn.Module): method setup (line 541) | def setup(self): method __call__ (line 558) | def __call__( class FlaxT5LayerCollection (line 609) | class FlaxT5LayerCollection(nn.Module): method setup (line 614) | def setup(self): method __call__ (line 619) | def __call__( class FlaxT5BlockCollection (line 644) | class FlaxT5BlockCollection(nn.Module): method setup (line 649) | def setup(self): method __call__ (line 673) | def __call__( class FlaxT5Stack (line 730) | class FlaxT5Stack(nn.Module): method setup (line 736) | def setup(self): method __call__ (line 747) | def __call__( class FlaxT5PreTrainedModel (line 928) | class FlaxT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 938) | def __init__( method enable_gradient_checkpointing (line 951) | def enable_gradient_checkpointing(self): method init_weights (line 958) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 988) | def __call__( method init_cache (line 1037) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1075) | def encode( method decode (line 1133) | def decode( class FlaxT5Module (line 1279) | class FlaxT5Module(nn.Module): method _get_encoder_module (line 1284) | def _get_encoder_module(self): method _get_decoder_module (line 1287) | def _get_decoder_module(self): method setup (line 1290) | def setup(self): method __call__ (line 1316) | def __call__( class FlaxT5Model (line 1367) | class FlaxT5Model(FlaxT5PreTrainedModel): class FlaxT5EncoderModule (line 1410) | class FlaxT5EncoderModule(nn.Module): method setup (line 1415) | def setup(self): method __call__ (line 1433) | def __call__( class FlaxT5EncoderModel (line 1456) | class FlaxT5EncoderModel(FlaxT5PreTrainedModel): method __call__ (line 1460) | def __call__( class FlaxT5ForConditionalGenerationModule (line 1497) | class FlaxT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 1502) | def _get_encoder_module(self): method _get_decoder_module (line 1505) | def _get_decoder_module(self): method setup (line 1508) | def setup(self): method __call__ (line 1540) | def __call__( class FlaxT5ForConditionalGeneration (line 1606) | class FlaxT5ForConditionalGeneration(FlaxT5PreTrainedModel): method decode (line 1611) | def decode( method prepare_inputs_for_generation (line 1740) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1769) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/t5/modeling_t5.py function load_tf_weights_in_t5 (line 75) | def load_tf_weights_in_t5(model, config, tf_checkpoint_path): class T5LayerNorm (line 239) | class T5LayerNorm(nn.Module): method __init__ (line 240) | def __init__(self, hidden_size, eps=1e-6): method forward (line 248) | def forward(self, hidden_states): class T5DenseActDense (line 281) | class T5DenseActDense(nn.Module): method __init__ (line 282) | def __init__(self, config: T5Config): method forward (line 289) | def forward(self, hidden_states): class T5DenseGatedActDense (line 297) | class T5DenseGatedActDense(nn.Module): method __init__ (line 298) | def __init__(self, config: T5Config): method forward (line 306) | def forward(self, hidden_states): class T5LayerFF (line 315) | class T5LayerFF(nn.Module): method __init__ (line 316) | def __init__(self, config: T5Config): method forward (line 326) | def forward(self, hidden_states): class T5Attention (line 333) | class T5Attention(nn.Module): method __init__ (line 334) | def __init__(self, config: T5Config, has_relative_attention_bias=False): method prune_heads (line 357) | def prune_heads(self, heads): method _relative_position_bucket (line 374) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 421) | def compute_bias(self, query_length, key_length, device=None): method forward (line 438) | def forward( class T5LayerSelfAttention (line 561) | class T5LayerSelfAttention(nn.Module): method __init__ (line 562) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 568) | def forward( class T5LayerCrossAttention (line 593) | class T5LayerCrossAttention(nn.Module): method __init__ (line 594) | def __init__(self, config): method forward (line 600) | def forward( class T5Block (line 629) | class T5Block(nn.Module): method __init__ (line 630) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 640) | def forward( class T5PreTrainedModel (line 742) | class T5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 756) | def dummy_inputs(self): method _init_weights (line 766) | def _init_weights(self, module): method _set_gradient_checkpointing (line 810) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 814) | def _shift_right(self, input_ids): class T5Stack (line 840) | class T5Stack(T5PreTrainedModel): method __init__ (line 841) | def __init__(self, config, embed_tokens=None): method parallelize (line 861) | def parallelize(self, device_map=None): method deparallelize (line 882) | def deparallelize(self): method get_input_embeddings (line 893) | def get_input_embeddings(self): method set_input_embeddings (line 896) | def set_input_embeddings(self, new_embeddings): method forward (line 899) | def forward( class T5Model (line 1274) | class T5Model(T5PreTrainedModel): method __init__ (line 1283) | def __init__(self, config: T5Config): method parallelize (line 1307) | def parallelize(self, device_map=None): method deparallelize (line 1319) | def deparallelize(self): method get_input_embeddings (line 1328) | def get_input_embeddings(self): method set_input_embeddings (line 1331) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1336) | def get_encoder(self): method get_decoder (line 1339) | def get_decoder(self): method _prune_heads (line 1342) | def _prune_heads(self, heads_to_prune): method forward (line 1352) | def forward( class T5ForConditionalGeneration (line 1466) | class T5ForConditionalGeneration(T5PreTrainedModel): method __init__ (line 1476) | def __init__(self, config: T5Config): method parallelize (line 1504) | def parallelize(self, device_map=None): method deparallelize (line 1517) | def deparallelize(self): method get_input_embeddings (line 1527) | def get_input_embeddings(self): method set_input_embeddings (line 1530) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1535) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1538) | def get_output_embeddings(self): method get_encoder (line 1541) | def get_encoder(self): method get_decoder (line 1544) | def get_decoder(self): method forward (line 1549) | def forward( method prepare_inputs_for_generation (line 1700) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1728) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1731) | def _reorder_cache(self, past, beam_idx): class T5EncoderModel (line 1760) | class T5EncoderModel(T5PreTrainedModel): method __init__ (line 1765) | def __init__(self, config: T5Config): method parallelize (line 1782) | def parallelize(self, device_map=None): method deparallelize (line 1793) | def deparallelize(self): method get_input_embeddings (line 1800) | def get_input_embeddings(self): method set_input_embeddings (line 1803) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1807) | def get_encoder(self): method _prune_heads (line 1810) | def _prune_heads(self, heads_to_prune): method forward (line 1820) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/t5/modeling_tf_t5.py class TFT5LayerNorm (line 77) | class TFT5LayerNorm(tf.keras.layers.Layer): method __init__ (line 78) | def __init__(self, epsilon=1e-6, **kwargs): method build (line 85) | def build(self, input_shape): method call (line 90) | def call(self, hidden_states): class TFT5DenseActDense (line 96) | class TFT5DenseActDense(tf.keras.layers.Layer): method __init__ (line 97) | def __init__(self, config, **kwargs): method call (line 114) | def call(self, hidden_states, training=False): class TFT5DenseGatedActDense (line 122) | class TFT5DenseGatedActDense(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, config, **kwargs): method call (line 143) | def call(self, hidden_states, training=False): class TFT5LayerFF (line 152) | class TFT5LayerFF(tf.keras.layers.Layer): method __init__ (line 153) | def __init__(self, config, **kwargs): method call (line 163) | def call(self, hidden_states, training=False): class TFT5Attention (line 170) | class TFT5Attention(tf.keras.layers.Layer): method __init__ (line 173) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method build (line 221) | def build(self, input_shape): method prune_heads (line 232) | def prune_heads(self, heads): method _relative_position_bucket (line 236) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 280) | def compute_bias(self, query_length, key_length): method call (line 299) | def call( class TFT5LayerSelfAttention (line 434) | class TFT5LayerSelfAttention(tf.keras.layers.Layer): method __init__ (line 435) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 445) | def call( class TFT5LayerCrossAttention (line 472) | class TFT5LayerCrossAttention(tf.keras.layers.Layer): method __init__ (line 473) | def __init__(self, config, **kwargs): method call (line 483) | def call( class TFT5Block (line 514) | class TFT5Block(tf.keras.layers.Layer): method __init__ (line 515) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 536) | def call( class TFT5MainLayer (line 623) | class TFT5MainLayer(tf.keras.layers.Layer): method __init__ (line 626) | def __init__(self, config, embed_tokens=None, **kwargs): method _prune_heads (line 647) | def _prune_heads(self, heads_to_prune): method call (line 651) | def call( class TFT5PreTrainedModel (line 868) | class TFT5PreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 880) | def dummy_inputs(self): method serving (line 900) | def serving(self, inputs): method get_input_embeddings (line 905) | def get_input_embeddings(self): method set_input_embeddings (line 908) | def set_input_embeddings(self, value): method _shift_right (line 914) | def _shift_right(self, input_ids): class TFT5Model (line 1130) | class TFT5Model(TFT5PreTrainedModel): method __init__ (line 1131) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 1152) | def get_encoder(self): method get_decoder (line 1155) | def get_decoder(self): method call (line 1161) | def call( method serving_output (line 1261) | def serving_output(self, output): class TFT5ForConditionalGeneration (line 1282) | class TFT5ForConditionalGeneration(TFT5PreTrainedModel, TFCausalLanguage... method __init__ (line 1283) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1310) | def get_output_embeddings(self): method set_output_embeddings (line 1318) | def set_output_embeddings(self, value): method get_encoder (line 1331) | def get_encoder(self): method get_decoder (line 1334) | def get_decoder(self): method call (line 1340) | def call( method serving_output (line 1480) | def serving_output(self, output): method prepare_inputs_for_generation (line 1499) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1528) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method _reorder_cache (line 1531) | def _reorder_cache(self, past, beam_idx): class TFT5EncoderModel (line 1560) | class TFT5EncoderModel(TFT5PreTrainedModel): method __init__ (line 1561) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1577) | def dummy_inputs(self): method get_encoder (line 1580) | def get_encoder(self): method call (line 1586) | def call( method serving (line 1646) | def serving(self, inputs): method serving_output (line 1652) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/t5/tokenization_t5.py class T5Tokenizer (line 55) | class T5Tokenizer(PreTrainedTokenizer): method __init__ (line 115) | def __init__( method _eventually_correct_t5_max_length (line 158) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method vocab_size (line 180) | def vocab_size(self): method get_vocab (line 183) | def get_vocab(self): method get_special_tokens_mask (line 188) | def get_special_tokens_mask( method _add_eos_if_not_present (line 216) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 227) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 249) | def build_inputs_with_special_tokens( method __getstate__ (line 275) | def __getstate__(self): method __setstate__ (line 280) | def __setstate__(self, d): method _tokenize (line 290) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 294) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 302) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 310) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 324) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/t5/tokenization_t5_fast.py class T5TokenizerFast (line 65) | class T5TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 110) | def __init__( method _eventually_correct_t5_max_length (line 150) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method save_vocabulary (line 171) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 191) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 217) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/src/transformers/models/table_transformer/configuration_table_transformer.py class TableTransformerConfig (line 36) | class TableTransformerConfig(PretrainedConfig): method __init__ (line 137) | def __init__( method num_attention_heads (line 213) | def num_attention_heads(self) -> int: method hidden_size (line 217) | def hidden_size(self) -> int: class TableTransformerOnnxConfig (line 222) | class TableTransformerOnnxConfig(OnnxConfig): method inputs (line 227) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 236) | def atol_for_validation(self) -> float: method default_onnx_opset (line 240) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/table_transformer/convert_table_transformer_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 115) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 120) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 132) | def read_in_q_k_v(state_dict): function resize (line 173) | def resize(image, checkpoint_url): function normalize (line 183) | def normalize(image): function convert_table_transformer_checkpoint (line 190) | def convert_table_transformer_checkpoint(checkpoint_url, pytorch_dump_fo... FILE: benchmark/third_party/transformers/src/transformers/models/table_transformer/modeling_table_transformer.py class TableTransformerDecoderOutput (line 62) | class TableTransformerDecoderOutput(BaseModelOutputWithCrossAttentions): class TableTransformerModelOutput (line 94) | class TableTransformerModelOutput(Seq2SeqModelOutput): class TableTransformerObjectDetectionOutput (line 136) | class TableTransformerObjectDetectionOutput(ModelOutput): class TableTransformerFrozenBatchNorm2d (line 199) | class TableTransformerFrozenBatchNorm2d(nn.Module): method __init__ (line 207) | def __init__(self, n): method _load_from_state_dict (line 214) | def _load_from_state_dict( method forward (line 225) | def forward(self, x): function replace_batch_norm (line 239) | def replace_batch_norm(m, name=""): class TableTransformerTimmConvEncoder (line 255) | class TableTransformerTimmConvEncoder(nn.Module): method __init__ (line 263) | def __init__(self, name: str, dilation: bool, use_pretrained_backbone:... method forward (line 291) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class TableTransformerConvModel (line 304) | class TableTransformerConvModel(nn.Module): method __init__ (line 309) | def __init__(self, conv_encoder, position_embedding): method forward (line 314) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 325) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class TableTransformerSinePositionEmbedding (line 340) | class TableTransformerSinePositionEmbedding(nn.Module): method __init__ (line 346) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 357) | def forward(self, pixel_values, pixel_mask): class TableTransformerLearnedPositionEmbedding (line 378) | class TableTransformerLearnedPositionEmbedding(nn.Module): method __init__ (line 383) | def __init__(self, embedding_dim=256): method forward (line 388) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 402) | def build_position_encoding(config): class TableTransformerAttention (line 416) | class TableTransformerAttention(nn.Module): method __init__ (line 423) | def __init__( method _shape (line 448) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 451) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 454) | def forward( class TableTransformerEncoderLayer (line 547) | class TableTransformerEncoderLayer(nn.Module): method __init__ (line 549) | def __init__(self, config: TableTransformerConfig): method forward (line 565) | def forward( class TableTransformerDecoderLayer (line 620) | class TableTransformerDecoderLayer(nn.Module): method __init__ (line 622) | def __init__(self, config: TableTransformerConfig): method forward (line 648) | def forward( class TableTransformerClassificationHead (line 730) | class TableTransformerClassificationHead(nn.Module): method __init__ (line 733) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 739) | def forward(self, hidden_states: torch.Tensor): class TableTransformerPreTrainedModel (line 748) | class TableTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 753) | def _init_weights(self, module): method _set_gradient_checkpointing (line 770) | def _set_gradient_checkpointing(self, module, value=False): class TableTransformerEncoder (line 830) | class TableTransformerEncoder(TableTransformerPreTrainedModel): method __init__ (line 845) | def __init__(self, config: TableTransformerConfig): method forward (line 858) | def forward( class TableTransformerDecoder (line 942) | class TableTransformerDecoder(TableTransformerPreTrainedModel): method __init__ (line 957) | def __init__(self, config: TableTransformerConfig): method forward (line 970) | def forward( class TableTransformerModel (line 1130) | class TableTransformerModel(TableTransformerPreTrainedModel): method __init__ (line 1132) | def __init__(self, config: TableTransformerConfig): method get_encoder (line 1153) | def get_encoder(self): method get_decoder (line 1156) | def get_decoder(self): method freeze_backbone (line 1159) | def freeze_backbone(self): method unfreeze_backbone (line 1163) | def unfreeze_backbone(self): method forward (line 1169) | def forward( class TableTransformerForObjectDetection (line 1301) | class TableTransformerForObjectDetection(TableTransformerPreTrainedModel): method __init__ (line 1303) | def __init__(self, config: TableTransformerConfig): method _set_aux_loss (line 1322) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1330) | def forward( function dice_loss (line 1465) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1485) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class TableTransformerLoss (line 1517) | class TableTransformerLoss(nn.Module): method __init__ (line 1542) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1553) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1575) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1590) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1614) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1647) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1653) | def _get_target_permutation_idx(self, indices): method get_loss (line 1659) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1670) | def forward(self, outputs, targets): class TableTransformerMLPPredictionHead (line 1716) | class TableTransformerMLPPredictionHead(nn.Module): method __init__ (line 1725) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1731) | def forward(self, x): class TableTransformerHungarianMatcher (line 1738) | class TableTransformerHungarianMatcher(nn.Module): method __init__ (line 1755) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1766) | def forward(self, outputs, targets): function _upcast (line 1817) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1826) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1843) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1860) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1885) | def _max_by_axis(the_list): class NestedTensor (line 1895) | class NestedTensor(object): method __init__ (line 1896) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1900) | def to(self, device): method decompose (line 1909) | def decompose(self): method __repr__ (line 1912) | def __repr__(self): function nested_tensor_from_tensor_list (line 1917) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): function center_to_corners_format (line 1935) | def center_to_corners_format(x): FILE: benchmark/third_party/transformers/src/transformers/models/tapas/configuration_tapas.py class TapasConfig (line 45) | class TapasConfig(PretrainedConfig): method __init__ (line 157) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 35) | def convert_tf_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/tapas/modeling_tapas.py class TableQuestionAnsweringOutput (line 102) | class TableQuestionAnsweringOutput(ModelOutput): function load_tf_weights_in_tapas (line 131) | def load_tf_weights_in_tapas(model, config, tf_checkpoint_path): class TapasEmbeddings (line 265) | class TapasEmbeddings(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 292) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class TapasSelfAttention (line 345) | class TapasSelfAttention(nn.Module): method __init__ (line 346) | def __init__(self, config): method transpose_for_scores (line 365) | def transpose_for_scores(self, x): method forward (line 370) | def forward( class TapasSelfOutput (line 441) | class TapasSelfOutput(nn.Module): method __init__ (line 442) | def __init__(self, config): method forward (line 448) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasAttention (line 455) | class TapasAttention(nn.Module): method __init__ (line 456) | def __init__(self, config): method prune_heads (line 463) | def prune_heads(self, heads): method forward (line 482) | def forward( class TapasIntermediate (line 507) | class TapasIntermediate(nn.Module): method __init__ (line 508) | def __init__(self, config): method forward (line 516) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasOutput (line 523) | class TapasOutput(nn.Module): method __init__ (line 524) | def __init__(self, config): method forward (line 530) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasLayer (line 537) | class TapasLayer(nn.Module): method __init__ (line 538) | def __init__(self, config): method forward (line 553) | def forward( method feed_forward_chunk (line 619) | def feed_forward_chunk(self, attention_output): class TapasEncoder (line 625) | class TapasEncoder(nn.Module): method __init__ (line 626) | def __init__(self, config): method forward (line 632) | def forward( class TapasPooler (line 694) | class TapasPooler(nn.Module): method __init__ (line 695) | def __init__(self, config): method forward (line 700) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasPredictionHeadTransform (line 710) | class TapasPredictionHeadTransform(nn.Module): method __init__ (line 711) | def __init__(self, config): method forward (line 720) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasLMPredictionHead (line 728) | class TapasLMPredictionHead(nn.Module): method __init__ (line 729) | def __init__(self, config): method forward (line 742) | def forward(self, hidden_states): class TapasOnlyMLMHead (line 749) | class TapasOnlyMLMHead(nn.Module): method __init__ (line 750) | def __init__(self, config): method forward (line 754) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class TapasPreTrainedModel (line 759) | class TapasPreTrainedModel(PreTrainedModel): method _init_weights (line 770) | def _init_weights(self, module): method _set_gradient_checkpointing (line 786) | def _set_gradient_checkpointing(self, module, value=False): class TapasModel (line 853) | class TapasModel(TapasPreTrainedModel): method __init__ (line 864) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 877) | def get_input_embeddings(self): method set_input_embeddings (line 880) | def set_input_embeddings(self, value): method _prune_heads (line 883) | def _prune_heads(self, heads_to_prune): method forward (line 893) | def forward( class TapasForMaskedLM (line 1006) | class TapasForMaskedLM(TapasPreTrainedModel): method __init__ (line 1010) | def __init__(self, config): method get_output_embeddings (line 1019) | def get_output_embeddings(self): method set_output_embeddings (line 1022) | def set_output_embeddings(self, new_embeddings): method forward (line 1027) | def forward( class TapasForQuestionAnswering (line 1121) | class TapasForQuestionAnswering(TapasPreTrainedModel): method __init__ (line 1122) | def __init__(self, config: TapasConfig): method forward (line 1158) | def forward( class TapasForSequenceClassification (line 1466) | class TapasForSequenceClassification(TapasPreTrainedModel): method __init__ (line 1467) | def __init__(self, config): method forward (line 1480) | def forward( class AverageApproximationFunction (line 1586) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1595) | class IndexMap(object): method __init__ (line 1598) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1617) | def batch_shape(self): class ProductIndexMap (line 1621) | class ProductIndexMap(IndexMap): method __init__ (line 1624) | def __init__(self, outer_index, inner_index): method project_outer (line 1649) | def project_outer(self, index): method project_inner (line 1657) | def project_inner(self, index): function gather (line 1669) | def gather(values, index, name="segmented_gather"): function flatten (line 1702) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1731) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1772) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_sum (line 1823) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_mean (line 1850) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_max (line 1879) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 1906) | def reduce_min(values, index, name="segmented_reduce_min"): function compute_column_logits (line 1936) | def compute_column_logits( function _single_column_cell_selection_loss (line 1988) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function compute_token_logits (line 2095) | def compute_token_logits(sequence_output, temperature, output_weights, o... function _calculate_aggregate_mask (line 2117) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2168) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2214) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2238) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2276) | def _calculate_expected_result( function huber_loss (line 2364) | def huber_loss(input, target, delta: float = 1.0): function _calculate_regression_loss (line 2369) | def _calculate_regression_loss( FILE: benchmark/third_party/transformers/src/transformers/models/tapas/modeling_tf_tapas.py class TFTableQuestionAnsweringOutput (line 114) | class TFTableQuestionAnsweringOutput(ModelOutput): class TFTapasEmbeddings (line 143) | class TFTapasEmbeddings(tf.keras.layers.Layer): method __init__ (line 149) | def __init__(self, config: TapasConfig, **kwargs): method build (line 162) | def build(self, input_shape: tf.TensorShape): method call (line 190) | def call( class TFTapasSelfAttention (line 254) | class TFTapasSelfAttention(tf.keras.layers.Layer): method __init__ (line 255) | def __init__(self, config: TapasConfig, **kwargs): method transpose_for_scores (line 282) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 289) | def call( class TFTapasSelfOutput (line 372) | class TFTapasSelfOutput(tf.keras.layers.Layer): method __init__ (line 373) | def __init__(self, config: TapasConfig, **kwargs): method call (line 382) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFTapasAttention (line 391) | class TFTapasAttention(tf.keras.layers.Layer): method __init__ (line 392) | def __init__(self, config: TapasConfig, **kwargs): method prune_heads (line 398) | def prune_heads(self, heads): method call (line 401) | def call( class TFTapasIntermediate (line 432) | class TFTapasIntermediate(tf.keras.layers.Layer): method __init__ (line 433) | def __init__(self, config: TapasConfig, **kwargs): method call (line 445) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasOutput (line 453) | class TFTapasOutput(tf.keras.layers.Layer): method __init__ (line 454) | def __init__(self, config: TapasConfig, **kwargs): method call (line 463) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFTapasLayer (line 472) | class TFTapasLayer(tf.keras.layers.Layer): method __init__ (line 473) | def __init__(self, config: TapasConfig, **kwargs): method call (line 486) | def call( class TFTapasEncoder (line 559) | class TFTapasEncoder(tf.keras.layers.Layer): method __init__ (line 560) | def __init__(self, config: TapasConfig, **kwargs): method call (line 565) | def call( class TFTapasPooler (line 629) | class TFTapasPooler(tf.keras.layers.Layer): method __init__ (line 630) | def __init__(self, config: TapasConfig, **kwargs): method call (line 640) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasPredictionHeadTransform (line 650) | class TFTapasPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 651) | def __init__(self, config: TapasConfig, **kwargs): method call (line 667) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasLMPredictionHead (line 676) | class TFTapasLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 677) | def __init__(self, config: TapasConfig, input_embeddings: tf.keras.lay... method build (line 689) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 694) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 697) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 701) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 704) | def set_bias(self, value: tf.Variable): method call (line 708) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasMLMHead (line 720) | class TFTapasMLMHead(tf.keras.layers.Layer): method __init__ (line 721) | def __init__(self, config: TapasConfig, input_embeddings: tf.keras.lay... method call (line 726) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFTapasMainLayer (line 733) | class TFTapasMainLayer(tf.keras.layers.Layer): method __init__ (line 736) | def __init__(self, config: TapasConfig, add_pooling_layer: bool = True... method get_input_embeddings (line 746) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 749) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 753) | def _prune_heads(self, heads_to_prune): method call (line 761) | def call( class TFTapasPreTrainedModel (line 856) | class TFTapasPreTrainedModel(TFPreTrainedModel): method serving (line 874) | def serving(self, inputs): class TFTapasModel (line 979) | class TFTapasModel(TFTapasPreTrainedModel): method __init__ (line 980) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 988) | def call( method serving_output (line 1041) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFTapasForMaskedLM (line 1054) | class TFTapasForMaskedLM(TFTapasPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 1055) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method get_lm_head (line 1067) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1073) | def call( method serving_output (line 1148) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFTapasComputeTokenLogits (line 1155) | class TFTapasComputeTokenLogits(tf.keras.layers.Layer): method __init__ (line 1156) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1175) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFTapasComputeColumnLogits (line 1191) | class TFTapasComputeColumnLogits(tf.keras.layers.Layer): method __init__ (line 1192) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1209) | def call(self, sequence_output, cell_index, cell_mask, allow_empty_col... class TFTapasForQuestionAnswering (line 1260) | class TFTapasForQuestionAnswering(TFTapasPreTrainedModel): method __init__ (line 1261) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1285) | def call( method serving_output (line 1577) | def serving_output(self, output: TFTableQuestionAnsweringOutput) -> TF... class TFTapasForSequenceClassification (line 1596) | class TFTapasForSequenceClassification(TFTapasPreTrainedModel, TFSequenc... method __init__ (line 1597) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1610) | def call( method serving_output (line 1690) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class AverageApproximationFunction (line 1700) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1709) | class IndexMap(object): method __init__ (line 1712) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1728) | def batch_shape(self): class ProductIndexMap (line 1732) | class ProductIndexMap(IndexMap): method __init__ (line 1735) | def __init__(self, outer_index, inner_index): method project_outer (line 1761) | def project_outer(self, index): method project_inner (line 1769) | def project_inner(self, index): function gather (line 1778) | def gather(values, index, name="segmented_gather"): function flatten (line 1794) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1817) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1845) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_mean (line 1880) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_sum (line 1903) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_max (line 1926) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 1948) | def reduce_min(values, index, name="segmented_reduce_min"): function _single_column_cell_selection_loss (line 1953) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function _calculate_aggregate_mask (line 2026) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2070) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2116) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2140) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2178) | def _calculate_expected_result( function _calculate_regression_loss (line 2257) | def _calculate_regression_loss( FILE: benchmark/third_party/transformers/src/transformers/models/tapas/tokenization_tapas.py class TapasTruncationStrategy (line 137) | class TapasTruncationStrategy(ExplicitEnum): class TokenCoordinates (line 150) | class TokenCoordinates: class TokenizedTable (line 157) | class TokenizedTable: class SerializedExample (line 163) | class SerializedExample: function _is_inner_wordpiece (line 170) | def _is_inner_wordpiece(token: Text): function load_vocab (line 174) | def load_vocab(vocab_file): function whitespace_tokenize (line 185) | def whitespace_tokenize(text): class TapasTokenizer (line 236) | class TapasTokenizer(PreTrainedTokenizer): method __init__ (line 320) | def __init__( method do_lower_case (line 405) | def do_lower_case(self): method vocab_size (line 409) | def vocab_size(self): method get_vocab (line 412) | def get_vocab(self): method _tokenize (line 415) | def _tokenize(self, text): method _convert_token_to_id (line 431) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 435) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 439) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 444) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_attention_mask_from_sequences (line 464) | def create_attention_mask_from_sequences(self, query_ids: List[int], t... method create_segment_token_type_ids_from_sequences (line 478) | def create_segment_token_type_ids_from_sequences( method create_column_token_type_ids_from_sequences (line 495) | def create_column_token_type_ids_from_sequences( method create_row_token_type_ids_from_sequences (line 512) | def create_row_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 529) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 548) | def get_special_tokens_mask( method __call__ (line 577) | def __call__( method batch_encode_plus (line 694) | def batch_encode_plus( method _get_question_tokens (line 790) | def _get_question_tokens(self, query): method _batch_encode_plus (line 803) | def _batch_encode_plus( method _batch_prepare_for_model (line 860) | def _batch_prepare_for_model( method encode (line 932) | def encode( method encode_plus (line 975) | def encode_plus( method _encode_plus (line 1058) | def _encode_plus( method prepare_for_model (line 1114) | def prepare_for_model( method _get_truncated_table_rows (line 1306) | def _get_truncated_table_rows( method _tokenize_table (line 1363) | def _tokenize_table( method _question_encoding_cost (line 1408) | def _question_encoding_cost(self, question_tokens): method _get_token_budget (line 1412) | def _get_token_budget(self, question_tokens, max_length=None): method _get_table_values (line 1426) | def _get_table_values(self, table, num_columns, num_rows, num_tokens) ... method _get_table_boundaries (line 1445) | def _get_table_boundaries(self, table): method _get_table_cost (line 1458) | def _get_table_cost(self, table, num_columns, num_rows, num_tokens): method _get_max_num_tokens (line 1461) | def _get_max_num_tokens(self, question_tokens, tokenized_table, num_co... method _get_num_columns (line 1480) | def _get_num_columns(self, table): method _get_num_rows (line 1486) | def _get_num_rows(self, table, drop_rows_to_fit): method _serialize_text (line 1495) | def _serialize_text(self, question_tokens): method _serialize (line 1516) | def _serialize( method _get_column_values (line 1546) | def _get_column_values(self, table, col_index): method _get_cell_token_indexes (line 1554) | def _get_cell_token_indexes(self, column_ids, row_ids, column_id, row_... method _get_numeric_column_ranks (line 1559) | def _get_numeric_column_ranks(self, column_ids, row_ids, table): method _get_numeric_sort_key_fn (line 1594) | def _get_numeric_sort_key_fn(self, table_numeric_values, value): method _get_numeric_relations (line 1615) | def _get_numeric_relations(self, question, column_ids, row_ids, table): method _get_numeric_values (line 1656) | def _get_numeric_values(self, table, column_ids, row_ids): method _get_numeric_values_scale (line 1679) | def _get_numeric_values_scale(self, table, column_ids, row_ids): method _pad_to_seq_length (line 1700) | def _pad_to_seq_length(self, inputs): method _get_all_answer_ids_from_coordinates (line 1706) | def _get_all_answer_ids_from_coordinates( method _get_all_answer_ids (line 1726) | def _get_all_answer_ids(self, column_ids, row_ids, answer_coordinates): method _find_tokens (line 1741) | def _find_tokens(self, text, segment): method _find_answer_coordinates_from_answer_text (line 1752) | def _find_answer_coordinates_from_answer_text( method _find_answer_ids_from_answer_texts (line 1772) | def _find_answer_ids_from_answer_texts( method _get_answer_ids (line 1810) | def _get_answer_ids(self, column_ids, row_ids, answer_coordinates): method get_answer_ids (line 1818) | def get_answer_ids(self, column_ids, row_ids, tokenized_table, answer_... method _pad (line 1828) | def _pad( method _get_cell_token_probs (line 1922) | def _get_cell_token_probs(self, probabilities, segment_ids, row_ids, c... method _get_mean_cell_probs (line 1930) | def _get_mean_cell_probs(self, probabilities, segment_ids, row_ids, co... method convert_logits_to_predictions (line 1939) | def convert_logits_to_predictions(self, data, logits, logits_agg=None,... class BasicTokenizer (line 2041) | class BasicTokenizer(object): method __init__ (line 2061) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 2069) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 2106) | def _run_strip_accents(self, text): method _run_split_on_punc (line 2117) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 2139) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 2152) | def _is_chinese_char(self, cp): method _clean_text (line 2176) | def _clean_text(self, text): class WordpieceTokenizer (line 2191) | class WordpieceTokenizer(object): method __init__ (line 2194) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 2199) | def tokenize(self, text): class Relation (line 2257) | class Relation(enum.Enum): class Date (line 2270) | class Date: class NumericValue (line 2277) | class NumericValue: class NumericValueSpan (line 2283) | class NumericValueSpan: class Cell (line 2290) | class Cell: class Question (line 2296) | class Question: function _process_date_pattern (line 2355) | def _process_date_pattern(dp): function _process_date_patterns (line 2369) | def _process_date_patterns(): function _get_numeric_value_from_date (line 2423) | def _get_numeric_value_from_date(date, mask): function _get_span_length_key (line 2438) | def _get_span_length_key(span): function _get_numeric_value_from_float (line 2443) | def _get_numeric_value_from_float(value): function _parse_date (line 2449) | def _parse_date(text): function _parse_number (line 2466) | def _parse_number(text): function get_all_spans (line 2484) | def get_all_spans(text, max_ngram_length): function normalize_for_match (line 2505) | def normalize_for_match(text): function format_text (line 2509) | def format_text(text): function parse_text (line 2523) | def parse_text(text): function _get_value_type (line 2597) | def _get_value_type(numeric_value): function _get_value_as_primitive_value (line 2605) | def _get_value_as_primitive_value(numeric_value): function _get_all_types (line 2623) | def _get_all_types(numeric_values): function get_numeric_sort_key_fn (line 2627) | def get_numeric_sort_key_fn(numeric_values): function _consolidate_numeric_values (line 2674) | def _consolidate_numeric_values(row_index_to_values, min_consolidation_f... function _get_numeric_values (line 2721) | def _get_numeric_values(text): function _get_column_values (line 2727) | def _get_column_values(table, col_index): function get_numeric_relation (line 2743) | def get_numeric_relation(value, other_value, sort_key_fn): function add_numeric_values_to_question (line 2756) | def add_numeric_values_to_question(question): function filter_invalid_unicode (line 2764) | def filter_invalid_unicode(text): function filter_invalid_unicode_from_table (line 2769) | def filter_invalid_unicode_from_table(table): function add_numeric_table_values (line 2795) | def add_numeric_table_values(table, min_consolidation_fraction=0.7, debu... FILE: benchmark/third_party/transformers/src/transformers/models/tapex/tokenization_tapex.py class TapexTruncationStrategy (line 57) | class TapexTruncationStrategy(ExplicitEnum): function bytes_to_unicode (line 120) | def bytes_to_unicode(): function get_pairs (line 142) | def get_pairs(word): class IndexedRowTableLinearize (line 155) | class IndexedRowTableLinearize: method process_table (line 160) | def process_table(self, table_content: Dict): method process_header (line 173) | def process_header(self, headers: List): method process_row (line 179) | def process_row(self, row: List, row_index: int): class TapexTokenizer (line 194) | class TapexTokenizer(PreTrainedTokenizer): method __init__ (line 272) | def __init__( method build_inputs_with_special_tokens (line 337) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 359) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 384) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 405) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method vocab_size (line 412) | def vocab_size(self): method get_vocab (line 415) | def get_vocab(self): method bpe (line 418) | def bpe(self, token): method _tokenize (line 460) | def _tokenize(self, text): method _convert_token_to_id (line 470) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 474) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 478) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 484) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 514) | def __call__( method source_call_func (line 591) | def source_call_func( method batch_encode_plus (line 679) | def batch_encode_plus( method _batch_encode_plus (line 736) | def _batch_encode_plus( method _batch_prepare_for_model (line 796) | def _batch_prepare_for_model( method encode (line 867) | def encode( method encode_plus (line 899) | def encode_plus( method _encode_plus (line 947) | def _encode_plus( method target_call_func (line 1005) | def target_call_func( method target_batch_encode_plus (line 1070) | def target_batch_encode_plus( method _target_batch_encode_plus (line 1123) | def _target_batch_encode_plus( method target_encode (line 1185) | def target_encode( method target_encode_plus (line 1216) | def target_encode_plus( method _target_encode_plus (line 1267) | def _target_encode_plus( method prepare_table_query (line 1321) | def prepare_table_query( method truncate_table_cells (line 1365) | def truncate_table_cells(self, table_content: Dict, question: str, ans... method truncate_cell (line 1381) | def truncate_cell(self, cell_value): method truncate_table_rows (line 1396) | def truncate_table_rows( method estimate_delete_ratio (line 1425) | def estimate_delete_ratio(self, table_content: Dict, question: str, ma... method delete_unrelated_rows (line 1451) | def delete_unrelated_rows(self, table_content: Dict, question: str, an... FILE: benchmark/third_party/transformers/src/transformers/models/time_series_transformer/configuration_time_series_transformer.py class TimeSeriesTransformerConfig (line 33) | class TimeSeriesTransformerConfig(PretrainedConfig): method __init__ (line 133) | def __init__( method _number_of_features (line 222) | def _number_of_features(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/time_series_transformer/modeling_time_series_transformer.py class AffineTransformed (line 52) | class AffineTransformed(TransformedDistribution): method __init__ (line 53) | def __init__(self, base_distribution: Distribution, loc=None, scale=No... method mean (line 60) | def mean(self): method variance (line 67) | def variance(self): method stddev (line 74) | def stddev(self): class ParameterProjection (line 81) | class ParameterProjection(nn.Module): method __init__ (line 82) | def __init__( method forward (line 90) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor]: class LambdaLayer (line 96) | class LambdaLayer(nn.Module): method __init__ (line 97) | def __init__(self, function): method forward (line 101) | def forward(self, x, *args): class DistributionOutput (line 105) | class DistributionOutput: method __init__ (line 110) | def __init__(self, dim: int = 1) -> None: method _base_distribution (line 114) | def _base_distribution(self, distr_args): method distribution (line 120) | def distribution( method event_shape (line 133) | def event_shape(self) -> Tuple: method event_dim (line 140) | def event_dim(self) -> int: method value_in_support (line 148) | def value_in_support(self) -> float: method get_parameter_projection (line 155) | def get_parameter_projection(self, in_features: int) -> nn.Module: method domain_map (line 165) | def domain_map(self, *args: torch.Tensor): method squareplus (line 174) | def squareplus(cls, x: torch.Tensor) -> torch.Tensor: class StudentTOutput (line 182) | class StudentTOutput(DistributionOutput): method domain_map (line 187) | def domain_map(cls, df: torch.Tensor, loc: torch.Tensor, scale: torch.... class NormalOutput (line 193) | class NormalOutput(DistributionOutput): method domain_map (line 198) | def domain_map(cls, loc: torch.Tensor, scale: torch.Tensor): class NegativeBinomialOutput (line 203) | class NegativeBinomialOutput(DistributionOutput): method domain_map (line 208) | def domain_map(cls, total_count: torch.Tensor, logits: torch.Tensor): method _base_distribution (line 212) | def _base_distribution(self, distr_args) -> Distribution: method distribution (line 222) | def distribution( class FeatureEmbedder (line 234) | class FeatureEmbedder(nn.Module): method __init__ (line 235) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 241) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MeanScaler (line 258) | class MeanScaler(nn.Module): method __init__ (line 272) | def __init__(self, dim: int, keepdim: bool = False, minimum_scale: flo... method forward (line 280) | def forward(self, data: torch.Tensor, weights: torch.Tensor) -> Tuple[... class NOPScaler (line 312) | class NOPScaler(nn.Module): method __init__ (line 323) | def __init__(self, dim: int, keepdim: bool = False): method forward (line 328) | def forward(self, data: torch.Tensor, observed_indicator: torch.Tensor... function weighted_average (line 333) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... class NegativeLogLikelihood (line 357) | class NegativeLogLikelihood: method __call__ (line 362) | def __call__(self, input: torch.distributions.Distribution, target: to... function _make_causal_mask (line 367) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 383) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class Seq2SeqTimeSeriesModelOutput (line 398) | class Seq2SeqTimeSeriesModelOutput(ModelOutput): class Seq2SeqTimeSeriesPredictionOutput (line 466) | class Seq2SeqTimeSeriesPredictionOutput(ModelOutput): class SampleTimeSeriesPredictionOutput (line 534) | class SampleTimeSeriesPredictionOutput(ModelOutput): class TimeSeriesTransformerAttention (line 539) | class TimeSeriesTransformerAttention(nn.Module): method __init__ (line 542) | def __init__( method _shape (line 569) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 572) | def forward( class TimeSeriesTransformerEncoderLayer (line 687) | class TimeSeriesTransformerEncoderLayer(nn.Module): method __init__ (line 688) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 704) | def forward( class TimeSeriesTransformerDecoderLayer (line 756) | class TimeSeriesTransformerDecoderLayer(nn.Module): method __init__ (line 757) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 783) | def forward( class TimeSeriesTransformerPreTrainedModel (line 873) | class TimeSeriesTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 879) | def _init_weights(self, module): method _set_gradient_checkpointing (line 890) | def _set_gradient_checkpointing(self, module, value=False): class TimeSeriesTransformerEncoder (line 1043) | class TimeSeriesTransformerEncoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 1052) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 1067) | def forward( class TimeSeriesTransformerDecoder (line 1175) | class TimeSeriesTransformerDecoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 1184) | def __init__(self, config: TimeSeriesTransformerConfig): method _prepare_decoder_attention_mask (line 1196) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1216) | def forward( class TimeSeriesTransformerModel (line 1417) | class TimeSeriesTransformerModel(TimeSeriesTransformerPreTrainedModel): method __init__ (line 1418) | def __init__(self, config: TimeSeriesTransformerConfig): method _past_length (line 1439) | def _past_length(self) -> int: method get_lagged_subsequences (line 1442) | def get_lagged_subsequences( method create_network_inputs (line 1477) | def create_network_inputs( method enc_dec_outputs (line 1550) | def enc_dec_outputs(self, transformer_inputs): method get_encoder (line 1560) | def get_encoder(self): method get_decoder (line 1563) | def get_decoder(self): method forward (line 1568) | def forward( class TimeSeriesTransformerForPrediction (line 1688) | class TimeSeriesTransformerForPrediction(TimeSeriesTransformerPreTrained... method __init__ (line 1689) | def __init__(self, config: TimeSeriesTransformerConfig): method output_params (line 1712) | def output_params(self, dec_output): method get_encoder (line 1715) | def get_encoder(self): method get_decoder (line 1718) | def get_decoder(self): method output_distribution (line 1722) | def output_distribution(self, params, scale=None, trailing_n=None) -> ... method forward (line 1730) | def forward( method generate (line 1870) | def generate( FILE: benchmark/third_party/transformers/src/transformers/models/trajectory_transformer/configuration_trajectory_transformer.py class TrajectoryTransformerConfig (line 31) | class TrajectoryTransformerConfig(PretrainedConfig): method __init__ (line 115) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/trajectory_transformer/convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py class Parser (line 23) | class Parser(utils.Parser): function convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch (line 28) | def convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorc... FILE: benchmark/third_party/transformers/src/transformers/models/trajectory_transformer/modeling_trajectory_transformer.py function load_tf_weights_in_trajectory_transformer (line 50) | def load_tf_weights_in_trajectory_transformer(model, config, tf_checkpoi... class TrajectoryTransformerOutput (line 124) | class TrajectoryTransformerOutput(ModelOutput): class TrajectoryTransformerPreTrainedModel (line 154) | class TrajectoryTransformerPreTrainedModel(PreTrainedModel): method _set_gradient_checkpointing (line 166) | def _set_gradient_checkpointing(self, module, value=False): method _init_weights (line 170) | def _init_weights(self, module): class EinLinear (line 229) | class EinLinear(nn.Module): method __init__ (line 230) | def __init__(self, n_models, in_features, out_features, bias): method reset_parameters (line 241) | def reset_parameters(self): method forward (line 249) | def forward(self, input): class CausalSelfAttention (line 262) | class CausalSelfAttention(nn.Module): method __init__ (line 263) | def __init__(self, config): method forward (line 295) | def forward( class Block (line 357) | class Block(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 370) | def forward( class TrajectoryTransformerModel (line 406) | class TrajectoryTransformerModel(TrajectoryTransformerPreTrainedModel): method __init__ (line 409) | def __init__(self, config): method get_block_size (line 440) | def get_block_size(self): method offset_tokens (line 443) | def offset_tokens(self, trajectories): method pad_to_full_observation (line 455) | def pad_to_full_observation(self, hidden_states): method forward (line 471) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/configuration_transfo_xl.py class TransfoXLConfig (line 29) | class TransfoXLConfig(PretrainedConfig): method __init__ (line 116) | def __init__( method max_position_embeddings (line 178) | def max_position_embeddings(self): method max_position_embeddings (line 184) | def max_position_embeddings(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py function convert_transfo_xl_checkpoint_to_pytorch (line 41) | def convert_transfo_xl_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py class TFPositionalEmbedding (line 58) | class TFPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 59) | def __init__(self, demb, **kwargs): method call (line 64) | def call(self, pos_seq, bsz=None): class TFPositionwiseFF (line 75) | class TFPositionwiseFF(tf.keras.layers.Layer): method __init__ (line 76) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method call (line 94) | def call(self, inp, training=False): class TFRelPartialLearnableMultiHeadAttn (line 118) | class TFRelPartialLearnableMultiHeadAttn(tf.keras.layers.Layer): method __init__ (line 119) | def __init__( method build (line 169) | def build(self, input_shape): method _rel_shift (line 179) | def _rel_shift(self, x): method call (line 189) | def call(self, w, r, attn_mask, mems, head_mask, output_attentions, tr... class TFRelPartialLearnableDecoderLayer (line 270) | class TFRelPartialLearnableDecoderLayer(tf.keras.layers.Layer): method __init__ (line 271) | def __init__( method call (line 313) | def call(self, dec_inp, r, dec_attn_mask, mems, head_mask, output_atte... class TFTransfoEmbeddings (line 322) | class TFTransfoEmbeddings(tf.keras.layers.Layer): method __init__ (line 323) | def __init__(self, vocab_size, emb_size, init_std, **kwargs): method build (line 330) | def build(self, input_shape): method call (line 339) | def call(self, inputs): class TFAdaptiveEmbedding (line 343) | class TFAdaptiveEmbedding(tf.keras.layers.Layer): method __init__ (line 344) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, init_... method build (line 377) | def build(self, input_shape): method call (line 391) | def call(self, inp): class TFTransfoXLMainLayer (line 420) | class TFTransfoXLMainLayer(tf.keras.layers.Layer): method __init__ (line 423) | def __init__(self, config, **kwargs): method build (line 486) | def build(self, input_shape): method get_input_embeddings (line 496) | def get_input_embeddings(self): method set_input_embeddings (line 499) | def set_input_embeddings(self, value): method backward_compatible (line 502) | def backward_compatible(self): method reset_memory_length (line 505) | def reset_memory_length(self, mem_len): method _prune_heads (line 508) | def _prune_heads(self, heads): method init_mems (line 511) | def init_mems(self, bsz): method _update_mems (line 522) | def _update_mems(self, hids, mems, mlen, qlen): method call (line 543) | def call( class TFTransfoXLPreTrainedModel (line 678) | class TFTransfoXLPreTrainedModel(TFPreTrainedModel): method serving (line 694) | def serving(self, inputs): class TFTransfoXLModelOutput (line 701) | class TFTransfoXLModelOutput(ModelOutput): class TFTransfoXLLMHeadModelOutput (line 732) | class TFTransfoXLLMHeadModelOutput(ModelOutput): class TFTransfoXLSequenceClassifierOutputWithPast (line 765) | class TFTransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TFTransfoXLModel (line 883) | class TFTransfoXLModel(TFTransfoXLPreTrainedModel): method __init__ (line 884) | def __init__(self, config, *inputs, **kwargs): method call (line 896) | def call( method serving_output (line 920) | def serving_output(self, output): class TFTransfoXLLMHeadModel (line 939) | class TFTransfoXLLMHeadModel(TFTransfoXLPreTrainedModel): method __init__ (line 940) | def __init__(self, config): method _resize_token_embeddings (line 953) | def _resize_token_embeddings(self, new_num_tokens): method get_output_embeddings (line 956) | def get_output_embeddings(self): method reset_memory_length (line 962) | def reset_memory_length(self, mem_len): method init_mems (line 965) | def init_mems(self, bsz): method call (line 976) | def call( method serving_output (line 1020) | def serving_output(self, output): method prepare_inputs_for_generation (line 1031) | def prepare_inputs_for_generation(self, input_ids, past=None, **model_... method _reorder_cache (line 1043) | def _reorder_cache(mems: List[tf.Tensor], beam_idx: tf.Tensor) -> List... class TFTransfoXLForSequenceClassification (line 1062) | class TFTransfoXLForSequenceClassification(TFTransfoXLPreTrainedModel, T... method __init__ (line 1063) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1074) | def get_output_embeddings(self): method call (line 1085) | def call( method serving_output (line 1168) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/modeling_tf_transfo_xl_utilities.py class TFAdaptiveSoftmaxMask (line 26) | class TFAdaptiveSoftmaxMask(tf.keras.layers.Layer): method __init__ (line 27) | def __init__(self, vocab_size, d_embed, d_proj, cutoffs, div_val=1, ke... method build (line 46) | def build(self, input_shape): method _logit (line 105) | def _logit(x, W, b, proj=None): method _gather_logprob (line 112) | def _gather_logprob(logprob, target): method call (line 118) | def call(self, hidden, target, return_mean=True, training=False): FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/modeling_transfo_xl.py function build_tf_to_pytorch_map (line 52) | def build_tf_to_pytorch_map(model, config): function load_tf_weights_in_transfo_xl (line 120) | def load_tf_weights_in_transfo_xl(model, config, tf_path): class PositionalEmbedding (line 179) | class PositionalEmbedding(nn.Module): method __init__ (line 180) | def __init__(self, demb): method forward (line 188) | def forward(self, pos_seq, bsz=None): class PositionwiseFF (line 198) | class PositionwiseFF(nn.Module): method __init__ (line 199) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method forward (line 218) | def forward(self, inp): class RelPartialLearnableMultiHeadAttn (line 235) | class RelPartialLearnableMultiHeadAttn(nn.Module): method __init__ (line 236) | def __init__( method _rel_shift (line 276) | def _rel_shift(self, x): method forward (line 288) | def forward(self, w, r, attn_mask=None, mems=None, head_mask=None, out... class RelPartialLearnableDecoderLayer (line 373) | class RelPartialLearnableDecoderLayer(nn.Module): method __init__ (line 374) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, layer_no... method forward (line 384) | def forward(self, dec_inp, r, dec_attn_mask=None, mems=None, head_mask... class AdaptiveEmbedding (line 401) | class AdaptiveEmbedding(nn.Module): method __init__ (line 402) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, sampl... method forward (line 429) | def forward(self, inp): class TransfoXLPreTrainedModel (line 461) | class TransfoXLPreTrainedModel(PreTrainedModel): method _init_weight (line 471) | def _init_weight(self, weight): method _init_bias (line 477) | def _init_bias(self, bias): method _init_weights (line 480) | def _init_weights(self, m): method resize_token_embeddings (line 520) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _get_new_num_tokens_layer (line 559) | def _get_new_num_tokens_layer(self, new_num_tokens, layer): method _get_embedding_shapes (line 572) | def _get_embedding_shapes(self): method _resize_token_embeddings (line 576) | def _resize_token_embeddings(self, new_num_tokens, layer=-1): method _resize_cutoffs (line 587) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... class TransfoXLModelOutput (line 602) | class TransfoXLModelOutput(ModelOutput): class TransfoXLSequenceClassifierOutputWithPast (line 633) | class TransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TransfoXLLMHeadModelOutput (line 667) | class TransfoXLLMHeadModelOutput(ModelOutput): method logits (line 703) | def logits(self): class TransfoXLModel (line 766) | class TransfoXLModel(TransfoXLPreTrainedModel): method __init__ (line 767) | def __init__(self, config): method get_input_embeddings (line 822) | def get_input_embeddings(self): method set_input_embeddings (line 825) | def set_input_embeddings(self, new_embeddings): method backward_compatible (line 828) | def backward_compatible(self): method reset_memory_length (line 831) | def reset_memory_length(self, mem_len): method _prune_heads (line 834) | def _prune_heads(self, heads): method init_mems (line 838) | def init_mems(self, bsz): method _update_mems (line 850) | def _update_mems(self, hids, mems, mlen, qlen): method forward (line 877) | def forward( class TransfoXLLMHeadModel (line 1008) | class TransfoXLLMHeadModel(TransfoXLPreTrainedModel): method __init__ (line 1009) | def __init__(self, config): method tie_weights (line 1035) | def tie_weights(self): method reset_memory_length (line 1056) | def reset_memory_length(self, mem_len): method init_mems (line 1059) | def init_mems(self, bsz): method forward (line 1069) | def forward( method get_output_embeddings (line 1144) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 1151) | def prepare_inputs_for_generation(self, input_ids, past=None, **model_... method _resize_cutoffs (line 1163) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... method _reorder_cache (line 1171) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class TransfoXLForSequenceClassification (line 1195) | class TransfoXLForSequenceClassification(TransfoXLPreTrainedModel): method __init__ (line 1198) | def __init__(self, config): method forward (line 1213) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/modeling_transfo_xl_utilities.py class ProjectedAdaptiveLogSoftmax (line 29) | class ProjectedAdaptiveLogSoftmax(nn.Module): method __init__ (line 30) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, keep_... method _compute_logit (line 71) | def _compute_logit(self, hidden, weight, bias, proj): method forward (line 85) | def forward(self, hidden, labels=None, keep_order=False): method log_prob (line 190) | def log_prob(self, hidden): FILE: benchmark/third_party/transformers/src/transformers/models/transfo_xl/tokenization_transfo_xl.py function tokenize_numbers (line 76) | def tokenize_numbers(text_array: List[str]) -> List[str]: function detokenize_numbers (line 102) | def detokenize_numbers(text: str) -> str: class TransfoXLTokenizer (line 123) | class TransfoXLTokenizer(PreTrainedTokenizer): method __init__ (line 168) | def __init__( method do_lower_case (line 260) | def do_lower_case(self): method _compile_space_around_punctuation_pattern (line 263) | def _compile_space_around_punctuation_pattern(self): method count_file (line 268) | def count_file(self, path, verbose=False, add_eos=False): method count_sents (line 284) | def count_sents(self, sents, verbose=False): method _build_from_file (line 295) | def _build_from_file(self, vocab_file): method save_vocabulary (line 310) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_vocab (line 322) | def build_vocab(self): method encode_file (line 343) | def encode_file(self, path, ordered=False, verbose=False, add_eos=True... method encode_sents (line 361) | def encode_sents(self, sents, ordered=False, verbose=False): method add_special (line 375) | def add_special(self, sym): method add_symbol (line 381) | def add_symbol(self, sym): method move_added_token (line 386) | def move_added_token(self, token: str, target_idx: int): method moses_punct_norm (line 413) | def moses_punct_norm(self, text): method moses_tokenize (line 416) | def moses_tokenize(self, text): method moses_pipeline (line 421) | def moses_pipeline(self, text: str) -> List[str]: method _convert_id_to_token (line 446) | def _convert_id_to_token(self, idx): method _convert_token_to_id (line 451) | def _convert_token_to_id(self, sym): method convert_tokens_to_string (line 468) | def convert_tokens_to_string(self, tokens): method convert_to_tensor (line 477) | def convert_to_tensor(self, symbols): method vocab_size (line 481) | def vocab_size(self): method get_vocab (line 484) | def get_vocab(self): method _tokenize (line 487) | def _tokenize(self, line, add_eos=False, add_double_eos=False): class LMOrderedIterator (line 507) | class LMOrderedIterator(object): method __init__ (line 508) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None): method get_batch (line 530) | def get_batch(self, i, bptt=None): method get_fixlen_iter (line 546) | def get_fixlen_iter(self, start=0): method get_varlen_iter (line 550) | def get_varlen_iter(self, start=0, std=5, min_len=5, max_deviation=3): method __iter__ (line 562) | def __iter__(self): class LMShuffledIterator (line 566) | class LMShuffledIterator(object): method __init__ (line 567) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None, shuffl... method get_sent_stream (line 580) | def get_sent_stream(self): method stream_iterator (line 589) | def stream_iterator(self, sent_stream): method __iter__ (line 636) | def __iter__(self): class LMMultiFileIterator (line 644) | class LMMultiFileIterator(LMShuffledIterator): method __init__ (line 645) | def __init__(self, paths, vocab, bsz, bptt, device="cpu", ext_len=None... method get_sent_stream (line 657) | def get_sent_stream(self, path): method __iter__ (line 665) | def __iter__(self): class TransfoXLCorpus (line 676) | class TransfoXLCorpus(object): method from_pretrained (line 679) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 714) | def __init__(self, *args, **kwargs): method build_corpus (line 721) | def build_corpus(self, path, dataset): method get_iterator (line 755) | def get_iterator(self, split, *args, **kwargs): function get_lm_corpus (line 776) | def get_lm_corpus(datadir, dataset): FILE: benchmark/third_party/transformers/src/transformers/models/trocr/configuration_trocr.py class TrOCRConfig (line 31) | class TrOCRConfig(PretrainedConfig): method __init__ (line 104) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/trocr/convert_trocr_unilm_to_pytorch.py function create_rename_keys (line 43) | def create_rename_keys(encoder_config, decoder_config): function read_in_q_k_v (line 88) | def read_in_q_k_v(state_dict, encoder_config): function rename_key (line 104) | def rename_key(dct, old, new): function prepare_img (line 110) | def prepare_img(checkpoint_url): function convert_tr_ocr_checkpoint (line 124) | def convert_tr_ocr_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/trocr/modeling_trocr.py function _make_causal_mask (line 48) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 64) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class TrOCRLearnedPositionalEmbedding (line 79) | class TrOCRLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 84) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 90) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class TrOCRSinusoidalPositionalEmbedding (line 101) | class TrOCRSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 104) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method get_embedding (line 113) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 132) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 150) | def create_position_ids_from_input_ids( class TrOCRAttention (line 163) | class TrOCRAttention(nn.Module): method __init__ (line 166) | def __init__( method _shape (line 199) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 202) | def forward( class TrOCRDecoderLayer (line 312) | class TrOCRDecoderLayer(nn.Module): method __init__ (line 313) | def __init__(self, config: TrOCRConfig): method forward (line 347) | def forward( class TrOCRPreTrainedModel (line 441) | class TrOCRPreTrainedModel(PreTrainedModel): method _init_weights (line 446) | def _init_weights(self, module): method _set_gradient_checkpointing (line 457) | def _set_gradient_checkpointing(self, module, value=False): class TrOCRDecoder (line 479) | class TrOCRDecoder(TrOCRPreTrainedModel): method __init__ (line 487) | def __init__(self, config: TrOCRConfig): method get_input_embeddings (line 516) | def get_input_embeddings(self): method set_input_embeddings (line 519) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 522) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 540) | def forward( class TrOCRDecoderWrapper (line 768) | class TrOCRDecoderWrapper(TrOCRPreTrainedModel): method __init__ (line 774) | def __init__(self, config): method forward (line 778) | def forward(self, *args, **kwargs): class TrOCRForCausalLM (line 787) | class TrOCRForCausalLM(TrOCRPreTrainedModel): method __init__ (line 788) | def __init__(self, config): method get_input_embeddings (line 800) | def get_input_embeddings(self): method set_input_embeddings (line 803) | def set_input_embeddings(self, value): method get_output_embeddings (line 806) | def get_output_embeddings(self): method set_output_embeddings (line 809) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 812) | def set_decoder(self, decoder): method get_decoder (line 815) | def get_decoder(self): method forward (line 819) | def forward( method prepare_inputs_for_generation (line 993) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1009) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/trocr/processing_trocr.py class TrOCRProcessor (line 24) | class TrOCRProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 46) | def __call__(self, *args, **kwargs): method batch_decode (line 79) | def batch_decode(self, *args, **kwargs): method decode (line 86) | def decode(self, *args, **kwargs): method as_target_processor (line 94) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/unispeech/configuration_unispeech.py class UniSpeechConfig (line 34) | class UniSpeechConfig(PretrainedConfig): method __init__ (line 180) | def __init__( method inputs_to_logits_ratio (line 299) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/unispeech/convert_unispeech_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 69) | def set_recursively(hf_pointer, key, value, full_name, weight_type, is_f... function recursively_load_weights (line 106) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 150) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_checkpoint (line 191) | def convert_unispeech_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/unispeech/modeling_unispeech.py class UniSpeechForPreTrainingOutput (line 75) | class UniSpeechForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 111) | def _compute_mask_indices( class UniSpeechNoLayerNormConvLayer (line 231) | class UniSpeechNoLayerNormConvLayer(nn.Module): method __init__ (line 232) | def __init__(self, config, layer_id=0): method forward (line 246) | def forward(self, hidden_states): class UniSpeechLayerNormConvLayer (line 253) | class UniSpeechLayerNormConvLayer(nn.Module): method __init__ (line 254) | def __init__(self, config, layer_id=0): method forward (line 269) | def forward(self, hidden_states): class UniSpeechGroupNormConvLayer (line 281) | class UniSpeechGroupNormConvLayer(nn.Module): method __init__ (line 282) | def __init__(self, config, layer_id=0): method forward (line 298) | def forward(self, hidden_states): class UniSpeechPositionalConvEmbedding (line 306) | class UniSpeechPositionalConvEmbedding(nn.Module): method __init__ (line 307) | def __init__(self, config): method forward (line 330) | def forward(self, hidden_states): class UniSpeechSamePadLayer (line 342) | class UniSpeechSamePadLayer(nn.Module): method __init__ (line 343) | def __init__(self, num_conv_pos_embeddings): method forward (line 347) | def forward(self, hidden_states): class UniSpeechFeatureEncoder (line 354) | class UniSpeechFeatureEncoder(nn.Module): method __init__ (line 357) | def __init__(self, config): method _freeze_parameters (line 377) | def _freeze_parameters(self): method forward (line 382) | def forward(self, input_values): class UniSpeechFeatureExtractor (line 408) | class UniSpeechFeatureExtractor(UniSpeechFeatureEncoder): method __init__ (line 409) | def __init__(self, config): class UniSpeechFeatureProjection (line 420) | class UniSpeechFeatureProjection(nn.Module): method __init__ (line 421) | def __init__(self, config): method forward (line 427) | def forward(self, hidden_states): class UniSpeechAttention (line 436) | class UniSpeechAttention(nn.Module): method __init__ (line 439) | def __init__( method _shape (line 466) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 469) | def forward( class UniSpeechFeedForward (line 584) | class UniSpeechFeedForward(nn.Module): method __init__ (line 585) | def __init__(self, config): method forward (line 598) | def forward(self, hidden_states): class UniSpeechEncoderLayer (line 609) | class UniSpeechEncoderLayer(nn.Module): method __init__ (line 610) | def __init__(self, config): method forward (line 623) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechEncoderLayerStableLayerNorm (line 644) | class UniSpeechEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 645) | def __init__(self, config): method forward (line 658) | def forward( class UniSpeechEncoder (line 682) | class UniSpeechEncoder(nn.Module): method __init__ (line 683) | def __init__(self, config): method forward (line 692) | def forward( class UniSpeechEncoderStableLayerNorm (line 770) | class UniSpeechEncoderStableLayerNorm(nn.Module): method __init__ (line 771) | def __init__(self, config): method forward (line 782) | def forward( class UniSpeechGumbelVectorQuantizer (line 861) | class UniSpeechGumbelVectorQuantizer(nn.Module): method __init__ (line 867) | def __init__(self, config): method _compute_perplexity (line 888) | def _compute_perplexity(probs): method forward (line 893) | def forward(self, hidden_states): class UniSpeechPreTrainedModel (line 931) | class UniSpeechPreTrainedModel(PreTrainedModel): method _init_weights (line 943) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 976) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 991) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1006) | def _set_gradient_checkpointing(self, module, value=False): class UniSpeechModel (line 1072) | class UniSpeechModel(UniSpeechPreTrainedModel): method __init__ (line 1073) | def __init__(self, config: UniSpeechConfig): method _mask_hidden_states (line 1091) | def _mask_hidden_states( method forward (line 1146) | def forward( class UniSpeechForPreTraining (line 1197) | class UniSpeechForPreTraining(UniSpeechPreTrainedModel): method __init__ (line 1198) | def __init__(self, config: UniSpeechConfig): method set_gumbel_temperature (line 1213) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1219) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1231) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1239) | def compute_contrastive_logits( method forward (line 1260) | def forward( class UniSpeechForCTC (line 1348) | class UniSpeechForCTC(UniSpeechPreTrainedModel): method __init__ (line 1349) | def __init__(self, config): method freeze_feature_extractor (line 1370) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1382) | def freeze_feature_encoder(self): method forward (line 1398) | def forward( class UniSpeechForSequenceClassification (line 1479) | class UniSpeechForSequenceClassification(UniSpeechPreTrainedModel): method __init__ (line 1480) | def __init__(self, config): method freeze_feature_extractor (line 1497) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1509) | def freeze_feature_encoder(self): method freeze_base_model (line 1516) | def freeze_base_model(self): method forward (line 1534) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/unispeech_sat/configuration_unispeech_sat.py class UniSpeechSatConfig (line 34) | class UniSpeechSatConfig(PretrainedConfig): method __init__ (line 190) | def __init__( method inputs_to_logits_ratio (line 317) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/unispeech_sat/convert_unispeech_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: benchmark/third_party/transformers/src/transformers/models/unispeech_sat/convert_unispeech_sat_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 64) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 93) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 140) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_sat_checkpoint (line 185) | def convert_unispeech_sat_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py class UniSpeechSatForPreTrainingOutput (line 88) | class UniSpeechSatForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 125) | def _compute_mask_indices( class UniSpeechSatNoLayerNormConvLayer (line 245) | class UniSpeechSatNoLayerNormConvLayer(nn.Module): method __init__ (line 246) | def __init__(self, config, layer_id=0): method forward (line 260) | def forward(self, hidden_states): class UniSpeechSatLayerNormConvLayer (line 267) | class UniSpeechSatLayerNormConvLayer(nn.Module): method __init__ (line 268) | def __init__(self, config, layer_id=0): method forward (line 283) | def forward(self, hidden_states): class UniSpeechSatGroupNormConvLayer (line 295) | class UniSpeechSatGroupNormConvLayer(nn.Module): method __init__ (line 296) | def __init__(self, config, layer_id=0): method forward (line 312) | def forward(self, hidden_states): class UniSpeechSatPositionalConvEmbedding (line 320) | class UniSpeechSatPositionalConvEmbedding(nn.Module): method __init__ (line 321) | def __init__(self, config): method forward (line 344) | def forward(self, hidden_states): class UniSpeechSatSamePadLayer (line 356) | class UniSpeechSatSamePadLayer(nn.Module): method __init__ (line 357) | def __init__(self, num_conv_pos_embeddings): method forward (line 361) | def forward(self, hidden_states): class UniSpeechSatFeatureEncoder (line 368) | class UniSpeechSatFeatureEncoder(nn.Module): method __init__ (line 371) | def __init__(self, config): method _freeze_parameters (line 391) | def _freeze_parameters(self): method forward (line 396) | def forward(self, input_values): class UniSpeechSatFeatureExtractor (line 422) | class UniSpeechSatFeatureExtractor(UniSpeechSatFeatureEncoder): method __init__ (line 423) | def __init__(self, config): class UniSpeechSatFeatureProjection (line 434) | class UniSpeechSatFeatureProjection(nn.Module): method __init__ (line 435) | def __init__(self, config): method forward (line 441) | def forward(self, hidden_states): class UniSpeechSatAttention (line 450) | class UniSpeechSatAttention(nn.Module): method __init__ (line 453) | def __init__( method _shape (line 480) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 483) | def forward( class UniSpeechSatFeedForward (line 598) | class UniSpeechSatFeedForward(nn.Module): method __init__ (line 599) | def __init__(self, config): method forward (line 612) | def forward(self, hidden_states): class UniSpeechSatEncoderLayer (line 623) | class UniSpeechSatEncoderLayer(nn.Module): method __init__ (line 624) | def __init__(self, config): method forward (line 637) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechSatEncoderLayerStableLayerNorm (line 658) | class UniSpeechSatEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 659) | def __init__(self, config): method forward (line 672) | def forward( class UniSpeechSatEncoder (line 696) | class UniSpeechSatEncoder(nn.Module): method __init__ (line 697) | def __init__(self, config): method forward (line 706) | def forward( class UniSpeechSatEncoderStableLayerNorm (line 784) | class UniSpeechSatEncoderStableLayerNorm(nn.Module): method __init__ (line 785) | def __init__(self, config): method forward (line 796) | def forward( class UniSpeechSatGumbelVectorQuantizer (line 875) | class UniSpeechSatGumbelVectorQuantizer(nn.Module): method __init__ (line 881) | def __init__(self, config): method _compute_perplexity (line 902) | def _compute_perplexity(probs, mask=None): method forward (line 907) | def forward(self, hidden_states): class UniSpeechSatPreTrainedModel (line 945) | class UniSpeechSatPreTrainedModel(PreTrainedModel): method _init_weights (line 957) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 990) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1005) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1020) | def _set_gradient_checkpointing(self, module, value=False): class UniSpeechSatModel (line 1088) | class UniSpeechSatModel(UniSpeechSatPreTrainedModel): method __init__ (line 1089) | def __init__(self, config: UniSpeechSatConfig): method _mask_hidden_states (line 1106) | def _mask_hidden_states( method forward (line 1161) | def forward( class UniSpeechSatForPreTraining (line 1210) | class UniSpeechSatForPreTraining(UniSpeechSatPreTrainedModel): method __init__ (line 1211) | def __init__(self, config: UniSpeechSatConfig): method set_gumbel_temperature (line 1233) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1239) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1251) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1259) | def compute_contrastive_logits( method forward (line 1280) | def forward( class UniSpeechSatForCTC (line 1352) | class UniSpeechSatForCTC(UniSpeechSatPreTrainedModel): method __init__ (line 1353) | def __init__(self, config): method freeze_feature_extractor (line 1374) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1386) | def freeze_feature_encoder(self): method forward (line 1402) | def forward( class UniSpeechSatForSequenceClassification (line 1483) | class UniSpeechSatForSequenceClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1484) | def __init__(self, config): method freeze_feature_extractor (line 1501) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1513) | def freeze_feature_encoder(self): method freeze_base_model (line 1520) | def freeze_base_model(self): method forward (line 1538) | def forward( class UniSpeechSatForAudioFrameClassification (line 1607) | class UniSpeechSatForAudioFrameClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1608) | def __init__(self, config): method freeze_feature_extractor (line 1625) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1637) | def freeze_feature_encoder(self): method freeze_base_model (line 1644) | def freeze_base_model(self): method forward (line 1661) | def forward( class AMSoftmaxLoss (line 1716) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1717) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1725) | def forward(self, hidden_states, labels): class TDNNLayer (line 1740) | class TDNNLayer(nn.Module): method __init__ (line 1741) | def __init__(self, config, layer_id=0): method forward (line 1751) | def forward(self, hidden_states): class UniSpeechSatForXVector (line 1773) | class UniSpeechSatForXVector(UniSpeechSatPreTrainedModel): method __init__ (line 1774) | def __init__(self, config): method freeze_feature_extractor (line 1793) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1805) | def freeze_feature_encoder(self): method freeze_base_model (line 1812) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1820) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1844) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/van/configuration_van.py class VanConfig (line 30) | class VanConfig(PretrainedConfig): method __init__ (line 82) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/van/convert_van_to_pytorch.py class Tracker (line 43) | class Tracker: method _forward_hook (line 48) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 54) | def __call__(self, x: Tensor): method parametrized (line 62) | def parametrized(self): class ModuleTransfer (line 68) | class ModuleTransfer: method __call__ (line 75) | def __call__(self, x: Tensor): function copy_parameters (line 98) | def copy_parameters(from_model: nn.Module, our_model: nn.Module) -> nn.M... function convert_weight_and_push (line 122) | def convert_weight_and_push( function convert_weights_and_push (line 167) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: benchmark/third_party/transformers/src/transformers/models/van/modeling_van.py function drop_path (line 58) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class VanDropPath (line 79) | class VanDropPath(nn.Module): method __init__ (line 82) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 86) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 89) | def extra_repr(self) -> str: class VanOverlappingPatchEmbedder (line 93) | class VanOverlappingPatchEmbedder(nn.Module): method __init__ (line 100) | def __init__(self, in_channels: int, hidden_size: int, patch_size: int... method forward (line 107) | def forward(self, input: torch.Tensor) -> torch.Tensor: class VanMlpLayer (line 113) | class VanMlpLayer(nn.Module): method __init__ (line 119) | def __init__( method forward (line 135) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttention (line 145) | class VanLargeKernelAttention(nn.Module): method __init__ (line 150) | def __init__(self, hidden_size: int): method forward (line 158) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttentionLayer (line 165) | class VanLargeKernelAttentionLayer(nn.Module): method __init__ (line 170) | def __init__(self, hidden_size: int): method forward (line 174) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanSpatialAttentionLayer (line 180) | class VanSpatialAttentionLayer(nn.Module): method __init__ (line 186) | def __init__(self, hidden_size: int, hidden_act: str = "gelu"): method forward (line 199) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayerScaling (line 208) | class VanLayerScaling(nn.Module): method __init__ (line 213) | def __init__(self, hidden_size: int, initial_value: float = 1e-2): method forward (line 217) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayer (line 223) | class VanLayer(nn.Module): method __init__ (line 228) | def __init__( method forward (line 246) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanStage (line 266) | class VanStage(nn.Module): method __init__ (line 271) | def __init__( method forward (line 297) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanEncoder (line 309) | class VanEncoder(nn.Module): method __init__ (line 314) | def __init__(self, config: VanConfig): method forward (line 344) | def forward( class VanPreTrainedModel (line 364) | class VanPreTrainedModel(PreTrainedModel): method _init_weights (line 375) | def _init_weights(self, module): method _set_gradient_checkpointing (line 391) | def _set_gradient_checkpointing(self, module, value=False): class VanModel (line 426) | class VanModel(VanPreTrainedModel): method __init__ (line 427) | def __init__(self, config): method forward (line 445) | def forward( class VanForImageClassification (line 482) | class VanForImageClassification(VanPreTrainedModel): method __init__ (line 483) | def __init__(self, config): method forward (line 502) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/videomae/configuration_videomae.py class VideoMAEConfig (line 28) | class VideoMAEConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/videomae/convert_videomae_to_pytorch.py function get_videomae_config (line 33) | def get_videomae_config(model_name): function rename_key (line 67) | def rename_key(name): function convert_state_dict (line 114) | def convert_state_dict(orig_state_dict, config): function prepare_video (line 147) | def prepare_video(): function convert_videomae_checkpoint (line 155) | def convert_videomae_checkpoint(checkpoint_url, pytorch_dump_folder_path... FILE: benchmark/third_party/transformers/src/transformers/models/videomae/feature_extraction_videomae.py class VideoMAEFeatureExtractor (line 32) | class VideoMAEFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtra... method __init__ (line 61) | def __init__( method resize_video (line 81) | def resize_video(self, video, size, resample="bilinear"): method crop_video (line 84) | def crop_video(self, video, size): method normalize_video (line 87) | def normalize_video(self, video, mean, std): method __call__ (line 103) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/videomae/modeling_videomae.py class VideoMAEDecoderOutput (line 57) | class VideoMAEDecoderOutput(ModelOutput): class VideoMAEForPreTrainingOutput (line 80) | class VideoMAEForPreTrainingOutput(ModelOutput): function get_sinusoid_encoding_table (line 107) | def get_sinusoid_encoding_table(n_position, d_hid): class VideoMAEEmbeddings (line 120) | class VideoMAEEmbeddings(nn.Module): method __init__ (line 126) | def __init__(self, config): method forward (line 135) | def forward(self, pixel_values, bool_masked_pos): class VideoMAEPatchEmbeddings (line 152) | class VideoMAEPatchEmbeddings(nn.Module): method __init__ (line 162) | def __init__(self, config): method forward (line 189) | def forward(self, pixel_values): class VideoMAESelfAttention (line 205) | class VideoMAESelfAttention(nn.Module): method __init__ (line 206) | def __init__(self, config: VideoMAEConfig) -> None: method transpose_for_scores (line 231) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 236) | def forward( class VideoMAESelfOutput (line 277) | class VideoMAESelfOutput(nn.Module): method __init__ (line 283) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 288) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAEAttention (line 297) | class VideoMAEAttention(nn.Module): method __init__ (line 298) | def __init__(self, config: VideoMAEConfig) -> None: method prune_heads (line 304) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 322) | def forward( class VideoMAEIntermediate (line 337) | class VideoMAEIntermediate(nn.Module): method __init__ (line 338) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 346) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VideoMAEOutput (line 355) | class VideoMAEOutput(nn.Module): method __init__ (line 356) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 361) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAELayer (line 371) | class VideoMAELayer(nn.Module): method __init__ (line 374) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 384) | def forward( class VideoMAEEncoder (line 414) | class VideoMAEEncoder(nn.Module): method __init__ (line 415) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 421) | def forward( class VideoMAEPreTrainedModel (line 471) | class VideoMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 482) | def _init_weights(self, module): method _set_gradient_checkpointing (line 494) | def _set_gradient_checkpointing(self, module, value=False): class VideoMAEModel (line 537) | class VideoMAEModel(VideoMAEPreTrainedModel): method __init__ (line 538) | def __init__(self, config): method get_input_embeddings (line 553) | def get_input_embeddings(self): method _prune_heads (line 556) | def _prune_heads(self, heads_to_prune): method forward (line 566) | def forward( class VideoMAEDecoder (line 656) | class VideoMAEDecoder(nn.Module): method __init__ (line 657) | def __init__(self, config, num_patches): method forward (line 679) | def forward( class VideoMAEForPreTraining (line 734) | class VideoMAEForPreTraining(VideoMAEPreTrainedModel): method __init__ (line 735) | def __init__(self, config): method forward (line 754) | def forward( class VideoMAEForVideoClassification (line 905) | class VideoMAEForVideoClassification(VideoMAEPreTrainedModel): method __init__ (line 906) | def __init__(self, config): method forward (line 921) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/vilt/configuration_vilt.py class ViltConfig (line 28) | class ViltConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/vilt/convert_vilt_original_to_pytorch.py function create_rename_keys (line 45) | def create_rename_keys(config, vqa_model=False, nlvr_model=False, irtr_m... function read_in_q_k_v (line 134) | def read_in_q_k_v(state_dict, config): function remove_classification_head_ (line 157) | def remove_classification_head_(state_dict): function rename_key (line 163) | def rename_key(dct, old, new): function convert_vilt_checkpoint (line 169) | def convert_vilt_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/vilt/feature_extraction_vilt.py class ViltFeatureExtractor (line 42) | class ViltFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtractio... method __init__ (line 73) | def __init__( method _resize (line 93) | def _resize(self, image, shorter=800, longer=1333, size_divisor=32, re... method _max_by_axis (line 135) | def _max_by_axis(self, the_list): method pad_and_create_pixel_mask (line 143) | def pad_and_create_pixel_mask( method __call__ (line 184) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/vilt/modeling_vilt.py class ViltForImagesAndTextClassificationOutput (line 60) | class ViltForImagesAndTextClassificationOutput(ModelOutput): class ViltEmbeddings (line 85) | class ViltEmbeddings(nn.Module): method __init__ (line 94) | def __init__(self, config): method visual_embed (line 109) | def visual_embed(self, pixel_values, pixel_mask, max_image_length=200): method forward (line 197) | def forward( class TextEmbeddings (line 239) | class TextEmbeddings(nn.Module): method __init__ (line 242) | def __init__(self, config): method forward (line 259) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class ViltPatchEmbeddings (line 294) | class ViltPatchEmbeddings(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 314) | def forward(self, pixel_values): class ViltSelfAttention (line 324) | class ViltSelfAttention(nn.Module): method __init__ (line 325) | def __init__(self, config): method transpose_for_scores (line 343) | def transpose_for_scores(self, x): method forward (line 348) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltSelfOutput (line 385) | class ViltSelfOutput(nn.Module): method __init__ (line 391) | def __init__(self, config: ViltConfig) -> None: method forward (line 396) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltAttention (line 404) | class ViltAttention(nn.Module): method __init__ (line 405) | def __init__(self, config): method prune_heads (line 411) | def prune_heads(self, heads): method forward (line 429) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltIntermediate (line 439) | class ViltIntermediate(nn.Module): method __init__ (line 440) | def __init__(self, config: ViltConfig) -> None: method forward (line 448) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViltOutput (line 457) | class ViltOutput(nn.Module): method __init__ (line 458) | def __init__(self, config: ViltConfig) -> None: method forward (line 463) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltLayer (line 472) | class ViltLayer(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 485) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltEncoder (line 510) | class ViltEncoder(nn.Module): method __init__ (line 511) | def __init__(self, config): method forward (line 517) | def forward( class ViltPreTrainedModel (line 569) | class ViltPreTrainedModel(PreTrainedModel): method _init_weights (line 580) | def _init_weights(self, module): method _set_gradient_checkpointing (line 596) | def _set_gradient_checkpointing(self, module, value=False): class ViltModel (line 727) | class ViltModel(ViltPreTrainedModel): method __init__ (line 728) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 741) | def get_input_embeddings(self): method set_input_embeddings (line 744) | def set_input_embeddings(self, value): method _prune_heads (line 747) | def _prune_heads(self, heads_to_prune): method forward (line 757) | def forward( class ViltPooler (line 871) | class ViltPooler(nn.Module): method __init__ (line 872) | def __init__(self, config): method forward (line 877) | def forward(self, hidden_states): class ViltForMaskedLM (line 892) | class ViltForMaskedLM(ViltPreTrainedModel): method __init__ (line 893) | def __init__(self, config): method get_output_embeddings (line 902) | def get_output_embeddings(self): method set_output_embeddings (line 905) | def set_output_embeddings(self, new_embeddings): method forward (line 910) | def forward( class ViltPredictionHeadTransform (line 1021) | class ViltPredictionHeadTransform(nn.Module): method __init__ (line 1022) | def __init__(self, config): method forward (line 1031) | def forward(self, hidden_states): class ViltMLMHead (line 1038) | class ViltMLMHead(nn.Module): method __init__ (line 1039) | def __init__(self, config, weight=None): method forward (line 1051) | def forward(self, x): class ViltForQuestionAnswering (line 1064) | class ViltForQuestionAnswering(ViltPreTrainedModel): method __init__ (line 1065) | def __init__(self, config): method forward (line 1084) | def forward( class ViltForImageAndTextRetrieval (line 1175) | class ViltForImageAndTextRetrieval(ViltPreTrainedModel): method __init__ (line 1176) | def __init__(self, config): method forward (line 1189) | def forward( class ViltForImagesAndTextClassification (line 1274) | class ViltForImagesAndTextClassification(ViltPreTrainedModel): method __init__ (line 1275) | def __init__(self, config): method forward (line 1295) | def forward( class ViltForTokenClassification (line 1414) | class ViltForTokenClassification(ViltPreTrainedModel): method __init__ (line 1418) | def __init__(self, config): method forward (line 1432) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/vilt/processing_vilt.py class ViltProcessor (line 26) | class ViltProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 46) | def __call__( method batch_decode (line 96) | def batch_decode(self, *args, **kwargs): method decode (line 103) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py class VisionEncoderDecoderConfig (line 34) | class VisionEncoderDecoderConfig(PretrainedConfig): method __init__ (line 83) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 101) | def from_encoder_decoder_configs( method to_dict (line 117) | def to_dict(self): class VisionEncoderDecoderEncoderOnnxConfig (line 131) | class VisionEncoderDecoderEncoderOnnxConfig(OnnxConfig): method inputs (line 135) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 143) | def atol_for_validation(self) -> float: method outputs (line 147) | def outputs(self) -> Mapping[str, Mapping[int, str]]: class VisionEncoderDecoderDecoderOnnxConfig (line 151) | class VisionEncoderDecoderDecoderOnnxConfig(OnnxConfig): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 161) | def generate_dummy_inputs( class VisionEncoderDecoderOnnxConfig (line 186) | class VisionEncoderDecoderOnnxConfig(OnnxConfig): method inputs (line 188) | def inputs(self) -> None: method get_encoder_config (line 191) | def get_encoder_config(self, encoder_config: PretrainedConfig) -> Onnx... method get_decoder_config (line 204) | def get_decoder_config( FILE: benchmark/third_party/transformers/src/transformers/models/vision_encoder_decoder/modeling_flax_vision_encoder_decoder.py class FlaxVisionEncoderDecoderModule (line 170) | class FlaxVisionEncoderDecoderModule(nn.Module): method setup (line 174) | def setup(self): method _get_encoder_module (line 200) | def _get_encoder_module(self): method _get_projection_module (line 203) | def _get_projection_module(self): method _get_decoder_module (line 206) | def _get_decoder_module(self): method __call__ (line 209) | def __call__( class FlaxVisionEncoderDecoderModel (line 268) | class FlaxVisionEncoderDecoderModel(FlaxPreTrainedModel): method __init__ (line 280) | def __init__( method init_weights (line 313) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 353) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 396) | def encode( method decode (line 470) | def decode( method __call__ (line 601) | def __call__( method prepare_inputs_for_generation (line 688) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 719) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 725) | def from_encoder_decoder_pretrained( FILE: benchmark/third_party/transformers/src/transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py function shift_tokens_right (line 149) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... class TFVisionEncoderDecoderModel (line 177) | class TFVisionEncoderDecoderModel(TFPreTrainedModel, TFCausalLanguageMod... method __init__ (line 189) | def __init__( method dummy_inputs (line 257) | def dummy_inputs(self): method get_encoder (line 281) | def get_encoder(self): method get_decoder (line 284) | def get_decoder(self): method get_input_embeddings (line 287) | def get_input_embeddings(self): method get_output_embeddings (line 290) | def get_output_embeddings(self): method set_output_embeddings (line 293) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 297) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 366) | def from_encoder_decoder_pretrained( method call (line 536) | def call( method serving_output (line 708) | def serving_output(self, output): method prepare_inputs_for_generation (line 731) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 751) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 754) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 760) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py function shift_tokens_right (line 37) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class VisionEncoderDecoderModel (line 151) | class VisionEncoderDecoderModel(PreTrainedModel): method __init__ (line 163) | def __init__( method _set_gradient_checkpointing (line 228) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 233) | def get_encoder(self): method get_decoder (line 236) | def get_decoder(self): method get_output_embeddings (line 239) | def get_output_embeddings(self): method set_output_embeddings (line 242) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 246) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 366) | def from_encoder_decoder_pretrained( method forward (line 521) | def forward( method prepare_decoder_input_ids_from_labels (line 648) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 651) | def prepare_inputs_for_generation( method resize_token_embeddings (line 666) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 672) | def _reorder_cache(self, past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/vision_text_dual_encoder/configuration_vision_text_dual_encoder.py class VisionTextDualEncoderConfig (line 28) | class VisionTextDualEncoderConfig(PretrainedConfig): method __init__ (line 78) | def __init__(self, projection_dim=512, logit_scale_init_value=2.6592, ... method from_vision_text_configs (line 106) | def from_vision_text_configs(cls, vision_config: PretrainedConfig, tex... method to_dict (line 117) | def to_dict(self): FILE: benchmark/third_party/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 244) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 270) | def __call__( method get_text_features (line 320) | def get_text_features( method get_image_features (line 382) | def get_image_features( method from_vision_text_pretrained (line 416) | def from_vision_text_pretrained( FILE: benchmark/third_party/transformers/src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py function contrastive_loss (line 150) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 155) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class VisionTextDualEncoderModel (line 162) | class VisionTextDualEncoderModel(PreTrainedModel): method __init__ (line 166) | def __init__( method get_text_features (line 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: benchmark/third_party/transformers/src/transformers/models/vision_text_dual_encoder/processing_vision_text_dual_encoder.py class VisionTextDualEncoderProcessor (line 23) | class VisionTextDualEncoderProcessor(ProcessorMixin): method __init__ (line 41) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 45) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 98) | def batch_decode(self, *args, **kwargs): method decode (line 105) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/visual_bert/configuration_visual_bert.py class VisualBertConfig (line 43) | class VisualBertConfig(PretrainedConfig): method __init__ (line 113) | def __init__( FILE: benchmark/third_party/transformers/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py function load_state_dict (line 59) | def load_state_dict(checkpoint_path): function get_new_dict (line 64) | def get_new_dict(d, config, rename_keys_prefix=rename_keys_prefix): function convert_visual_bert_checkpoint (line 83) | def convert_visual_bert_checkpoint(checkpoint_path, pytorch_dump_folder_... FILE: benchmark/third_party/transformers/src/transformers/models/visual_bert/modeling_visual_bert.py class VisualBertEmbeddings (line 65) | class VisualBertEmbeddings(nn.Module): method __init__ (line 68) | def __init__(self, config): method forward (line 98) | def forward( class VisualBertSelfAttention (line 197) | class VisualBertSelfAttention(nn.Module): method __init__ (line 198) | def __init__(self, config): method transpose_for_scores (line 216) | def transpose_for_scores(self, x): method forward (line 221) | def forward( class VisualBertSelfOutput (line 266) | class VisualBertSelfOutput(nn.Module): method __init__ (line 267) | def __init__(self, config): method forward (line 273) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertAttention (line 280) | class VisualBertAttention(nn.Module): method __init__ (line 281) | def __init__(self, config): method prune_heads (line 287) | def prune_heads(self, heads): method forward (line 305) | def forward( class VisualBertIntermediate (line 324) | class VisualBertIntermediate(nn.Module): method __init__ (line 325) | def __init__(self, config): method forward (line 333) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertOutput (line 340) | class VisualBertOutput(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertLayer (line 354) | class VisualBertLayer(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 363) | def forward( method feed_forward_chunk (line 387) | def feed_forward_chunk(self, attention_output): class VisualBertEncoder (line 393) | class VisualBertEncoder(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 400) | def forward( class VisualBertPooler (line 458) | class VisualBertPooler(nn.Module): method __init__ (line 459) | def __init__(self, config): method forward (line 464) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertPredictionHeadTransform (line 474) | class VisualBertPredictionHeadTransform(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 484) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertLMPredictionHead (line 492) | class VisualBertLMPredictionHead(nn.Module): method __init__ (line 493) | def __init__(self, config): method forward (line 506) | def forward(self, hidden_states): class VisualBertPreTrainingHeads (line 513) | class VisualBertPreTrainingHeads(nn.Module): method __init__ (line 514) | def __init__(self, config): method forward (line 519) | def forward(self, sequence_output, pooled_output): class VisualBertPreTrainedModel (line 525) | class VisualBertPreTrainedModel(PreTrainedModel): method _init_weights (line 536) | def _init_weights(self, module): method _set_gradient_checkpointing (line 549) | def _set_gradient_checkpointing(self, module, value=False): class VisualBertForPreTrainingOutput (line 555) | class VisualBertForPreTrainingOutput(ModelOutput): class VisualBertModel (line 677) | class VisualBertModel(VisualBertPreTrainedModel): method __init__ (line 685) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 702) | def get_input_embeddings(self): method set_input_embeddings (line 705) | def set_input_embeddings(self, value): method _prune_heads (line 708) | def _prune_heads(self, heads_to_prune): method forward (line 718) | def forward( class VisualBertForPreTraining (line 873) | class VisualBertForPreTraining(VisualBertPreTrainedModel): method __init__ (line 874) | def __init__(self, config): method get_output_embeddings (line 883) | def get_output_embeddings(self): method set_output_embeddings (line 886) | def set_output_embeddings(self, new_embeddings): method forward (line 891) | def forward( class VisualBertForMultipleChoice (line 1022) | class VisualBertForMultipleChoice(VisualBertPreTrainedModel): method __init__ (line 1023) | def __init__(self, config): method forward (line 1037) | def forward( class VisualBertForQuestionAnswering (line 1175) | class VisualBertForQuestionAnswering(VisualBertPreTrainedModel): method __init__ (line 1176) | def __init__(self, config): method forward (line 1189) | def forward( class VisualBertForVisualReasoning (line 1301) | class VisualBertForVisualReasoning(VisualBertPreTrainedModel): method __init__ (line 1302) | def __init__(self, config): method forward (line 1315) | def forward( class VisualBertRegionToPhraseAttention (line 1410) | class VisualBertRegionToPhraseAttention(nn.Module): method __init__ (line 1411) | def __init__(self, config): method transpose_for_scores (line 1428) | def transpose_for_scores(self, x): method forward (line 1433) | def forward(self, query, key, attention_mask): class VisualBertForRegionToPhraseAlignment (line 1461) | class VisualBertForRegionToPhraseAlignment(VisualBertPreTrainedModel): method __init__ (line 1462) | def __init__(self, config): method forward (line 1475) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/vit/configuration_vit.py class ViTConfig (line 35) | class ViTConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class ViTOnnxConfig (line 130) | class ViTOnnxConfig(OnnxConfig): method inputs (line 135) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 143) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/vit/convert_dino_to_pytorch.py function create_rename_keys (line 36) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 87) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 113) | def remove_classification_head_(state_dict): function rename_key (line 119) | def rename_key(dct, old, new): function prepare_img (line 125) | def prepare_img(): function convert_vit_checkpoint (line 132) | def convert_vit_checkpoint(model_name, pytorch_dump_folder_path, base_mo... FILE: benchmark/third_party/transformers/src/transformers/models/vit/convert_vit_timm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 90) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 116) | def remove_classification_head_(state_dict): function rename_key (line 122) | def rename_key(dct, old, new): function prepare_img (line 128) | def prepare_img(): function convert_vit_checkpoint (line 135) | def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path): FILE: benchmark/third_party/transformers/src/transformers/models/vit/feature_extraction_vit.py class ViTFeatureExtractor (line 38) | class ViTFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtraction... method __init__ (line 67) | def __init__( method __call__ (line 85) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/vit/modeling_flax_vit.py class FlaxViTPatchEmbeddings (line 87) | 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 386) | class FlaxViTEncoder(nn.Module): method setup (line 390) | def setup(self): method __call__ (line 393) | def __call__( class FlaxViTPooler (line 410) | class FlaxViTPooler(nn.Module): method setup (line 414) | def setup(self): method __call__ (line 423) | def __call__(self, hidden_states): class FlaxViTPreTrainedModel (line 429) | class FlaxViTPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 440) | def __init__( method init_weights (line 454) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 474) | def __call__( class FlaxViTModule (line 507) | class FlaxViTModule(nn.Module): method setup (line 512) | def setup(self): method __call__ (line 518) | def __call__( class FlaxViTModel (line 558) | class FlaxViTModel(FlaxViTPreTrainedModel): class FlaxViTForImageClassificationModule (line 588) | class FlaxViTForImageClassificationModule(nn.Module): method setup (line 592) | def setup(self): method __call__ (line 602) | def __call__( class FlaxViTForImageClassification (line 641) | class FlaxViTForImageClassification(FlaxViTPreTrainedModel): FILE: benchmark/third_party/transformers/src/transformers/models/vit/modeling_tf_vit.py class TFViTEmbeddings (line 55) | class TFViTEmbeddings(tf.keras.layers.Layer): method __init__ (line 61) | def __init__(self, config: ViTConfig, **kwargs): method build (line 68) | def build(self, input_shape: tf.TensorShape): method interpolate_pos_encoding (line 86) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 120) | def call( class TFViTPatchEmbeddings (line 145) | class TFViTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 152) | def __init__(self, config: ViTConfig, **kwargs): method call (line 178) | def call( class TFViTSelfAttention (line 209) | class TFViTSelfAttention(tf.keras.layers.Layer): method __init__ (line 210) | def __init__(self, config: ViTConfig, **kwargs): method transpose_for_scores (line 235) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 242) | def call( class TFViTSelfOutput (line 284) | class TFViTSelfOutput(tf.keras.layers.Layer): method __init__ (line 290) | def __init__(self, config: ViTConfig, **kwargs): method call (line 298) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTAttention (line 305) | class TFViTAttention(tf.keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: ViTConfig, **kwargs): method prune_heads (line 312) | def prune_heads(self, heads): method call (line 315) | def call( class TFViTIntermediate (line 333) | class TFViTIntermediate(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config: ViTConfig, **kwargs): method call (line 346) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTOutput (line 353) | class TFViTOutput(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: ViTConfig, **kwargs): method call (line 362) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTLayer (line 370) | class TFViTLayer(tf.keras.layers.Layer): method __init__ (line 373) | def __init__(self, config: ViTConfig, **kwargs): method call (line 387) | def call( class TFViTEncoder (line 420) | class TFViTEncoder(tf.keras.layers.Layer): method __init__ (line 421) | def __init__(self, config: ViTConfig, **kwargs): method call (line 426) | def call( class TFViTMainLayer (line 466) | class TFViTMainLayer(tf.keras.layers.Layer): method __init__ (line 469) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 479) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 482) | def _prune_heads(self, heads_to_prune): method call (line 490) | def call( class TFViTPreTrainedModel (line 544) | class TFViTPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 555) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 574) | def serving(self, inputs): class TFViTModel (line 664) | class TFViTModel(TFViTPreTrainedModel): method __init__ (line 665) | def __init__(self, config: ViTConfig, *inputs, add_pooling_layer=True,... method call (line 680) | def call( method serving_output (line 703) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... class TFViTPooler (line 715) | class TFViTPooler(tf.keras.layers.Layer): method __init__ (line 716) | def __init__(self, config: ViTConfig, **kwargs): method call (line 726) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTForImageClassification (line 750) | class TFViTForImageClassification(TFViTPreTrainedModel, TFSequenceClassi... method __init__ (line 751) | def __init__(self, config: ViTConfig, *inputs, **kwargs): method call (line 773) | def call( method serving_output (line 815) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... FILE: benchmark/third_party/transformers/src/transformers/models/vit/modeling_vit.py class ViTEmbeddings (line 62) | class ViTEmbeddings(nn.Module): method __init__ (line 67) | def __init__(self, config: ViTConfig, use_mask_token: bool = False) ->... method interpolate_pos_encoding (line 84) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 117) | def forward( class ViTPatchEmbeddings (line 148) | class ViTPatchEmbeddings(nn.Module): method __init__ (line 155) | def __init__(self, config): method forward (line 170) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTSelfAttention (line 186) | class ViTSelfAttention(nn.Module): method __init__ (line 187) | def __init__(self, config: ViTConfig) -> None: method transpose_for_scores (line 205) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 210) | def forward( class ViTSelfOutput (line 246) | class ViTSelfOutput(nn.Module): method __init__ (line 252) | def __init__(self, config: ViTConfig) -> None: method forward (line 257) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTAttention (line 265) | class ViTAttention(nn.Module): method __init__ (line 266) | def __init__(self, config: ViTConfig) -> None: method prune_heads (line 272) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 290) | def forward( class ViTIntermediate (line 304) | class ViTIntermediate(nn.Module): method __init__ (line 305) | def __init__(self, config: ViTConfig) -> None: method forward (line 313) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTOutput (line 321) | class ViTOutput(nn.Module): method __init__ (line 322) | def __init__(self, config: ViTConfig) -> None: method forward (line 327) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTLayer (line 336) | class ViTLayer(nn.Module): method __init__ (line 339) | def __init__(self, config: ViTConfig) -> None: method forward (line 349) | def forward( class ViTEncoder (line 378) | class ViTEncoder(nn.Module): method __init__ (line 379) | def __init__(self, config: ViTConfig) -> None: method forward (line 385) | def forward( class ViTPreTrainedModel (line 435) | class ViTPreTrainedModel(PreTrainedModel): method _init_weights (line 446) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 456) | def _set_gradient_checkpointing(self, module: ViTEncoder, value: bool ... class ViTModel (line 501) | class ViTModel(ViTPreTrainedModel): method __init__ (line 502) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 515) | def get_input_embeddings(self) -> ViTPatchEmbeddings: method _prune_heads (line 518) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 535) | def forward( class ViTPooler (line 588) | class ViTPooler(nn.Module): method __init__ (line 589) | def __init__(self, config: ViTConfig): method forward (line 594) | def forward(self, hidden_states): class ViTForMaskedImageModeling (line 615) | class ViTForMaskedImageModeling(ViTPreTrainedModel): method __init__ (line 616) | def __init__(self, config: ViTConfig) -> None: method forward (line 635) | def forward( class ViTForImageClassification (line 737) | class ViTForImageClassification(ViTPreTrainedModel): method __init__ (line 738) | def __init__(self, config: ViTConfig) -> None: method forward (line 758) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/vit_mae/configuration_vit_mae.py class ViTMAEConfig (line 29) | class ViTMAEConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/vit_mae/modeling_tf_vit_mae.py class TFViTMAEModelOutput (line 53) | class TFViTMAEModelOutput(ModelOutput): class TFViTMAEDecoderOutput (line 82) | class TFViTMAEDecoderOutput(ModelOutput): class TFViTMAEForPreTrainingOutput (line 105) | class TFViTMAEForPreTrainingOutput(ModelOutput): function get_2d_sincos_pos_embed (line 136) | def get_2d_sincos_pos_embed(embed_dim, grid_size, add_cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 164) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 176) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class TFViTMAEEmbeddings (line 199) | class TFViTMAEEmbeddings(tf.keras.layers.Layer): method __init__ (line 205) | def __init__(self, config: ViTMAEConfig, **kwargs): method build (line 213) | def build(self, input_shape: tf.TensorShape): method random_masking (line 235) | def random_masking(self, sequence: tf.Tensor, noise: Optional[tf.Tenso... method call (line 276) | def call(self, pixel_values: tf.Tensor, noise: tf.Tensor = None) -> tf... class TFViTMAEPatchEmbeddings (line 293) | class TFViTMAEPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 300) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 324) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFViTMAESelfAttention (line 354) | class TFViTMAESelfAttention(tf.keras.layers.Layer): method __init__ (line 355) | def __init__(self, config: ViTMAEConfig, **kwargs): method transpose_for_scores (line 380) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 387) | def call( class TFViTMAESelfOutput (line 430) | class TFViTMAESelfOutput(tf.keras.layers.Layer): method __init__ (line 436) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 444) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTMAEAttention (line 452) | class TFViTMAEAttention(tf.keras.layers.Layer): method __init__ (line 453) | def __init__(self, config: ViTMAEConfig, **kwargs): method prune_heads (line 459) | def prune_heads(self, heads): method call (line 462) | def call( class TFViTMAEIntermediate (line 481) | class TFViTMAEIntermediate(tf.keras.layers.Layer): method __init__ (line 482) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 494) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTMAEOutput (line 502) | class TFViTMAEOutput(tf.keras.layers.Layer): method __init__ (line 503) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 511) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTMAELayer (line 520) | class TFViTMAELayer(tf.keras.layers.Layer): method __init__ (line 523) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 537) | def call( class TFViTMAEEncoder (line 571) | class TFViTMAEEncoder(tf.keras.layers.Layer): method __init__ (line 572) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 577) | def call( class TFViTMAEMainLayer (line 617) | class TFViTMAEMainLayer(tf.keras.layers.Layer): method __init__ (line 620) | def __init__(self, config: ViTMAEConfig, **kwargs): method get_input_embeddings (line 629) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 632) | def _prune_heads(self, heads_to_prune): method call (line 640) | def call( class TFViTMAEPreTrainedModel (line 688) | class TFViTMAEPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 699) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 717) | def serving(self, inputs): class TFViTMAEModel (line 805) | class TFViTMAEModel(TFViTMAEPreTrainedModel): method __init__ (line 806) | def __init__(self, config: ViTMAEConfig, *inputs, **kwargs): method get_input_embeddings (line 811) | def get_input_embeddings(self): method call (line 817) | def call( method serving_output (line 859) | def serving_output(self, output: TFViTMAEModelOutput) -> TFViTMAEModel... class TFViTMAEDecoder (line 872) | class TFViTMAEDecoder(tf.keras.layers.Layer): method __init__ (line 873) | def __init__(self, config, num_patches, **kwargs): method build (line 895) | def build(self, input_shape: tf.TensorShape): method call (line 917) | def call( class TFViTMAEForPreTraining (line 978) | class TFViTMAEForPreTraining(TFViTMAEPreTrainedModel): method __init__ (line 979) | def __init__(self, config): method get_input_embeddings (line 990) | def get_input_embeddings(self): method _prune_heads (line 993) | def _prune_heads(self, heads_to_prune): method patchify (line 996) | def patchify(self, pixel_values): method unpatchify (line 1047) | def unpatchify(self, patchified_pixel_values): method forward_loss (line 1079) | def forward_loss(self, pixel_values, pred, mask): method call (line 1108) | def call( method serving_output (line 1174) | def serving_output(self, output: TFViTMAEForPreTrainingOutput) -> TFVi... FILE: benchmark/third_party/transformers/src/transformers/models/vit_mae/modeling_vit_mae.py class ViTMAEModelOutput (line 55) | class ViTMAEModelOutput(ModelOutput): class ViTMAEDecoderOutput (line 84) | class ViTMAEDecoderOutput(ModelOutput): class ViTMAEForPreTrainingOutput (line 107) | class ViTMAEForPreTrainingOutput(ModelOutput): function get_2d_sincos_pos_embed (line 138) | def get_2d_sincos_pos_embed(embed_dim, grid_size, add_cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 166) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 178) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class ViTMAEEmbeddings (line 199) | class ViTMAEEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config): method initialize_weights (line 218) | def initialize_weights(self): method random_masking (line 232) | def random_masking(self, sequence, noise=None): method forward (line 264) | def forward(self, pixel_values, noise=None): class ViTMAEPatchEmbeddings (line 282) | class ViTMAEPatchEmbeddings(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 303) | def forward(self, pixel_values): class ViTMAESelfAttention (line 318) | class ViTMAESelfAttention(nn.Module): method __init__ (line 319) | def __init__(self, config: ViTMAEConfig) -> None: method transpose_for_scores (line 337) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 342) | def forward( class ViTMAESelfOutput (line 379) | class ViTMAESelfOutput(nn.Module): method __init__ (line 385) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 390) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAEAttention (line 399) | class ViTMAEAttention(nn.Module): method __init__ (line 400) | def __init__(self, config: ViTMAEConfig) -> None: method prune_heads (line 406) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 424) | def forward( class ViTMAEIntermediate (line 439) | class ViTMAEIntermediate(nn.Module): method __init__ (line 440) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 448) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMAEOutput (line 457) | class ViTMAEOutput(nn.Module): method __init__ (line 458) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 463) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAELayer (line 473) | class ViTMAELayer(nn.Module): method __init__ (line 476) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 486) | def forward( class ViTMAEEncoder (line 516) | class ViTMAEEncoder(nn.Module): method __init__ (line 517) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 523) | def forward( class ViTMAEPreTrainedModel (line 573) | class ViTMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 584) | def _init_weights(self, module): method _set_gradient_checkpointing (line 596) | def _set_gradient_checkpointing(self, module, value=False): class ViTMAEModel (line 639) | class ViTMAEModel(ViTMAEPreTrainedModel): method __init__ (line 640) | def __init__(self, config): method get_input_embeddings (line 652) | def get_input_embeddings(self): method _prune_heads (line 655) | def _prune_heads(self, heads_to_prune): method forward (line 665) | def forward( class ViTMAEDecoder (line 734) | class ViTMAEDecoder(nn.Module): method __init__ (line 735) | def __init__(self, config, num_patches): method initialize_weights (line 760) | def initialize_weights(self, num_patches): method forward (line 770) | def forward( class ViTMAEForPreTraining (line 851) | class ViTMAEForPreTraining(ViTMAEPreTrainedModel): method __init__ (line 852) | def __init__(self, config): method get_input_embeddings (line 862) | def get_input_embeddings(self): method _prune_heads (line 865) | def _prune_heads(self, heads_to_prune): method patchify (line 873) | def patchify(self, pixel_values): method unpatchify (line 904) | def unpatchify(self, patchified_pixel_values): method forward_loss (line 939) | def forward_loss(self, pixel_values, pred, mask): method forward (line 966) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/vit_msn/configuration_vit_msn.py class ViTMSNConfig (line 30) | class ViTMSNConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/vit_msn/modeling_vit_msn.py class ViTMSNEmbeddings (line 46) | class ViTMSNEmbeddings(nn.Module): method __init__ (line 51) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False)... method interpolate_pos_encoding (line 62) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 97) | def forward( class ViTMSNPatchEmbeddings (line 129) | class ViTMSNPatchEmbeddings(nn.Module): method __init__ (line 136) | def __init__(self, config): method forward (line 151) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTMSNSelfAttention (line 168) | class ViTMSNSelfAttention(nn.Module): method __init__ (line 169) | def __init__(self, config: ViTMSNConfig) -> None: method transpose_for_scores (line 187) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 192) | def forward( class ViTMSNSelfOutput (line 229) | class ViTMSNSelfOutput(nn.Module): method __init__ (line 235) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 240) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNAttention (line 249) | class ViTMSNAttention(nn.Module): method __init__ (line 250) | def __init__(self, config: ViTMSNConfig) -> None: method prune_heads (line 256) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 274) | def forward( class ViTMSNIntermediate (line 289) | class ViTMSNIntermediate(nn.Module): method __init__ (line 290) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 298) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMSNOutput (line 307) | class ViTMSNOutput(nn.Module): method __init__ (line 308) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 313) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNLayer (line 323) | class ViTMSNLayer(nn.Module): method __init__ (line 326) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 336) | def forward( class ViTMSNEncoder (line 366) | class ViTMSNEncoder(nn.Module): method __init__ (line 367) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 373) | def forward( class ViTMSNPreTrainedModel (line 423) | class ViTMSNPreTrainedModel(PreTrainedModel): method _init_weights (line 436) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 448) | def _set_gradient_checkpointing(self, module: ViTMSNEncoder, value: bo... class ViTMSNModel (line 493) | class ViTMSNModel(ViTMSNPreTrainedModel): method __init__ (line 494) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False): method get_input_embeddings (line 506) | def get_input_embeddings(self) -> ViTMSNPatchEmbeddings: method _prune_heads (line 509) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 519) | def forward( class ViTMSNForImageClassification (line 599) | class ViTMSNForImageClassification(ViTMSNPreTrainedModel): method __init__ (line 600) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 614) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/configuration_wav2vec2.py class Wav2Vec2Config (line 32) | class Wav2Vec2Config(PretrainedConfig): method __init__ (line 200) | def __init__( method inputs_to_logits_ratio (line 337) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 69) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 98) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 142) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_checkpoint (line 187) | def convert_wav2vec2_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py class FlaxWav2Vec2BaseModelOutput (line 46) | class FlaxWav2Vec2BaseModelOutput(ModelOutput): class FlaxWav2Vec2ForPreTrainingOutput (line 76) | class FlaxWav2Vec2ForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 110) | def _compute_mask_indices( function _sample_negative_indices (line 183) | def _sample_negative_indices(features_shape: Tuple, num_negatives: int, ... class FlaxWav2Vec2LayerNormConvLayer (line 290) | class FlaxWav2Vec2LayerNormConvLayer(nn.Module): method setup (line 295) | def setup(self): method __call__ (line 311) | def __call__(self, hidden_states): class FlaxConvWithWeightNorm (line 318) | class FlaxConvWithWeightNorm(nn.Module): method setup (line 322) | def setup(self): method _get_normed_weights (line 341) | def _get_normed_weights(self): method __call__ (line 347) | def __call__(self, hidden_states): class FlaxWav2Vec2PositionalConvEmbedding (line 354) | class FlaxWav2Vec2PositionalConvEmbedding(nn.Module): method setup (line 358) | def setup(self): method __call__ (line 363) | def __call__(self, hidden_states): class FlaxConvLayersCollection (line 376) | class FlaxConvLayersCollection(nn.Module): method setup (line 380) | def setup(self): method __call__ (line 394) | def __call__(self, hidden_states): class FlaxWav2Vec2FeatureEncoder (line 400) | class FlaxWav2Vec2FeatureEncoder(nn.Module): method setup (line 406) | def setup(self): method __call__ (line 409) | def __call__(self, input_values, freeze_feature_encoder=False): class FlaxWav2Vec2FeatureProjection (line 417) | class FlaxWav2Vec2FeatureProjection(nn.Module): method setup (line 421) | def setup(self): method __call__ (line 430) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2Attention (line 437) | class FlaxWav2Vec2Attention(nn.Module): method setup (line 445) | def setup(self) -> None: method _split_heads (line 466) | def _split_heads(self, hidden_states): method _merge_heads (line 469) | def _merge_heads(self, hidden_states): method __call__ (line 472) | def __call__( class FlaxWav2Vec2FeedForward (line 528) | class FlaxWav2Vec2FeedForward(nn.Module): method setup (line 532) | def setup(self): method __call__ (line 552) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2EncoderLayerStableLayerNorm (line 562) | class FlaxWav2Vec2EncoderLayerStableLayerNorm(nn.Module): method setup (line 566) | def setup(self): method __call__ (line 579) | def __call__(self, hidden_states, attention_mask=None, deterministic=T... class FlaxWav2Vec2EncoderLayerStableLayerNormCollection (line 599) | class FlaxWav2Vec2EncoderLayerStableLayerNormCollection(nn.Module): method setup (line 603) | def setup(self): method __call__ (line 609) | def __call__( class FlaxWav2Vec2StableLayerNormEncoder (line 647) | class FlaxWav2Vec2StableLayerNormEncoder(nn.Module): method setup (line 651) | def setup(self): method __call__ (line 657) | def __call__( class FlaxWav2Vec2GumbelVectorQuantizer (line 703) | class FlaxWav2Vec2GumbelVectorQuantizer(nn.Module): method setup (line 712) | def setup(self): method _compute_perplexity (line 735) | def _compute_perplexity(probs, mask=None): method __call__ (line 746) | def __call__(self, hidden_states, mask_time_indices=None, deterministi... class FlaxWav2Vec2Adapter (line 781) | class FlaxWav2Vec2Adapter(nn.Module): method setup (line 785) | def setup(self): method __call__ (line 799) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2AdapterLayer (line 810) | class FlaxWav2Vec2AdapterLayer(nn.Module): method setup (line 814) | def setup(self): method __call__ (line 824) | def __call__(self, hidden_states): class FlaxWav2Vec2AdapterLayersCollection (line 831) | class FlaxWav2Vec2AdapterLayersCollection(nn.Module): method setup (line 835) | def setup(self): method __call__ (line 841) | def __call__(self, hidden_states): class FlaxWav2Vec2PreTrainedModel (line 848) | class FlaxWav2Vec2PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 859) | def __init__( method init_weights (line 871) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 891) | def __call__( method _get_feat_extract_output_lengths (line 935) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2Module (line 941) | class FlaxWav2Vec2Module(nn.Module): method setup (line 945) | def setup(self): method __call__ (line 959) | def __call__( method _get_feat_extract_output_lengths (line 1011) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1034) | def _get_feature_vector_attention_mask( class FlaxWav2Vec2Model (line 1058) | class FlaxWav2Vec2Model(FlaxWav2Vec2PreTrainedModel): class FlaxWav2Vec2ForCTCModule (line 1101) | class FlaxWav2Vec2ForCTCModule(nn.Module): method setup (line 1105) | def setup(self): method __call__ (line 1114) | def __call__( method _get_feat_extract_output_lengths (line 1146) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2ForCTC (line 1176) | class FlaxWav2Vec2ForCTC(FlaxWav2Vec2PreTrainedModel): class FlaxWav2Vec2ForPreTrainingModule (line 1222) | class FlaxWav2Vec2ForPreTrainingModule(nn.Module): method setup (line 1226) | def setup(self): method __call__ (line 1242) | def __call__( method _get_feat_extract_output_lengths (line 1297) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2ForPreTraining (line 1322) | class FlaxWav2Vec2ForPreTraining(FlaxWav2Vec2PreTrainedModel): method __call__ (line 1327) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/modeling_tf_wav2vec2.py class TFWav2Vec2BaseModelOutput (line 67) | class TFWav2Vec2BaseModelOutput(ModelOutput): function input_values_processing (line 95) | def input_values_processing(func, config, input_values, **kwargs): function _sample_without_replacement (line 212) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 222) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 237) | def _compute_mask_indices( function _expand_mask (line 308) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWav2Vec2GroupNorm (line 321) | class TFWav2Vec2GroupNorm(tf.keras.layers.Layer): method __init__ (line 326) | def __init__( method build (line 356) | def build(self, input_shape): method call (line 368) | def call(self, inputs): method get_config (line 385) | def get_config(self): method compute_output_shape (line 402) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 405) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 418) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 442) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 453) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 464) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 470) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 491) | def _check_axis(self): method _create_input_spec (line 498) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 503) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 519) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 535) | def _create_broadcast_shape(self, input_shape): class TFWav2Vec2WeightNormConv1D (line 546) | class TFWav2Vec2WeightNormConv1D(tf.keras.layers.Conv1D): method __init__ (line 549) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 564) | def _init_norm(self): method _normalize_kernel (line 569) | def _normalize_kernel(self): method build (line 574) | def build(self, input_shape): method call (line 593) | def call(self, inputs): class TFWav2Vec2NoLayerNormConvLayer (line 606) | class TFWav2Vec2NoLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 607) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 621) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2LayerNormConvLayer (line 627) | class TFWav2Vec2LayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 628) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 643) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2GroupNormConvLayer (line 650) | class TFWav2Vec2GroupNormConvLayer(tf.keras.layers.Layer): method __init__ (line 651) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 668) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2PositionalConvEmbedding (line 675) | class TFWav2Vec2PositionalConvEmbedding(tf.keras.layers.Layer): method __init__ (line 676) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 688) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2SamePadLayer (line 695) | class TFWav2Vec2SamePadLayer(tf.keras.layers.Layer): method __init__ (line 696) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 700) | def call(self, hidden_states): class TFWav2Vec2FeatureEncoder (line 706) | class TFWav2Vec2FeatureEncoder(tf.keras.layers.Layer): method __init__ (line 707) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 726) | def call(self, input_values): class TFWav2Vec2FeatureExtractor (line 733) | class TFWav2Vec2FeatureExtractor(TFWav2Vec2FeatureEncoder): method __init__ (line 734) | def __init__(self, config, **kwargs): class TFWav2Vec2FeatureProjection (line 744) | class TFWav2Vec2FeatureProjection(tf.keras.layers.Layer): method __init__ (line 745) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 757) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFWav2Vec2Attention (line 765) | class TFWav2Vec2Attention(tf.keras.layers.Layer): method __init__ (line 768) | def __init__( method _shape (line 796) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 799) | def call( class TFWav2Vec2FeedForward (line 918) | class TFWav2Vec2FeedForward(tf.keras.layers.Layer): method __init__ (line 919) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 940) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFWav2Vec2EncoderLayer (line 950) | class TFWav2Vec2EncoderLayer(tf.keras.layers.Layer): method __init__ (line 951) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 967) | def call( class TFWav2Vec2EncoderLayerStableLayerNorm (line 993) | class TFWav2Vec2EncoderLayerStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 994) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 1010) | def call( class TFWav2Vec2Encoder (line 1034) | class TFWav2Vec2Encoder(tf.keras.layers.Layer): method __init__ (line 1035) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 1043) | def call( class TFWav2Vec2EncoderStableLayerNorm (line 1099) | class TFWav2Vec2EncoderStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 1100) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 1110) | def call( class TFWav2Vec2MainLayer (line 1167) | class TFWav2Vec2MainLayer(tf.keras.layers.Layer): method __init__ (line 1170) | def __init__(self, config: Wav2Vec2Config, **kwargs): method build (line 1181) | def build(self, input_shape: tf.TensorShape): method _get_feat_extract_output_lengths (line 1188) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1203) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1247) | def call( class TFWav2Vec2PreTrainedModel (line 1317) | class TFWav2Vec2PreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 1328) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method __init__ (line 1337) | def __init__(self, config, *inputs, **kwargs): method serving (line 1353) | def serving(self, inputs): class TFWav2Vec2Model (line 1461) | class TFWav2Vec2Model(TFWav2Vec2PreTrainedModel): method __init__ (line 1462) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method call (line 1469) | def call( method serving_output (line 1548) | def serving_output(self, output): class TFWav2Vec2ForCTC (line 1564) | class TFWav2Vec2ForCTC(TFWav2Vec2PreTrainedModel): method __init__ (line 1565) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method freeze_feature_extractor (line 1572) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1584) | def freeze_feature_encoder(self): method call (line 1594) | def call( method serving_output (line 1729) | def serving_output(self, output: TFCausalLMOutput) -> TFCausalLMOutput: FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/modeling_wav2vec2.py class Wav2Vec2ForPreTrainingOutput (line 94) | class Wav2Vec2ForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 135) | def _compute_mask_indices( function _sample_negative_indices (line 254) | def _sample_negative_indices( class Wav2Vec2NoLayerNormConvLayer (line 290) | class Wav2Vec2NoLayerNormConvLayer(nn.Module): method __init__ (line 291) | def __init__(self, config, layer_id=0): method forward (line 305) | def forward(self, hidden_states): class Wav2Vec2LayerNormConvLayer (line 311) | class Wav2Vec2LayerNormConvLayer(nn.Module): method __init__ (line 312) | def __init__(self, config, layer_id=0): method forward (line 327) | def forward(self, hidden_states): class Wav2Vec2GroupNormConvLayer (line 338) | class Wav2Vec2GroupNormConvLayer(nn.Module): method __init__ (line 339) | def __init__(self, config, layer_id=0): method forward (line 355) | def forward(self, hidden_states): class Wav2Vec2PositionalConvEmbedding (line 362) | class Wav2Vec2PositionalConvEmbedding(nn.Module): method __init__ (line 363) | def __init__(self, config): method forward (line 386) | def forward(self, hidden_states): class Wav2Vec2SamePadLayer (line 397) | class Wav2Vec2SamePadLayer(nn.Module): method __init__ (line 398) | def __init__(self, num_conv_pos_embeddings): method forward (line 402) | def forward(self, hidden_states): class Wav2Vec2FeatureEncoder (line 408) | class Wav2Vec2FeatureEncoder(nn.Module): method __init__ (line 411) | def __init__(self, config): method _freeze_parameters (line 430) | def _freeze_parameters(self): method forward (line 435) | def forward(self, input_values): class Wav2Vec2FeatureExtractor (line 461) | class Wav2Vec2FeatureExtractor(Wav2Vec2FeatureEncoder): method __init__ (line 462) | def __init__(self, config): class Wav2Vec2FeatureProjection (line 472) | class Wav2Vec2FeatureProjection(nn.Module): method __init__ (line 473) | def __init__(self, config): method forward (line 479) | def forward(self, hidden_states): class Wav2Vec2Attention (line 488) | class Wav2Vec2Attention(nn.Module): method __init__ (line 491) | def __init__( method _shape (line 518) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 521) | def forward( class Wav2Vec2FeedForward (line 635) | class Wav2Vec2FeedForward(nn.Module): method __init__ (line 636) | def __init__(self, config): method forward (line 649) | def forward(self, hidden_states): class Wav2Vec2EncoderLayer (line 659) | class Wav2Vec2EncoderLayer(nn.Module): method __init__ (line 660) | def __init__(self, config): method forward (line 673) | def forward(self, hidden_states, attention_mask=None, output_attention... class Wav2Vec2EncoderLayerStableLayerNorm (line 693) | class Wav2Vec2EncoderLayerStableLayerNorm(nn.Module): method __init__ (line 694) | def __init__(self, config): method forward (line 707) | def forward( class Wav2Vec2Encoder (line 730) | class Wav2Vec2Encoder(nn.Module): method __init__ (line 731) | def __init__(self, config): method forward (line 740) | def forward( class Wav2Vec2EncoderStableLayerNorm (line 817) | class Wav2Vec2EncoderStableLayerNorm(nn.Module): method __init__ (line 818) | def __init__(self, config): method forward (line 829) | def forward( class Wav2Vec2GumbelVectorQuantizer (line 908) | class Wav2Vec2GumbelVectorQuantizer(nn.Module): method __init__ (line 914) | def __init__(self, config): method _compute_perplexity (line 935) | def _compute_perplexity(probs, mask=None): method forward (line 946) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2Adapter (line 984) | class Wav2Vec2Adapter(nn.Module): method __init__ (line 985) | def __init__(self, config): method forward (line 998) | def forward(self, hidden_states): class Wav2Vec2AdapterLayer (line 1015) | class Wav2Vec2AdapterLayer(nn.Module): method __init__ (line 1016) | def __init__(self, config): method forward (line 1026) | def forward(self, hidden_states): class Wav2Vec2PreTrainedModel (line 1033) | class Wav2Vec2PreTrainedModel(PreTrainedModel): method _init_weights (line 1045) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1078) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1101) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1121) | def _set_gradient_checkpointing(self, module, value=False): class Wav2Vec2Model (line 1187) | class Wav2Vec2Model(Wav2Vec2PreTrainedModel): method __init__ (line 1188) | def __init__(self, config: Wav2Vec2Config): method freeze_feature_extractor (line 1208) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1220) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1227) | def _mask_hidden_states( method forward (line 1282) | def forward( class Wav2Vec2ForPreTraining (line 1336) | class Wav2Vec2ForPreTraining(Wav2Vec2PreTrainedModel): method __init__ (line 1337) | def __init__(self, config: Wav2Vec2Config): method set_gumbel_temperature (line 1351) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1357) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1369) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1377) | def compute_contrastive_logits( method forward (line 1399) | def forward( class Wav2Vec2ForMaskedLM (line 1559) | class Wav2Vec2ForMaskedLM(Wav2Vec2PreTrainedModel): method __init__ (line 1560) | def __init__(self, config): method forward (line 1575) | def forward( class Wav2Vec2ForCTC (line 1608) | class Wav2Vec2ForCTC(Wav2Vec2PreTrainedModel): method __init__ (line 1609) | def __init__(self, config): method freeze_feature_extractor (line 1630) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1642) | def freeze_feature_encoder(self): method forward (line 1658) | def forward( class Wav2Vec2ForSequenceClassification (line 1738) | class Wav2Vec2ForSequenceClassification(Wav2Vec2PreTrainedModel): method __init__ (line 1739) | def __init__(self, config): method freeze_feature_extractor (line 1756) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1768) | def freeze_feature_encoder(self): method freeze_base_model (line 1775) | def freeze_base_model(self): method forward (line 1793) | def forward( class Wav2Vec2ForAudioFrameClassification (line 1861) | class Wav2Vec2ForAudioFrameClassification(Wav2Vec2PreTrainedModel): method __init__ (line 1862) | def __init__(self, config): method freeze_feature_extractor (line 1878) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1890) | def freeze_feature_encoder(self): method freeze_base_model (line 1897) | def freeze_base_model(self): method forward (line 1914) | def forward( class AMSoftmaxLoss (line 1968) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1969) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1977) | def forward(self, hidden_states, labels): class TDNNLayer (line 1991) | class TDNNLayer(nn.Module): method __init__ (line 1992) | def __init__(self, config, layer_id=0): method forward (line 2002) | def forward(self, hidden_states): class Wav2Vec2ForXVector (line 2023) | class Wav2Vec2ForXVector(Wav2Vec2PreTrainedModel): method __init__ (line 2024) | def __init__(self, config): method freeze_feature_extractor (line 2043) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2055) | def freeze_feature_encoder(self): method freeze_base_model (line 2062) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2070) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2094) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/processing_wav2vec2.py class Wav2Vec2Processor (line 26) | class Wav2Vec2Processor(ProcessorMixin): method __init__ (line 43) | def __init__(self, feature_extractor, tokenizer): method from_pretrained (line 49) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 67) | def __call__(self, *args, **kwargs): method pad (line 104) | def pad(self, *args, **kwargs): method batch_decode (line 134) | def batch_decode(self, *args, **kwargs): method decode (line 141) | def decode(self, *args, **kwargs): method as_target_processor (line 149) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py class Wav2Vec2CTCTokenizerOutput (line 106) | class Wav2Vec2CTCTokenizerOutput(ModelOutput): class Wav2Vec2CTCTokenizer (line 127) | class Wav2Vec2CTCTokenizer(PreTrainedTokenizer): method __init__ (line 161) | def __init__( method word_delimiter_token (line 202) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 212) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 222) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 226) | def word_delimiter_token_id(self, value): method vocab_size (line 230) | def vocab_size(self) -> int: method get_vocab (line 233) | def get_vocab(self) -> Dict: method _tokenize (line 236) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 245) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 249) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 254) | def convert_tokens_to_string( method _compute_offsets (line 318) | def _compute_offsets( method _get_word_offsets (line 333) | def _get_word_offsets( method prepare_for_tokenization (line 367) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _decode (line 372) | def _decode( method batch_decode (line 420) | def batch_decode( method decode (line 490) | def decode( method save_vocabulary (line 595) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _add_tokens (line 608) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... class Wav2Vec2Tokenizer (line 667) | class Wav2Vec2Tokenizer(PreTrainedTokenizer): method __init__ (line 727) | def __init__( method word_delimiter_token (line 770) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 780) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 790) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 794) | def word_delimiter_token_id(self, value): method __call__ (line 798) | def __call__( method vocab_size (line 853) | def vocab_size(self) -> int: method get_vocab (line 856) | def get_vocab(self) -> Dict: method _convert_token_to_id (line 859) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 863) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 868) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 886) | def _decode( method save_vocabulary (line 914) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2_conformer/configuration_wav2vec2_conformer.py class Wav2Vec2ConformerConfig (line 33) | class Wav2Vec2ConformerConfig(PretrainedConfig): method __init__ (line 209) | def __init__( method inputs_to_logits_ratio (line 356) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2_conformer/convert_wav2vec2_conformer_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 82) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 119) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 176) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_conformer_checkpoint (line 221) | def convert_wav2vec2_conformer_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py class Wav2Vec2ConformerForPreTrainingOutput (line 90) | class Wav2Vec2ConformerForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 132) | def _compute_mask_indices( function _sample_negative_indices (line 252) | def _sample_negative_indices( class Wav2Vec2ConformerNoLayerNormConvLayer (line 289) | class Wav2Vec2ConformerNoLayerNormConvLayer(nn.Module): method __init__ (line 290) | def __init__(self, config, layer_id=0): method forward (line 304) | def forward(self, hidden_states): class Wav2Vec2ConformerLayerNormConvLayer (line 311) | class Wav2Vec2ConformerLayerNormConvLayer(nn.Module): method __init__ (line 312) | def __init__(self, config, layer_id=0): method forward (line 327) | def forward(self, hidden_states): class Wav2Vec2ConformerGroupNormConvLayer (line 339) | class Wav2Vec2ConformerGroupNormConvLayer(nn.Module): method __init__ (line 340) | def __init__(self, config, layer_id=0): method forward (line 356) | def forward(self, hidden_states): class Wav2Vec2ConformerPositionalConvEmbedding (line 364) | class Wav2Vec2ConformerPositionalConvEmbedding(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 388) | def forward(self, hidden_states): class Wav2Vec2ConformerRotaryPositionalEmbedding (line 399) | class Wav2Vec2ConformerRotaryPositionalEmbedding(nn.Module): method __init__ (line 404) | def __init__(self, config): method forward (line 414) | def forward(self, hidden_states): class Wav2Vec2ConformerRelPositionalEmbedding (line 431) | class Wav2Vec2ConformerRelPositionalEmbedding(nn.Module): method __init__ (line 434) | def __init__(self, config): method extend_pe (line 441) | def extend_pe(self, x): method forward (line 472) | def forward(self, hidden_states: torch.Tensor): class Wav2Vec2ConformerSamePadLayer (line 482) | class Wav2Vec2ConformerSamePadLayer(nn.Module): method __init__ (line 483) | def __init__(self, num_conv_pos_embeddings): method forward (line 487) | def forward(self, hidden_states): class Wav2Vec2ConformerFeatureEncoder (line 494) | class Wav2Vec2ConformerFeatureEncoder(nn.Module): method __init__ (line 497) | def __init__(self, config): method _freeze_parameters (line 517) | def _freeze_parameters(self): method forward (line 522) | def forward(self, input_values): class Wav2Vec2ConformerFeatureProjection (line 549) | class Wav2Vec2ConformerFeatureProjection(nn.Module): method __init__ (line 550) | def __init__(self, config): method forward (line 556) | def forward(self, hidden_states): class Wav2Vec2ConformerFeedForward (line 565) | class Wav2Vec2ConformerFeedForward(nn.Module): method __init__ (line 566) | def __init__(self, config): method forward (line 579) | def forward(self, hidden_states): class Wav2Vec2ConformerConvolutionModule (line 589) | class Wav2Vec2ConformerConvolutionModule(nn.Module): method __init__ (line 592) | def __init__(self, config): method forward (line 627) | def forward(self, hidden_states): class Wav2Vec2ConformerSelfAttention (line 649) | class Wav2Vec2ConformerSelfAttention(nn.Module): method __init__ (line 654) | def __init__(self, config): method forward (line 676) | def forward( method _apply_rotary_embedding (line 738) | def _apply_rotary_embedding(self, hidden_states, relative_position_emb... method _apply_relative_embeddings (line 757) | def _apply_relative_embeddings(self, query, key, relative_position_emb... class Wav2Vec2ConformerEncoderLayer (line 797) | class Wav2Vec2ConformerEncoderLayer(nn.Module): method __init__ (line 800) | def __init__(self, config): method forward (line 822) | def forward( class Wav2Vec2ConformerEncoder (line 864) | class Wav2Vec2ConformerEncoder(nn.Module): method __init__ (line 865) | def __init__(self, config): method forward (line 882) | def forward( class Wav2Vec2ConformerGumbelVectorQuantizer (line 966) | class Wav2Vec2ConformerGumbelVectorQuantizer(nn.Module): method __init__ (line 972) | def __init__(self, config): method _compute_perplexity (line 993) | def _compute_perplexity(probs, mask=None): method forward (line 1004) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2ConformerAdapter (line 1043) | class Wav2Vec2ConformerAdapter(nn.Module): method __init__ (line 1044) | def __init__(self, config): method forward (line 1057) | def forward(self, hidden_states): class Wav2Vec2ConformerAdapterLayer (line 1075) | class Wav2Vec2ConformerAdapterLayer(nn.Module): method __init__ (line 1076) | def __init__(self, config): method forward (line 1086) | def forward(self, hidden_states): class Wav2Vec2ConformerPreTrainedModel (line 1093) | class Wav2Vec2ConformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1105) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1143) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1166) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1186) | def _set_gradient_checkpointing(self, module, value=False): class Wav2Vec2ConformerModel (line 1252) | class Wav2Vec2ConformerModel(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1253) | def __init__(self, config: Wav2Vec2ConformerConfig): method freeze_feature_encoder (line 1271) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1279) | def _mask_hidden_states( method forward (line 1335) | def forward( class Wav2Vec2ConformerForPreTraining (line 1391) | class Wav2Vec2ConformerForPreTraining(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1393) | def __init__(self, config: Wav2Vec2ConformerConfig): method set_gumbel_temperature (line 1408) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_encoder (line 1415) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1424) | def compute_contrastive_logits( method forward (line 1447) | def forward( class Wav2Vec2ConformerForCTC (line 1613) | class Wav2Vec2ConformerForCTC(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1615) | def __init__(self, config): method freeze_feature_encoder (line 1637) | def freeze_feature_encoder(self): method forward (line 1654) | def forward( class Wav2Vec2ConformerForSequenceClassification (line 1734) | class Wav2Vec2ConformerForSequenceClassification(Wav2Vec2ConformerPreTra... method __init__ (line 1736) | def __init__(self, config): method freeze_feature_encoder (line 1755) | def freeze_feature_encoder(self): method freeze_base_model (line 1762) | def freeze_base_model(self): method forward (line 1781) | def forward( class Wav2Vec2ConformerForAudioFrameClassification (line 1849) | class Wav2Vec2ConformerForAudioFrameClassification(Wav2Vec2ConformerPreT... method __init__ (line 1851) | def __init__(self, config): method freeze_feature_encoder (line 1869) | def freeze_feature_encoder(self): method freeze_base_model (line 1877) | def freeze_base_model(self): method forward (line 1895) | def forward( class AMSoftmaxLoss (line 1950) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1951) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1959) | def forward(self, hidden_states, labels): class TDNNLayer (line 1974) | class TDNNLayer(nn.Module): method __init__ (line 1975) | def __init__(self, config, layer_id=0): method forward (line 1985) | def forward(self, hidden_states): class Wav2Vec2ConformerForXVector (line 2006) | class Wav2Vec2ConformerForXVector(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 2007) | def __init__(self, config): method freeze_feature_encoder (line 2027) | def freeze_feature_encoder(self): method freeze_base_model (line 2035) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2044) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2069) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2_phoneme/tokenization_wav2vec2_phoneme.py class Wav2Vec2PhonemeCTCTokenizerOutput (line 77) | class Wav2Vec2PhonemeCTCTokenizerOutput(ModelOutput): class Wav2Vec2PhonemeCTCTokenizer (line 94) | class Wav2Vec2PhonemeCTCTokenizer(PreTrainedTokenizer): method __init__ (line 132) | def __init__( method vocab_size (line 173) | def vocab_size(self) -> int: method get_vocab (line 176) | def get_vocab(self) -> Dict: method init_backend (line 179) | def init_backend(self, phonemizer_lang: str): method prepare_for_tokenization (line 191) | def prepare_for_tokenization( method _tokenize (line 235) | def _tokenize(self, text, **kwargs): method phonemize (line 256) | def phonemize(self, text: str, phonemizer_lang: Optional[str] = None) ... method word_delimiter_token (line 275) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 284) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 294) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 298) | def word_delimiter_token_id(self, value): method phone_delimiter_token (line 302) | def phone_delimiter_token(self) -> str: method phone_delimiter_token_id (line 312) | def phone_delimiter_token_id(self) -> Optional[int]: method phone_delimiter_token (line 322) | def phone_delimiter_token(self, value): method phone_delimiter_token_id (line 326) | def phone_delimiter_token_id(self, value): method _convert_token_to_id (line 329) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 333) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 338) | def convert_tokens_to_string( method _compute_offsets (line 389) | def _compute_offsets( method _decode (line 408) | def _decode( method decode (line 450) | def decode( method batch_decode (line 506) | def batch_decode( method save_vocabulary (line 562) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _add_tokens (line 575) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... FILE: benchmark/third_party/transformers/src/transformers/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.py class Wav2Vec2DecoderWithLMOutput (line 45) | class Wav2Vec2DecoderWithLMOutput(ModelOutput): class Wav2Vec2ProcessorWithLM (line 67) | class Wav2Vec2ProcessorWithLM(ProcessorMixin): method __init__ (line 83) | def __init__( method save_pretrained (line 108) | def save_pretrained(self, save_directory): method from_pretrained (line 113) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method _set_language_model_attribute (line 184) | def _set_language_model_attribute(decoder: "BeamSearchDecoderCTC", att... method language_model (line 188) | def language_model(self): method get_missing_alphabet_tokens (line 192) | def get_missing_alphabet_tokens(decoder, tokenizer): method __call__ (line 214) | def __call__(self, *args, **kwargs): method pad (line 252) | def pad(self, *args, **kwargs): method batch_decode (line 283) | def batch_decode( method decode (line 439) | def decode( method as_target_processor (line 579) | def as_target_processor(self): FILE: benchmark/third_party/transformers/src/transformers/models/wavlm/configuration_wavlm.py class WavLMConfig (line 32) | class WavLMConfig(PretrainedConfig): method __init__ (line 196) | def __init__( method inputs_to_logits_ratio (line 338) | def inputs_to_logits_ratio(self): FILE: benchmark/third_party/transformers/src/transformers/models/wavlm/convert_wavlm_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 68) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 96) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 140) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wavlm_checkpoint (line 181) | def convert_wavlm_checkpoint(checkpoint_path, pytorch_dump_folder_path, ... FILE: benchmark/third_party/transformers/src/transformers/models/wavlm/convert_wavlm_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: benchmark/third_party/transformers/src/transformers/models/wavlm/modeling_wavlm.py function _compute_mask_indices (line 84) | def _compute_mask_indices( class WavLMNoLayerNormConvLayer (line 204) | class WavLMNoLayerNormConvLayer(nn.Module): method __init__ (line 205) | def __init__(self, config, layer_id=0): method forward (line 219) | def forward(self, hidden_states): class WavLMLayerNormConvLayer (line 226) | class WavLMLayerNormConvLayer(nn.Module): method __init__ (line 227) | def __init__(self, config, layer_id=0): method forward (line 242) | def forward(self, hidden_states): class WavLMGroupNormConvLayer (line 254) | class WavLMGroupNormConvLayer(nn.Module): method __init__ (line 255) | def __init__(self, config, layer_id=0): method forward (line 271) | def forward(self, hidden_states): class WavLMPositionalConvEmbedding (line 279) | class WavLMPositionalConvEmbedding(nn.Module): method __init__ (line 280) | def __init__(self, config): method forward (line 303) | def forward(self, hidden_states): class WavLMSamePadLayer (line 315) | class WavLMSamePadLayer(nn.Module): method __init__ (line 316) | def __init__(self, num_conv_pos_embeddings): method forward (line 320) | def forward(self, hidden_states): class WavLMFeatureEncoder (line 327) | class WavLMFeatureEncoder(nn.Module): method __init__ (line 330) | def __init__(self, config): method _freeze_parameters (line 347) | def _freeze_parameters(self): method forward (line 352) | def forward(self, input_values): class WavLMFeatureExtractor (line 378) | class WavLMFeatureExtractor(WavLMFeatureEncoder): method __init__ (line 379) | def __init__(self, config): class WavLMFeatureProjection (line 390) | class WavLMFeatureProjection(nn.Module): method __init__ (line 391) | def __init__(self, config): method forward (line 397) | def forward(self, hidden_states): class WavLMAttention (line 405) | class WavLMAttention(nn.Module): method __init__ (line 408) | def __init__( method forward (line 444) | def forward( method torch_multi_head_self_attention (line 485) | def torch_multi_head_self_attention( method compute_bias (line 540) | def compute_bias(self, query_length: int, key_length: int) -> torch.Fl... method _relative_positions_bucket (line 550) | def _relative_positions_bucket(self, relative_positions: torch.FloatTe... class WavLMFeedForward (line 572) | class WavLMFeedForward(nn.Module): method __init__ (line 573) | def __init__(self, config): method forward (line 586) | def forward(self, hidden_states): class WavLMEncoderLayer (line 596) | class WavLMEncoderLayer(nn.Module): method __init__ (line 597) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 612) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoderLayerStableLayerNorm (line 637) | class WavLMEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 638) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 653) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoder (line 674) | class WavLMEncoder(nn.Module): method __init__ (line 675) | def __init__(self, config): method forward (line 686) | def forward( class WavLMEncoderStableLayerNorm (line 762) | class WavLMEncoderStableLayerNorm(nn.Module): method __init__ (line 763) | def __init__(self, config): method forward (line 777) | def forward( class WavLMGumbelVectorQuantizer (line 851) | class WavLMGumbelVectorQuantizer(nn.Module): method __init__ (line 857) | def __init__(self, config): method _compute_perplexity (line 879) | def _compute_perplexity(probs): method forward (line 884) | def forward(self, hidden_states): class WavLMAdapter (line 922) | class WavLMAdapter(nn.Module): method __init__ (line 923) | def __init__(self, config): method forward (line 936) | def forward(self, hidden_states): class WavLMAdapterLayer (line 954) | class WavLMAdapterLayer(nn.Module): method __init__ (line 955) | def __init__(self, config): method forward (line 965) | def forward(self, hidden_states): class WavLMPreTrainedModel (line 973) | class WavLMPreTrainedModel(PreTrainedModel): method _init_weights (line 985) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1018) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1041) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1061) | def _set_gradient_checkpointing(self, module, value=False): class WavLMModel (line 1127) | class WavLMModel(WavLMPreTrainedModel): method __init__ (line 1128) | def __init__(self, config: WavLMConfig): method freeze_feature_extractor (line 1148) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1160) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1167) | def _mask_hidden_states( method forward (line 1222) | def forward( class WavLMForCTC (line 1280) | class WavLMForCTC(WavLMPreTrainedModel): method __init__ (line 1281) | def __init__(self, config): method freeze_feature_extractor (line 1302) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1314) | def freeze_feature_encoder(self): method forward (line 1330) | def forward( class WavLMForSequenceClassification (line 1411) | class WavLMForSequenceClassification(WavLMPreTrainedModel): method __init__ (line 1412) | def __init__(self, config): method freeze_feature_extractor (line 1429) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1441) | def freeze_feature_encoder(self): method freeze_base_model (line 1448) | def freeze_base_model(self): method forward (line 1466) | def forward( class WavLMForAudioFrameClassification (line 1535) | class WavLMForAudioFrameClassification(WavLMPreTrainedModel): method __init__ (line 1536) | 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( class AMSoftmaxLoss (line 1643) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1644) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1652) | def forward(self, hidden_states, labels): class TDNNLayer (line 1667) | class TDNNLayer(nn.Module): method __init__ (line 1668) | def __init__(self, config, layer_id=0): method forward (line 1678) | def forward(self, hidden_states): class WavLMForXVector (line 1700) | class WavLMForXVector(WavLMPreTrainedModel): method __init__ (line 1701) | def __init__(self, config): method freeze_feature_extractor (line 1720) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1732) | def freeze_feature_encoder(self): method freeze_base_model (line 1739) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1747) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1771) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/whisper/configuration_whisper.py class WhisperConfig (line 62) | class WhisperConfig(PretrainedConfig): method __init__ (line 161) | def __init__( class WhisperOnnxConfig (line 228) | class WhisperOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 230) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 246) | def generate_dummy_inputs( method atol_for_validation (line 280) | def atol_for_validation(self) -> float: FILE: benchmark/third_party/transformers/src/transformers/models/whisper/english_normalizer.py function remove_symbols_and_diacritics (line 52) | def remove_symbols_and_diacritics(s: str, keep=""): function remove_symbols (line 75) | def remove_symbols(s: str): class BasicTextNormalizer (line 82) | class BasicTextNormalizer: method __init__ (line 83) | def __init__(self, remove_diacritics: bool = False, split_letters: boo... method __call__ (line 87) | def __call__(self, s: str): class EnglishNumberNormalizer (line 101) | class EnglishNumberNormalizer: method __init__ (line 112) | def __init__(self): method process_words (line 220) | def process_words(self, words: List[str]) -> Iterator[str]: method preprocess (line 441) | def preprocess(self, s: str): method postprocess (line 470) | def postprocess(self, s: str): method __call__ (line 495) | def __call__(self, s: str): class EnglishSpellingNormalizer (line 503) | class EnglishSpellingNormalizer: method __init__ (line 510) | def __init__(self, english_spelling_mapping): method __call__ (line 513) | def __call__(self, s: str): class EnglishTextNormalizer (line 517) | class EnglishTextNormalizer: method __init__ (line 518) | def __init__(self, english_spelling_mapping): method __call__ (line 578) | def __call__(self, s: str): FILE: benchmark/third_party/transformers/src/transformers/models/whisper/feature_extraction_whisper.py class WhisperFeatureExtractor (line 32) | class WhisperFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 60) | def __init__( method get_mel_filters (line 86) | def get_mel_filters(self, sr, n_fft, n_mels=128, dtype=np.float32): method fram_wave (line 135) | def fram_wave(self, waveform, center=True): method stft (line 171) | def stft(self, frames, window): method _np_extract_fbank_features (line 198) | def _np_extract_fbank_features(self, waveform: np.array) -> np.ndarray: method __call__ (line 218) | def __call__( FILE: benchmark/third_party/transformers/src/transformers/models/whisper/modeling_tf_whisper.py function shift_tokens_right (line 51) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 76) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 94) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWhisperPositionalEmbedding (line 107) | class TFWhisperPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 108) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method build (line 114) | def build(self, input_shape): method call (line 122) | def call(self, input_ids, past_key_values_length=0): class TFWhisperAttention (line 128) | class TFWhisperAttention(tf.keras.layers.Layer): method __init__ (line 131) | def __init__( method _shape (line 160) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 164) | def call( class TFWhisperEncoderLayer (line 284) | class TFWhisperEncoderLayer(tf.keras.layers.Layer): method __init__ (line 285) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 299) | def call( class TFWhisperDecoderLayer (line 340) | class TFWhisperDecoderLayer(tf.keras.layers.Layer): method __init__ (line 341) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 369) | def call( class TFWhisperPreTrainedModel (line 452) | class TFWhisperPreTrainedModel(TFPreTrainedModel): method _get_feat_extract_output_lengths (line 457) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor) -... method dummy_inputs (line 466) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method serving (line 489) | def serving(self, inputs): class TFWhisperEncoder (line 592) | class TFWhisperEncoder(tf.keras.layers.Layer): method __init__ (line 603) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 628) | def call( class TFWhisperDecoder (line 724) | class TFWhisperDecoder(tf.keras.layers.Layer): method __init__ (line 733) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 757) | def get_input_embeddings(self): method set_input_embeddings (line 760) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 763) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 788) | def call( class TFWhisperMainLayer (line 981) | class TFWhisperMainLayer(tf.keras.layers.Layer): method __init__ (line 984) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 990) | def get_input_embeddings(self): method set_input_embeddings (line 993) | def set_input_embeddings(self, value): method get_encoder (line 996) | def get_encoder(self): method get_decoder (line 999) | def get_decoder(self): method call (line 1005) | def call( class TFWhisperModel (line 1103) | class TFWhisperModel(TFWhisperPreTrainedModel): method __init__ (line 1104) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 1109) | def get_input_embeddings(self): method set_input_embeddings (line 1112) | def set_input_embeddings(self, value): method get_encoder (line 1115) | def get_encoder(self): method get_decoder (line 1118) | def get_decoder(self): method decoder (line 1121) | def decoder(self): method encoder (line 1124) | def encoder(self): method call (line 1130) | def call( method serving_output (line 1187) | def serving_output(self, output): class TFWhisperForConditionalGeneration (line 1211) | class TFWhisperForConditionalGeneration(TFWhisperPreTrainedModel, TFCaus... method __init__ (line 1222) | def __init__(self, config: WhisperConfig, **kwargs): method get_encoder (line 1226) | def get_encoder(self): method get_decoder (line 1229) | def get_decoder(self): method get_output_embeddings (line 1232) | def get_output_embeddings(self): method set_output_embeddings (line 1235) | def set_output_embeddings(self, value): method resize_token_embeddings (line 1238) | def resize_token_embeddings(self, new_num_tokens: int) -> tf.keras.lay... method call (line 1245) | def call( method serving_output (line 1340) | def serving_output(self, output): method prepare_inputs_for_generation (line 1359) | def prepare_inputs_for_generation( method _reorder_cache (line 1393) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/whisper/modeling_whisper.py function shift_tokens_right (line 52) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 69) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 85) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class WhisperPositionalEmbedding (line 99) | class WhisperPositionalEmbedding(nn.Embedding): method __init__ (line 100) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method forward (line 103) | def forward(self, input_ids, past_key_values_length=0): class WhisperAttention (line 108) | class WhisperAttention(nn.Module): method __init__ (line 111) | def __init__( method _shape (line 139) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 143) | def forward( class WhisperEncoderLayer (line 258) | class WhisperEncoderLayer(nn.Module): method __init__ (line 259) | def __init__(self, config: WhisperConfig): method forward (line 275) | def forward( class WhisperDecoderLayer (line 327) | class WhisperDecoderLayer(nn.Module): method __init__ (line 328) | def __init__(self, config: WhisperConfig): method forward (line 354) | def forward( class WhisperPreTrainedModel (line 444) | class WhisperPreTrainedModel(PreTrainedModel): method _init_weights (line 451) | def _init_weights(self, module): method _set_gradient_checkpointing (line 462) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 466) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... class WhisperEncoder (line 572) | class WhisperEncoder(WhisperPreTrainedModel): method __init__ (line 582) | def __init__(self, config: WhisperConfig): method _freeze_parameters (line 605) | def _freeze_parameters(self): method forward (line 610) | def forward( class WhisperDecoder (line 711) | class WhisperDecoder(WhisperPreTrainedModel): method __init__ (line 719) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 739) | def get_input_embeddings(self): method set_input_embeddings (line 742) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 745) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 766) | def forward( class WhisperModel (line 970) | class WhisperModel(WhisperPreTrainedModel): method __init__ (line 973) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 981) | def get_input_embeddings(self): method set_input_embeddings (line 984) | def set_input_embeddings(self, value): method get_encoder (line 987) | def get_encoder(self): method get_decoder (line 990) | def get_decoder(self): method freeze_encoder (line 993) | def freeze_encoder(self): method forward (line 1002) | def forward( class WhisperForConditionalGeneration (line 1094) | class WhisperForConditionalGeneration(WhisperPreTrainedModel): method __init__ (line 1105) | def __init__(self, config: WhisperConfig): method get_encoder (line 1113) | def get_encoder(self): method get_decoder (line 1116) | def get_decoder(self): method resize_token_embeddings (line 1119) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1123) | def get_output_embeddings(self): method set_output_embeddings (line 1126) | def set_output_embeddings(self, new_embeddings): method freeze_encoder (line 1129) | def freeze_encoder(self): method forward (line 1138) | def forward( method prepare_inputs_for_generation (line 1230) | def prepare_inputs_for_generation( method _reorder_cache (line 1247) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/whisper/processing_whisper.py class WhisperProcessor (line 22) | class WhisperProcessor(ProcessorMixin): method __init__ (line 39) | def __init__(self, feature_extractor, tokenizer): method get_decoder_prompt_ids (line 44) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method __call__ (line 77) | def __call__(self, *args, **kwargs): method batch_decode (line 110) | def batch_decode(self, *args, **kwargs): method decode (line 117) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/whisper/tokenization_whisper.py function bytes_to_unicode (line 50) | def bytes_to_unicode(): function get_pairs (line 78) | def get_pairs(word): class WhisperTokenizer (line 92) | class WhisperTokenizer(PreTrainedTokenizer): method __init__ (line 129) | def __init__( method get_vocab (line 182) | def get_vocab(self): method vocab_size (line 188) | def vocab_size(self) -> int: method bpe (line 192) | def bpe(self, token): method build_inputs_with_special_tokens (line 235) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 249) | def get_special_tokens_mask( method _tokenize (line 282) | def _tokenize(self, text): method _convert_token_to_id (line 293) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 297) | def _convert_id_to_token(self, index): method _normalize (line 301) | def _normalize(self, text): method _decode (line 309) | def _decode( method convert_tokens_to_string (line 343) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 349) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 388) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 395) | def _build_conversation_input_ids(self, conversation) -> List[int]: FILE: benchmark/third_party/transformers/src/transformers/models/x_clip/configuration_x_clip.py class XCLIPTextConfig (line 32) | class XCLIPTextConfig(PretrainedConfig): method __init__ (line 89) | def __init__( method from_pretrained (line 124) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPVisionConfig (line 141) | class XCLIPVisionConfig(PretrainedConfig): method __init__ (line 208) | def __init__( method from_pretrained (line 254) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPConfig (line 271) | class XCLIPConfig(PretrainedConfig): method __init__ (line 310) | def __init__( method from_text_vision_configs (line 348) | def from_text_vision_configs(cls, text_config: XCLIPTextConfig, vision... method to_dict (line 359) | def to_dict(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/x_clip/modeling_x_clip.py function _expand_mask (line 50) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 66) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function x_clip_loss (line 71) | def x_clip_loss(similarity: torch.Tensor) -> torch.Tensor: class XCLIPOutput (line 78) | class XCLIPOutput(ModelOutput): method to_tuple (line 111) | def to_tuple(self) -> Tuple[Any]: class XCLIPVisionEmbeddings (line 121) | class XCLIPVisionEmbeddings(nn.Module): method __init__ (line 122) | def __init__(self, config: XCLIPVisionConfig): method forward (line 140) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class XCLIPTextEmbeddings (line 152) | class XCLIPTextEmbeddings(nn.Module): method __init__ (line 153) | def __init__(self, config: XCLIPTextConfig): method forward (line 163) | def forward( class XCLIPAttention (line 184) | class XCLIPAttention(nn.Module): method __init__ (line 187) | def __init__(self, config): method _shape (line 206) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 209) | def forward( class XCLIPMLP (line 289) | class XCLIPMLP(nn.Module): method __init__ (line 290) | def __init__(self, config): method forward (line 297) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XCLIPEncoderLayer (line 305) | class XCLIPEncoderLayer(nn.Module): method __init__ (line 306) | def __init__(self, config: XCLIPConfig): method forward (line 314) | def forward( function drop_path (line 356) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class XCLIPDropPath (line 377) | class XCLIPDropPath(nn.Module): method __init__ (line 380) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 384) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 387) | def extra_repr(self) -> str: class XCLIPVisionEncoderLayer (line 391) | class XCLIPVisionEncoderLayer(nn.Module): method __init__ (line 396) | def __init__(self, config: XCLIPConfig): method forward (line 412) | def forward( class XCLIPPreTrainedModel (line 471) | class XCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 482) | def _init_weights(self, module): method _set_gradient_checkpointing (line 531) | def _set_gradient_checkpointing(self, module, value=False): class XCLIPEncoder (line 633) | class XCLIPEncoder(nn.Module): method __init__ (line 642) | def __init__(self, config: XCLIPConfig): method forward (line 648) | def forward( class XCLIPTextTransformer (line 736) | class XCLIPTextTransformer(nn.Module): method __init__ (line 737) | def __init__(self, config: XCLIPTextConfig): method forward (line 747) | def forward( method _build_causal_attention_mask (line 811) | def _build_causal_attention_mask(self, batch_size, seq_len, dtype): class XCLIPTextModel (line 821) | class XCLIPTextModel(XCLIPPreTrainedModel): method __init__ (line 824) | def __init__(self, config: XCLIPTextConfig): method get_input_embeddings (line 830) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 833) | def set_input_embeddings(self, value): method forward (line 838) | def forward( class XCLIPVisionEncoder (line 874) | class XCLIPVisionEncoder(nn.Module): method __init__ (line 883) | def __init__(self, config: XCLIPConfig): method forward (line 889) | def forward( class XCLIPVisionTransformer (line 977) | class XCLIPVisionTransformer(nn.Module): method __init__ (line 982) | def __init__(self, config: XCLIPVisionConfig): method forward (line 994) | def forward( class XCLIPVisionModel (line 1036) | class XCLIPVisionModel(XCLIPPreTrainedModel): method __init__ (line 1040) | def __init__(self, config: XCLIPVisionConfig): method get_input_embeddings (line 1046) | def get_input_embeddings(self) -> nn.Module: method forward (line 1051) | def forward( class XCLIPMultiframeIntegrationTransformer (line 1113) | class XCLIPMultiframeIntegrationTransformer(nn.Module): method __init__ (line 1118) | def __init__(self, config: XCLIPVisionConfig): method forward (line 1124) | def forward( class XCLIPCrossAttention (line 1159) | class XCLIPCrossAttention(nn.Module): method __init__ (line 1162) | def __init__(self, config): method _shape (line 1178) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 1181) | def forward(self, queries, keys, values): class PromptGeneratorLayer (line 1211) | class PromptGeneratorLayer(nn.Module): method __init__ (line 1212) | def __init__(self, config): method forward (line 1226) | def forward(self, x, visual): class XCLIPPromptGenerator (line 1232) | class XCLIPPromptGenerator(nn.Module): method __init__ (line 1235) | def __init__(self, config): method forward (line 1242) | def forward(self, text, visual): class XCLIPModel (line 1251) | class XCLIPModel(XCLIPPreTrainedModel): method __init__ (line 1254) | def __init__(self, config: XCLIPConfig): method get_text_features (line 1299) | def get_text_features( method get_video_features (line 1346) | def get_video_features( method forward (line 1433) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/x_clip/processing_x_clip.py class XCLIPProcessor (line 22) | class XCLIPProcessor(ProcessorMixin): method __init__ (line 39) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 43) | def __call__(self, text=None, videos=None, return_tensors=None, **kwar... method batch_decode (line 97) | def batch_decode(self, *args, **kwargs): method decode (line 104) | def decode(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/xglm/configuration_xglm.py class XGLMConfig (line 29) | class XGLMConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/xglm/modeling_flax_xglm.py function create_sinusoidal_positions (line 115) | def create_sinusoidal_positions(n_pos, dim, padding_idx=1): function shift_tokens_right (line 129) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxXGLMAttention (line 141) | class FlaxXGLMAttention(nn.Module): method setup (line 150) | def setup(self) -> None: method _split_heads (line 177) | def _split_heads(self, hidden_states): method _merge_heads (line 180) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 184) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 216) | def __call__( class FlaxXGLMDecoderLayer (line 310) | class FlaxXGLMDecoderLayer(nn.Module): method setup (line 314) | def setup(self) -> None: method __call__ (line 350) | def __call__( class FlaxXGLMDecoderLayerCollection (line 401) | class FlaxXGLMDecoderLayerCollection(nn.Module): method setup (line 405) | def setup(self): method __call__ (line 411) | def __call__( class FlaxXGLMModule (line 470) | class FlaxXGLMModule(nn.Module): method setup (line 474) | def setup(self): method __call__ (line 497) | def __call__( class FlaxXGLMPreTrainedModel (line 554) | class FlaxXGLMPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 559) | def __init__( method init_weights (line 571) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 606) | def init_cache(self, batch_size, max_length): method __call__ (line 626) | def __call__( class FlaxXGLMModel (line 703) | class FlaxXGLMModel(FlaxXGLMPreTrainedModel): class FlaxXGLMForCausalLMModule (line 716) | class FlaxXGLMForCausalLMModule(nn.Module): method setup (line 720) | def setup(self): method __call__ (line 729) | def __call__( class FlaxXGLMForCausalLM (line 782) | class FlaxXGLMForCausalLM(FlaxXGLMPreTrainedModel): method prepare_inputs_for_generation (line 785) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 806) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/xglm/modeling_tf_xglm.py function create_sinusiodal_positions (line 66) | def create_sinusiodal_positions(num_positions: int, embedding_dim: int, ... function _create_position_ids_from_input_ids (line 89) | def _create_position_ids_from_input_ids( function _create_position_ids_from_inputs_embeds (line 102) | def _create_position_ids_from_inputs_embeds( function _make_causal_mask (line 120) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 138) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None, past_ke... class TFXGLMAttention (line 152) | class TFXGLMAttention(tf.keras.layers.Layer): method __init__ (line 155) | def __init__( method _shape (line 183) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 186) | def call( class TFXGLMDecoderLayer (line 305) | class TFXGLMDecoderLayer(tf.keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: XGLMConfig, **kwargs: Any) -> None: method call (line 338) | def call( class TFXGLMMainLayer (line 420) | class TFXGLMMainLayer(tf.keras.layers.Layer): method __init__ (line 423) | def __init__( method get_input_embeddings (line 452) | def get_input_embeddings(self) -> TFSharedEmbeddings: method set_input_embeddings (line 455) | def set_input_embeddings(self, value: TFSharedEmbeddings) -> None: method _prepare_decoder_attention_mask (line 458) | def _prepare_decoder_attention_mask( method embed_positions (line 480) | def embed_positions( method call (line 497) | def call( class TFXGLMPreTrainedModel (line 632) | class TFXGLMPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 637) | def dummy_inputs(self): method serving (line 654) | def serving(self, inputs): class TFXGLMModel (line 773) | class TFXGLMModel(TFXGLMPreTrainedModel): method __init__ (line 782) | def __init__( method call (line 797) | def call( method serving_output (line 833) | def serving_output(self, output): class TFXGLMForCausalLM (line 859) | class TFXGLMForCausalLM(TFXGLMPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 869) | def __init__( method get_output_embeddings (line 885) | def get_output_embeddings(self): method set_output_embeddings (line 888) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 891) | def prepare_inputs_for_generation(self, inputs, past=None, use_cache=N... method call (line 914) | def call( method serving_output (line 977) | def serving_output(self, output): method _reorder_cache (line 997) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/xglm/modeling_xglm.py function _make_causal_mask (line 118) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 134) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function create_position_ids_from_input_ids (line 148) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class XGLMSinusoidalPositionalEmbedding (line 160) | class XGLMSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 163) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 170) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 179) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 200) | def forward( method create_position_ids_from_inputs_embeds (line 220) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class XGLMAttention (line 238) | class XGLMAttention(nn.Module): method __init__ (line 241) | def __init__( method _shape (line 268) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 271) | def forward( class XGLMDecoderLayer (line 390) | class XGLMDecoderLayer(nn.Module): method __init__ (line 391) | def __init__(self, config: XGLMConfig): method forward (line 420) | def forward( class XGLMPreTrainedModel (line 510) | class XGLMPreTrainedModel(PreTrainedModel): method _init_weights (line 515) | def _init_weights(self, module): method _set_gradient_checkpointing (line 526) | def _set_gradient_checkpointing(self, module, value=False): class XGLMModel (line 535) | class XGLMModel(XGLMPreTrainedModel): method __init__ (line 544) | def __init__(self, config: XGLMConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 569) | def get_input_embeddings(self): method set_input_embeddings (line 572) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 575) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 600) | def forward( class XGLMForCausalLM (line 824) | class XGLMForCausalLM(XGLMPreTrainedModel): method __init__ (line 834) | def __init__(self, config): method get_input_embeddings (line 842) | def get_input_embeddings(self): method set_input_embeddings (line 845) | def set_input_embeddings(self, value): 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 861) | def forward( method prepare_inputs_for_generation (line 931) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 947) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/src/transformers/models/xglm/tokenization_xglm.py class XGLMTokenizer (line 43) | class XGLMTokenizer(PreTrainedTokenizer): method __init__ (line 117) | def __init__( method __getstate__ (line 173) | def __getstate__(self): method __setstate__ (line 179) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 189) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 214) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 242) | def create_token_type_ids_from_sequences( method vocab_size (line 267) | def vocab_size(self): method get_vocab (line 270) | def get_vocab(self): method _tokenize (line 275) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 278) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 287) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 293) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 298) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/xglm/tokenization_xglm_fast.py class XGLMTokenizerFast (line 49) | class XGLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method build_inputs_with_special_tokens (line 139) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 164) | def create_token_type_ids_from_sequences( method save_vocabulary (line 188) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/xlm/configuration_xlm.py class XLMConfig (line 40) | class XLMConfig(PretrainedConfig): method __init__ (line 160) | def __init__( class XLMOnnxConfig (line 237) | class XLMOnnxConfig(OnnxConfig): method inputs (line 239) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/xlm/convert_xlm_original_pytorch_checkpoint_to_pytorch.py function convert_xlm_checkpoint_to_pytorch (line 31) | def convert_xlm_checkpoint_to_pytorch(xlm_checkpoint_path, pytorch_dump_... FILE: benchmark/third_party/transformers/src/transformers/models/xlm/modeling_tf_xlm.py function create_sinusoidal_embeddings (line 81) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 87) | def get_masks(slen, lengths, causal, padding_mask=None): class TFXLMMultiHeadAttention (line 116) | class TFXLMMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 119) | def __init__(self, n_heads, dim, config, **kwargs): method prune_heads (line 134) | def prune_heads(self, heads): method call (line 137) | def call(self, input, mask, kv, cache, head_mask, output_attentions, t... class TFXLMTransformerFFN (line 208) | class TFXLMTransformerFFN(tf.keras.layers.Layer): method __init__ (line 209) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 217) | def call(self, input, training=False): class TFXLMMainLayer (line 227) | class TFXLMMainLayer(tf.keras.layers.Layer): method __init__ (line 230) | def __init__(self, config, **kwargs): method build (line 317) | def build(self, input_shape): method get_input_embeddings (line 335) | def get_input_embeddings(self): method set_input_embeddings (line 338) | def set_input_embeddings(self, value): method _prune_heads (line 342) | def _prune_heads(self, heads_to_prune): method call (line 350) | def call( class TFXLMPreTrainedModel (line 524) | class TFXLMPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 534) | def dummy_inputs(self): class TFXLMWithLMHeadModelOutput (line 550) | class TFXLMWithLMHeadModelOutput(ModelOutput): class TFXLMModel (line 696) | class TFXLMModel(TFXLMPreTrainedModel): method __init__ (line 697) | def __init__(self, config, *inputs, **kwargs): method call (line 709) | def call( method serving_output (line 744) | def serving_output(self, output): class TFXLMPredLayer (line 751) | class TFXLMPredLayer(tf.keras.layers.Layer): method __init__ (line 756) | def __init__(self, config, input_embeddings, **kwargs): method build (line 775) | def build(self, input_shape): method get_output_embeddings (line 781) | def get_output_embeddings(self): method set_output_embeddings (line 784) | def set_output_embeddings(self, value): method get_bias (line 788) | def get_bias(self): method set_bias (line 791) | def set_bias(self, value): method call (line 795) | def call(self, hidden_states): class TFXLMWithLMHeadModel (line 809) | class TFXLMWithLMHeadModel(TFXLMPreTrainedModel): method __init__ (line 810) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 817) | def get_lm_head(self): method get_prefix_bias_name (line 820) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 824) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 846) | def call( method serving_output (line 888) | def serving_output(self, output): class TFXLMForSequenceClassification (line 902) | class TFXLMForSequenceClassification(TFXLMPreTrainedModel, TFSequenceCla... method __init__ (line 903) | def __init__(self, config, *inputs, **kwargs): method call (line 918) | def call( method serving_output (line 974) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFXLMForMultipleChoice (line 988) | class TFXLMForMultipleChoice(TFXLMPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 989) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 999) | def dummy_inputs(self): method call (line 1025) | def call( method serving (line 1110) | def serving(self, inputs: Dict[str, tf.Tensor]): method serving_output (line 1116) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFXLMForTokenClassification (line 1130) | class TFXLMForTokenClassification(TFXLMPreTrainedModel, TFTokenClassific... method __init__ (line 1131) | def __init__(self, config, *inputs, **kwargs): method call (line 1149) | def call( method serving_output (line 1204) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFXLMForQuestionAnsweringSimple (line 1218) | class TFXLMForQuestionAnsweringSimple(TFXLMPreTrainedModel, TFQuestionAn... method __init__ (line 1219) | def __init__(self, config, *inputs, **kwargs): method call (line 1234) | def call( method serving_output (line 1303) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: benchmark/third_party/transformers/src/transformers/models/xlm/modeling_xlm.py function create_sinusoidal_embeddings (line 72) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 80) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 105) | class MultiHeadAttention(nn.Module): method __init__ (line 109) | def __init__(self, n_heads, dim, config): method prune_heads (line 123) | def prune_heads(self, heads): method forward (line 138) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 202) | class TransformerFFN(nn.Module): method __init__ (line 203) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 212) | def forward(self, input): method ff_chunk (line 215) | def ff_chunk(self, input): class XLMPreTrainedModel (line 223) | class XLMPreTrainedModel(PreTrainedModel): method __init__ (line 233) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 237) | def dummy_inputs(self): method _init_weights (line 246) | def _init_weights(self, module): class XLMForQuestionAnsweringOutput (line 264) | class XLMForQuestionAnsweringOutput(ModelOutput): class XLMModel (line 395) | class XLMModel(XLMPreTrainedModel): method __init__ (line 398) | def __init__(self, config): method get_input_embeddings (line 468) | def get_input_embeddings(self): method set_input_embeddings (line 471) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 474) | def _prune_heads(self, heads_to_prune): method forward (line 489) | def forward( class XLMPredLayer (line 626) | class XLMPredLayer(nn.Module): method __init__ (line 631) | def __init__(self, config): method forward (line 649) | def forward(self, x, y=None): class XLMWithLMHeadModel (line 675) | class XLMWithLMHeadModel(XLMPreTrainedModel): method __init__ (line 676) | def __init__(self, config): method get_output_embeddings (line 684) | def get_output_embeddings(self): method set_output_embeddings (line 687) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 690) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 711) | def forward( class XLMForSequenceClassification (line 771) | class XLMForSequenceClassification(XLMPreTrainedModel): method __init__ (line 772) | def __init__(self, config): method forward (line 790) | def forward( class XLMForQuestionAnsweringSimple (line 874) | class XLMForQuestionAnsweringSimple(XLMPreTrainedModel): method __init__ (line 875) | def __init__(self, config): method forward (line 891) | def forward( class XLMForQuestionAnswering (line 979) | class XLMForQuestionAnswering(XLMPreTrainedModel): method __init__ (line 980) | def __init__(self, config): method forward (line 991) | def forward( class XLMForTokenClassification (line 1100) | class XLMForTokenClassification(XLMPreTrainedModel): method __init__ (line 1101) | def __init__(self, config): method forward (line 1119) | def forward( class XLMForMultipleChoice (line 1185) | class XLMForMultipleChoice(XLMPreTrainedModel): method __init__ (line 1186) | def __init__(self, config, *inputs, **kwargs): method forward (line 1203) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/xlm/tokenization_xlm.py function get_pairs (line 428) | def get_pairs(word): function lowercase_and_remove_accent (line 441) | def lowercase_and_remove_accent(text): function replace_unicode_punct (line 458) | def replace_unicode_punct(text): function remove_non_printing_char (line 501) | def remove_non_printing_char(text): function romanian_preprocessing (line 514) | def romanian_preprocessing(text): class XLMTokenizer (line 528) | class XLMTokenizer(PreTrainedTokenizer): method __init__ (line 589) | def __init__( method do_lower_case (line 665) | def do_lower_case(self): method moses_punct_norm (line 668) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 676) | def moses_tokenize(self, text, lang): method moses_pipeline (line 684) | def moses_pipeline(self, text, lang): method ja_tokenize (line 690) | def ja_tokenize(self, text): method vocab_size (line 712) | def vocab_size(self): method get_vocab (line 715) | def get_vocab(self): method bpe (line 718) | def bpe(self, token): method _tokenize (line 762) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 858) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 862) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 866) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 871) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 898) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 926) | def create_token_type_ids_from_sequences( method save_vocabulary (line 955) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 983) | def __getstate__(self): method __setstate__ (line 988) | def __setstate__(self, d): FILE: benchmark/third_party/transformers/src/transformers/models/xlm_prophetnet/configuration_xlm_prophetnet.py class XLMProphetNetConfig (line 33) | class XLMProphetNetConfig(PretrainedConfig): method __init__ (line 109) | def __init__( method num_hidden_layers (line 176) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 180) | def num_hidden_layers(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py function softmax (line 184) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 192) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 210) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 238) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class XLMProphetNetSeq2SeqLMOutput (line 263) | class XLMProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 338) | def decoder_cross_attentions(self): class XLMProphetNetSeq2SeqModelOutput (line 349) | class XLMProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 425) | def decoder_cross_attentions(self): class XLMProphetNetDecoderModelOutput (line 436) | class XLMProphetNetDecoderModelOutput(ModelOutput): class XLMProphetNetDecoderLMOutput (line 497) | class XLMProphetNetDecoderLMOutput(ModelOutput): class XLMProphetNetPreTrainedModel (line 559) | class XLMProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 564) | def _init_weights(self, module): method _set_gradient_checkpointing (line 574) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 578) | def _shift_right(self, input_ids): class XLMProphetNetPositionalEmbeddings (line 602) | class XLMProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 609) | def __init__(self, config: XLMProphetNetConfig) -> None: method forward (line 613) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 641) | def _forward(self, position_ids): class XLMProphetNetAttention (line 646) | class XLMProphetNetAttention(nn.Module): method __init__ (line 649) | def __init__( method _shape (line 673) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 676) | def forward( class XLMProphetNetFeedForward (line 806) | class XLMProphetNetFeedForward(nn.Module): method __init__ (line 811) | def __init__(self, config: XLMProphetNetConfig, ffn_dim: int): method forward (line 819) | def forward(self, hidden_states): class XLMProphetNetNgramSelfAttention (line 830) | class XLMProphetNetNgramSelfAttention(nn.Module): method __init__ (line 831) | def __init__(self, config: XLMProphetNetConfig): method _shape (line 860) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 863) | def prepare_for_onnx_export_(self): method forward (line 866) | def forward( method get_main_relative_pos_embeddings (line 1059) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1101) | def get_predict_relative_pos_embeddings( class XLMProphetNetEncoderLayer (line 1152) | class XLMProphetNetEncoderLayer(nn.Module): method __init__ (line 1157) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1167) | def forward( class XLMProphetNetDecoderLayer (line 1196) | class XLMProphetNetDecoderLayer(nn.Module): method __init__ (line 1201) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1216) | def forward( class XLMProphetNetEncoder (line 1285) | class XLMProphetNetEncoder(XLMProphetNetPreTrainedModel): method __init__ (line 1292) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: nn.Em... method get_input_embeddings (line 1309) | def get_input_embeddings(self): method set_input_embeddings (line 1312) | def set_input_embeddings(self, value): method forward (line 1317) | def forward( class XLMProphetNetDecoder (line 1426) | class XLMProphetNetDecoder(XLMProphetNetPreTrainedModel): method __init__ (line 1433) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: Optio... method get_input_embeddings (line 1457) | def get_input_embeddings(self): method set_input_embeddings (line 1460) | def set_input_embeddings(self, value): method forward (line 1465) | def forward( method compute_buffered_relative_buckets (line 1714) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1736) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1759) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class XLMProphetNetModel (line 1800) | class XLMProphetNetModel(XLMProphetNetPreTrainedModel): method __init__ (line 1801) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 1818) | def get_input_embeddings(self): method set_input_embeddings (line 1821) | def set_input_embeddings(self, value): method get_encoder (line 1826) | def get_encoder(self): method get_decoder (line 1829) | def get_decoder(self): method forward (line 1834) | def forward( class XLMProphetNetForConditionalGeneration (line 1928) | class XLMProphetNetForConditionalGeneration(XLMProphetNetPreTrainedModel): method __init__ (line 1929) | def __init__(self, config: XLMProphetNetConfig): method get_output_embeddings (line 1940) | def get_output_embeddings(self): method set_output_embeddings (line 1943) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1946) | def get_input_embeddings(self): method forward (line 1951) | def forward( method _compute_loss (line 2057) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2085) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2114) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2119) | def _reorder_cache(past, beam_idx): method get_encoder (line 2128) | def get_encoder(self): method get_decoder (line 2131) | def get_decoder(self): class XLMProphetNetForCausalLM (line 2141) | class XLMProphetNetForCausalLM(XLMProphetNetPreTrainedModel): method __init__ (line 2142) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 2158) | def get_input_embeddings(self): method set_input_embeddings (line 2161) | def set_input_embeddings(self, value): method get_output_embeddings (line 2164) | def get_output_embeddings(self): method set_output_embeddings (line 2167) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2170) | def set_decoder(self, decoder): method get_decoder (line 2173) | def get_decoder(self): method forward (line 2178) | def forward( method _compute_loss (line 2312) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2340) | def prepare_inputs_for_generation( method _reorder_cache (line 2366) | def _reorder_cache(past, beam_idx): class XLMProphetNetDecoderWrapper (line 2374) | class XLMProphetNetDecoderWrapper(XLMProphetNetPreTrainedModel): method __init__ (line 2380) | def __init__(self, config: XLMProphetNetConfig): method forward (line 2384) | def forward(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py function load_vocab (line 48) | def load_vocab(vocab_file): class XLMProphetNetTokenizer (line 59) | class XLMProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method __getstate__ (line 192) | def __getstate__(self): method __setstate__ (line 197) | def __setstate__(self, d): method get_special_tokens_mask (line 215) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 243) | def create_token_type_ids_from_sequences( method vocab_size (line 268) | def vocab_size(self): method get_vocab (line 271) | def get_vocab(self): method _tokenize (line 276) | def _tokenize(self, text: str) -> str: method _convert_token_to_id (line 279) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 288) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 294) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 299) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 316) | def build_inputs_with_special_tokens( FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/configuration_xlm_roberta.py class XLMRobertaConfig (line 45) | class XLMRobertaConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class XLMRobertaOnnxConfig (line 155) | class XLMRobertaOnnxConfig(OnnxConfig): method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py class FlaxXLMRobertaModel (line 68) | class FlaxXLMRobertaModel(FlaxRobertaModel): class FlaxXLMRobertaForMaskedLM (line 81) | class FlaxXLMRobertaForMaskedLM(FlaxRobertaForMaskedLM): class FlaxXLMRobertaForSequenceClassification (line 97) | class FlaxXLMRobertaForSequenceClassification(FlaxRobertaForSequenceClas... class FlaxXLMRobertaForMultipleChoice (line 113) | class FlaxXLMRobertaForMultipleChoice(FlaxRobertaForMultipleChoice): class FlaxXLMRobertaForTokenClassification (line 129) | class FlaxXLMRobertaForTokenClassification(FlaxRobertaForTokenClassifica... class FlaxXLMRobertaForQuestionAnswering (line 145) | class FlaxXLMRobertaForQuestionAnswering(FlaxRobertaForQuestionAnswering): FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py class TFXLMRobertaModel (line 85) | class TFXLMRobertaModel(TFRobertaModel): class XLMRobertaForCausalLM (line 98) | class XLMRobertaForCausalLM(TFRobertaForCausalLM): class TFXLMRobertaForMaskedLM (line 111) | class TFXLMRobertaForMaskedLM(TFRobertaForMaskedLM): class TFXLMRobertaForSequenceClassification (line 127) | class TFXLMRobertaForSequenceClassification(TFRobertaForSequenceClassifi... class TFXLMRobertaForTokenClassification (line 143) | class TFXLMRobertaForTokenClassification(TFRobertaForTokenClassification): class TFXLMRobertaForQuestionAnswering (line 159) | class TFXLMRobertaForQuestionAnswering(TFRobertaForQuestionAnswering): class TFXLMRobertaForMultipleChoice (line 175) | class TFXLMRobertaForMultipleChoice(TFRobertaForMultipleChoice): FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py class XLMRobertaEmbeddings (line 67) | class XLMRobertaEmbeddings(nn.Module): method __init__ (line 73) | def __init__(self, config): method forward (line 96) | def forward( method create_position_ids_from_inputs_embeds (line 136) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaSelfAttention (line 155) | class XLMRobertaSelfAttention(nn.Module): method __init__ (line 156) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 182) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 187) | def forward( class XLMRobertaSelfOutput (line 283) | class XLMRobertaSelfOutput(nn.Module): method __init__ (line 284) | def __init__(self, config): method forward (line 290) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XLMRobertaAttention (line 298) | class XLMRobertaAttention(nn.Module): method __init__ (line 299) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 305) | def prune_heads(self, heads): method forward (line 323) | def forward( class XLMRobertaIntermediate (line 348) | class XLMRobertaIntermediate(nn.Module): method __init__ (line 349) | def __init__(self, config): method forward (line 357) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaOutput (line 364) | class XLMRobertaOutput(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 371) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XLMRobertaLayer (line 379) | class XLMRobertaLayer(nn.Module): method __init__ (line 380) | def __init__(self, config): method forward (line 394) | def forward( method feed_forward_chunk (line 459) | def feed_forward_chunk(self, attention_output): class XLMRobertaEncoder (line 466) | class XLMRobertaEncoder(nn.Module): method __init__ (line 467) | def __init__(self, config): method forward (line 473) | def forward( class XLMRobertaPooler (line 564) | class XLMRobertaPooler(nn.Module): method __init__ (line 565) | def __init__(self, config): method forward (line 570) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaPreTrainedModel (line 580) | class XLMRobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 592) | def _init_weights(self, module): method _set_gradient_checkpointing (line 608) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 612) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class XLMRobertaModel (line 693) | class XLMRobertaModel(XLMRobertaPreTrainedModel): method __init__ (line 712) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 724) | def get_input_embeddings(self): method set_input_embeddings (line 727) | def set_input_embeddings(self, value): method _prune_heads (line 730) | def _prune_heads(self, heads_to_prune): method forward (line 746) | def forward( class XLMRobertaForCausalLM (line 881) | class XLMRobertaForCausalLM(XLMRobertaPreTrainedModel): method __init__ (line 886) | def __init__(self, config): method get_output_embeddings (line 901) | def get_output_embeddings(self): method set_output_embeddings (line 904) | def set_output_embeddings(self, new_embeddings): method forward (line 909) | def forward( method prepare_inputs_for_generation (line 1013) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 1025) | def _reorder_cache(self, past, beam_idx): class XLMRobertaForMaskedLM (line 1037) | class XLMRobertaForMaskedLM(XLMRobertaPreTrainedModel): method __init__ (line 1042) | def __init__(self, config): method get_output_embeddings (line 1060) | def get_output_embeddings(self): method set_output_embeddings (line 1063) | def set_output_embeddings(self, new_embeddings): method forward (line 1076) | def forward( class XLMRobertaLMHead (line 1135) | class XLMRobertaLMHead(nn.Module): method __init__ (line 1138) | def __init__(self, config): method forward (line 1147) | def forward(self, features, **kwargs): method _tie_weights (line 1157) | def _tie_weights(self): class XLMRobertaForSequenceClassification (line 1174) | class XLMRobertaForSequenceClassification(XLMRobertaPreTrainedModel): method __init__ (line 1177) | def __init__(self, config): method forward (line 1197) | def forward( class XLMRobertaForMultipleChoice (line 1275) | class XLMRobertaForMultipleChoice(XLMRobertaPreTrainedModel): method __init__ (line 1278) | def __init__(self, config): method forward (line 1297) | def forward( class XLMRobertaForTokenClassification (line 1371) | class XLMRobertaForTokenClassification(XLMRobertaPreTrainedModel): method __init__ (line 1375) | def __init__(self, config): method forward (line 1398) | def forward( class XLMRobertaClassificationHead (line 1452) | class XLMRobertaClassificationHead(nn.Module): method __init__ (line 1455) | def __init__(self, config): method forward (line 1464) | def forward(self, features, **kwargs): class XLMRobertaForQuestionAnswering (line 1482) | class XLMRobertaForQuestionAnswering(XLMRobertaPreTrainedModel): method __init__ (line 1486) | def __init__(self, config): method forward (line 1505) | def forward( function create_position_ids_from_input_ids (line 1581) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py class XLMRobertaTokenizer (line 63) | class XLMRobertaTokenizer(PreTrainedTokenizer): method __init__ (line 137) | def __init__( method __getstate__ (line 186) | def __getstate__(self): method __setstate__ (line 192) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 202) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 228) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 256) | def create_token_type_ids_from_sequences( method vocab_size (line 282) | def vocab_size(self): method get_vocab (line 285) | def get_vocab(self): method _tokenize (line 290) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 293) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 302) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 308) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 313) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py class XLMRobertaTokenizerFast (line 82) | class XLMRobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 139) | def __init__( method build_inputs_with_special_tokens (line 171) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 197) | def create_token_type_ids_from_sequences( method save_vocabulary (line 222) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/xlm_roberta_xl/configuration_xlm_roberta_xl.py class XLMRobertaXLConfig (line 34) | class XLMRobertaXLConfig(PretrainedConfig): method __init__ (line 102) | def __init__( class XLMRobertaXLOnnxConfig (line 143) | class XLMRobertaXLOnnxConfig(OnnxConfig): method inputs (line 145) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py class XLMRobertaXLEmbeddings (line 61) | class XLMRobertaXLEmbeddings(nn.Module): method __init__ (line 66) | def __init__(self, config): method forward (line 88) | def forward( method create_position_ids_from_inputs_embeds (line 129) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaXLSelfAttention (line 148) | class XLMRobertaXLSelfAttention(nn.Module): method __init__ (line 149) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 175) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 180) | def forward( class XLMRobertaXLSelfOutput (line 275) | class XLMRobertaXLSelfOutput(nn.Module): method __init__ (line 276) | def __init__(self, config): method forward (line 281) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLAttention (line 288) | class XLMRobertaXLAttention(nn.Module): method __init__ (line 289) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 296) | def prune_heads(self, heads): method forward (line 314) | def forward( class XLMRobertaXLIntermediate (line 340) | class XLMRobertaXLIntermediate(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 349) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLOutput (line 355) | class XLMRobertaXLOutput(nn.Module): method __init__ (line 356) | def __init__(self, config): method forward (line 360) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLLayer (line 366) | class XLMRobertaXLLayer(nn.Module): method __init__ (line 367) | def __init__(self, config): method forward (line 382) | def forward( method feed_forward_chunk (line 447) | def feed_forward_chunk(self, attention_output): class XLMRobertaXLEncoder (line 454) | class XLMRobertaXLEncoder(nn.Module): method __init__ (line 455) | def __init__(self, config): method forward (line 462) | def forward( class XLMRobertaXLPooler (line 555) | class XLMRobertaXLPooler(nn.Module): method __init__ (line 556) | def __init__(self, config): method forward (line 561) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLPreTrainedModel (line 570) | class XLMRobertaXLPreTrainedModel(PreTrainedModel): method _init_weights (line 580) | def _init_weights(self, module): method update_keys_to_ignore (line 596) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class XLMRobertaXLModel (line 665) | class XLMRobertaXLModel(XLMRobertaXLPreTrainedModel): method __init__ (line 679) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 691) | def get_input_embeddings(self): method set_input_embeddings (line 694) | def set_input_embeddings(self, value): method _prune_heads (line 697) | def _prune_heads(self, heads_to_prune): method forward (line 713) | def forward( class XLMRobertaXLForCausalLM (line 847) | class XLMRobertaXLForCausalLM(XLMRobertaXLPreTrainedModel): method __init__ (line 852) | 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 874) | def forward( method prepare_inputs_for_generation (line 975) | def prepare_inputs_for_generation(self, input_ids, past=None, attentio... method _reorder_cache (line 987) | def _reorder_cache(self, past, beam_idx): class XLMRobertaXLForMaskedLM (line 997) | class XLMRobertaXLForMaskedLM(XLMRobertaXLPreTrainedModel): method __init__ (line 1002) | def __init__(self, config): method get_output_embeddings (line 1019) | def get_output_embeddings(self): method set_output_embeddings (line 1022) | def set_output_embeddings(self, new_embeddings): method forward (line 1033) | def forward( class XLMRobertaXLLMHead (line 1091) | class XLMRobertaXLLMHead(nn.Module): method __init__ (line 1094) | def __init__(self, config): method forward (line 1103) | def forward(self, features, **kwargs): method _tie_weights (line 1113) | def _tie_weights(self): class XLMRobertaXLForSequenceClassification (line 1125) | class XLMRobertaXLForSequenceClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1128) | def __init__(self, config): method forward (line 1145) | def forward( class XLMRobertaXLForMultipleChoice (line 1222) | class XLMRobertaXLForMultipleChoice(XLMRobertaXLPreTrainedModel): method __init__ (line 1225) | def __init__(self, config): method forward (line 1243) | def forward( class XLMRobertaXLForTokenClassification (line 1316) | class XLMRobertaXLForTokenClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1320) | def __init__(self, config): method forward (line 1340) | def forward( class XLMRobertaXLClassificationHead (line 1402) | class XLMRobertaXLClassificationHead(nn.Module): method __init__ (line 1405) | def __init__(self, config): method forward (line 1414) | def forward(self, features, **kwargs): class XLMRobertaXLForQuestionAnswering (line 1431) | class XLMRobertaXLForQuestionAnswering(XLMRobertaXLPreTrainedModel): method __init__ (line 1435) | def __init__(self, config): method forward (line 1451) | def forward( function create_position_ids_from_input_ids (line 1527) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/configuration_xlnet.py class XLNetConfig (line 32) | class XLNetConfig(PretrainedConfig): method __init__ (line 150) | def __init__( method max_position_embeddings (line 233) | def max_position_embeddings(self): method max_position_embeddings (line 238) | def max_position_embeddings(self, value): FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/convert_xlnet_original_tf_checkpoint_to_pytorch.py function convert_xlnet_checkpoint_to_pytorch (line 49) | def convert_xlnet_checkpoint_to_pytorch( FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/modeling_tf_xlnet.py class TFXLNetRelativeAttention (line 68) | class TFXLNetRelativeAttention(tf.keras.layers.Layer): method __init__ (line 69) | def __init__(self, config, **kwargs): method build (line 88) | def build(self, input_shape): method prune_heads (line 119) | def prune_heads(self, heads): method rel_shift (line 122) | def rel_shift(self, x, klen=-1): method rel_attn_core (line 134) | def rel_attn_core( method post_attention (line 178) | def post_attention(self, h, attn_vec, residual=True, training=False): method call (line 191) | def call( class TFXLNetFeedForward (line 331) | class TFXLNetFeedForward(tf.keras.layers.Layer): method __init__ (line 332) | def __init__(self, config, **kwargs): method call (line 347) | def call(self, inp, training=False): class TFXLNetLayer (line 358) | class TFXLNetLayer(tf.keras.layers.Layer): method __init__ (line 359) | def __init__(self, config, **kwargs): method call (line 365) | def call( class TFXLNetLMHead (line 402) | class TFXLNetLMHead(tf.keras.layers.Layer): method __init__ (line 403) | def __init__(self, config, input_embeddings, **kwargs): method build (line 410) | def build(self, input_shape): method get_output_embeddings (line 414) | def get_output_embeddings(self): method set_output_embeddings (line 417) | def set_output_embeddings(self, value): method get_bias (line 421) | def get_bias(self): method set_bias (line 424) | def set_bias(self, value): method call (line 428) | def call(self, hidden_states): class TFXLNetMainLayer (line 435) | class TFXLNetMainLayer(tf.keras.layers.Layer): method __init__ (line 438) | def __init__(self, config, **kwargs): method get_input_embeddings (line 466) | def get_input_embeddings(self): method set_input_embeddings (line 469) | def set_input_embeddings(self, value): method build (line 473) | def build(self, input_shape): method _prune_heads (line 479) | def _prune_heads(self, heads_to_prune): method create_mask (line 482) | def create_mask(self, qlen, mlen): method cache_mem (line 511) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 533) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 543) | def relative_positional_encoding(self, qlen, klen, bsz=None): method call (line 584) | def call( class TFXLNetPreTrainedModel (line 799) | class TFXLNetPreTrainedModel(TFPreTrainedModel): class TFXLNetModelOutput (line 810) | class TFXLNetModelOutput(ModelOutput): class TFXLNetLMHeadModelOutput (line 844) | class TFXLNetLMHeadModelOutput(ModelOutput): class TFXLNetForSequenceClassificationOutput (line 881) | class TFXLNetForSequenceClassificationOutput(ModelOutput): class TFXLNetForTokenClassificationOutput (line 915) | class TFXLNetForTokenClassificationOutput(ModelOutput): class TFXLNetForMultipleChoiceOutput (line 949) | class TFXLNetForMultipleChoiceOutput(ModelOutput): class TFXLNetForQuestionAnsweringSimpleOutput (line 985) | class TFXLNetForQuestionAnsweringSimpleOutput(ModelOutput): class TFXLNetModel (line 1140) | class TFXLNetModel(TFXLNetPreTrainedModel): method __init__ (line 1141) | def __init__(self, config, *inputs, **kwargs): method call (line 1153) | def call( method serving_output (line 1189) | def serving_output(self, output): class TFXLNetLMHeadModel (line 1205) | class TFXLNetLMHeadModel(TFXLNetPreTrainedModel, TFCausalLanguageModelin... method __init__ (line 1206) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1213) | def get_lm_head(self): method get_prefix_bias_name (line 1216) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1220) | def prepare_inputs_for_generation(self, inputs, past=None, use_mems=No... method call (line 1262) | def call( method serving_output (line 1357) | def serving_output(self, output): class TFXLNetForSequenceClassification (line 1372) | class TFXLNetForSequenceClassification(TFXLNetPreTrainedModel, TFSequenc... method __init__ (line 1373) | def __init__(self, config, *inputs, **kwargs): method call (line 1393) | def call( method serving_output (line 1452) | def serving_output(self, output): class TFXLNetForMultipleChoice (line 1469) | class TFXLNetForMultipleChoice(TFXLNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 1470) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1482) | def dummy_inputs(self): method call (line 1499) | def call( method serving (line 1582) | def serving(self, inputs): method serving_output (line 1587) | def serving_output(self, output): class TFXLNetForTokenClassification (line 1602) | class TFXLNetForTokenClassification(TFXLNetPreTrainedModel, TFTokenClass... method __init__ (line 1603) | def __init__(self, config, *inputs, **kwargs): method call (line 1620) | def call( method serving_output (line 1675) | def serving_output(self, output): class TFXLNetForQuestionAnsweringSimple (line 1690) | class TFXLNetForQuestionAnsweringSimple(TFXLNetPreTrainedModel, TFQuesti... method __init__ (line 1691) | def __init__(self, config, *inputs, **kwargs): method call (line 1706) | def call( method serving_output (line 1777) | def serving_output(self, output): FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/modeling_xlnet.py function build_tf_xlnet_to_pytorch_map (line 54) | def build_tf_xlnet_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_xlnet (line 137) | def load_tf_weights_in_xlnet(model, config, tf_path): class XLNetRelativeAttention (line 204) | class XLNetRelativeAttention(nn.Module): method __init__ (line 205) | def __init__(self, config): method prune_heads (line 233) | def prune_heads(self, heads): method rel_shift (line 237) | def rel_shift(x, klen=-1): method rel_shift_bnij (line 250) | def rel_shift_bnij(x, klen=-1): method rel_attn_core (line 264) | def rel_attn_core( method post_attention (line 316) | def post_attention(self, h, attn_vec, residual=True): method forward (line 328) | def forward( class XLNetFeedForward (line 464) | class XLNetFeedForward(nn.Module): method __init__ (line 465) | def __init__(self, config): method forward (line 476) | def forward(self, inp): class XLNetLayer (line 487) | class XLNetLayer(nn.Module): method __init__ (line 488) | def __init__(self, config): method forward (line 496) | def forward( method ff_chunk (line 532) | def ff_chunk(self, output_x): class XLNetPreTrainedModel (line 537) | class XLNetPreTrainedModel(PreTrainedModel): method _init_weights (line 547) | def _init_weights(self, module): class XLNetModelOutput (line 580) | class XLNetModelOutput(ModelOutput): class XLNetLMHeadModelOutput (line 614) | class XLNetLMHeadModelOutput(ModelOutput): class XLNetForSequenceClassificationOutput (line 651) | class XLNetForSequenceClassificationOutput(ModelOutput): class XLNetForTokenClassificationOutput (line 685) | class XLNetForTokenClassificationOutput(ModelOutput): class XLNetForMultipleChoiceOutput (line 719) | class XLNetForMultipleChoiceOutput(ModelOutput): class XLNetForQuestionAnsweringSimpleOutput (line 755) | class XLNetForQuestionAnsweringSimpleOutput(ModelOutput): class XLNetForQuestionAnsweringOutput (line 792) | class XLNetForQuestionAnsweringOutput(ModelOutput): class XLNetModel (line 932) | class XLNetModel(XLNetPreTrainedModel): method __init__ (line 933) | def __init__(self, config): method get_input_embeddings (line 953) | def get_input_embeddings(self): method set_input_embeddings (line 956) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 959) | def _prune_heads(self, heads_to_prune): method create_mask (line 962) | def create_mask(self, qlen, mlen): method cache_mem (line 991) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 1013) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 1023) | def relative_positional_encoding(self, qlen, klen, bsz=None): method forward (line 1068) | def forward( class XLNetLMHeadModel (line 1298) | class XLNetLMHeadModel(XLNetPreTrainedModel): method __init__ (line 1299) | def __init__(self, config): method get_output_embeddings (line 1310) | def get_output_embeddings(self): method set_output_embeddings (line 1313) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1316) | def prepare_inputs_for_generation(self, input_ids, past=None, use_mems... method forward (line 1360) | def forward( method _reorder_cache (line 1486) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class XLNetForSequenceClassification (line 1502) | class XLNetForSequenceClassification(XLNetPreTrainedModel): method __init__ (line 1503) | def __init__(self, config): method forward (line 1522) | def forward( class XLNetForTokenClassification (line 1612) | class XLNetForTokenClassification(XLNetPreTrainedModel): method __init__ (line 1613) | def __init__(self, config): method forward (line 1630) | def forward( class XLNetForMultipleChoice (line 1700) | class XLNetForMultipleChoice(XLNetPreTrainedModel): method __init__ (line 1701) | def __init__(self, config): method forward (line 1718) | def forward( class XLNetForQuestionAnsweringSimple (line 1804) | class XLNetForQuestionAnsweringSimple(XLNetPreTrainedModel): method __init__ (line 1805) | def __init__(self, config): method forward (line 1822) | def forward( class XLNetForQuestionAnswering (line 1915) | class XLNetForQuestionAnswering(XLNetPreTrainedModel): method __init__ (line 1916) | def __init__(self, config): method forward (line 1931) | def forward( FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/tokenization_xlnet.py class XLNetTokenizer (line 53) | class XLNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method vocab_size (line 182) | def vocab_size(self): method get_vocab (line 185) | def get_vocab(self): method __getstate__ (line 190) | def __getstate__(self): method __setstate__ (line 195) | def __setstate__(self, d): method preprocess_text (line 205) | def preprocess_text(self, inputs): method _tokenize (line 220) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 240) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 244) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 248) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 253) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 278) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 306) | def create_token_type_ids_from_sequences( method save_vocabulary (line 336) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/xlnet/tokenization_xlnet_fast.py class XLNetTokenizerFast (line 63) | class XLNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 130) | def __init__( method build_inputs_with_special_tokens (line 174) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 199) | def create_token_type_ids_from_sequences( method save_vocabulary (line 229) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: benchmark/third_party/transformers/src/transformers/models/yolos/configuration_yolos.py class YolosConfig (line 35) | class YolosConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class YolosOnnxConfig (line 162) | class YolosOnnxConfig(OnnxConfig): method inputs (line 167) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 175) | def atol_for_validation(self) -> float: method default_onnx_opset (line 179) | def default_onnx_opset(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/models/yolos/convert_yolos_to_pytorch.py function get_yolos_config (line 35) | def get_yolos_config(yolos_name: str) -> YolosConfig: function read_in_q_k_v (line 71) | def read_in_q_k_v(state_dict: dict, config: YolosConfig, base_model: boo... function rename_key (line 89) | def rename_key(name: str) -> str: function convert_state_dict (line 126) | def convert_state_dict(orig_state_dict: dict, model: YolosForObjectDetec... function prepare_img (line 151) | def prepare_img() -> torch.Tensor: function convert_yolos_checkpoint (line 158) | def convert_yolos_checkpoint( FILE: benchmark/third_party/transformers/src/transformers/models/yolos/feature_extraction_yolos.py function center_to_corners_format (line 40) | def center_to_corners_format(x): function corners_to_center_format (line 51) | def corners_to_center_format(x): function masks_to_boxes (line 63) | def masks_to_boxes(masks): function rgb_to_id (line 97) | def rgb_to_id(color): function id_to_rgb (line 106) | def id_to_rgb(id_map): class YolosFeatureExtractor (line 122) | class YolosFeatureExtractor(FeatureExtractionMixin, ImageFeatureExtracti... method __init__ (line 155) | def __init__( method _is_valid_format (line 176) | def _is_valid_format(self, format): method prepare (line 182) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 193) | def convert_coco_poly_to_mask(self, segmentations, height, width): method prepare_coco_detection (line 217) | def prepare_coco_detection(self, image, target, return_segmentation_ma... method prepare_coco_panoptic (line 282) | def prepare_coco_panoptic(self, image, target, masks_path, return_mask... method _resize (line 316) | def _resize(self, image, size, target=None, max_size=None): method _normalize (line 387) | def _normalize(self, image, mean, std, target=None): method __call__ (line 409) | def __call__( method _max_by_axis (line 617) | def _max_by_axis(self, the_list): method pad (line 625) | def pad(self, pixel_values_list: List["torch.Tensor"], return_tensors:... method post_process (line 659) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 703) | def post_process_object_detection( FILE: benchmark/third_party/transformers/src/transformers/models/yolos/modeling_yolos.py class YolosObjectDetectionOutput (line 70) | class YolosObjectDetectionOutput(ModelOutput): class YolosEmbeddings (line 114) | class YolosEmbeddings(nn.Module): method __init__ (line 120) | def __init__(self, config: YolosConfig) -> None: method forward (line 135) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class InterpolateInitialPositionEmbeddings (line 157) | class InterpolateInitialPositionEmbeddings(nn.Module): method __init__ (line 158) | def __init__(self, config) -> None: method forward (line 162) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class InterpolateMidPositionEmbeddings (line 186) | class InterpolateMidPositionEmbeddings(nn.Module): method __init__ (line 187) | def __init__(self, config) -> None: method forward (line 191) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class YolosPatchEmbeddings (line 219) | class YolosPatchEmbeddings(nn.Module): method __init__ (line 226) | def __init__(self, config): method forward (line 241) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class YolosSelfAttention (line 253) | class YolosSelfAttention(nn.Module): method __init__ (line 254) | def __init__(self, config: YolosConfig) -> None: method transpose_for_scores (line 272) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 277) | def forward( class YolosSelfOutput (line 314) | class YolosSelfOutput(nn.Module): method __init__ (line 320) | def __init__(self, config: YolosConfig) -> None: method forward (line 325) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosAttention (line 334) | class YolosAttention(nn.Module): method __init__ (line 335) | def __init__(self, config: YolosConfig) -> None: method prune_heads (line 341) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 359) | def forward( class YolosIntermediate (line 374) | class YolosIntermediate(nn.Module): method __init__ (line 375) | def __init__(self, config: YolosConfig) -> None: method forward (line 383) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YolosOutput (line 392) | class YolosOutput(nn.Module): method __init__ (line 393) | def __init__(self, config: YolosConfig) -> None: method forward (line 398) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosLayer (line 408) | class YolosLayer(nn.Module): method __init__ (line 411) | def __init__(self, config: YolosConfig) -> None: method forward (line 421) | def forward( class YolosEncoder (line 450) | class YolosEncoder(nn.Module): method __init__ (line 451) | def __init__(self, config: YolosConfig) -> None: method forward (line 475) | def forward( class YolosPreTrainedModel (line 534) | class YolosPreTrainedModel(PreTrainedModel): method _init_weights (line 545) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 557) | def _set_gradient_checkpointing(self, module: YolosEncoder, value: boo... class YolosModel (line 600) | class YolosModel(YolosPreTrainedModel): method __init__ (line 601) | def __init__(self, config: YolosConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 614) | def get_input_embeddings(self) -> YolosPatchEmbeddings: method _prune_heads (line 617) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 637) | def forward( class YolosPooler (line 688) | class YolosPooler(nn.Module): method __init__ (line 689) | def __init__(self, config: YolosConfig): method forward (line 694) | def forward(self, hidden_states): class YolosForObjectDetection (line 709) | class YolosForObjectDetection(YolosPreTrainedModel): method __init__ (line 710) | def __init__(self, config: YolosConfig): method _set_aux_loss (line 730) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 738) | def forward( function dice_loss (line 867) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 887) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class YolosLoss (line 919) | class YolosLoss(nn.Module): method __init__ (line 944) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 955) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 977) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 992) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1016) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1049) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1055) | def _get_target_permutation_idx(self, indices): method get_loss (line 1061) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1072) | def forward(self, outputs, targets): class YolosMLPPredictionHead (line 1118) | class YolosMLPPredictionHead(nn.Module): method __init__ (line 1127) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1133) | def forward(self, x): class YolosHungarianMatcher (line 1140) | class YolosHungarianMatcher(nn.Module): method __init__ (line 1157) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1168) | def forward(self, outputs, targets): function _upcast (line 1219) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1228) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1245) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1262) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1287) | def _max_by_axis(the_list): class NestedTensor (line 1297) | class NestedTensor(object): method __init__ (line 1298) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1302) | def to(self, device): method decompose (line 1311) | def decompose(self): method __repr__ (line 1314) | def __repr__(self): function nested_tensor_from_tensor_list (line 1319) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: benchmark/third_party/transformers/src/transformers/models/yoso/configuration_yoso.py class YosoConfig (line 29) | class YosoConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/models/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: benchmark/third_party/transformers/src/transformers/models/yoso/modeling_yoso.py function load_cuda_kernels (line 54) | def load_cuda_kernels(): function to_contiguous (line 77) | def to_contiguous(input_tensors): function normalize (line 91) | def normalize(input_tensors): function hashing (line 101) | def hashing(query, key, num_hash, hash_len): class YosoCumulation (line 121) | class YosoCumulation(torch.autograd.Function): method forward (line 123) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 136) | def backward(ctx, grad): class YosoLSHCumulation (line 152) | class YosoLSHCumulation(torch.autograd.Function): method forward (line 154) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 192) | def backward(ctx, grad): class YosoEmbeddings (line 242) | class YosoEmbeddings(nn.Module): method __init__ (line 245) | def __init__(self, config): method forward (line 265) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class YosoSelfAttention (line 300) | class YosoSelfAttention(nn.Module): method __init__ (line 301) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 346) | def transpose_for_scores(self, layer): method forward (line 351) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoSelfOutput (line 434) | class YosoSelfOutput(nn.Module): method __init__ (line 435) | def __init__(self, config): method forward (line 441) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoAttention (line 448) | class YosoAttention(nn.Module): method __init__ (line 449) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 455) | def prune_heads(self, heads): method forward (line 473) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoIntermediate (line 481) | class YosoIntermediate(nn.Module): method __init__ (line 482) | def __init__(self, config): method forward (line 490) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YosoOutput (line 497) | class YosoOutput(nn.Module): method __init__ (line 498) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoLayer (line 511) | class YosoLayer(nn.Module): method __init__ (line 512) | def __init__(self, config): method forward (line 521) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 534) | def feed_forward_chunk(self, attention_output): class YosoEncoder (line 540) | class YosoEncoder(nn.Module): method __init__ (line 541) | def __init__(self, config): method forward (line 547) | def forward( class YosoPredictionHeadTransform (line 596) | class YosoPredictionHeadTransform(nn.Module): method __init__ (line 597) | def __init__(self, config): method forward (line 606) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YosoLMPredictionHead (line 614) | class YosoLMPredictionHead(nn.Module): method __init__ (line 615) | def __init__(self, config): method forward (line 628) | def forward(self, hidden_states): class YosoOnlyMLMHead (line 635) | class YosoOnlyMLMHead(nn.Module): method __init__ (line 636) | def __init__(self, config): method forward (line 640) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class YosoPreTrainedModel (line 645) | class YosoPreTrainedModel(PreTrainedModel): method _init_weights (line 656) | def _init_weights(self, module): method _set_gradient_checkpointing (line 672) | def _set_gradient_checkpointing(self, module, value=False): class YosoModel (line 742) | class YosoModel(YosoPreTrainedModel): method __init__ (line 743) | def __init__(self, config): method get_input_embeddings (line 753) | def get_input_embeddings(self): method set_input_embeddings (line 756) | def set_input_embeddings(self, value): method _prune_heads (line 759) | def _prune_heads(self, heads_to_prune): method forward (line 774) | def forward( class YosoForMaskedLM (line 854) | class YosoForMaskedLM(YosoPreTrainedModel): method __init__ (line 855) | def __init__(self, config): method get_output_embeddings (line 864) | def get_output_embeddings(self): method set_output_embeddings (line 867) | def set_output_embeddings(self, new_embeddings): method forward (line 877) | def forward( class YosoClassificationHead (line 930) | class YosoClassificationHead(nn.Module): method __init__ (line 933) | def __init__(self, config): method forward (line 941) | def forward(self, features, **kwargs): class YosoForSequenceClassification (line 956) | class YosoForSequenceClassification(YosoPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method forward (line 973) | def forward( class YosoForMultipleChoice (line 1048) | class YosoForMultipleChoice(YosoPreTrainedModel): method __init__ (line 1049) | def __init__(self, config): method forward (line 1066) | def forward( class YosoForTokenClassification (line 1140) | class YosoForTokenClassification(YosoPreTrainedModel): method __init__ (line 1141) | def __init__(self, config): method forward (line 1159) | def forward( class YosoForQuestionAnswering (line 1226) | class YosoForQuestionAnswering(YosoPreTrainedModel): method __init__ (line 1227) | def __init__(self, config): method forward (line 1246) | def forward( FILE: benchmark/third_party/transformers/src/transformers/onnx/__main__.py function main (line 28) | def main(): FILE: benchmark/third_party/transformers/src/transformers/onnx/config.py class PatchingSpec (line 47) | class PatchingSpec: class OnnxConfig (line 67) | class OnnxConfig(ABC): method __init__ (line 110) | def __init__(self, config: "PretrainedConfig", task: str = "default", ... method from_model_config (line 127) | def from_model_config(cls, config: "PretrainedConfig", task: str = "de... method inputs (line 141) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 151) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method values_override (line 162) | def values_override(self) -> Optional[Mapping[str, Any]]: method default_batch_size (line 175) | def default_batch_size(self) -> int: method default_sequence_length (line 186) | def default_sequence_length(self) -> int: method default_num_choices (line 196) | def default_num_choices(self) -> int: method default_onnx_opset (line 206) | def default_onnx_opset(self) -> int: method atol_for_validation (line 216) | def atol_for_validation(self) -> float: method is_torch_support_available (line 226) | def is_torch_support_available(self) -> bool: method use_external_data_format (line 241) | def use_external_data_format(num_parameters: int) -> bool: method _generate_dummy_images (line 257) | def _generate_dummy_images( method _generate_dummy_audio (line 266) | def _generate_dummy_audio( method generate_dummy_inputs (line 279) | def generate_dummy_inputs( method generate_dummy_inputs_onnxruntime (line 388) | def generate_dummy_inputs_onnxruntime(self, reference_model_inputs: Ma... method patch_ops (line 402) | def patch_ops(self): method restore_ops (line 407) | def restore_ops(self): method flatten_output_collection_property (line 413) | def flatten_output_collection_property(cls, name: str, field: Iterable... class OnnxConfigWithPast (line 431) | class OnnxConfigWithPast(OnnxConfig, ABC): method __init__ (line 432) | def __init__( method with_past (line 443) | def with_past(cls, config: "PretrainedConfig", task: str = "default") ... method outputs (line 456) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method values_override (line 464) | def values_override(self) -> Optional[Mapping[str, Any]]: method num_layers (line 471) | def num_layers(self) -> int: method num_attention_heads (line 484) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 496) | def generate_dummy_inputs( method fill_with_past_key_values_ (line 538) | def fill_with_past_key_values_( method _flatten_past_key_values_ (line 563) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method flatten_output_collection_property (line 567) | def flatten_output_collection_property(self, name: str, field: Iterabl... class OnnxSeq2SeqConfigWithPast (line 578) | class OnnxSeq2SeqConfigWithPast(OnnxConfigWithPast): method outputs (line 580) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 597) | def num_layers(self) -> Tuple[int]: method num_attention_heads (line 613) | def num_attention_heads(self) -> Tuple[int]: method generate_dummy_inputs (line 628) | def generate_dummy_inputs( method fill_with_past_key_values_ (line 697) | def fill_with_past_key_values_(self, inputs_or_outputs: Mapping[str, M... method _flatten_past_key_values_ (line 725) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: benchmark/third_party/transformers/src/transformers/onnx/convert.py function check_onnxruntime_requirements (line 55) | def check_onnxruntime_requirements(minimum_version: Version): function export_pytorch (line 84) | def export_pytorch( function export_tensorflow (line 222) | def export_tensorflow( function export (line 289) | def export( function validate_model_outputs (line 358) | def validate_model_outputs( function ensure_model_and_config_inputs_match (line 481) | def ensure_model_and_config_inputs_match( FILE: benchmark/third_party/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 534) | def get_supported_features_for_model_type( method feature_to_task (line 560) | def feature_to_task(feature: str) -> str: method _validate_framework_choice (line 564) | def _validate_framework_choice(framework: str): method get_model_class_for_feature (line 579) | def get_model_class_for_feature(feature: str, framework: str = "pt") -... method determine_framework (line 606) | def determine_framework(model: str, framework: str = None) -> str: method get_model_from_feature (line 656) | def get_model_from_feature( method check_supported_model_or_raise (line 689) | def check_supported_model_or_raise( method get_config (line 713) | def get_config(model_type: str, feature: str) -> OnnxConfig: FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/optimization.py function get_constant_schedule (line 34) | def get_constant_schedule(optimizer: Optimizer, last_epoch: int = -1): function get_constant_schedule_with_warmup (line 50) | def get_constant_schedule_with_warmup(optimizer: Optimizer, num_warmup_s... function get_linear_schedule_with_warmup (line 75) | def get_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_tra... function get_cosine_schedule_with_warmup (line 104) | def get_cosine_schedule_with_warmup( function get_cosine_with_hard_restarts_schedule_with_warmup (line 138) | def get_cosine_with_hard_restarts_schedule_with_warmup( function get_polynomial_decay_schedule_with_warmup (line 173) | def get_polynomial_decay_schedule_with_warmup( function get_scheduler (line 233) | def get_scheduler( class AdamW (line 273) | class AdamW(Optimizer): method __init__ (line 295) | def __init__( method step (line 324) | def step(self, closure: Callable = None): class Adafactor (line 386) | class Adafactor(Optimizer): method __init__ (line 471) | def __init__( method _get_lr (line 504) | def _get_lr(param_group, param_state): method _get_options (line 515) | def _get_options(param_group, param_shape): method _rms (line 521) | def _rms(tensor): method _approx_sq_grad (line 525) | def _approx_sq_grad(exp_avg_sq_row, exp_avg_sq_col): method step (line 532) | def step(self, closure=None): class AdafactorSchedule (line 626) | class AdafactorSchedule(LambdaLR): method __init__ (line 634) | def __init__(self, optimizer, initial_lr=0.0): method get_lr (line 644) | def get_lr(self): function get_adafactor_schedule (line 656) | def get_adafactor_schedule(optimizer, initial_lr=0.0): FILE: benchmark/third_party/transformers/src/transformers/optimization_tf.py class WarmUp (line 24) | class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule): method __init__ (line 42) | def __init__( method __call__ (line 57) | def __call__(self, step): method get_config (line 72) | def get_config(self): function create_optimizer (line 82) | def create_optimizer( class AdamWeightDecay (line 166) | class AdamWeightDecay(tf.keras.optimizers.Adam): method __init__ (line 205) | def __init__( method from_config (line 224) | def from_config(cls, config): method _prepare_local (line 229) | def _prepare_local(self, var_device, var_dtype, apply_state): method _decay_weights_op (line 235) | def _decay_weights_op(self, var, learning_rate, apply_state): method apply_gradients (line 244) | def apply_gradients(self, grads_and_vars, name=None, **kwargs): method _get_lr (line 248) | def _get_lr(self, var_device, var_dtype, apply_state): method _resource_apply_dense (line 261) | def _resource_apply_dense(self, grad, var, apply_state=None): method _resource_apply_sparse (line 267) | def _resource_apply_sparse(self, grad, var, indices, apply_state=None): method get_config (line 273) | def get_config(self): method _do_use_weight_decay (line 278) | def _do_use_weight_decay(self, param_name): class GradientAccumulator (line 296) | class GradientAccumulator(object): method __init__ (line 307) | def __init__(self): method step (line 313) | def step(self): method gradients (line 326) | def gradients(self): method __call__ (line 332) | def __call__(self, gradients): method reset (line 358) | def reset(self): FILE: benchmark/third_party/transformers/src/transformers/pipelines/__init__.py function get_supported_tasks (line 383) | def get_supported_tasks() -> List[str]: function get_task (line 390) | def get_task(model: str, use_auth_token: Optional[str] = None) -> str: function check_task (line 413) | def check_task(task: str) -> Tuple[str, Dict, Any]: function clean_custom_task (line 450) | def clean_custom_task(task_info): function pipeline (line 466) | def pipeline( FILE: benchmark/third_party/transformers/src/transformers/pipelines/audio_classification.py function ffmpeg_read (line 29) | def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array: class AudioClassificationPipeline (line 66) | class AudioClassificationPipeline(Pipeline): method __init__ (line 79) | def __init__(self, *args, **kwargs): method __call__ (line 89) | def __call__( method _sanitize_parameters (line 118) | def _sanitize_parameters(self, top_k=None, **kwargs): method preprocess (line 127) | def preprocess(self, inputs): method _forward (line 145) | def _forward(self, model_inputs): method postprocess (line 149) | def postprocess(self, model_outputs, top_k=5): FILE: benchmark/third_party/transformers/src/transformers/pipelines/audio_utils.py function ffmpeg_read (line 8) | def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array: function ffmpeg_microphone (line 43) | def ffmpeg_microphone( function ffmpeg_microphone_live (line 96) | def ffmpeg_microphone_live( function chunk_bytes_iter (line 168) | def chunk_bytes_iter(iterator, chunk_len: int, stride: Tuple[int, int], ... function _ffmpeg_stream (line 203) | def _ffmpeg_stream(ffmpeg_command, buflen: int): FILE: benchmark/third_party/transformers/src/transformers/pipelines/automatic_speech_recognition.py function rescale_stride (line 34) | def rescale_stride(tokens_or_logits, stride, ratio): function chunk_iter (line 54) | def chunk_iter(inputs, feature_extractor, chunk_len, stride_left, stride... class AutomaticSpeechRecognitionPipeline (line 68) | class AutomaticSpeechRecognitionPipeline(ChunkPipeline): method __init__ (line 121) | def __init__(self, feature_extractor: Union["SequenceFeatureExtractor"... method __call__ (line 142) | def __call__( method _sanitize_parameters (line 185) | def _sanitize_parameters(self, **kwargs): method preprocess (line 201) | def preprocess(self, inputs, chunk_length_s=0, stride_length_s=None): method _forward (line 288) | def _forward(self, model_inputs): method postprocess (line 344) | def postprocess(self, model_outputs, decoder_kwargs: Optional[Dict] = ... FILE: benchmark/third_party/transformers/src/transformers/pipelines/base.py function no_collate_fn (line 67) | def no_collate_fn(items): function _pad (line 73) | def _pad(items, key, padding_value, padding_side): function pad_collate_fn (line 112) | def pad_collate_fn(tokenizer, feature_extractor): function infer_framework_load_model (line 175) | def infer_framework_load_model( function infer_framework_from_model (line 272) | def infer_framework_from_model( function get_framework (line 311) | def get_framework(model, revision: Optional[str] = None): function get_default_model_and_revision (line 345) | def get_default_model_and_revision( class PipelineException (line 389) | class PipelineException(Exception): method __init__ (line 399) | def __init__(self, task: str, model: str, reason: str): class ArgumentHandler (line 406) | class ArgumentHandler(ABC): method __call__ (line 412) | def __call__(self, *args, **kwargs): class PipelineDataFormat (line 416) | class PipelineDataFormat: method __init__ (line 438) | def __init__( method __iter__ (line 462) | def __iter__(self): method save (line 466) | def save(self, data: Union[dict, List[dict]]): method save_binary (line 475) | def save_binary(self, data: Union[dict, List[dict]]) -> str: method from_str (line 494) | def from_str( class CsvPipelineDataFormat (line 529) | class CsvPipelineDataFormat(PipelineDataFormat): method __init__ (line 541) | def __init__( method __iter__ (line 550) | def __iter__(self): method save (line 559) | def save(self, data: List[dict]): class JsonPipelineDataFormat (line 573) | class JsonPipelineDataFormat(PipelineDataFormat): method __init__ (line 585) | def __init__( method __iter__ (line 597) | def __iter__(self): method save (line 604) | def save(self, data: dict): class PipedPipelineDataFormat (line 615) | class PipedPipelineDataFormat(PipelineDataFormat): method __iter__ (line 629) | def __iter__(self): method save (line 644) | def save(self, data: dict): method save_binary (line 653) | def save_binary(self, data: Union[dict, List[dict]]) -> str: class _ScikitCompat (line 663) | class _ScikitCompat(ABC): method transform (line 669) | def transform(self, X): method predict (line 673) | def predict(self, X): class Pipeline (line 722) | class Pipeline(_ScikitCompat): method __init__ (line 741) | def __init__( method save_pretrained (line 790) | def save_pretrained(self, save_directory: str): method transform (line 835) | def transform(self, X): method predict (line 841) | def predict(self, X): method device_placement (line 848) | def device_placement(self): method ensure_tensor_on_device (line 873) | def ensure_tensor_on_device(self, **inputs): method _ensure_tensor_on_device (line 887) | def _ensure_tensor_on_device(self, inputs, device): method check_model_type (line 907) | def check_model_type(self, supported_models: Union[List[str], dict]): method _sanitize_parameters (line 931) | def _sanitize_parameters(self, **pipeline_parameters): method preprocess (line 944) | def preprocess(self, input_: Any, **preprocess_parameters: Dict) -> Di... method _forward (line 952) | def _forward(self, input_tensors: Dict[str, GenericTensor], **forward_... method postprocess (line 965) | def postprocess(self, model_outputs: ModelOutput, **postprocess_parame... method get_inference_context (line 973) | def get_inference_context(self): method forward (line 981) | def forward(self, model_inputs, **forward_params): method get_iterator (line 996) | def get_iterator( method __call__ (line 1019) | def __call__(self, inputs, *args, num_workers=None, batch_size=None, *... method run_multi (line 1076) | def run_multi(self, inputs, preprocess_params, forward_params, postpro... method run_single (line 1079) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method iterate (line 1085) | def iterate(self, inputs, preprocess_params, forward_params, postproce... class ChunkPipeline (line 1092) | class ChunkPipeline(Pipeline): method run_single (line 1093) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method get_iterator (line 1101) | def get_iterator( class PipelineRegistry (line 1121) | class PipelineRegistry: method __init__ (line 1122) | def __init__(self, supported_tasks: Dict[str, Any], task_aliases: Dict... method get_supported_tasks (line 1126) | def get_supported_tasks(self) -> List[str]: method check_task (line 1131) | def check_task(self, task: str) -> Tuple[str, Dict, Any]: method register_pipeline (line 1150) | def register_pipeline( method to_dict (line 1185) | def to_dict(self): FILE: benchmark/third_party/transformers/src/transformers/pipelines/conversational.py class Conversation (line 18) | class Conversation: method __init__ (line 56) | def __init__( method __eq__ (line 71) | def __eq__(self, other): method add_user_input (line 82) | def add_user_input(self, text: str, overwrite: bool = False): method mark_processed (line 106) | def mark_processed(self): method append_response (line 115) | def append_response(self, response: str): method iter_texts (line 124) | def iter_texts(self): method __repr__ (line 137) | def __repr__(self): class ConversationalPipeline (line 163) | class ConversationalPipeline(Pipeline): method __init__ (line 191) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 196) | def _sanitize_parameters( method __call__ (line 218) | def __call__(self, conversations: Union[Conversation, List[Conversatio... method preprocess (line 244) | def preprocess(self, conversation: Conversation, min_length_for_respon... method _forward (line 264) | def _forward(self, model_inputs, minimum_tokens=10, **generate_kwargs): method postprocess (line 283) | def postprocess(self, model_outputs, clean_up_tokenization_spaces=True): method _legacy_parse_and_tokenize (line 295) | def _legacy_parse_and_tokenize(self, conversation: Conversation) -> Dict: FILE: benchmark/third_party/transformers/src/transformers/pipelines/depth_estimation.py class DepthEstimationPipeline (line 23) | class DepthEstimationPipeline(Pipeline): method __init__ (line 33) | def __init__(self, *args, **kwargs): method __call__ (line 38) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method _sanitize_parameters (line 69) | def _sanitize_parameters(self, **kwargs): method preprocess (line 72) | def preprocess(self, image): method _forward (line 78) | def _forward(self, model_inputs): method postprocess (line 82) | def postprocess(self, model_outputs): FILE: benchmark/third_party/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 117) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 131) | def _sanitize_parameters( method __call__ (line 171) | def __call__( method preprocess (line 247) | def preprocess( method _forward (line 391) | def _forward(self, model_inputs): method postprocess (line 410) | def postprocess(self, model_outputs, top_k=1, **kwargs): method postprocess_encoder_decoder_single (line 419) | def postprocess_encoder_decoder_single(self, model_outputs, **kwargs): method postprocess_extractive_qa (line 435) | def postprocess_extractive_qa( FILE: benchmark/third_party/transformers/src/transformers/pipelines/feature_extraction.py class FeatureExtractionPipeline (line 7) | class FeatureExtractionPipeline(Pipeline): method _sanitize_parameters (line 45) | def _sanitize_parameters(self, truncation=None, tokenize_kwargs=None, ... method preprocess (line 64) | def preprocess(self, inputs, **tokenize_kwargs) -> Dict[str, GenericTe... method _forward (line 69) | def _forward(self, model_inputs): method postprocess (line 73) | def postprocess(self, model_outputs, return_tensors=False): method __call__ (line 82) | def __call__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/pipelines/fill_mask.py class FillMaskPipeline (line 34) | class FillMaskPipeline(Pipeline): method get_masked_index (line 54) | def get_masked_index(self, input_ids: GenericTensor) -> np.ndarray: method _ensure_exactly_one_mask_token (line 63) | def _ensure_exactly_one_mask_token(self, input_ids: GenericTensor) -> ... method ensure_exactly_one_mask_token (line 73) | def ensure_exactly_one_mask_token(self, model_inputs: GenericTensor): method preprocess (line 81) | def preprocess(self, inputs, return_tensors=None, **preprocess_paramet... method _forward (line 88) | def _forward(self, model_inputs): method postprocess (line 93) | def postprocess(self, model_outputs, top_k=5, target_ids=None): method get_target_ids (line 148) | def get_target_ids(self, targets, top_k=None): method _sanitize_parameters (line 189) | def _sanitize_parameters(self, top_k=None, targets=None): method __call__ (line 205) | def __call__(self, inputs, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/pipelines/image_classification.py class ImageClassificationPipeline (line 32) | class ImageClassificationPipeline(Pipeline): method __init__ (line 44) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 53) | def _sanitize_parameters(self, top_k=None): method __call__ (line 59) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 90) | def preprocess(self, image): method _forward (line 95) | def _forward(self, model_inputs): method postprocess (line 99) | def postprocess(self, model_outputs, top_k=5): FILE: benchmark/third_party/transformers/src/transformers/pipelines/image_segmentation.py class ImageSegmentationPipeline (line 30) | class ImageSegmentationPipeline(Pipeline): method __init__ (line 42) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 57) | def _sanitize_parameters(self, **kwargs): method __call__ (line 70) | def __call__(self, images, **kwargs) -> Union[Predictions, List[Predic... method preprocess (line 111) | def preprocess(self, image): method _forward (line 118) | def _forward(self, model_inputs): method postprocess (line 124) | def postprocess( FILE: benchmark/third_party/transformers/src/transformers/pipelines/image_to_text.py class ImageToTextPipeline (line 29) | class ImageToTextPipeline(Pipeline): method __init__ (line 40) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 47) | def _sanitize_parameters(self, max_new_tokens=None, generate_kwargs=No... method __call__ (line 62) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 89) | def preprocess(self, image): method _forward (line 94) | def _forward(self, model_inputs, generate_kwargs=None): method postprocess (line 105) | def postprocess(self, model_outputs): FILE: benchmark/third_party/transformers/src/transformers/pipelines/object_detection.py class ObjectDetectionPipeline (line 24) | class ObjectDetectionPipeline(Pipeline): method __init__ (line 35) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 44) | def _sanitize_parameters(self, **kwargs): method __call__ (line 50) | def __call__(self, *args, **kwargs) -> Union[Predictions, List[Predict... method preprocess (line 81) | def preprocess(self, image): method _forward (line 88) | def _forward(self, model_inputs): method postprocess (line 94) | def postprocess(self, model_outputs, threshold=0.9): method _get_bounding_box (line 116) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: FILE: benchmark/third_party/transformers/src/transformers/pipelines/pt_utils.py class PipelineDataset (line 6) | class PipelineDataset(Dataset): method __init__ (line 7) | def __init__(self, dataset, process, params): method __len__ (line 12) | def __len__(self): method __getitem__ (line 15) | def __getitem__(self, i): class PipelineIterator (line 21) | class PipelineIterator(IterableDataset): method __init__ (line 22) | def __init__(self, loader, infer, params, loader_batch_size=None): method __len__ (line 61) | def __len__(self): method __iter__ (line 64) | def __iter__(self): method loader_batch_item (line 68) | def loader_batch_item(self): method __next__ (line 107) | def __next__(self): class PipelineChunkIterator (line 141) | class PipelineChunkIterator(PipelineIterator): method __init__ (line 142) | def __init__(self, loader, infer, params, loader_batch_size=None): method __iter__ (line 162) | def __iter__(self): method __next__ (line 167) | def __next__(self): class PipelinePackIterator (line 186) | class PipelinePackIterator(PipelineIterator): method __iter__ (line 232) | def __iter__(self): method __next__ (line 236) | def __next__(self): class KeyDataset (line 286) | class KeyDataset(Dataset): method __init__ (line 287) | def __init__(self, dataset: Dataset, key: str): method __len__ (line 291) | def __len__(self): method __getitem__ (line 294) | def __getitem__(self, i): class KeyPairDataset (line 298) | class KeyPairDataset(Dataset): method __init__ (line 299) | def __init__(self, dataset: Dataset, key1: str, key2: str): method __len__ (line 304) | def __len__(self): method __getitem__ (line 307) | def __getitem__(self, i): FILE: benchmark/third_party/transformers/src/transformers/pipelines/question_answering.py function decode_spans (line 45) | def decode_spans( function select_starts_ends (line 95) | def select_starts_ends( class QuestionAnsweringArgumentHandler (line 149) | class QuestionAnsweringArgumentHandler(ArgumentHandler): method normalize (line 158) | def normalize(self, item): method __call__ (line 173) | def __call__(self, *args, **kwargs): class QuestionAnsweringPipeline (line 224) | class QuestionAnsweringPipeline(ChunkPipeline): method __init__ (line 240) | def __init__( method create_sample (line 266) | def create_sample( method _sanitize_parameters (line 287) | def _sanitize_parameters( method __call__ (line 330) | def __call__(self, *args, **kwargs): method preprocess (line 383) | def preprocess(self, example, padding="do_not_pad", doc_stride=None, m... method _forward (line 497) | def _forward(self, inputs): method postprocess (line 503) | def postprocess( method get_indices (line 588) | def get_indices( method span_to_answer (line 606) | def span_to_answer(self, text: str, start: int, end: int) -> Dict[str,... FILE: benchmark/third_party/transformers/src/transformers/pipelines/table_question_answering.py class TableQuestionAnsweringArgumentHandler (line 35) | class TableQuestionAnsweringArgumentHandler(ArgumentHandler): method __call__ (line 40) | def __call__(self, table=None, query=None, **kwargs): class TableQuestionAnsweringPipeline (line 89) | class TableQuestionAnsweringPipeline(Pipeline): method __init__ (line 104) | def __init__(self, args_parser=TableQuestionAnsweringArgumentHandler()... method batch_inference (line 124) | def batch_inference(self, **inputs): method sequential_inference (line 127) | def sequential_inference(self, **inputs): method __call__ (line 256) | def __call__(self, *args, **kwargs): method _sanitize_parameters (line 338) | def _sanitize_parameters(self, sequential=None, padding=None, truncati... method preprocess (line 350) | def preprocess(self, pipeline_input, sequential=None, padding=True, tr... method _forward (line 366) | def _forward(self, model_inputs, sequential=False): method postprocess (line 379) | def postprocess(self, model_outputs): FILE: benchmark/third_party/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 49) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 58) | def _sanitize_parameters( method check_inputs (line 94) | def check_inputs(self, input_length: int, min_length: int, max_length:... method _parse_and_tokenize (line 100) | def _parse_and_tokenize(self, *args, truncation): method __call__ (line 121) | def __call__(self, *args, **kwargs): method preprocess (line 159) | def preprocess(self, inputs, truncation=TruncationStrategy.DO_NOT_TRUN... method _forward (line 163) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 180) | def postprocess(self, model_outputs, return_type=ReturnType.TEXT, clea... class SummarizationPipeline (line 198) | class SummarizationPipeline(Text2TextGenerationPipeline): method __call__ (line 226) | def __call__(self, *args, **kwargs): method check_inputs (line 252) | def check_inputs(self, input_length: int, min_length: int, max_length:... class TranslationPipeline (line 267) | class TranslationPipeline(Text2TextGenerationPipeline): method check_inputs (line 289) | def check_inputs(self, input_length: int, min_length: int, max_length:... method preprocess (line 297) | def preprocess(self, *args, truncation=TruncationStrategy.DO_NOT_TRUNC... method _sanitize_parameters (line 305) | def _sanitize_parameters(self, src_lang=None, tgt_lang=None, **kwargs): method __call__ (line 321) | def __call__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/pipelines/text_classification.py function sigmoid (line 17) | def sigmoid(_outputs): function softmax (line 21) | def softmax(_outputs): class ClassificationFunction (line 27) | class ClassificationFunction(ExplicitEnum): class TextClassificationPipeline (line 48) | class TextClassificationPipeline(Pipeline): method __init__ (line 67) | def __init__(self, **kwargs): method _sanitize_parameters (line 76) | def _sanitize_parameters(self, return_all_scores=None, function_to_app... method __call__ (line 106) | def __call__(self, *args, **kwargs): method preprocess (line 149) | def preprocess(self, inputs, **tokenizer_kwargs) -> Dict[str, GenericT... method _forward (line 166) | def _forward(self, model_inputs): method postprocess (line 169) | def postprocess(self, model_outputs, function_to_apply=None, top_k=1, ... FILE: benchmark/third_party/transformers/src/transformers/pipelines/text_generation.py class ReturnType (line 14) | class ReturnType(enum.Enum): class TextGenerationPipeline (line 21) | class TextGenerationPipeline(Pipeline): method __init__ (line 48) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 75) | def _sanitize_parameters( method _parse_and_tokenize (line 138) | def _parse_and_tokenize(self, *args, **kwargs): method __call__ (line 148) | def __call__(self, text_inputs, **kwargs): method preprocess (line 189) | def preprocess(self, prompt_text, prefix="", handle_long_generation=No... method _forward (line 217) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 237) | def postprocess(self, model_outputs, return_type=ReturnType.FULL_TEXT,... FILE: benchmark/third_party/transformers/src/transformers/pipelines/token_classification.py class TokenClassificationArgumentHandler (line 19) | class TokenClassificationArgumentHandler(ArgumentHandler): method __call__ (line 24) | def __call__(self, inputs: Union[str, List[str]], **kwargs): class AggregationStrategy (line 46) | class AggregationStrategy(ExplicitEnum): class TokenClassificationPipeline (line 86) | class TokenClassificationPipeline(Pipeline): method __init__ (line 101) | def __init__(self, args_parser=TokenClassificationArgumentHandler(), *... method _sanitize_parameters (line 112) | def _sanitize_parameters( method __call__ (line 162) | def __call__(self, inputs: Union[str, List[str]], **kwargs): method preprocess (line 194) | def preprocess(self, sentence, offset_mapping=None): method _forward (line 210) | def _forward(self, model_inputs): method postprocess (line 228) | def postprocess(self, model_outputs, aggregation_strategy=AggregationS... method gather_pre_entities (line 254) | def gather_pre_entities( method aggregate (line 316) | def aggregate(self, pre_entities: List[dict], aggregation_strategy: Ag... method aggregate_word (line 338) | def aggregate_word(self, entities: List[dict], aggregation_strategy: A... method aggregate_words (line 368) | def aggregate_words(self, entities: List[dict], aggregation_strategy: ... method group_sub_entities (line 395) | def group_sub_entities(self, entities: List[dict]) -> dict: method get_tag (line 416) | def get_tag(self, entity_name: str) -> Tuple[str, str]: method group_entities (line 430) | def group_entities(self, entities: List[dict]) -> List[dict]: FILE: benchmark/third_party/transformers/src/transformers/pipelines/visual_question_answering.py class VisualQuestionAnsweringPipeline (line 19) | class VisualQuestionAnsweringPipeline(Pipeline): method __init__ (line 32) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 36) | def _sanitize_parameters(self, top_k=None, padding=None, truncation=No... method __call__ (line 46) | def __call__(self, image: Union["Image.Image", str], question: str = N... method preprocess (line 90) | def preprocess(self, inputs, padding=False, truncation=False): method _forward (line 99) | def _forward(self, model_inputs): method postprocess (line 103) | def postprocess(self, model_outputs, top_k=5): FILE: benchmark/third_party/transformers/src/transformers/pipelines/zero_shot_classification.py class ZeroShotClassificationArgumentHandler (line 13) | class ZeroShotClassificationArgumentHandler(ArgumentHandler): method _parse_labels (line 19) | def _parse_labels(self, labels): method __call__ (line 24) | def __call__(self, sequences, labels, hypothesis_template): class ZeroShotClassificationPipeline (line 46) | class ZeroShotClassificationPipeline(ChunkPipeline): method __init__ (line 63) | def __init__(self, args_parser=ZeroShotClassificationArgumentHandler()... method entailment_id (line 73) | def entailment_id(self): method _parse_and_tokenize (line 79) | def _parse_and_tokenize( method _sanitize_parameters (line 121) | def _sanitize_parameters(self, **kwargs): method __call__ (line 139) | def __call__( method preprocess (line 184) | def preprocess(self, inputs, candidate_labels=None, hypothesis_templat... method _forward (line 197) | def _forward(self, inputs): method postprocess (line 211) | def postprocess(self, model_outputs, multi_label=False): FILE: benchmark/third_party/transformers/src/transformers/pipelines/zero_shot_image_classification.py class ZeroShotImageClassificationPipeline (line 31) | class ZeroShotImageClassificationPipeline(ChunkPipeline): method __init__ (line 43) | def __init__(self, **kwargs): method __call__ (line 50) | def __call__(self, images: Union[str, List[str], "Image", List["Image"... method _sanitize_parameters (line 79) | def _sanitize_parameters(self, **kwargs): method preprocess (line 88) | def preprocess(self, image, candidate_labels=None, hypothesis_template... method _forward (line 98) | def _forward(self, model_inputs): method postprocess (line 116) | def postprocess(self, model_outputs): FILE: benchmark/third_party/transformers/src/transformers/pipelines/zero_shot_object_detection.py class ZeroShotObjectDetectionPipeline (line 31) | class ZeroShotObjectDetectionPipeline(Pipeline): method __init__ (line 43) | def __init__(self, **kwargs): method __call__ (line 52) | def __call__( method _sanitize_parameters (line 113) | def _sanitize_parameters(self, **kwargs): method preprocess (line 121) | def preprocess(self, inputs): method _forward (line 134) | def _forward(self, model_inputs): method postprocess (line 142) | def postprocess(self, model_outputs, threshold=0.1, top_k=None): method _get_bounding_box (line 168) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: method _processor (line 190) | def _processor(self, text=None, images=None, padding="max_length", ret... FILE: benchmark/third_party/transformers/src/transformers/processing_utils.py class ProcessorMixin (line 43) | class ProcessorMixin(PushToHubMixin): method __init__ (line 55) | def __init__(self, *args, **kwargs): method __repr__ (line 89) | def __repr__(self): method save_pretrained (line 94) | def save_pretrained(self, save_directory, push_to_hub: bool = False, *... method from_pretrained (line 153) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register_for_auto_class (line 186) | def register_for_auto_class(cls, auto_class="AutoProcessor"): method _get_arguments_from_pretrained (line 212) | def _get_arguments_from_pretrained(cls, pretrained_model_name_or_path,... FILE: benchmark/third_party/transformers/src/transformers/pytorch_utils.py function torch_int_div (line 35) | def torch_int_div(tensor1, tensor2): function softmax_backward_data (line 45) | def softmax_backward_data(parent, grad_output, output, dim, self): function prune_linear_layer (line 57) | def prune_linear_layer(layer: nn.Linear, index: torch.LongTensor, dim: i... class Conv1D (line 91) | class Conv1D(nn.Module): method __init__ (line 102) | def __init__(self, nf, nx): method forward (line 110) | def forward(self, x): function prune_conv1d_layer (line 117) | def prune_conv1d_layer(layer: Conv1D, index: torch.LongTensor, dim: int ... function prune_layer (line 150) | def prune_layer( function apply_chunking_to_forward (line 174) | def apply_chunking_to_forward( function find_pruneable_heads_and_indices (line 249) | def find_pruneable_heads_and_indices( FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/testing_utils.py function parse_flag_from_env (line 105) | def parse_flag_from_env(key, default=False): function parse_int_from_env (line 121) | def parse_int_from_env(key, default=None): function is_pt_tf_cross_test (line 143) | def is_pt_tf_cross_test(test_case): function is_pt_flax_cross_test (line 162) | def is_pt_flax_cross_test(test_case): function is_staging_test (line 181) | def is_staging_test(test_case): function slow (line 198) | def slow(test_case): function tooslow (line 208) | def tooslow(test_case): function custom_tokenizers (line 219) | def custom_tokenizers(test_case): function require_bs4 (line 229) | def require_bs4(test_case): function require_git_lfs (line 236) | def require_git_lfs(test_case): function require_accelerate (line 246) | def require_accelerate(test_case): function require_safetensors (line 253) | def require_safetensors(test_case): function require_rjieba (line 260) | def require_rjieba(test_case): function require_tf2onnx (line 267) | def require_tf2onnx(test_case): function require_onnx (line 271) | def require_onnx(test_case): function require_timm (line 275) | def require_timm(test_case): function require_torch (line 285) | def require_torch(test_case): function require_torch_or_tf (line 295) | def require_torch_or_tf(test_case): function require_intel_extension_for_pytorch (line 307) | def require_intel_extension_for_pytorch(test_case): function require_torch_scatter (line 322) | def require_torch_scatter(test_case): function require_tensorflow_probability (line 332) | def require_tensorflow_probability(test_case): function require_torchaudio (line 344) | def require_torchaudio(test_case): function require_tf (line 351) | def require_tf(test_case): function require_flax (line 358) | def require_flax(test_case): function require_sentencepiece (line 365) | def require_sentencepiece(test_case): function require_scipy (line 372) | def require_scipy(test_case): function require_tokenizers (line 379) | def require_tokenizers(test_case): function require_tensorflow_text (line 386) | def require_tensorflow_text(test_case): function require_pandas (line 394) | def require_pandas(test_case): function require_pytesseract (line 401) | def require_pytesseract(test_case): function require_scatter (line 408) | def require_scatter(test_case): function require_pytorch_quantization (line 416) | def require_pytorch_quantization(test_case): function require_vision (line 426) | def require_vision(test_case): function require_ftfy (line 434) | def require_ftfy(test_case): function require_spacy (line 441) | def require_spacy(test_case): function require_torch_multi_gpu (line 448) | def require_torch_multi_gpu(test_case): function require_torch_non_multi_gpu (line 463) | def require_torch_non_multi_gpu(test_case): function require_torch_up_to_2_gpus (line 475) | def require_torch_up_to_2_gpus(test_case): function require_torch_tpu (line 487) | def require_torch_tpu(test_case): function require_torchdynamo (line 513) | def require_torchdynamo(test_case): function require_torch_tensorrt_fx (line 518) | def require_torch_tensorrt_fx(test_case): function require_torch_gpu (line 523) | def require_torch_gpu(test_case): function require_torch_bf16_gpu (line 528) | def require_torch_bf16_gpu(test_case): function require_torch_bf16_cpu (line 536) | def require_torch_bf16_cpu(test_case): function require_torch_tf32 (line 544) | def require_torch_tf32(test_case): function require_detectron2 (line 551) | def require_detectron2(test_case): function require_faiss (line 556) | def require_faiss(test_case): function require_optuna (line 561) | def require_optuna(test_case): function require_ray (line 571) | def require_ray(test_case): function require_sigopt (line 581) | def require_sigopt(test_case): function require_wandb (line 591) | def require_wandb(test_case): function require_soundfile (line 601) | def require_soundfile(test_case): function require_deepspeed (line 611) | def require_deepspeed(test_case): function require_fairscale (line 618) | def require_fairscale(test_case): function require_apex (line 625) | def require_apex(test_case): function require_bitsandbytes (line 632) | def require_bitsandbytes(test_case): function require_phonemizer (line 639) | def require_phonemizer(test_case): function require_pyctcdecode (line 646) | def require_pyctcdecode(test_case): function require_librosa (line 653) | def require_librosa(test_case): function cmd_exists (line 660) | def cmd_exists(cmd): function require_usr_bin_time (line 664) | def require_usr_bin_time(test_case): function require_sudachi (line 671) | def require_sudachi(test_case): function require_jumanpp (line 678) | def require_jumanpp(test_case): function get_gpu_count (line 685) | def get_gpu_count(): function get_tests_dir (line 705) | def get_tests_dir(append_path=None): function apply_print_resets (line 742) | def apply_print_resets(buf): function assert_screenout (line 746) | def assert_screenout(out, what): class CaptureStd (line 752) | class CaptureStd: method __init__ (line 801) | def __init__(self, out=True, err=True, replay=True): method __enter__ (line 818) | def __enter__(self): method __exit__ (line 829) | def __exit__(self, *exc): method __repr__ (line 844) | def __repr__(self): class CaptureStdout (line 859) | class CaptureStdout(CaptureStd): method __init__ (line 862) | def __init__(self, replay=True): class CaptureStderr (line 866) | class CaptureStderr(CaptureStd): method __init__ (line 869) | def __init__(self, replay=True): class CaptureLogger (line 873) | class CaptureLogger: method __init__ (line 898) | def __init__(self, logger): method __enter__ (line 904) | def __enter__(self): method __exit__ (line 908) | def __exit__(self, *exc): method __repr__ (line 912) | def __repr__(self): function LoggingLevel (line 917) | def LoggingLevel(level): function ExtendSysPath (line 939) | def ExtendSysPath(path: Union[str, os.PathLike]) -> Iterator[None]: class TestCasePlus (line 959) | class TestCasePlus(unittest.TestCase): method setUp (line 1038) | def setUp(self): method test_file_path (line 1059) | def test_file_path(self): method test_file_path_str (line 1063) | def test_file_path_str(self): method test_file_dir (line 1067) | def test_file_dir(self): method test_file_dir_str (line 1071) | def test_file_dir_str(self): method tests_dir (line 1075) | def tests_dir(self): method tests_dir_str (line 1079) | def tests_dir_str(self): method examples_dir (line 1083) | def examples_dir(self): method examples_dir_str (line 1087) | def examples_dir_str(self): method repo_root_dir (line 1091) | def repo_root_dir(self): method repo_root_dir_str (line 1095) | def repo_root_dir_str(self): method src_dir (line 1099) | def src_dir(self): method src_dir_str (line 1103) | def src_dir_str(self): method get_env (line 1106) | def get_env(self): method get_auto_remove_tmp_dir (line 1126) | def get_auto_remove_tmp_dir(self, tmp_dir=None, before=None, after=None): method python_one_liner_max_rss (line 1194) | def python_one_liner_max_rss(self, one_liner_str): method tearDown (line 1227) | def tearDown(self): function mockenv (line 1234) | def mockenv(**kwargs): function mockenv_context (line 1247) | def mockenv_context(*remove, **update): function pytest_addoption_shared (line 1283) | def pytest_addoption_shared(parser): function pytest_terminal_summary_main (line 1302) | def pytest_terminal_summary_main(tr, id): class _RunOutput (line 1441) | class _RunOutput: method __init__ (line 1442) | def __init__(self, returncode, stdout, stderr): function _read_stream (line 1448) | async def _read_stream(stream, callback): function _stream_subprocess (line 1457) | async def _stream_subprocess(cmd, env=None, stdin=None, timeout=None, qu... function execute_subprocess_async (line 1498) | def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, qui... function pytest_xdist_worker_id (line 1520) | def pytest_xdist_worker_id(): function get_torch_dist_unique_port (line 1530) | def get_torch_dist_unique_port(): function nested_simplify (line 1542) | def nested_simplify(obj, decimals=3): function check_json_file_has_correct_format (line 1573) | def check_json_file_has_correct_format(file_path): function to_2tuple (line 1590) | def to_2tuple(x): class SubprocessCallException (line 1597) | class SubprocessCallException(Exception): function run_command (line 1601) | def run_command(command: List[str], return_stdout=False): class RequestCounter (line 1618) | class RequestCounter: method __enter__ (line 1623) | def __enter__(self): method __exit__ (line 1631) | def __exit__(self, *args, **kwargs): method new_request (line 1634) | def new_request(self, method, **kwargs): function is_flaky (line 1645) | def is_flaky(max_attempts: int = 5, wait_before_retry: Optional[float] =... function run_test_in_subprocess (line 1678) | def run_test_in_subprocess(test_case, target_func, inputs=None, timeout=... FILE: benchmark/third_party/transformers/src/transformers/tf_utils.py function shape_list (line 26) | def shape_list(tensor: Union[tf.Tensor, np.ndarray]) -> List[int]: function stable_softmax (line 49) | def stable_softmax(logits: tf.Tensor, axis: Optional[int] = None, name: ... FILE: benchmark/third_party/transformers/src/transformers/tokenization_utils.py class Trie (line 52) | class Trie: method __init__ (line 58) | def __init__(self): method add (line 61) | def add(self, word: str): method split (line 90) | def split(self, text: str) -> List[str]: method cut_text (line 243) | def cut_text(self, text, offsets): function _is_whitespace (line 268) | def _is_whitespace(char): function _is_control (line 280) | def _is_control(char): function _is_punctuation (line 292) | def _is_punctuation(char): function _is_end_of_word (line 307) | def _is_end_of_word(text): function _is_start_of_word (line 313) | def _is_start_of_word(text): function _insert_one_token_to_ordered_list (line 319) | def _insert_one_token_to_ordered_list(token_list: List[str], new_token: ... class PreTrainedTokenizer (line 333) | class PreTrainedTokenizer(PreTrainedTokenizerBase): method __init__ (line 346) | def __init__(self, **kwargs): method is_fast (line 359) | def is_fast(self) -> bool: method vocab_size (line 363) | def vocab_size(self) -> int: method get_added_vocab (line 369) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 378) | def __len__(self): method _add_tokens (line 384) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method _create_trie (line 449) | def _create_trie(self, unique_no_split_tokens): method num_special_tokens_to_add (line 458) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method tokenize (line 481) | def tokenize(self, text: TextInput, **kwargs) -> List[str]: method _tokenize (line 551) | def _tokenize(self, text, **kwargs): method convert_tokens_to_ids (line 560) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 582) | def _convert_token_to_id_with_added_voc(self, token): method _convert_token_to_id (line 590) | def _convert_token_to_id(self, token): method _encode_plus (line 593) | def _encode_plus( method _batch_encode_plus (line 671) | def _batch_encode_plus( method _batch_prepare_for_model (line 757) | def _batch_prepare_for_model( method prepare_for_tokenization (line 821) | def prepare_for_tokenization( method get_special_tokens_mask (line 845) | def get_special_tokens_mask( method convert_ids_to_tokens (line 876) | def convert_ids_to_tokens(self, ids: int, skip_special_tokens: bool = ... method convert_ids_to_tokens (line 880) | def convert_ids_to_tokens(self, ids: List[int], skip_special_tokens: b... method convert_ids_to_tokens (line 883) | def convert_ids_to_tokens( method _convert_id_to_token (line 915) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 918) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 921) | def _decode( FILE: benchmark/third_party/transformers/src/transformers/tokenization_utils_base.py class AddedToken (line 79) | class AddedToken: method __getstate__ (line 91) | def __getstate__(self): class EncodingFast (line 95) | class EncodingFast: class TruncationStrategy (line 125) | class TruncationStrategy(ExplicitEnum): class CharSpan (line 137) | class CharSpan(NamedTuple): class TokenSpan (line 150) | class TokenSpan(NamedTuple): class BatchEncoding (line 163) | class BatchEncoding(UserDict): method __init__ (line 190) | def __init__( method n_sequences (line 213) | def n_sequences(self) -> Optional[int]: method is_fast (line 222) | def is_fast(self) -> bool: method __getitem__ (line 229) | def __getitem__(self, item: Union[int, str]) -> Union[Any, EncodingFast]: method __getattr__ (line 246) | def __getattr__(self, item: str): method __getstate__ (line 252) | def __getstate__(self): method __setstate__ (line 255) | def __setstate__(self, state): method keys (line 262) | def keys(self): method values (line 265) | def values(self): method items (line 268) | def items(self): method encodings (line 276) | def encodings(self) -> Optional[List[EncodingFast]]: method tokens (line 283) | def tokens(self, batch_index: int = 0) -> List[str]: method sequence_ids (line 301) | def sequence_ids(self, batch_index: int = 0) -> List[Optional[int]]: method words (line 325) | def words(self, batch_index: int = 0) -> List[Optional[int]]: method word_ids (line 349) | def word_ids(self, batch_index: int = 0) -> List[Optional[int]]: method token_to_sequence (line 368) | def token_to_sequence(self, batch_or_token_index: int, token_index: Op... method token_to_word (line 407) | def token_to_word(self, batch_or_token_index: int, token_index: Option... method word_to_tokens (line 445) | def word_to_tokens( method token_to_chars (line 496) | def token_to_chars(self, batch_or_token_index: int, token_index: Optio... method char_to_token (line 535) | def char_to_token( method word_to_chars (line 576) | def word_to_chars( method char_to_word (line 621) | def char_to_word(self, batch_or_char_index: int, char_index: Optional[... method convert_to_tensors (line 660) | def convert_to_tensors( method to (line 741) | def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding": class SpecialTokensMixin (line 762) | class SpecialTokensMixin: method __init__ (line 800) | def __init__(self, verbose=True, **kwargs): method sanitize_special_tokens (line 830) | def sanitize_special_tokens(self) -> int: method add_special_tokens (line 842) | def add_special_tokens(self, special_tokens_dict: Dict[str, Union[str,... method add_tokens (line 914) | def add_tokens( method _add_tokens (line 963) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method bos_token (line 967) | def bos_token(self) -> str: method eos_token (line 978) | def eos_token(self) -> str: method unk_token (line 989) | def unk_token(self) -> str: method sep_token (line 1000) | def sep_token(self) -> str: method pad_token (line 1012) | def pad_token(self) -> str: method cls_token (line 1023) | def cls_token(self) -> str: method mask_token (line 1035) | def mask_token(self) -> str: method additional_special_tokens (line 1047) | def additional_special_tokens(self) -> List[str]: method bos_token (line 1059) | def bos_token(self, value): method eos_token (line 1063) | def eos_token(self, value): method unk_token (line 1067) | def unk_token(self, value): method sep_token (line 1071) | def sep_token(self, value): method pad_token (line 1075) | def pad_token(self, value): method cls_token (line 1079) | def cls_token(self, value): method mask_token (line 1083) | def mask_token(self, value): method additional_special_tokens (line 1087) | def additional_special_tokens(self, value): method bos_token_id (line 1091) | def bos_token_id(self) -> Optional[int]: method eos_token_id (line 1101) | def eos_token_id(self) -> Optional[int]: method unk_token_id (line 1111) | def unk_token_id(self) -> Optional[int]: method sep_token_id (line 1120) | def sep_token_id(self) -> Optional[int]: method pad_token_id (line 1130) | def pad_token_id(self) -> Optional[int]: method pad_token_type_id (line 1139) | def pad_token_type_id(self) -> int: method cls_token_id (line 1146) | def cls_token_id(self) -> Optional[int]: method mask_token_id (line 1158) | def mask_token_id(self) -> Optional[int]: method additional_special_tokens_ids (line 1168) | def additional_special_tokens_ids(self) -> List[int]: method bos_token_id (line 1176) | def bos_token_id(self, value): method eos_token_id (line 1180) | def eos_token_id(self, value): method unk_token_id (line 1184) | def unk_token_id(self, value): method sep_token_id (line 1188) | def sep_token_id(self, value): method pad_token_id (line 1192) | def pad_token_id(self, value): method cls_token_id (line 1196) | def cls_token_id(self, value): method mask_token_id (line 1200) | def mask_token_id(self, value): method additional_special_tokens_ids (line 1204) | def additional_special_tokens_ids(self, values): method special_tokens_map (line 1208) | def special_tokens_map(self) -> Dict[str, Union[str, List[str]]]: method special_tokens_map_extended (line 1227) | def special_tokens_map_extended(self) -> Dict[str, Union[str, AddedTok... method all_special_tokens (line 1243) | def all_special_tokens(self) -> List[str]: method all_special_tokens_extended (line 1253) | def all_special_tokens_extended(self) -> List[Union[str, AddedToken]]: method all_special_ids (line 1269) | def all_special_ids(self) -> List[int]: class PreTrainedTokenizerBase (line 1452) | class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): method __init__ (line 1472) | def __init__(self, **kwargs): method max_len_single_sentence (line 1506) | def max_len_single_sentence(self) -> int: method max_len_sentences_pair (line 1513) | def max_len_sentences_pair(self) -> int: method max_len_single_sentence (line 1520) | def max_len_single_sentence(self, value) -> int: method max_len_sentences_pair (line 1534) | def max_len_sentences_pair(self, value) -> int: method _set_processor_class (line 1545) | def _set_processor_class(self, processor_class: str): method __repr__ (line 1549) | def __repr__(self) -> str: method get_vocab (line 1557) | def get_vocab(self) -> Dict[str, int]: method from_pretrained (line 1570) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method _from_pretrained (line 1790) | def _from_pretrained( method _eventually_correct_t5_max_length (line 2015) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method save_pretrained (line 2022) | def save_pretrained( method _save_pretrained (line 2150) | def _save_pretrained( method save_vocabulary (line 2184) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method tokenize (line 2202) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode (line 2232) | def encode( method num_special_tokens_to_add (line 2273) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method _get_padding_truncation_strategies (line 2276) | def _get_padding_truncation_strategies( method __call__ (line 2415) | def __call__( method _call_one (line 2503) | def _call_one( method encode_plus (line 2616) | def encode_plus( method _encode_plus (line 2688) | def _encode_plus( method batch_encode_plus (line 2712) | def batch_encode_plus( method _batch_encode_plus (line 2785) | def _batch_encode_plus( method pad (line 2814) | def pad( method create_token_type_ids_from_sequences (line 2987) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 3007) | def build_inputs_with_special_tokens( method prepare_for_model (line 3028) | def prepare_for_model( method truncate_sequences (line 3163) | def truncate_sequences( method _pad (line 3283) | def _pad( method convert_tokens_to_string (line 3361) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method batch_decode (line 3374) | def batch_decode( method decode (line 3407) | def decode( method _decode (line 3443) | def _decode( method get_special_tokens_mask (line 3452) | def get_special_tokens_mask( method clean_up_tokenization (line 3484) | def clean_up_tokenization(out_string: str) -> str: method _eventual_warn_about_too_long_sequence (line 3508) | def _eventual_warn_about_too_long_sequence(self, ids: List[int], max_l... method _switch_to_input_mode (line 3528) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 3534) | def _switch_to_target_mode(self): method as_target_tokenizer (line 3541) | def as_target_tokenizer(self): method register_for_auto_class (line 3558) | def register_for_auto_class(cls, auto_class="AutoTokenizer"): method prepare_seq2seq_batch (line 3583) | def prepare_seq2seq_batch( function get_fast_tokenizer_file (line 3706) | def get_fast_tokenizer_file(tokenization_files: List[str]) -> str: FILE: benchmark/third_party/transformers/src/transformers/tokenization_utils_fast.py class PreTrainedTokenizerFast (line 78) | class PreTrainedTokenizerFast(PreTrainedTokenizerBase): method __init__ (line 95) | def __init__(self, *args, **kwargs): method is_fast (line 139) | def is_fast(self) -> bool: method vocab_size (line 143) | def vocab_size(self) -> int: method get_vocab (line 149) | def get_vocab(self) -> Dict[str, int]: method vocab (line 153) | def vocab(self) -> Dict[str, int]: method get_added_vocab (line 156) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 168) | def __len__(self) -> int: method backend_tokenizer (line 175) | def backend_tokenizer(self) -> TokenizerFast: method decoder (line 182) | def decoder(self) -> DecoderFast: method _convert_encoding (line 188) | def _convert_encoding( method convert_tokens_to_ids (line 235) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 257) | def _convert_token_to_id_with_added_voc(self, token: str) -> int: method _convert_id_to_token (line 263) | def _convert_id_to_token(self, index: int) -> Optional[str]: method _add_tokens (line 266) | def _add_tokens(self, new_tokens: List[Union[str, AddedToken]], specia... method num_special_tokens_to_add (line 272) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method convert_ids_to_tokens (line 293) | def convert_ids_to_tokens( method tokenize (line 319) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method set_truncation_and_padding (line 322) | def set_truncation_and_padding( method _batch_encode_plus (line 393) | def _batch_encode_plus( method _encode_plus (line 479) | def _encode_plus( method convert_tokens_to_string (line 537) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 540) | def _decode( method _save_pretrained (line 559) | def _save_pretrained( method train_new_from_iterator (line 607) | def train_new_from_iterator( FILE: benchmark/third_party/transformers/src/transformers/trainer.py class Trainer (line 209) | class Trainer: method __init__ (line 294) | def __init__( method add_callback (line 664) | def add_callback(self, callback): method pop_callback (line 675) | def pop_callback(self, callback): method remove_callback (line 691) | def remove_callback(self, callback): method _move_model_to_device (line 702) | def _move_model_to_device(self, model, device): method _set_signature_columns_if_needed (line 708) | def _set_signature_columns_if_needed(self): method _remove_unused_columns (line 716) | def _remove_unused_columns(self, dataset: "datasets.Dataset", descript... method _get_collator_with_removed_columns (line 742) | def _get_collator_with_removed_columns( method _get_train_sampler (line 760) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method get_train_dataloader (line 831) | def get_train_dataloader(self) -> DataLoader: method _get_eval_sampler (line 881) | def _get_eval_sampler(self, eval_dataset: Dataset) -> Optional[torch.u... method get_eval_dataloader (line 910) | def get_eval_dataloader(self, eval_dataset: Optional[Dataset] = None) ... method get_test_dataloader (line 960) | def get_test_dataloader(self, test_dataset: Dataset) -> DataLoader: method create_optimizer_and_scheduler (line 1008) | def create_optimizer_and_scheduler(self, num_training_steps: int): method create_optimizer (line 1024) | def create_optimizer(self): method get_optimizer_cls_and_kwargs (line 1073) | def get_optimizer_cls_and_kwargs(args: TrainingArguments) -> Tuple[Any... method create_scheduler (line 1132) | def create_scheduler(self, num_training_steps: int, optimizer: torch.o... method num_examples (line 1149) | def num_examples(self, dataloader: DataLoader) -> int: method _hp_search_setup (line 1163) | def _hp_search_setup(self, trial: Union["optuna.Trial", Dict[str, Any]]): method _report_to_hp_search (line 1204) | def _report_to_hp_search(self, trial: Union["optuna.Trial", Dict[str, ... method _tune_save_checkpoint (line 1222) | def _tune_save_checkpoint(self): method call_model_init (line 1235) | def call_model_init(self, trial=None): method torch_jit_model_eval (line 1249) | def torch_jit_model_eval(self, model, dataloader, training=False): method ipex_optimize_model (line 1272) | def ipex_optimize_model(self, model, training=False, dtype=torch.float... method _wrap_model (line 1294) | def _wrap_model(self, model, training=True, dataloader=None): method train (line 1422) | def train( method _inner_training_loop (line 1508) | def _inner_training_loop( method _get_output_dir (line 1900) | def _get_output_dir(self, trial): method _load_from_checkpoint (line 1920) | def _load_from_checkpoint(self, resume_from_checkpoint, model=None): method _load_best_model (line 1982) | def _load_best_model(self): method _issue_warnings_after_load (line 2043) | def _issue_warnings_after_load(self, load_result): method _maybe_log_save_evaluate (line 2057) | def _maybe_log_save_evaluate(self, tr_loss, model, trial, epoch, ignor... method _load_rng_state (line 2096) | def _load_rng_state(self, checkpoint): method _save_checkpoint (line 2137) | def _save_checkpoint(self, model, trial, metrics=None): method _load_optimizer_and_scheduler (line 2243) | def _load_optimizer_and_scheduler(self, checkpoint): method hyperparameter_search (line 2300) | def hyperparameter_search( method log (line 2395) | def log(self, logs: Dict[str, float]) -> None: method _prepare_input (line 2412) | def _prepare_input(self, data: Union[torch.Tensor, Any]) -> Union[torc... method _prepare_inputs (line 2430) | def _prepare_inputs(self, inputs: Dict[str, Union[torch.Tensor, Any]])... method compute_loss_context_manager (line 2446) | def compute_loss_context_manager(self): method torchdynamo_smart_context_manager (line 2457) | def torchdynamo_smart_context_manager(self): method autocast_smart_context_manager (line 2463) | def autocast_smart_context_manager(self): method training_step (line 2482) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... method compute_loss (line 2530) | def compute_loss(self, model, inputs, return_outputs=False): method is_local_process_zero (line 2562) | def is_local_process_zero(self) -> bool: method is_world_process_zero (line 2569) | def is_world_process_zero(self) -> bool: method save_model (line 2581) | def save_model(self, output_dir: Optional[str] = None, _internal_call:... method _save_tpu (line 2646) | def _save_tpu(self, output_dir: Optional[str] = None): method _save (line 2674) | def _save(self, output_dir: Optional[str] = None, state_dict=None): method store_flos (line 2699) | def store_flos(self): method _sorted_checkpoints (line 2710) | def _sorted_checkpoints( method _rotate_checkpoints (line 2734) | def _rotate_checkpoints(self, use_mtime=False, output_dir=None) -> None: method evaluate (line 2759) | def evaluate( method predict (line 2828) | def predict( method evaluation_loop (line 2888) | def evaluation_loop( method _nested_gather (line 3098) | def _nested_gather(self, tensors, name=None): method _pad_across_processes (line 3116) | def _pad_across_processes(self, tensor, pad_index=-100): method prediction_step (line 3148) | def prediction_step( method floating_point_ops (line 3245) | def floating_point_ops(self, inputs: Dict[str, Union[torch.Tensor, Any... method init_git_repo (line 3263) | def init_git_repo(self, at_init: bool = False): method create_model_card (line 3314) | def create_model_card( method _push_from_checkpoint (line 3370) | def _push_from_checkpoint(self, checkpoint_folder): method push_to_hub (line 3412) | def push_to_hub(self, commit_message: Optional[str] = "End of training... method prediction_loop (line 3471) | def prediction_loop( method _gather_and_numpify (line 3617) | def _gather_and_numpify(self, tensors, name): FILE: benchmark/third_party/transformers/src/transformers/trainer_callback.py class TrainerState (line 35) | class TrainerState: method __post_init__ (line 91) | def __post_init__(self): method save_to_json (line 95) | def save_to_json(self, json_path: str): method load_from_json (line 102) | def load_from_json(cls, json_path: str): class TrainerControl (line 110) | class TrainerControl: method _new_training (line 144) | def _new_training(self): method _new_epoch (line 148) | def _new_epoch(self): method _new_step (line 152) | def _new_step(self): class TrainerCallback (line 159) | class TrainerCallback: method on_init_end (line 209) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 215) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 221) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 227) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 233) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 239) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_substep_end (line 246) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 252) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 259) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 265) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 271) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 277) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 283) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... class CallbackHandler (line 290) | class CallbackHandler(TrainerCallback): method __init__ (line 293) | def __init__(self, callbacks, model, tokenizer, optimizer, lr_scheduler): method add_callback (line 312) | def add_callback(self, callback): method pop_callback (line 323) | def pop_callback(self, callback): method remove_callback (line 335) | def remove_callback(self, callback): method callback_list (line 345) | def callback_list(self): method on_init_end (line 348) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 351) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 355) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 358) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 362) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 365) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_substep_end (line 371) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 374) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 377) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 381) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 384) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 388) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 392) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... method call_event (line 395) | def call_event(self, event, args, state, control, **kwargs): class DefaultFlowCallback (line 415) | class DefaultFlowCallback(TrainerCallback): method on_step_end (line 420) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_epoch_end (line 449) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... class ProgressCallback (line 465) | class ProgressCallback(TrainerCallback): method __init__ (line 470) | def __init__(self): method on_train_begin (line 474) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 479) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 484) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_evaluate (line 490) | def on_evaluate(self, args, state, control, **kwargs): method on_predict (line 496) | def on_predict(self, args, state, control, **kwargs): method on_log (line 502) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 507) | def on_train_end(self, args, state, control, **kwargs): class PrinterCallback (line 513) | class PrinterCallback(TrainerCallback): method on_log (line 518) | def on_log(self, args, state, control, logs=None, **kwargs): class EarlyStoppingCallback (line 524) | class EarlyStoppingCallback(TrainerCallback): method __init__ (line 540) | def __init__(self, early_stopping_patience: int = 1, early_stopping_th... method check_metric_value (line 546) | def check_metric_value(self, args, state, control, metric_value): method on_train_begin (line 557) | def on_train_begin(self, args, state, control, **kwargs): method on_evaluate (line 566) | def on_evaluate(self, args, state, control, metrics, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/trainer_pt_utils.py function atleast_1d (line 57) | def atleast_1d(tensor_or_array: Union[torch.Tensor, np.ndarray]): function torch_pad_and_concatenate (line 68) | def torch_pad_and_concatenate(tensor1, tensor2, padding_index=-100): function numpy_pad_and_concatenate (line 86) | def numpy_pad_and_concatenate(array1, array2, padding_index=-100): function nested_concat (line 104) | def nested_concat(tensors, new_tensors, padding_index=-100): function find_batch_size (line 126) | def find_batch_size(tensors): function nested_numpify (line 146) | def nested_numpify(tensors): function nested_detach (line 162) | def nested_detach(tensors): function nested_xla_mesh_reduce (line 171) | def nested_xla_mesh_reduce(tensors, name): function distributed_concat (line 188) | def distributed_concat(tensor: Any, num_total_examples: Optional[int] = ... function distributed_broadcast_scalars (line 205) | def distributed_broadcast_scalars( function reissue_pt_warnings (line 224) | def reissue_pt_warnings(caught_warnings): function torch_distributed_zero_first (line 233) | def torch_distributed_zero_first(local_rank: int): class DistributedSamplerWithLoop (line 247) | class DistributedSamplerWithLoop(DistributedSampler): method __init__ (line 261) | def __init__(self, dataset, batch_size, **kwargs): method __iter__ (line 265) | def __iter__(self): class SequentialDistributedSampler (line 275) | class SequentialDistributedSampler(Sampler): method __init__ (line 285) | def __init__(self, dataset, num_replicas=None, rank=None, batch_size=N... method __iter__ (line 310) | def __iter__(self): method __len__ (line 327) | def __len__(self): function get_tpu_sampler (line 331) | def get_tpu_sampler(dataset: torch.utils.data.Dataset, batch_size: int): function nested_new_like (line 337) | def nested_new_like(arrays, num_samples, padding_index=-100): function expand_like (line 344) | def expand_like(arrays, new_seq_length, padding_index=-100): function nested_truncate (line 351) | def nested_truncate(tensors, limit): class DistributedTensorGatherer (line 361) | class DistributedTensorGatherer: method __init__ (line 407) | def __init__(self, world_size, num_samples, make_multiple_of=None, pad... method add_arrays (line 421) | def add_arrays(self, arrays): method _nested_set_tensors (line 436) | def _nested_set_tensors(self, storage, arrays): method finalize (line 457) | def finalize(self): class LabelSmoother (line 470) | class LabelSmoother: method __call__ (line 484) | def __call__(self, model_output, labels, shift_labels=False): function get_length_grouped_indices (line 512) | def get_length_grouped_indices(lengths, batch_size, mega_batch_mult=None... class LengthGroupedSampler (line 547) | class LengthGroupedSampler(Sampler): method __init__ (line 553) | def __init__( method __len__ (line 585) | def __len__(self): method __iter__ (line 588) | def __iter__(self): class DistributedLengthGroupedSampler (line 593) | class DistributedLengthGroupedSampler(DistributedSampler): method __init__ (line 599) | def __init__( method __iter__ (line 659) | def __iter__(self) -> Iterator: class ShardSampler (line 680) | class ShardSampler(Sampler): method __init__ (line 689) | def __init__( method __iter__ (line 708) | def __iter__(self): method __len__ (line 722) | def __len__(self): class IterableDatasetShard (line 727) | class IterableDatasetShard(IterableDataset): method __init__ (line 768) | def __init__( method set_epoch (line 786) | def set_epoch(self, epoch): method __iter__ (line 791) | def __iter__(self): method __len__ (line 824) | def __len__(self): function _get_learning_rate (line 836) | def _get_learning_rate(self): function _secs2timedelta (line 856) | def _secs2timedelta(secs): function metrics_format (line 865) | def metrics_format(self, metrics: Dict[str, float]) -> Dict[str, float]: function log_metrics (line 891) | def log_metrics(self, split, metrics): function save_metrics (line 981) | def save_metrics(self, split, metrics, combined=True): function save_state (line 1019) | def save_state(self): function get_parameter_names (line 1032) | def get_parameter_names(model, forbidden_layer_types): function get_module_class_from_name (line 1048) | def get_module_class_from_name(module, name): function smp_forward_backward (line 1072) | def smp_forward_backward(model, inputs, gradient_accumulation_steps=1): function smp_forward_only (line 1080) | def smp_forward_only(model, inputs): function smp_gather (line 1083) | def smp_gather(tensor): function smp_nested_concat (line 1096) | def smp_nested_concat(tensor): FILE: benchmark/third_party/transformers/src/transformers/trainer_seq2seq.py class Seq2SeqTrainer (line 30) | class Seq2SeqTrainer(Trainer): method evaluate (line 31) | def evaluate( method predict (line 80) | def predict( method prediction_step (line 137) | def prediction_step( method _pad_tensors_to_max_len (line 237) | def _pad_tensors_to_max_len(self, tensor, max_length): FILE: benchmark/third_party/transformers/src/transformers/trainer_tf.py class TFTrainer (line 58) | class TFTrainer: method __init__ (line 91) | def __init__( method get_train_tfdataset (line 146) | def get_train_tfdataset(self) -> tf.data.Dataset: method get_eval_tfdataset (line 170) | def get_eval_tfdataset(self, eval_dataset: Optional[tf.data.Dataset] =... method get_test_tfdataset (line 203) | def get_test_tfdataset(self, test_dataset: tf.data.Dataset) -> tf.data... method create_optimizer_and_scheduler (line 228) | def create_optimizer_and_scheduler(self, num_training_steps: int): method setup_wandb (line 253) | def setup_wandb(self): method setup_comet (line 272) | def setup_comet(self): method prediction_loop (line 302) | def prediction_loop( method log (line 388) | def log(self, logs: Dict[str, float]) -> None: method evaluate (line 420) | def evaluate(self, eval_dataset: Optional[tf.data.Dataset] = None) -> ... method prediction_step (line 448) | def prediction_step( method distributed_prediction_steps (line 464) | def distributed_prediction_steps(self, batch): method train (line 473) | def train(self) -> None: method training_step (line 630) | def training_step(self, features, labels, nb_instances_in_global_batch): method apply_gradients (line 651) | def apply_gradients(self, features, labels, nb_instances_in_global_bat... method distributed_training_steps (line 705) | def distributed_training_steps(self, batch): method _compute_nb_instances (line 714) | def _compute_nb_instances(batch): method _get_step_inputs (line 725) | def _get_step_inputs(batch, nb_instances): method run_model (line 737) | def run_model(self, features, labels, training): method predict (line 767) | def predict(self, test_dataset: tf.data.Dataset) -> PredictionOutput: method save_model (line 793) | def save_model(self, output_dir: Optional[str] = None): FILE: benchmark/third_party/transformers/src/transformers/trainer_utils.py function seed_worker (line 50) | def seed_worker(_): function enable_full_determinism (line 58) | def enable_full_determinism(seed: int): function set_seed (line 83) | def set_seed(seed: int): class EvalPrediction (line 100) | class EvalPrediction: method __init__ (line 110) | def __init__( method __iter__ (line 120) | def __iter__(self): method __getitem__ (line 126) | def __getitem__(self, idx): class EvalLoopOutput (line 139) | class EvalLoopOutput(NamedTuple): class PredictionOutput (line 146) | class PredictionOutput(NamedTuple): class TrainOutput (line 152) | class TrainOutput(NamedTuple): function get_last_checkpoint (line 162) | def get_last_checkpoint(folder): class IntervalStrategy (line 174) | class IntervalStrategy(ExplicitEnum): class EvaluationStrategy (line 180) | class EvaluationStrategy(ExplicitEnum): class HubStrategy (line 186) | class HubStrategy(ExplicitEnum): class BestRun (line 193) | class BestRun(NamedTuple): function default_compute_objective (line 212) | def default_compute_objective(metrics: Dict[str, float]) -> float: function default_hp_space_optuna (line 233) | def default_hp_space_optuna(trial) -> Dict[str, float]: function default_hp_space_ray (line 245) | def default_hp_space_ray(trial) -> Dict[str, float]: function default_hp_space_sigopt (line 259) | def default_hp_space_sigopt(trial): function default_hp_space_wandb (line 272) | def default_hp_space_wandb(trial) -> Dict[str, float]: class HPSearchBackend (line 290) | class HPSearchBackend(ExplicitEnum): function is_main_process (line 305) | def is_main_process(local_rank): function total_processes_number (line 317) | def total_processes_number(local_rank): function speed_metrics (line 332) | def speed_metrics(split, start_time, num_samples=None, num_steps=None): class SchedulerType (line 355) | class SchedulerType(ExplicitEnum): class TrainerMemoryTracker (line 364) | class TrainerMemoryTracker: method __init__ (line 396) | def __init__(self, skip_memory_metrics=False): method derive_stage (line 423) | def derive_stage(self): method cpu_mem_used (line 433) | def cpu_mem_used(self): method peak_monitor_func (line 437) | def peak_monitor_func(self): method start (line 449) | def start(self): method stop (line 479) | def stop(self, stage): method update_metrics (line 523) | def update_metrics(self, stage, metrics): method stop_and_update_metrics (line 564) | def stop_and_update_metrics(self, metrics=None): function has_length (line 577) | def has_length(dataset): function denumpify_detensorize (line 588) | def denumpify_detensorize(metrics): function number_of_arguments (line 603) | def number_of_arguments(func): class ShardedDDPOption (line 613) | class ShardedDDPOption(ExplicitEnum): function find_executable_batch_size (line 621) | def find_executable_batch_size( class FSDPOption (line 652) | class FSDPOption(ExplicitEnum): class RemoveColumnsCollator (line 660) | class RemoveColumnsCollator: method __init__ (line 663) | def __init__( method _remove_columns (line 678) | def _remove_columns(self, feature: dict) -> dict: method __call__ (line 694) | def __call__(self, features: List[dict]): FILE: benchmark/third_party/transformers/src/transformers/training_args.py function default_logdir (line 76) | def default_logdir() -> str: function get_int_from_env (line 87) | def get_int_from_env(env_keys, default): function get_xla_device_type (line 96) | def get_xla_device_type(device: "torch.device") -> Optional[str]: class OptimizerNames (line 105) | class OptimizerNames(ExplicitEnum): class TrainingArguments (line 121) | class TrainingArguments: method __post_init__ (line 999) | def __post_init__(self): method __str__ (line 1271) | def __str__(self): method train_batch_size (line 1287) | def train_batch_size(self) -> int: method eval_batch_size (line 1301) | def eval_batch_size(self) -> int: method ddp_timeout_delta (line 1315) | def ddp_timeout_delta(self) -> timedelta: method _setup_devices (line 1323) | def _setup_devices(self) -> "torch.device": method device (line 1474) | def device(self) -> "torch.device": method n_gpu (line 1482) | def n_gpu(self): method parallel_mode (line 1496) | def parallel_mode(self): method world_size (line 1521) | def world_size(self): method process_index (line 1537) | def process_index(self): method local_process_index (line 1553) | def local_process_index(self): method should_log (line 1568) | def should_log(self): method should_save (line 1581) | def should_save(self): method get_process_log_level (line 1593) | def get_process_log_level(self): method place_model_on_device (line 1615) | def place_model_on_device(self): method _no_sync_in_gradient_accumulation (line 1622) | def _no_sync_in_gradient_accumulation(self): method main_process_first (line 1629) | def main_process_first(self, local=True, desc="work"): method get_warmup_steps (line 1683) | def get_warmup_steps(self, num_training_steps: int): method to_dict (line 1692) | def to_dict(self): method to_json_string (line 1709) | def to_json_string(self): method to_sanitized_dict (line 1715) | def to_sanitized_dict(self) -> Dict[str, Any]: class ParallelMode (line 1729) | class ParallelMode(Enum): FILE: benchmark/third_party/transformers/src/transformers/training_args_seq2seq.py class Seq2SeqTrainingArguments (line 28) | class Seq2SeqTrainingArguments(TrainingArguments): FILE: benchmark/third_party/transformers/src/transformers/training_args_tf.py class TFTrainingArguments (line 30) | class TFTrainingArguments(TrainingArguments): method _setup_strategy (line 189) | def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", int]: method strategy (line 238) | def strategy(self) -> "tf.distribute.Strategy": method n_replicas (line 246) | def n_replicas(self) -> int: method train_batch_size (line 253) | def train_batch_size(self) -> int: method eval_batch_size (line 266) | def eval_batch_size(self) -> int: method n_gpu (line 280) | def n_gpu(self) -> int: FILE: benchmark/third_party/transformers/src/transformers/utils/__init__.py function check_min_version (line 191) | def check_min_version(min_version): FILE: benchmark/third_party/transformers/src/transformers/utils/bitsandbytes.py function set_module_8bit_tensor_to_device (line 17) | def set_module_8bit_tensor_to_device(module, tensor_name, device, value=... function replace_8bit_linear (line 88) | def replace_8bit_linear(model, threshold=6.0, modules_to_not_convert="lm... function get_keys_to_not_convert (line 129) | def get_keys_to_not_convert(model): FILE: benchmark/third_party/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 add_code_sample_docstrings (line 1051) | def add_code_sample_docstrings( function replace_return_docstrings (line 1130) | def replace_return_docstrings(output_type=None, config_class=None): function copy_func (line 1152) | def copy_func(f): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_detectron2_objects.py class LayoutLMv2Model (line 8) | class LayoutLMv2Model: method __init__ (line 9) | def __init__(self, *args, **kwargs): method from_pretrained (line 13) | def from_pretrained(cls, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_flax_objects.py class FlaxForcedBOSTokenLogitsProcessor (line 6) | class FlaxForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class FlaxForcedEOSTokenLogitsProcessor (line 13) | class FlaxForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessor (line 20) | class FlaxLogitsProcessor(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessorList (line 27) | class FlaxLogitsProcessorList(metaclass=DummyObject): method __init__ (line 30) | def __init__(self, *args, **kwargs): class FlaxLogitsWarper (line 34) | class FlaxLogitsWarper(metaclass=DummyObject): method __init__ (line 37) | def __init__(self, *args, **kwargs): class FlaxMinLengthLogitsProcessor (line 41) | class FlaxMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 44) | def __init__(self, *args, **kwargs): class FlaxTemperatureLogitsWarper (line 48) | class FlaxTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 51) | def __init__(self, *args, **kwargs): class FlaxTopKLogitsWarper (line 55) | class FlaxTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 58) | def __init__(self, *args, **kwargs): class FlaxTopPLogitsWarper (line 62) | class FlaxTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 65) | def __init__(self, *args, **kwargs): class FlaxPreTrainedModel (line 69) | class FlaxPreTrainedModel(metaclass=DummyObject): method __init__ (line 72) | def __init__(self, *args, **kwargs): class FlaxAlbertForMaskedLM (line 76) | class FlaxAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 79) | def __init__(self, *args, **kwargs): class FlaxAlbertForMultipleChoice (line 83) | class FlaxAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 86) | def __init__(self, *args, **kwargs): class FlaxAlbertForPreTraining (line 90) | class FlaxAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 93) | def __init__(self, *args, **kwargs): class FlaxAlbertForQuestionAnswering (line 97) | class FlaxAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 100) | def __init__(self, *args, **kwargs): class FlaxAlbertForSequenceClassification (line 104) | class FlaxAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 107) | def __init__(self, *args, **kwargs): class FlaxAlbertForTokenClassification (line 111) | class FlaxAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 114) | def __init__(self, *args, **kwargs): class FlaxAlbertModel (line 118) | class FlaxAlbertModel(metaclass=DummyObject): method __init__ (line 121) | def __init__(self, *args, **kwargs): class FlaxAlbertPreTrainedModel (line 125) | class FlaxAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): class FlaxAutoModel (line 168) | class FlaxAutoModel(metaclass=DummyObject): method __init__ (line 171) | def __init__(self, *args, **kwargs): class FlaxAutoModelForCausalLM (line 175) | class FlaxAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 178) | def __init__(self, *args, **kwargs): class FlaxAutoModelForImageClassification (line 182) | class FlaxAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 185) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMaskedLM (line 189) | class FlaxAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 192) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMultipleChoice (line 196) | class FlaxAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 199) | def __init__(self, *args, **kwargs): class FlaxAutoModelForNextSentencePrediction (line 203) | class FlaxAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 206) | def __init__(self, *args, **kwargs): class FlaxAutoModelForPreTraining (line 210) | class FlaxAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 213) | def __init__(self, *args, **kwargs): class FlaxAutoModelForQuestionAnswering (line 217) | class FlaxAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 220) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSeq2SeqLM (line 224) | class FlaxAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 227) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSequenceClassification (line 231) | class FlaxAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 234) | def __init__(self, *args, **kwargs): class FlaxAutoModelForTokenClassification (line 238) | class FlaxAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 241) | def __init__(self, *args, **kwargs): class FlaxAutoModelForVision2Seq (line 245) | class FlaxAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 248) | def __init__(self, *args, **kwargs): class FlaxBartDecoderPreTrainedModel (line 252) | class FlaxBartDecoderPreTrainedModel(metaclass=DummyObject): method __init__ (line 255) | def __init__(self, *args, **kwargs): class FlaxBartForCausalLM (line 259) | class FlaxBartForCausalLM(metaclass=DummyObject): method __init__ (line 262) | def __init__(self, *args, **kwargs): class FlaxBartForConditionalGeneration (line 266) | class FlaxBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 269) | def __init__(self, *args, **kwargs): class FlaxBartForQuestionAnswering (line 273) | class FlaxBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 276) | def __init__(self, *args, **kwargs): class FlaxBartForSequenceClassification (line 280) | class FlaxBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 283) | def __init__(self, *args, **kwargs): class FlaxBartModel (line 287) | class FlaxBartModel(metaclass=DummyObject): method __init__ (line 290) | def __init__(self, *args, **kwargs): class FlaxBartPreTrainedModel (line 294) | class FlaxBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 297) | def __init__(self, *args, **kwargs): class FlaxBeitForImageClassification (line 301) | class FlaxBeitForImageClassification(metaclass=DummyObject): method __init__ (line 304) | def __init__(self, *args, **kwargs): class FlaxBeitForMaskedImageModeling (line 308) | class FlaxBeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 311) | def __init__(self, *args, **kwargs): class FlaxBeitModel (line 315) | class FlaxBeitModel(metaclass=DummyObject): method __init__ (line 318) | def __init__(self, *args, **kwargs): class FlaxBeitPreTrainedModel (line 322) | class FlaxBeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 325) | def __init__(self, *args, **kwargs): class FlaxBertForCausalLM (line 329) | class FlaxBertForCausalLM(metaclass=DummyObject): method __init__ (line 332) | def __init__(self, *args, **kwargs): class FlaxBertForMaskedLM (line 336) | class FlaxBertForMaskedLM(metaclass=DummyObject): method __init__ (line 339) | def __init__(self, *args, **kwargs): class FlaxBertForMultipleChoice (line 343) | class FlaxBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 346) | def __init__(self, *args, **kwargs): class FlaxBertForNextSentencePrediction (line 350) | class FlaxBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 353) | def __init__(self, *args, **kwargs): class FlaxBertForPreTraining (line 357) | class FlaxBertForPreTraining(metaclass=DummyObject): method __init__ (line 360) | def __init__(self, *args, **kwargs): class FlaxBertForQuestionAnswering (line 364) | class FlaxBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 367) | def __init__(self, *args, **kwargs): class FlaxBertForSequenceClassification (line 371) | class FlaxBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 374) | def __init__(self, *args, **kwargs): class FlaxBertForTokenClassification (line 378) | class FlaxBertForTokenClassification(metaclass=DummyObject): method __init__ (line 381) | def __init__(self, *args, **kwargs): class FlaxBertModel (line 385) | class FlaxBertModel(metaclass=DummyObject): method __init__ (line 388) | def __init__(self, *args, **kwargs): class FlaxBertPreTrainedModel (line 392) | class FlaxBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 395) | def __init__(self, *args, **kwargs): class FlaxBigBirdForCausalLM (line 399) | class FlaxBigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 402) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMaskedLM (line 406) | class FlaxBigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 409) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMultipleChoice (line 413) | class FlaxBigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 416) | def __init__(self, *args, **kwargs): class FlaxBigBirdForPreTraining (line 420) | class FlaxBigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 423) | def __init__(self, *args, **kwargs): class FlaxBigBirdForQuestionAnswering (line 427) | class FlaxBigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 430) | def __init__(self, *args, **kwargs): class FlaxBigBirdForSequenceClassification (line 434) | class FlaxBigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 437) | def __init__(self, *args, **kwargs): class FlaxBigBirdForTokenClassification (line 441) | class FlaxBigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 444) | def __init__(self, *args, **kwargs): class FlaxBigBirdModel (line 448) | class FlaxBigBirdModel(metaclass=DummyObject): method __init__ (line 451) | def __init__(self, *args, **kwargs): class FlaxBigBirdPreTrainedModel (line 455) | class FlaxBigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 458) | def __init__(self, *args, **kwargs): class FlaxBlenderbotForConditionalGeneration (line 462) | class FlaxBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 465) | def __init__(self, *args, **kwargs): class FlaxBlenderbotModel (line 469) | class FlaxBlenderbotModel(metaclass=DummyObject): method __init__ (line 472) | def __init__(self, *args, **kwargs): class FlaxBlenderbotPreTrainedModel (line 476) | class FlaxBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 479) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallForConditionalGeneration (line 483) | class FlaxBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 486) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallModel (line 490) | class FlaxBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 493) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallPreTrainedModel (line 497) | class FlaxBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 500) | def __init__(self, *args, **kwargs): class FlaxCLIPModel (line 504) | class FlaxCLIPModel(metaclass=DummyObject): method __init__ (line 507) | def __init__(self, *args, **kwargs): class FlaxCLIPPreTrainedModel (line 511) | class FlaxCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 514) | def __init__(self, *args, **kwargs): class FlaxCLIPTextModel (line 518) | class FlaxCLIPTextModel(metaclass=DummyObject): method __init__ (line 521) | def __init__(self, *args, **kwargs): class FlaxCLIPTextPreTrainedModel (line 525) | class FlaxCLIPTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 528) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionModel (line 532) | class FlaxCLIPVisionModel(metaclass=DummyObject): method __init__ (line 535) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionPreTrainedModel (line 539) | class FlaxCLIPVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 542) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMaskedLM (line 546) | class FlaxDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 549) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMultipleChoice (line 553) | class FlaxDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 556) | def __init__(self, *args, **kwargs): class FlaxDistilBertForQuestionAnswering (line 560) | class FlaxDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 563) | def __init__(self, *args, **kwargs): class FlaxDistilBertForSequenceClassification (line 567) | class FlaxDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 570) | def __init__(self, *args, **kwargs): class FlaxDistilBertForTokenClassification (line 574) | class FlaxDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 577) | def __init__(self, *args, **kwargs): class FlaxDistilBertModel (line 581) | class FlaxDistilBertModel(metaclass=DummyObject): method __init__ (line 584) | def __init__(self, *args, **kwargs): class FlaxDistilBertPreTrainedModel (line 588) | class FlaxDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 591) | def __init__(self, *args, **kwargs): class FlaxElectraForCausalLM (line 595) | class FlaxElectraForCausalLM(metaclass=DummyObject): method __init__ (line 598) | def __init__(self, *args, **kwargs): class FlaxElectraForMaskedLM (line 602) | class FlaxElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 605) | def __init__(self, *args, **kwargs): class FlaxElectraForMultipleChoice (line 609) | class FlaxElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 612) | def __init__(self, *args, **kwargs): class FlaxElectraForPreTraining (line 616) | class FlaxElectraForPreTraining(metaclass=DummyObject): method __init__ (line 619) | def __init__(self, *args, **kwargs): class FlaxElectraForQuestionAnswering (line 623) | class FlaxElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 626) | def __init__(self, *args, **kwargs): class FlaxElectraForSequenceClassification (line 630) | class FlaxElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 633) | def __init__(self, *args, **kwargs): class FlaxElectraForTokenClassification (line 637) | class FlaxElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 640) | def __init__(self, *args, **kwargs): class FlaxElectraModel (line 644) | class FlaxElectraModel(metaclass=DummyObject): method __init__ (line 647) | def __init__(self, *args, **kwargs): class FlaxElectraPreTrainedModel (line 651) | class FlaxElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 654) | def __init__(self, *args, **kwargs): class FlaxEncoderDecoderModel (line 658) | class FlaxEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 661) | def __init__(self, *args, **kwargs): class FlaxGPT2LMHeadModel (line 665) | class FlaxGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 668) | def __init__(self, *args, **kwargs): class FlaxGPT2Model (line 672) | class FlaxGPT2Model(metaclass=DummyObject): method __init__ (line 675) | def __init__(self, *args, **kwargs): class FlaxGPT2PreTrainedModel (line 679) | class FlaxGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 682) | def __init__(self, *args, **kwargs): class FlaxGPTNeoForCausalLM (line 686) | class FlaxGPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 689) | def __init__(self, *args, **kwargs): class FlaxGPTNeoModel (line 693) | class FlaxGPTNeoModel(metaclass=DummyObject): method __init__ (line 696) | def __init__(self, *args, **kwargs): class FlaxGPTNeoPreTrainedModel (line 700) | class FlaxGPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 703) | def __init__(self, *args, **kwargs): class FlaxGPTJForCausalLM (line 707) | class FlaxGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 710) | def __init__(self, *args, **kwargs): class FlaxGPTJModel (line 714) | class FlaxGPTJModel(metaclass=DummyObject): method __init__ (line 717) | def __init__(self, *args, **kwargs): class FlaxGPTJPreTrainedModel (line 721) | class FlaxGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 724) | def __init__(self, *args, **kwargs): class FlaxLongT5ForConditionalGeneration (line 728) | class FlaxLongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 731) | def __init__(self, *args, **kwargs): class FlaxLongT5Model (line 735) | class FlaxLongT5Model(metaclass=DummyObject): method __init__ (line 738) | def __init__(self, *args, **kwargs): class FlaxLongT5PreTrainedModel (line 742) | class FlaxLongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 745) | def __init__(self, *args, **kwargs): class FlaxMarianModel (line 749) | class FlaxMarianModel(metaclass=DummyObject): method __init__ (line 752) | def __init__(self, *args, **kwargs): class FlaxMarianMTModel (line 756) | class FlaxMarianMTModel(metaclass=DummyObject): method __init__ (line 759) | def __init__(self, *args, **kwargs): class FlaxMarianPreTrainedModel (line 763) | class FlaxMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 766) | def __init__(self, *args, **kwargs): class FlaxMBartForConditionalGeneration (line 770) | class FlaxMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 773) | def __init__(self, *args, **kwargs): class FlaxMBartForQuestionAnswering (line 777) | class FlaxMBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 780) | def __init__(self, *args, **kwargs): class FlaxMBartForSequenceClassification (line 784) | class FlaxMBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 787) | def __init__(self, *args, **kwargs): class FlaxMBartModel (line 791) | class FlaxMBartModel(metaclass=DummyObject): method __init__ (line 794) | def __init__(self, *args, **kwargs): class FlaxMBartPreTrainedModel (line 798) | class FlaxMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 801) | def __init__(self, *args, **kwargs): class FlaxMT5EncoderModel (line 805) | class FlaxMT5EncoderModel(metaclass=DummyObject): method __init__ (line 808) | def __init__(self, *args, **kwargs): class FlaxMT5ForConditionalGeneration (line 812) | class FlaxMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 815) | def __init__(self, *args, **kwargs): class FlaxMT5Model (line 819) | class FlaxMT5Model(metaclass=DummyObject): method __init__ (line 822) | def __init__(self, *args, **kwargs): class FlaxOPTForCausalLM (line 826) | class FlaxOPTForCausalLM(metaclass=DummyObject): method __init__ (line 829) | def __init__(self, *args, **kwargs): class FlaxOPTModel (line 833) | class FlaxOPTModel(metaclass=DummyObject): method __init__ (line 836) | def __init__(self, *args, **kwargs): class FlaxOPTPreTrainedModel (line 840) | class FlaxOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 843) | def __init__(self, *args, **kwargs): class FlaxPegasusForConditionalGeneration (line 847) | class FlaxPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 850) | def __init__(self, *args, **kwargs): class FlaxPegasusModel (line 854) | class FlaxPegasusModel(metaclass=DummyObject): method __init__ (line 857) | def __init__(self, *args, **kwargs): class FlaxPegasusPreTrainedModel (line 861) | class FlaxPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 864) | def __init__(self, *args, **kwargs): class FlaxRobertaForCausalLM (line 868) | class FlaxRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 871) | def __init__(self, *args, **kwargs): class FlaxRobertaForMaskedLM (line 875) | class FlaxRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 878) | def __init__(self, *args, **kwargs): class FlaxRobertaForMultipleChoice (line 882) | class FlaxRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 885) | def __init__(self, *args, **kwargs): class FlaxRobertaForQuestionAnswering (line 889) | class FlaxRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 892) | def __init__(self, *args, **kwargs): class FlaxRobertaForSequenceClassification (line 896) | class FlaxRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 899) | def __init__(self, *args, **kwargs): class FlaxRobertaForTokenClassification (line 903) | class FlaxRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 906) | def __init__(self, *args, **kwargs): class FlaxRobertaModel (line 910) | class FlaxRobertaModel(metaclass=DummyObject): method __init__ (line 913) | def __init__(self, *args, **kwargs): class FlaxRobertaPreTrainedModel (line 917) | class FlaxRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 920) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMaskedLM (line 924) | class FlaxRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 927) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMultipleChoice (line 931) | class FlaxRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 934) | def __init__(self, *args, **kwargs): class FlaxRoFormerForQuestionAnswering (line 938) | class FlaxRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 941) | def __init__(self, *args, **kwargs): class FlaxRoFormerForSequenceClassification (line 945) | class FlaxRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 948) | def __init__(self, *args, **kwargs): class FlaxRoFormerForTokenClassification (line 952) | class FlaxRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 955) | def __init__(self, *args, **kwargs): class FlaxRoFormerModel (line 959) | class FlaxRoFormerModel(metaclass=DummyObject): method __init__ (line 962) | def __init__(self, *args, **kwargs): class FlaxRoFormerPreTrainedModel (line 966) | class FlaxRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 969) | def __init__(self, *args, **kwargs): class FlaxSpeechEncoderDecoderModel (line 973) | class FlaxSpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 976) | def __init__(self, *args, **kwargs): class FlaxT5EncoderModel (line 980) | class FlaxT5EncoderModel(metaclass=DummyObject): method __init__ (line 983) | def __init__(self, *args, **kwargs): class FlaxT5ForConditionalGeneration (line 987) | class FlaxT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 990) | def __init__(self, *args, **kwargs): class FlaxT5Model (line 994) | class FlaxT5Model(metaclass=DummyObject): method __init__ (line 997) | def __init__(self, *args, **kwargs): class FlaxT5PreTrainedModel (line 1001) | class FlaxT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 1004) | def __init__(self, *args, **kwargs): class FlaxVisionEncoderDecoderModel (line 1008) | class FlaxVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1011) | def __init__(self, *args, **kwargs): class FlaxVisionTextDualEncoderModel (line 1015) | class FlaxVisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 1018) | def __init__(self, *args, **kwargs): class FlaxViTForImageClassification (line 1022) | class FlaxViTForImageClassification(metaclass=DummyObject): method __init__ (line 1025) | def __init__(self, *args, **kwargs): class FlaxViTModel (line 1029) | class FlaxViTModel(metaclass=DummyObject): method __init__ (line 1032) | def __init__(self, *args, **kwargs): class FlaxViTPreTrainedModel (line 1036) | class FlaxViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1039) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForCTC (line 1043) | class FlaxWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 1046) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForPreTraining (line 1050) | class FlaxWav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 1053) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2Model (line 1057) | class FlaxWav2Vec2Model(metaclass=DummyObject): method __init__ (line 1060) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2PreTrainedModel (line 1064) | class FlaxWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1067) | def __init__(self, *args, **kwargs): class FlaxXGLMForCausalLM (line 1071) | class FlaxXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 1074) | def __init__(self, *args, **kwargs): class FlaxXGLMModel (line 1078) | class FlaxXGLMModel(metaclass=DummyObject): method __init__ (line 1081) | def __init__(self, *args, **kwargs): class FlaxXGLMPreTrainedModel (line 1085) | class FlaxXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 1088) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMaskedLM (line 1092) | class FlaxXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 1095) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMultipleChoice (line 1099) | class FlaxXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 1102) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForQuestionAnswering (line 1106) | class FlaxXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1109) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForSequenceClassification (line 1113) | class FlaxXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 1116) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForTokenClassification (line 1120) | class FlaxXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 1123) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaModel (line 1127) | class FlaxXLMRobertaModel(metaclass=DummyObject): method __init__ (line 1130) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_pt_objects.py class PyTorchBenchmark (line 6) | class PyTorchBenchmark(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class PyTorchBenchmarkArguments (line 13) | class PyTorchBenchmarkArguments(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): class GlueDataset (line 20) | class GlueDataset(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): class GlueDataTrainingArguments (line 27) | class GlueDataTrainingArguments(metaclass=DummyObject): method __init__ (line 30) | def __init__(self, *args, **kwargs): class LineByLineTextDataset (line 34) | class LineByLineTextDataset(metaclass=DummyObject): method __init__ (line 37) | def __init__(self, *args, **kwargs): class LineByLineWithRefDataset (line 41) | class LineByLineWithRefDataset(metaclass=DummyObject): method __init__ (line 44) | def __init__(self, *args, **kwargs): class LineByLineWithSOPTextDataset (line 48) | class LineByLineWithSOPTextDataset(metaclass=DummyObject): method __init__ (line 51) | def __init__(self, *args, **kwargs): class SquadDataset (line 55) | class SquadDataset(metaclass=DummyObject): method __init__ (line 58) | def __init__(self, *args, **kwargs): class SquadDataTrainingArguments (line 62) | class SquadDataTrainingArguments(metaclass=DummyObject): method __init__ (line 65) | def __init__(self, *args, **kwargs): class TextDataset (line 69) | class TextDataset(metaclass=DummyObject): method __init__ (line 72) | def __init__(self, *args, **kwargs): class TextDatasetForNextSentencePrediction (line 76) | class TextDatasetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 79) | def __init__(self, *args, **kwargs): class Constraint (line 83) | class Constraint(metaclass=DummyObject): method __init__ (line 86) | def __init__(self, *args, **kwargs): class ConstraintListState (line 90) | class ConstraintListState(metaclass=DummyObject): method __init__ (line 93) | def __init__(self, *args, **kwargs): class DisjunctiveConstraint (line 97) | class DisjunctiveConstraint(metaclass=DummyObject): method __init__ (line 100) | def __init__(self, *args, **kwargs): class PhrasalConstraint (line 104) | class PhrasalConstraint(metaclass=DummyObject): method __init__ (line 107) | def __init__(self, *args, **kwargs): class BeamScorer (line 111) | class BeamScorer(metaclass=DummyObject): method __init__ (line 114) | def __init__(self, *args, **kwargs): class BeamSearchScorer (line 118) | class BeamSearchScorer(metaclass=DummyObject): method __init__ (line 121) | def __init__(self, *args, **kwargs): class ConstrainedBeamSearchScorer (line 125) | class ConstrainedBeamSearchScorer(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): class ForcedBOSTokenLogitsProcessor (line 132) | class ForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 135) | def __init__(self, *args, **kwargs): class ForcedEOSTokenLogitsProcessor (line 139) | class ForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 142) | def __init__(self, *args, **kwargs): class HammingDiversityLogitsProcessor (line 146) | class HammingDiversityLogitsProcessor(metaclass=DummyObject): method __init__ (line 149) | def __init__(self, *args, **kwargs): class InfNanRemoveLogitsProcessor (line 153) | class InfNanRemoveLogitsProcessor(metaclass=DummyObject): method __init__ (line 156) | def __init__(self, *args, **kwargs): class LogitsProcessor (line 160) | class LogitsProcessor(metaclass=DummyObject): method __init__ (line 163) | def __init__(self, *args, **kwargs): class LogitsProcessorList (line 167) | class LogitsProcessorList(metaclass=DummyObject): method __init__ (line 170) | def __init__(self, *args, **kwargs): class LogitsWarper (line 174) | class LogitsWarper(metaclass=DummyObject): method __init__ (line 177) | def __init__(self, *args, **kwargs): class MinLengthLogitsProcessor (line 181) | class MinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 184) | def __init__(self, *args, **kwargs): class NoBadWordsLogitsProcessor (line 188) | class NoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 191) | def __init__(self, *args, **kwargs): class NoRepeatNGramLogitsProcessor (line 195) | class NoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 198) | def __init__(self, *args, **kwargs): class PrefixConstrainedLogitsProcessor (line 202) | class PrefixConstrainedLogitsProcessor(metaclass=DummyObject): method __init__ (line 205) | def __init__(self, *args, **kwargs): class RepetitionPenaltyLogitsProcessor (line 209) | class RepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 212) | def __init__(self, *args, **kwargs): class TemperatureLogitsWarper (line 216) | class TemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 219) | def __init__(self, *args, **kwargs): class TopKLogitsWarper (line 223) | class TopKLogitsWarper(metaclass=DummyObject): method __init__ (line 226) | def __init__(self, *args, **kwargs): class TopPLogitsWarper (line 230) | class TopPLogitsWarper(metaclass=DummyObject): method __init__ (line 233) | def __init__(self, *args, **kwargs): class TypicalLogitsWarper (line 237) | class TypicalLogitsWarper(metaclass=DummyObject): method __init__ (line 240) | def __init__(self, *args, **kwargs): class MaxLengthCriteria (line 244) | class MaxLengthCriteria(metaclass=DummyObject): method __init__ (line 247) | def __init__(self, *args, **kwargs): class MaxTimeCriteria (line 251) | class MaxTimeCriteria(metaclass=DummyObject): method __init__ (line 254) | def __init__(self, *args, **kwargs): class StoppingCriteria (line 258) | class StoppingCriteria(metaclass=DummyObject): method __init__ (line 261) | def __init__(self, *args, **kwargs): class StoppingCriteriaList (line 265) | class StoppingCriteriaList(metaclass=DummyObject): method __init__ (line 268) | def __init__(self, *args, **kwargs): function top_k_top_p_filtering (line 272) | def top_k_top_p_filtering(*args, **kwargs): class PreTrainedModel (line 276) | class PreTrainedModel(metaclass=DummyObject): method __init__ (line 279) | def __init__(self, *args, **kwargs): class AlbertForMaskedLM (line 286) | class AlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 289) | def __init__(self, *args, **kwargs): class AlbertForMultipleChoice (line 293) | class AlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 296) | def __init__(self, *args, **kwargs): class AlbertForPreTraining (line 300) | class AlbertForPreTraining(metaclass=DummyObject): method __init__ (line 303) | def __init__(self, *args, **kwargs): class AlbertForQuestionAnswering (line 307) | class AlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 310) | def __init__(self, *args, **kwargs): class AlbertForSequenceClassification (line 314) | class AlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 317) | def __init__(self, *args, **kwargs): class AlbertForTokenClassification (line 321) | class AlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 324) | def __init__(self, *args, **kwargs): class AlbertModel (line 328) | class AlbertModel(metaclass=DummyObject): method __init__ (line 331) | def __init__(self, *args, **kwargs): class AlbertPreTrainedModel (line 335) | class AlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 338) | def __init__(self, *args, **kwargs): function load_tf_weights_in_albert (line 342) | def load_tf_weights_in_albert(*args, **kwargs): class AutoModel (line 433) | class AutoModel(metaclass=DummyObject): method __init__ (line 436) | def __init__(self, *args, **kwargs): class AutoModelForAudioClassification (line 440) | class AutoModelForAudioClassification(metaclass=DummyObject): method __init__ (line 443) | def __init__(self, *args, **kwargs): class AutoModelForAudioFrameClassification (line 447) | class AutoModelForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 450) | def __init__(self, *args, **kwargs): class AutoModelForAudioXVector (line 454) | class AutoModelForAudioXVector(metaclass=DummyObject): method __init__ (line 457) | def __init__(self, *args, **kwargs): class AutoModelForCausalLM (line 461) | class AutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 464) | def __init__(self, *args, **kwargs): class AutoModelForCTC (line 468) | class AutoModelForCTC(metaclass=DummyObject): method __init__ (line 471) | def __init__(self, *args, **kwargs): class AutoModelForDepthEstimation (line 475) | class AutoModelForDepthEstimation(metaclass=DummyObject): method __init__ (line 478) | def __init__(self, *args, **kwargs): class AutoModelForDocumentQuestionAnswering (line 482) | class AutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 485) | def __init__(self, *args, **kwargs): class AutoModelForImageClassification (line 489) | class AutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 492) | def __init__(self, *args, **kwargs): class AutoModelForImageSegmentation (line 496) | class AutoModelForImageSegmentation(metaclass=DummyObject): method __init__ (line 499) | def __init__(self, *args, **kwargs): class AutoModelForInstanceSegmentation (line 503) | class AutoModelForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 506) | def __init__(self, *args, **kwargs): class AutoModelForMaskedImageModeling (line 510) | class AutoModelForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 513) | def __init__(self, *args, **kwargs): class AutoModelForMaskedLM (line 517) | class AutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 520) | def __init__(self, *args, **kwargs): class AutoModelForMultipleChoice (line 524) | class AutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 527) | def __init__(self, *args, **kwargs): class AutoModelForNextSentencePrediction (line 531) | class AutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 534) | def __init__(self, *args, **kwargs): class AutoModelForObjectDetection (line 538) | class AutoModelForObjectDetection(metaclass=DummyObject): method __init__ (line 541) | def __init__(self, *args, **kwargs): class AutoModelForPreTraining (line 545) | class AutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 548) | def __init__(self, *args, **kwargs): class AutoModelForQuestionAnswering (line 552) | class AutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 555) | def __init__(self, *args, **kwargs): class AutoModelForSemanticSegmentation (line 559) | class AutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 562) | def __init__(self, *args, **kwargs): class AutoModelForSeq2SeqLM (line 566) | class AutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 569) | def __init__(self, *args, **kwargs): class AutoModelForSequenceClassification (line 573) | class AutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 576) | def __init__(self, *args, **kwargs): class AutoModelForSpeechSeq2Seq (line 580) | class AutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 583) | def __init__(self, *args, **kwargs): class AutoModelForTableQuestionAnswering (line 587) | class AutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 590) | def __init__(self, *args, **kwargs): class AutoModelForTokenClassification (line 594) | class AutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 597) | def __init__(self, *args, **kwargs): class AutoModelForVideoClassification (line 601) | class AutoModelForVideoClassification(metaclass=DummyObject): method __init__ (line 604) | def __init__(self, *args, **kwargs): class AutoModelForVision2Seq (line 608) | class AutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 611) | def __init__(self, *args, **kwargs): class AutoModelForVisualQuestionAnswering (line 615) | class AutoModelForVisualQuestionAnswering(metaclass=DummyObject): method __init__ (line 618) | def __init__(self, *args, **kwargs): class AutoModelForZeroShotObjectDetection (line 622) | class AutoModelForZeroShotObjectDetection(metaclass=DummyObject): method __init__ (line 625) | def __init__(self, *args, **kwargs): class AutoModelWithLMHead (line 629) | class AutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 632) | def __init__(self, *args, **kwargs): class BartForCausalLM (line 639) | class BartForCausalLM(metaclass=DummyObject): method __init__ (line 642) | def __init__(self, *args, **kwargs): class BartForConditionalGeneration (line 646) | class BartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 649) | def __init__(self, *args, **kwargs): class BartForQuestionAnswering (line 653) | class BartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 656) | def __init__(self, *args, **kwargs): class BartForSequenceClassification (line 660) | class BartForSequenceClassification(metaclass=DummyObject): method __init__ (line 663) | def __init__(self, *args, **kwargs): class BartModel (line 667) | class BartModel(metaclass=DummyObject): method __init__ (line 670) | def __init__(self, *args, **kwargs): class BartPretrainedModel (line 674) | class BartPretrainedModel(metaclass=DummyObject): method __init__ (line 677) | def __init__(self, *args, **kwargs): class PretrainedBartModel (line 681) | class PretrainedBartModel(metaclass=DummyObject): method __init__ (line 684) | def __init__(self, *args, **kwargs): class BeitForImageClassification (line 691) | class BeitForImageClassification(metaclass=DummyObject): method __init__ (line 694) | def __init__(self, *args, **kwargs): class BeitForMaskedImageModeling (line 698) | class BeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 701) | def __init__(self, *args, **kwargs): class BeitForSemanticSegmentation (line 705) | class BeitForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 708) | def __init__(self, *args, **kwargs): class BeitModel (line 712) | class BeitModel(metaclass=DummyObject): method __init__ (line 715) | def __init__(self, *args, **kwargs): class BeitPreTrainedModel (line 719) | class BeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 722) | def __init__(self, *args, **kwargs): class BertForMaskedLM (line 729) | class BertForMaskedLM(metaclass=DummyObject): method __init__ (line 732) | def __init__(self, *args, **kwargs): class BertForMultipleChoice (line 736) | class BertForMultipleChoice(metaclass=DummyObject): method __init__ (line 739) | def __init__(self, *args, **kwargs): class BertForNextSentencePrediction (line 743) | class BertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 746) | def __init__(self, *args, **kwargs): class BertForPreTraining (line 750) | class BertForPreTraining(metaclass=DummyObject): method __init__ (line 753) | def __init__(self, *args, **kwargs): class BertForQuestionAnswering (line 757) | class BertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 760) | def __init__(self, *args, **kwargs): class BertForSequenceClassification (line 764) | class BertForSequenceClassification(metaclass=DummyObject): method __init__ (line 767) | def __init__(self, *args, **kwargs): class BertForTokenClassification (line 771) | class BertForTokenClassification(metaclass=DummyObject): method __init__ (line 774) | def __init__(self, *args, **kwargs): class BertLayer (line 778) | class BertLayer(metaclass=DummyObject): method __init__ (line 781) | def __init__(self, *args, **kwargs): class BertLMHeadModel (line 785) | class BertLMHeadModel(metaclass=DummyObject): method __init__ (line 788) | def __init__(self, *args, **kwargs): class BertModel (line 792) | class BertModel(metaclass=DummyObject): method __init__ (line 795) | def __init__(self, *args, **kwargs): class BertPreTrainedModel (line 799) | class BertPreTrainedModel(metaclass=DummyObject): method __init__ (line 802) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert (line 806) | def load_tf_weights_in_bert(*args, **kwargs): class BertGenerationDecoder (line 810) | class BertGenerationDecoder(metaclass=DummyObject): method __init__ (line 813) | def __init__(self, *args, **kwargs): class BertGenerationEncoder (line 817) | class BertGenerationEncoder(metaclass=DummyObject): method __init__ (line 820) | def __init__(self, *args, **kwargs): class BertGenerationPreTrainedModel (line 824) | class BertGenerationPreTrainedModel(metaclass=DummyObject): method __init__ (line 827) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert_generation (line 831) | def load_tf_weights_in_bert_generation(*args, **kwargs): class BigBirdForCausalLM (line 838) | class BigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 841) | def __init__(self, *args, **kwargs): class BigBirdForMaskedLM (line 845) | class BigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 848) | def __init__(self, *args, **kwargs): class BigBirdForMultipleChoice (line 852) | class BigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 855) | def __init__(self, *args, **kwargs): class BigBirdForPreTraining (line 859) | class BigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 862) | def __init__(self, *args, **kwargs): class BigBirdForQuestionAnswering (line 866) | class BigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 869) | def __init__(self, *args, **kwargs): class BigBirdForSequenceClassification (line 873) | class BigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 876) | def __init__(self, *args, **kwargs): class BigBirdForTokenClassification (line 880) | class BigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 883) | def __init__(self, *args, **kwargs): class BigBirdLayer (line 887) | class BigBirdLayer(metaclass=DummyObject): method __init__ (line 890) | def __init__(self, *args, **kwargs): class BigBirdModel (line 894) | class BigBirdModel(metaclass=DummyObject): method __init__ (line 897) | def __init__(self, *args, **kwargs): class BigBirdPreTrainedModel (line 901) | class BigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 904) | def __init__(self, *args, **kwargs): function load_tf_weights_in_big_bird (line 908) | def load_tf_weights_in_big_bird(*args, **kwargs): class BigBirdPegasusForCausalLM (line 915) | class BigBirdPegasusForCausalLM(metaclass=DummyObject): method __init__ (line 918) | def __init__(self, *args, **kwargs): class BigBirdPegasusForConditionalGeneration (line 922) | class BigBirdPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 925) | def __init__(self, *args, **kwargs): class BigBirdPegasusForQuestionAnswering (line 929) | class BigBirdPegasusForQuestionAnswering(metaclass=DummyObject): method __init__ (line 932) | def __init__(self, *args, **kwargs): class BigBirdPegasusForSequenceClassification (line 936) | class BigBirdPegasusForSequenceClassification(metaclass=DummyObject): method __init__ (line 939) | def __init__(self, *args, **kwargs): class BigBirdPegasusModel (line 943) | class BigBirdPegasusModel(metaclass=DummyObject): method __init__ (line 946) | def __init__(self, *args, **kwargs): class BigBirdPegasusPreTrainedModel (line 950) | class BigBirdPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 953) | def __init__(self, *args, **kwargs): class BlenderbotForCausalLM (line 960) | class BlenderbotForCausalLM(metaclass=DummyObject): method __init__ (line 963) | def __init__(self, *args, **kwargs): class BlenderbotForConditionalGeneration (line 967) | class BlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 970) | def __init__(self, *args, **kwargs): class BlenderbotModel (line 974) | class BlenderbotModel(metaclass=DummyObject): method __init__ (line 977) | def __init__(self, *args, **kwargs): class BlenderbotPreTrainedModel (line 981) | class BlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 984) | def __init__(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 991) | class BlenderbotSmallForCausalLM(metaclass=DummyObject): method __init__ (line 994) | def __init__(self, *args, **kwargs): class BlenderbotSmallForConditionalGeneration (line 998) | class BlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1001) | def __init__(self, *args, **kwargs): class BlenderbotSmallModel (line 1005) | class BlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 1008) | def __init__(self, *args, **kwargs): class BlenderbotSmallPreTrainedModel (line 1012) | class BlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 1015) | def __init__(self, *args, **kwargs): class BloomForCausalLM (line 1022) | class BloomForCausalLM(metaclass=DummyObject): method __init__ (line 1025) | def __init__(self, *args, **kwargs): class BloomForQuestionAnswering (line 1029) | class BloomForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1032) | def __init__(self, *args, **kwargs): class BloomForSequenceClassification (line 1036) | class BloomForSequenceClassification(metaclass=DummyObject): method __init__ (line 1039) | def __init__(self, *args, **kwargs): class BloomForTokenClassification (line 1043) | class BloomForTokenClassification(metaclass=DummyObject): method __init__ (line 1046) | def __init__(self, *args, **kwargs): class BloomModel (line 1050) | class BloomModel(metaclass=DummyObject): method __init__ (line 1053) | def __init__(self, *args, **kwargs): class BloomPreTrainedModel (line 1057) | class BloomPreTrainedModel(metaclass=DummyObject): method __init__ (line 1060) | def __init__(self, *args, **kwargs): class CamembertForCausalLM (line 1067) | class CamembertForCausalLM(metaclass=DummyObject): method __init__ (line 1070) | def __init__(self, *args, **kwargs): class CamembertForMaskedLM (line 1074) | class CamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 1077) | def __init__(self, *args, **kwargs): class CamembertForMultipleChoice (line 1081) | class CamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1084) | def __init__(self, *args, **kwargs): class CamembertForQuestionAnswering (line 1088) | class CamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1091) | def __init__(self, *args, **kwargs): class CamembertForSequenceClassification (line 1095) | class CamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1098) | def __init__(self, *args, **kwargs): class CamembertForTokenClassification (line 1102) | class CamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 1105) | def __init__(self, *args, **kwargs): class CamembertModel (line 1109) | class CamembertModel(metaclass=DummyObject): method __init__ (line 1112) | def __init__(self, *args, **kwargs): class CamembertPreTrainedModel (line 1116) | class CamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1119) | def __init__(self, *args, **kwargs): class CanineForMultipleChoice (line 1126) | class CanineForMultipleChoice(metaclass=DummyObject): method __init__ (line 1129) | def __init__(self, *args, **kwargs): class CanineForQuestionAnswering (line 1133) | class CanineForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1136) | def __init__(self, *args, **kwargs): class CanineForSequenceClassification (line 1140) | class CanineForSequenceClassification(metaclass=DummyObject): method __init__ (line 1143) | def __init__(self, *args, **kwargs): class CanineForTokenClassification (line 1147) | class CanineForTokenClassification(metaclass=DummyObject): method __init__ (line 1150) | def __init__(self, *args, **kwargs): class CanineLayer (line 1154) | class CanineLayer(metaclass=DummyObject): method __init__ (line 1157) | def __init__(self, *args, **kwargs): class CanineModel (line 1161) | class CanineModel(metaclass=DummyObject): method __init__ (line 1164) | def __init__(self, *args, **kwargs): class CaninePreTrainedModel (line 1168) | class CaninePreTrainedModel(metaclass=DummyObject): method __init__ (line 1171) | def __init__(self, *args, **kwargs): function load_tf_weights_in_canine (line 1175) | def load_tf_weights_in_canine(*args, **kwargs): class CLIPModel (line 1182) | class CLIPModel(metaclass=DummyObject): method __init__ (line 1185) | def __init__(self, *args, **kwargs): class CLIPPreTrainedModel (line 1189) | class CLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 1192) | def __init__(self, *args, **kwargs): class CLIPTextModel (line 1196) | class CLIPTextModel(metaclass=DummyObject): method __init__ (line 1199) | def __init__(self, *args, **kwargs): class CLIPVisionModel (line 1203) | class CLIPVisionModel(metaclass=DummyObject): method __init__ (line 1206) | def __init__(self, *args, **kwargs): class CodeGenForCausalLM (line 1213) | class CodeGenForCausalLM(metaclass=DummyObject): method __init__ (line 1216) | def __init__(self, *args, **kwargs): class CodeGenModel (line 1220) | class CodeGenModel(metaclass=DummyObject): method __init__ (line 1223) | def __init__(self, *args, **kwargs): class CodeGenPreTrainedModel (line 1227) | class CodeGenPreTrainedModel(metaclass=DummyObject): method __init__ (line 1230) | def __init__(self, *args, **kwargs): class ConvBertForMaskedLM (line 1237) | class ConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class ConvBertForMultipleChoice (line 1244) | class ConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class ConvBertForQuestionAnswering (line 1251) | class ConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1254) | def __init__(self, *args, **kwargs): class ConvBertForSequenceClassification (line 1258) | class ConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1261) | def __init__(self, *args, **kwargs): class ConvBertForTokenClassification (line 1265) | class ConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1268) | def __init__(self, *args, **kwargs): class ConvBertLayer (line 1272) | class ConvBertLayer(metaclass=DummyObject): method __init__ (line 1275) | def __init__(self, *args, **kwargs): class ConvBertModel (line 1279) | class ConvBertModel(metaclass=DummyObject): method __init__ (line 1282) | def __init__(self, *args, **kwargs): class ConvBertPreTrainedModel (line 1286) | class ConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1289) | def __init__(self, *args, **kwargs): function load_tf_weights_in_convbert (line 1293) | def load_tf_weights_in_convbert(*args, **kwargs): class ConvNextForImageClassification (line 1300) | class ConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 1303) | def __init__(self, *args, **kwargs): class ConvNextModel (line 1307) | class ConvNextModel(metaclass=DummyObject): method __init__ (line 1310) | def __init__(self, *args, **kwargs): class ConvNextPreTrainedModel (line 1314) | class ConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 1317) | def __init__(self, *args, **kwargs): class CTRLForSequenceClassification (line 1324) | class CTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 1327) | def __init__(self, *args, **kwargs): class CTRLLMHeadModel (line 1331) | class CTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 1334) | def __init__(self, *args, **kwargs): class CTRLModel (line 1338) | class CTRLModel(metaclass=DummyObject): method __init__ (line 1341) | def __init__(self, *args, **kwargs): class CTRLPreTrainedModel (line 1345) | class CTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 1348) | def __init__(self, *args, **kwargs): class CvtForImageClassification (line 1355) | class CvtForImageClassification(metaclass=DummyObject): method __init__ (line 1358) | def __init__(self, *args, **kwargs): class CvtModel (line 1362) | class CvtModel(metaclass=DummyObject): method __init__ (line 1365) | def __init__(self, *args, **kwargs): class CvtPreTrainedModel (line 1369) | class CvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 1372) | def __init__(self, *args, **kwargs): class Data2VecAudioForAudioFrameClassification (line 1385) | class Data2VecAudioForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 1388) | def __init__(self, *args, **kwargs): class Data2VecAudioForCTC (line 1392) | class Data2VecAudioForCTC(metaclass=DummyObject): method __init__ (line 1395) | def __init__(self, *args, **kwargs): class Data2VecAudioForSequenceClassification (line 1399) | class Data2VecAudioForSequenceClassification(metaclass=DummyObject): method __init__ (line 1402) | def __init__(self, *args, **kwargs): class Data2VecAudioForXVector (line 1406) | class Data2VecAudioForXVector(metaclass=DummyObject): method __init__ (line 1409) | def __init__(self, *args, **kwargs): class Data2VecAudioModel (line 1413) | class Data2VecAudioModel(metaclass=DummyObject): method __init__ (line 1416) | def __init__(self, *args, **kwargs): class Data2VecAudioPreTrainedModel (line 1420) | class Data2VecAudioPreTrainedModel(metaclass=DummyObject): method __init__ (line 1423) | def __init__(self, *args, **kwargs): class Data2VecTextForCausalLM (line 1427) | class Data2VecTextForCausalLM(metaclass=DummyObject): method __init__ (line 1430) | def __init__(self, *args, **kwargs): class Data2VecTextForMaskedLM (line 1434) | class Data2VecTextForMaskedLM(metaclass=DummyObject): method __init__ (line 1437) | def __init__(self, *args, **kwargs): class Data2VecTextForMultipleChoice (line 1441) | class Data2VecTextForMultipleChoice(metaclass=DummyObject): method __init__ (line 1444) | def __init__(self, *args, **kwargs): class Data2VecTextForQuestionAnswering (line 1448) | class Data2VecTextForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1451) | def __init__(self, *args, **kwargs): class Data2VecTextForSequenceClassification (line 1455) | class Data2VecTextForSequenceClassification(metaclass=DummyObject): method __init__ (line 1458) | def __init__(self, *args, **kwargs): class Data2VecTextForTokenClassification (line 1462) | class Data2VecTextForTokenClassification(metaclass=DummyObject): method __init__ (line 1465) | def __init__(self, *args, **kwargs): class Data2VecTextModel (line 1469) | class Data2VecTextModel(metaclass=DummyObject): method __init__ (line 1472) | def __init__(self, *args, **kwargs): class Data2VecTextPreTrainedModel (line 1476) | class Data2VecTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 1479) | def __init__(self, *args, **kwargs): class Data2VecVisionForImageClassification (line 1483) | class Data2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 1486) | def __init__(self, *args, **kwargs): class Data2VecVisionForSemanticSegmentation (line 1490) | class Data2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1493) | def __init__(self, *args, **kwargs): class Data2VecVisionModel (line 1497) | class Data2VecVisionModel(metaclass=DummyObject): method __init__ (line 1500) | def __init__(self, *args, **kwargs): class Data2VecVisionPreTrainedModel (line 1504) | class Data2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 1507) | def __init__(self, *args, **kwargs): class DebertaForMaskedLM (line 1514) | class DebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 1517) | def __init__(self, *args, **kwargs): class DebertaForQuestionAnswering (line 1521) | class DebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1524) | def __init__(self, *args, **kwargs): class DebertaForSequenceClassification (line 1528) | class DebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 1531) | def __init__(self, *args, **kwargs): class DebertaForTokenClassification (line 1535) | class DebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 1538) | def __init__(self, *args, **kwargs): class DebertaModel (line 1542) | class DebertaModel(metaclass=DummyObject): method __init__ (line 1545) | def __init__(self, *args, **kwargs): class DebertaPreTrainedModel (line 1549) | class DebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 1552) | def __init__(self, *args, **kwargs): class DebertaV2ForMaskedLM (line 1559) | class DebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 1562) | def __init__(self, *args, **kwargs): class DebertaV2ForMultipleChoice (line 1566) | class DebertaV2ForMultipleChoice(metaclass=DummyObject): method __init__ (line 1569) | def __init__(self, *args, **kwargs): class DebertaV2ForQuestionAnswering (line 1573) | class DebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1576) | def __init__(self, *args, **kwargs): class DebertaV2ForSequenceClassification (line 1580) | class DebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1583) | def __init__(self, *args, **kwargs): class DebertaV2ForTokenClassification (line 1587) | class DebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 1590) | def __init__(self, *args, **kwargs): class DebertaV2Model (line 1594) | class DebertaV2Model(metaclass=DummyObject): method __init__ (line 1597) | def __init__(self, *args, **kwargs): class DebertaV2PreTrainedModel (line 1601) | class DebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1604) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2Model (line 1611) | class DecisionTransformerGPT2Model(metaclass=DummyObject): method __init__ (line 1614) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2PreTrainedModel (line 1618) | class DecisionTransformerGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1621) | def __init__(self, *args, **kwargs): class DecisionTransformerModel (line 1625) | class DecisionTransformerModel(metaclass=DummyObject): method __init__ (line 1628) | def __init__(self, *args, **kwargs): class DecisionTransformerPreTrainedModel (line 1632) | class DecisionTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1635) | def __init__(self, *args, **kwargs): class DeiTForImageClassification (line 1642) | class DeiTForImageClassification(metaclass=DummyObject): method __init__ (line 1645) | def __init__(self, *args, **kwargs): class DeiTForImageClassificationWithTeacher (line 1649) | class DeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 1652) | def __init__(self, *args, **kwargs): class DeiTForMaskedImageModeling (line 1656) | class DeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 1659) | def __init__(self, *args, **kwargs): class DeiTModel (line 1663) | class DeiTModel(metaclass=DummyObject): method __init__ (line 1666) | def __init__(self, *args, **kwargs): class DeiTPreTrainedModel (line 1670) | class DeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1673) | def __init__(self, *args, **kwargs): class DistilBertForMaskedLM (line 1680) | class DistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1683) | def __init__(self, *args, **kwargs): class DistilBertForMultipleChoice (line 1687) | class DistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1690) | def __init__(self, *args, **kwargs): class DistilBertForQuestionAnswering (line 1694) | class DistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1697) | def __init__(self, *args, **kwargs): class DistilBertForSequenceClassification (line 1701) | class DistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1704) | def __init__(self, *args, **kwargs): class DistilBertForTokenClassification (line 1708) | class DistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1711) | def __init__(self, *args, **kwargs): class DistilBertModel (line 1715) | class DistilBertModel(metaclass=DummyObject): method __init__ (line 1718) | def __init__(self, *args, **kwargs): class DistilBertPreTrainedModel (line 1722) | class DistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1725) | def __init__(self, *args, **kwargs): class DonutSwinModel (line 1732) | class DonutSwinModel(metaclass=DummyObject): method __init__ (line 1735) | def __init__(self, *args, **kwargs): class DonutSwinPreTrainedModel (line 1739) | class DonutSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 1742) | def __init__(self, *args, **kwargs): class DPRContextEncoder (line 1755) | class DPRContextEncoder(metaclass=DummyObject): method __init__ (line 1758) | def __init__(self, *args, **kwargs): class DPRPretrainedContextEncoder (line 1762) | class DPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 1765) | def __init__(self, *args, **kwargs): class DPRPreTrainedModel (line 1769) | class DPRPreTrainedModel(metaclass=DummyObject): method __init__ (line 1772) | def __init__(self, *args, **kwargs): class DPRPretrainedQuestionEncoder (line 1776) | class DPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 1779) | def __init__(self, *args, **kwargs): class DPRPretrainedReader (line 1783) | class DPRPretrainedReader(metaclass=DummyObject): method __init__ (line 1786) | def __init__(self, *args, **kwargs): class DPRQuestionEncoder (line 1790) | class DPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 1793) | def __init__(self, *args, **kwargs): class DPRReader (line 1797) | class DPRReader(metaclass=DummyObject): method __init__ (line 1800) | def __init__(self, *args, **kwargs): class DPTForDepthEstimation (line 1807) | class DPTForDepthEstimation(metaclass=DummyObject): method __init__ (line 1810) | def __init__(self, *args, **kwargs): class DPTForSemanticSegmentation (line 1814) | class DPTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1817) | def __init__(self, *args, **kwargs): class DPTModel (line 1821) | class DPTModel(metaclass=DummyObject): method __init__ (line 1824) | def __init__(self, *args, **kwargs): class DPTPreTrainedModel (line 1828) | class DPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1831) | def __init__(self, *args, **kwargs): class ElectraForCausalLM (line 1838) | class ElectraForCausalLM(metaclass=DummyObject): method __init__ (line 1841) | def __init__(self, *args, **kwargs): class ElectraForMaskedLM (line 1845) | class ElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 1848) | def __init__(self, *args, **kwargs): class ElectraForMultipleChoice (line 1852) | class ElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 1855) | def __init__(self, *args, **kwargs): class ElectraForPreTraining (line 1859) | class ElectraForPreTraining(metaclass=DummyObject): method __init__ (line 1862) | def __init__(self, *args, **kwargs): class ElectraForQuestionAnswering (line 1866) | class ElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1869) | def __init__(self, *args, **kwargs): class ElectraForSequenceClassification (line 1873) | class ElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 1876) | def __init__(self, *args, **kwargs): class ElectraForTokenClassification (line 1880) | class ElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 1883) | def __init__(self, *args, **kwargs): class ElectraModel (line 1887) | class ElectraModel(metaclass=DummyObject): method __init__ (line 1890) | def __init__(self, *args, **kwargs): class ElectraPreTrainedModel (line 1894) | class ElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 1897) | def __init__(self, *args, **kwargs): function load_tf_weights_in_electra (line 1901) | def load_tf_weights_in_electra(*args, **kwargs): class EncoderDecoderModel (line 1905) | class EncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1908) | def __init__(self, *args, **kwargs): class ErnieForCausalLM (line 1915) | class ErnieForCausalLM(metaclass=DummyObject): method __init__ (line 1918) | def __init__(self, *args, **kwargs): class ErnieForMaskedLM (line 1922) | class ErnieForMaskedLM(metaclass=DummyObject): method __init__ (line 1925) | def __init__(self, *args, **kwargs): class ErnieForMultipleChoice (line 1929) | class ErnieForMultipleChoice(metaclass=DummyObject): method __init__ (line 1932) | def __init__(self, *args, **kwargs): class ErnieForNextSentencePrediction (line 1936) | class ErnieForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 1939) | def __init__(self, *args, **kwargs): class ErnieForPreTraining (line 1943) | class ErnieForPreTraining(metaclass=DummyObject): method __init__ (line 1946) | def __init__(self, *args, **kwargs): class ErnieForQuestionAnswering (line 1950) | class ErnieForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1953) | def __init__(self, *args, **kwargs): class ErnieForSequenceClassification (line 1957) | class ErnieForSequenceClassification(metaclass=DummyObject): method __init__ (line 1960) | def __init__(self, *args, **kwargs): class ErnieForTokenClassification (line 1964) | class ErnieForTokenClassification(metaclass=DummyObject): method __init__ (line 1967) | def __init__(self, *args, **kwargs): class ErnieModel (line 1971) | class ErnieModel(metaclass=DummyObject): method __init__ (line 1974) | def __init__(self, *args, **kwargs): class ErniePreTrainedModel (line 1978) | class ErniePreTrainedModel(metaclass=DummyObject): method __init__ (line 1981) | def __init__(self, *args, **kwargs): class EsmFoldPreTrainedModel (line 1988) | class EsmFoldPreTrainedModel(metaclass=DummyObject): method __init__ (line 1991) | def __init__(self, *args, **kwargs): class EsmForMaskedLM (line 1995) | class EsmForMaskedLM(metaclass=DummyObject): method __init__ (line 1998) | def __init__(self, *args, **kwargs): class EsmForProteinFolding (line 2002) | class EsmForProteinFolding(metaclass=DummyObject): method __init__ (line 2005) | def __init__(self, *args, **kwargs): class EsmForSequenceClassification (line 2009) | class EsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 2012) | def __init__(self, *args, **kwargs): class EsmForTokenClassification (line 2016) | class EsmForTokenClassification(metaclass=DummyObject): method __init__ (line 2019) | def __init__(self, *args, **kwargs): class EsmModel (line 2023) | class EsmModel(metaclass=DummyObject): method __init__ (line 2026) | def __init__(self, *args, **kwargs): class EsmPreTrainedModel (line 2030) | class EsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 2033) | def __init__(self, *args, **kwargs): class FlaubertForMultipleChoice (line 2040) | class FlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2043) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnswering (line 2047) | class FlaubertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2050) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnsweringSimple (line 2054) | class FlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2057) | def __init__(self, *args, **kwargs): class FlaubertForSequenceClassification (line 2061) | class FlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2064) | def __init__(self, *args, **kwargs): class FlaubertForTokenClassification (line 2068) | class FlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 2071) | def __init__(self, *args, **kwargs): class FlaubertModel (line 2075) | class FlaubertModel(metaclass=DummyObject): method __init__ (line 2078) | def __init__(self, *args, **kwargs): class FlaubertPreTrainedModel (line 2082) | class FlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2085) | def __init__(self, *args, **kwargs): class FlaubertWithLMHeadModel (line 2089) | class FlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 2092) | def __init__(self, *args, **kwargs): class FlavaForPreTraining (line 2099) | class FlavaForPreTraining(metaclass=DummyObject): method __init__ (line 2102) | def __init__(self, *args, **kwargs): class FlavaImageCodebook (line 2106) | class FlavaImageCodebook(metaclass=DummyObject): method __init__ (line 2109) | def __init__(self, *args, **kwargs): class FlavaImageModel (line 2113) | class FlavaImageModel(metaclass=DummyObject): method __init__ (line 2116) | def __init__(self, *args, **kwargs): class FlavaModel (line 2120) | class FlavaModel(metaclass=DummyObject): method __init__ (line 2123) | def __init__(self, *args, **kwargs): class FlavaMultimodalModel (line 2127) | class FlavaMultimodalModel(metaclass=DummyObject): method __init__ (line 2130) | def __init__(self, *args, **kwargs): class FlavaPreTrainedModel (line 2134) | class FlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2137) | def __init__(self, *args, **kwargs): class FlavaTextModel (line 2141) | class FlavaTextModel(metaclass=DummyObject): method __init__ (line 2144) | def __init__(self, *args, **kwargs): class FNetForMaskedLM (line 2151) | class FNetForMaskedLM(metaclass=DummyObject): method __init__ (line 2154) | def __init__(self, *args, **kwargs): class FNetForMultipleChoice (line 2158) | class FNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 2161) | def __init__(self, *args, **kwargs): class FNetForNextSentencePrediction (line 2165) | class FNetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 2168) | def __init__(self, *args, **kwargs): class FNetForPreTraining (line 2172) | class FNetForPreTraining(metaclass=DummyObject): method __init__ (line 2175) | def __init__(self, *args, **kwargs): class FNetForQuestionAnswering (line 2179) | class FNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2182) | def __init__(self, *args, **kwargs): class FNetForSequenceClassification (line 2186) | class FNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 2189) | def __init__(self, *args, **kwargs): class FNetForTokenClassification (line 2193) | class FNetForTokenClassification(metaclass=DummyObject): method __init__ (line 2196) | def __init__(self, *args, **kwargs): class FNetLayer (line 2200) | class FNetLayer(metaclass=DummyObject): method __init__ (line 2203) | def __init__(self, *args, **kwargs): class FNetModel (line 2207) | class FNetModel(metaclass=DummyObject): method __init__ (line 2210) | def __init__(self, *args, **kwargs): class FNetPreTrainedModel (line 2214) | class FNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2217) | def __init__(self, *args, **kwargs): class FSMTForConditionalGeneration (line 2221) | class FSMTForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2224) | def __init__(self, *args, **kwargs): class FSMTModel (line 2228) | class FSMTModel(metaclass=DummyObject): method __init__ (line 2231) | def __init__(self, *args, **kwargs): class PretrainedFSMTModel (line 2235) | class PretrainedFSMTModel(metaclass=DummyObject): method __init__ (line 2238) | def __init__(self, *args, **kwargs): class FunnelBaseModel (line 2245) | class FunnelBaseModel(metaclass=DummyObject): method __init__ (line 2248) | def __init__(self, *args, **kwargs): class FunnelForMaskedLM (line 2252) | class FunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 2255) | def __init__(self, *args, **kwargs): class FunnelForMultipleChoice (line 2259) | class FunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 2262) | def __init__(self, *args, **kwargs): class FunnelForPreTraining (line 2266) | class FunnelForPreTraining(metaclass=DummyObject): method __init__ (line 2269) | def __init__(self, *args, **kwargs): class FunnelForQuestionAnswering (line 2273) | class FunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2276) | def __init__(self, *args, **kwargs): class FunnelForSequenceClassification (line 2280) | class FunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 2283) | def __init__(self, *args, **kwargs): class FunnelForTokenClassification (line 2287) | class FunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 2290) | def __init__(self, *args, **kwargs): class FunnelModel (line 2294) | class FunnelModel(metaclass=DummyObject): method __init__ (line 2297) | def __init__(self, *args, **kwargs): class FunnelPreTrainedModel (line 2301) | class FunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 2304) | def __init__(self, *args, **kwargs): function load_tf_weights_in_funnel (line 2308) | def load_tf_weights_in_funnel(*args, **kwargs): class GLPNForDepthEstimation (line 2315) | class GLPNForDepthEstimation(metaclass=DummyObject): method __init__ (line 2318) | def __init__(self, *args, **kwargs): class GLPNModel (line 2322) | class GLPNModel(metaclass=DummyObject): method __init__ (line 2325) | def __init__(self, *args, **kwargs): class GLPNPreTrainedModel (line 2329) | class GLPNPreTrainedModel(metaclass=DummyObject): method __init__ (line 2332) | def __init__(self, *args, **kwargs): class GPT2DoubleHeadsModel (line 2339) | class GPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 2342) | def __init__(self, *args, **kwargs): class GPT2ForSequenceClassification (line 2346) | class GPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2349) | def __init__(self, *args, **kwargs): class GPT2ForTokenClassification (line 2353) | class GPT2ForTokenClassification(metaclass=DummyObject): method __init__ (line 2356) | def __init__(self, *args, **kwargs): class GPT2LMHeadModel (line 2360) | class GPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 2363) | def __init__(self, *args, **kwargs): class GPT2Model (line 2367) | class GPT2Model(metaclass=DummyObject): method __init__ (line 2370) | def __init__(self, *args, **kwargs): class GPT2PreTrainedModel (line 2374) | class GPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2377) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt2 (line 2381) | def load_tf_weights_in_gpt2(*args, **kwargs): class GPTNeoForCausalLM (line 2388) | class GPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 2391) | def __init__(self, *args, **kwargs): class GPTNeoForSequenceClassification (line 2395) | class GPTNeoForSequenceClassification(metaclass=DummyObject): method __init__ (line 2398) | def __init__(self, *args, **kwargs): class GPTNeoModel (line 2402) | class GPTNeoModel(metaclass=DummyObject): method __init__ (line 2405) | def __init__(self, *args, **kwargs): class GPTNeoPreTrainedModel (line 2409) | class GPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 2412) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt_neo (line 2416) | def load_tf_weights_in_gpt_neo(*args, **kwargs): class GPTNeoXForCausalLM (line 2423) | class GPTNeoXForCausalLM(metaclass=DummyObject): method __init__ (line 2426) | def __init__(self, *args, **kwargs): class GPTNeoXLayer (line 2430) | class GPTNeoXLayer(metaclass=DummyObject): method __init__ (line 2433) | def __init__(self, *args, **kwargs): class GPTNeoXModel (line 2437) | class GPTNeoXModel(metaclass=DummyObject): method __init__ (line 2440) | def __init__(self, *args, **kwargs): class GPTNeoXPreTrainedModel (line 2444) | class GPTNeoXPreTrainedModel(metaclass=DummyObject): method __init__ (line 2447) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseForCausalLM (line 2454) | class GPTNeoXJapaneseForCausalLM(metaclass=DummyObject): method __init__ (line 2457) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseLayer (line 2461) | class GPTNeoXJapaneseLayer(metaclass=DummyObject): method __init__ (line 2464) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseModel (line 2468) | class GPTNeoXJapaneseModel(metaclass=DummyObject): method __init__ (line 2471) | def __init__(self, *args, **kwargs): class GPTNeoXJapanesePreTrainedModel (line 2475) | class GPTNeoXJapanesePreTrainedModel(metaclass=DummyObject): method __init__ (line 2478) | def __init__(self, *args, **kwargs): class GPTJForCausalLM (line 2485) | class GPTJForCausalLM(metaclass=DummyObject): method __init__ (line 2488) | def __init__(self, *args, **kwargs): class GPTJForQuestionAnswering (line 2492) | class GPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2495) | def __init__(self, *args, **kwargs): class GPTJForSequenceClassification (line 2499) | class GPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 2502) | def __init__(self, *args, **kwargs): class GPTJModel (line 2506) | class GPTJModel(metaclass=DummyObject): method __init__ (line 2509) | def __init__(self, *args, **kwargs): class GPTJPreTrainedModel (line 2513) | class GPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 2516) | def __init__(self, *args, **kwargs): class GroupViTModel (line 2523) | class GroupViTModel(metaclass=DummyObject): method __init__ (line 2526) | def __init__(self, *args, **kwargs): class GroupViTPreTrainedModel (line 2530) | class GroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2533) | def __init__(self, *args, **kwargs): class GroupViTTextModel (line 2537) | class GroupViTTextModel(metaclass=DummyObject): method __init__ (line 2540) | def __init__(self, *args, **kwargs): class GroupViTVisionModel (line 2544) | class GroupViTVisionModel(metaclass=DummyObject): method __init__ (line 2547) | def __init__(self, *args, **kwargs): class HubertForCTC (line 2554) | class HubertForCTC(metaclass=DummyObject): method __init__ (line 2557) | def __init__(self, *args, **kwargs): class HubertForSequenceClassification (line 2561) | class HubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2564) | def __init__(self, *args, **kwargs): class HubertModel (line 2568) | class HubertModel(metaclass=DummyObject): method __init__ (line 2571) | def __init__(self, *args, **kwargs): class HubertPreTrainedModel (line 2575) | class HubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2578) | def __init__(self, *args, **kwargs): class IBertForMaskedLM (line 2585) | class IBertForMaskedLM(metaclass=DummyObject): method __init__ (line 2588) | def __init__(self, *args, **kwargs): class IBertForMultipleChoice (line 2592) | class IBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2595) | def __init__(self, *args, **kwargs): class IBertForQuestionAnswering (line 2599) | class IBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2602) | def __init__(self, *args, **kwargs): class IBertForSequenceClassification (line 2606) | class IBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2609) | def __init__(self, *args, **kwargs): class IBertForTokenClassification (line 2613) | class IBertForTokenClassification(metaclass=DummyObject): method __init__ (line 2616) | def __init__(self, *args, **kwargs): class IBertModel (line 2620) | class IBertModel(metaclass=DummyObject): method __init__ (line 2623) | def __init__(self, *args, **kwargs): class IBertPreTrainedModel (line 2627) | class IBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2630) | def __init__(self, *args, **kwargs): class ImageGPTForCausalImageModeling (line 2637) | class ImageGPTForCausalImageModeling(metaclass=DummyObject): method __init__ (line 2640) | def __init__(self, *args, **kwargs): class ImageGPTForImageClassification (line 2644) | class ImageGPTForImageClassification(metaclass=DummyObject): method __init__ (line 2647) | def __init__(self, *args, **kwargs): class ImageGPTModel (line 2651) | class ImageGPTModel(metaclass=DummyObject): method __init__ (line 2654) | def __init__(self, *args, **kwargs): class ImageGPTPreTrainedModel (line 2658) | class ImageGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2661) | def __init__(self, *args, **kwargs): function load_tf_weights_in_imagegpt (line 2665) | def load_tf_weights_in_imagegpt(*args, **kwargs): class LayoutLMForMaskedLM (line 2672) | class LayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 2675) | def __init__(self, *args, **kwargs): class LayoutLMForQuestionAnswering (line 2679) | class LayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2682) | def __init__(self, *args, **kwargs): class LayoutLMForSequenceClassification (line 2686) | class LayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2689) | def __init__(self, *args, **kwargs): class LayoutLMForTokenClassification (line 2693) | class LayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 2696) | def __init__(self, *args, **kwargs): class LayoutLMModel (line 2700) | class LayoutLMModel(metaclass=DummyObject): method __init__ (line 2703) | def __init__(self, *args, **kwargs): class LayoutLMPreTrainedModel (line 2707) | class LayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2710) | def __init__(self, *args, **kwargs): class LayoutLMv2ForQuestionAnswering (line 2717) | class LayoutLMv2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2720) | def __init__(self, *args, **kwargs): class LayoutLMv2ForSequenceClassification (line 2724) | class LayoutLMv2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2727) | def __init__(self, *args, **kwargs): class LayoutLMv2ForTokenClassification (line 2731) | class LayoutLMv2ForTokenClassification(metaclass=DummyObject): method __init__ (line 2734) | def __init__(self, *args, **kwargs): class LayoutLMv2Model (line 2738) | class LayoutLMv2Model(metaclass=DummyObject): method __init__ (line 2741) | def __init__(self, *args, **kwargs): class LayoutLMv2PreTrainedModel (line 2745) | class LayoutLMv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2748) | def __init__(self, *args, **kwargs): class LayoutLMv3ForQuestionAnswering (line 2755) | class LayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2758) | def __init__(self, *args, **kwargs): class LayoutLMv3ForSequenceClassification (line 2762) | class LayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2765) | def __init__(self, *args, **kwargs): class LayoutLMv3ForTokenClassification (line 2769) | class LayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 2772) | def __init__(self, *args, **kwargs): class LayoutLMv3Model (line 2776) | class LayoutLMv3Model(metaclass=DummyObject): method __init__ (line 2779) | def __init__(self, *args, **kwargs): class LayoutLMv3PreTrainedModel (line 2783) | class LayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 2786) | def __init__(self, *args, **kwargs): class LEDForConditionalGeneration (line 2793) | class LEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2796) | def __init__(self, *args, **kwargs): class LEDForQuestionAnswering (line 2800) | class LEDForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2803) | def __init__(self, *args, **kwargs): class LEDForSequenceClassification (line 2807) | class LEDForSequenceClassification(metaclass=DummyObject): method __init__ (line 2810) | def __init__(self, *args, **kwargs): class LEDModel (line 2814) | class LEDModel(metaclass=DummyObject): method __init__ (line 2817) | def __init__(self, *args, **kwargs): class LEDPreTrainedModel (line 2821) | class LEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 2824) | def __init__(self, *args, **kwargs): class LevitForImageClassification (line 2831) | class LevitForImageClassification(metaclass=DummyObject): method __init__ (line 2834) | def __init__(self, *args, **kwargs): class LevitForImageClassificationWithTeacher (line 2838) | class LevitForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 2841) | def __init__(self, *args, **kwargs): class LevitModel (line 2845) | class LevitModel(metaclass=DummyObject): method __init__ (line 2848) | def __init__(self, *args, **kwargs): class LevitPreTrainedModel (line 2852) | class LevitPreTrainedModel(metaclass=DummyObject): method __init__ (line 2855) | def __init__(self, *args, **kwargs): class LiltForQuestionAnswering (line 2862) | class LiltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2865) | def __init__(self, *args, **kwargs): class LiltForSequenceClassification (line 2869) | class LiltForSequenceClassification(metaclass=DummyObject): method __init__ (line 2872) | def __init__(self, *args, **kwargs): class LiltForTokenClassification (line 2876) | class LiltForTokenClassification(metaclass=DummyObject): method __init__ (line 2879) | def __init__(self, *args, **kwargs): class LiltModel (line 2883) | class LiltModel(metaclass=DummyObject): method __init__ (line 2886) | def __init__(self, *args, **kwargs): class LiltPreTrainedModel (line 2890) | class LiltPreTrainedModel(metaclass=DummyObject): method __init__ (line 2893) | def __init__(self, *args, **kwargs): class LongformerForMaskedLM (line 2900) | class LongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 2903) | def __init__(self, *args, **kwargs): class LongformerForMultipleChoice (line 2907) | class LongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 2910) | def __init__(self, *args, **kwargs): class LongformerForQuestionAnswering (line 2914) | class LongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2917) | def __init__(self, *args, **kwargs): class LongformerForSequenceClassification (line 2921) | class LongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 2924) | def __init__(self, *args, **kwargs): class LongformerForTokenClassification (line 2928) | class LongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 2931) | def __init__(self, *args, **kwargs): class LongformerModel (line 2935) | class LongformerModel(metaclass=DummyObject): method __init__ (line 2938) | def __init__(self, *args, **kwargs): class LongformerPreTrainedModel (line 2942) | class LongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2945) | def __init__(self, *args, **kwargs): class LongformerSelfAttention (line 2949) | class LongformerSelfAttention(metaclass=DummyObject): method __init__ (line 2952) | def __init__(self, *args, **kwargs): class LongT5EncoderModel (line 2959) | class LongT5EncoderModel(metaclass=DummyObject): method __init__ (line 2962) | def __init__(self, *args, **kwargs): class LongT5ForConditionalGeneration (line 2966) | class LongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2969) | def __init__(self, *args, **kwargs): class LongT5Model (line 2973) | class LongT5Model(metaclass=DummyObject): method __init__ (line 2976) | def __init__(self, *args, **kwargs): class LongT5PreTrainedModel (line 2980) | class LongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 2983) | def __init__(self, *args, **kwargs): class LukeForEntityClassification (line 2990) | class LukeForEntityClassification(metaclass=DummyObject): method __init__ (line 2993) | def __init__(self, *args, **kwargs): class LukeForEntityPairClassification (line 2997) | class LukeForEntityPairClassification(metaclass=DummyObject): method __init__ (line 3000) | def __init__(self, *args, **kwargs): class LukeForEntitySpanClassification (line 3004) | class LukeForEntitySpanClassification(metaclass=DummyObject): method __init__ (line 3007) | def __init__(self, *args, **kwargs): class LukeForMaskedLM (line 3011) | class LukeForMaskedLM(metaclass=DummyObject): method __init__ (line 3014) | def __init__(self, *args, **kwargs): class LukeForMultipleChoice (line 3018) | class LukeForMultipleChoice(metaclass=DummyObject): method __init__ (line 3021) | def __init__(self, *args, **kwargs): class LukeForQuestionAnswering (line 3025) | class LukeForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3028) | def __init__(self, *args, **kwargs): class LukeForSequenceClassification (line 3032) | class LukeForSequenceClassification(metaclass=DummyObject): method __init__ (line 3035) | def __init__(self, *args, **kwargs): class LukeForTokenClassification (line 3039) | class LukeForTokenClassification(metaclass=DummyObject): method __init__ (line 3042) | def __init__(self, *args, **kwargs): class LukeModel (line 3046) | class LukeModel(metaclass=DummyObject): method __init__ (line 3049) | def __init__(self, *args, **kwargs): class LukePreTrainedModel (line 3053) | class LukePreTrainedModel(metaclass=DummyObject): method __init__ (line 3056) | def __init__(self, *args, **kwargs): class LxmertEncoder (line 3060) | class LxmertEncoder(metaclass=DummyObject): method __init__ (line 3063) | def __init__(self, *args, **kwargs): class LxmertForPreTraining (line 3067) | class LxmertForPreTraining(metaclass=DummyObject): method __init__ (line 3070) | def __init__(self, *args, **kwargs): class LxmertForQuestionAnswering (line 3074) | class LxmertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3077) | def __init__(self, *args, **kwargs): class LxmertModel (line 3081) | class LxmertModel(metaclass=DummyObject): method __init__ (line 3084) | def __init__(self, *args, **kwargs): class LxmertPreTrainedModel (line 3088) | class LxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3091) | def __init__(self, *args, **kwargs): class LxmertVisualFeatureEncoder (line 3095) | class LxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 3098) | def __init__(self, *args, **kwargs): class LxmertXLayer (line 3102) | class LxmertXLayer(metaclass=DummyObject): method __init__ (line 3105) | def __init__(self, *args, **kwargs): class M2M100ForConditionalGeneration (line 3112) | class M2M100ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3115) | def __init__(self, *args, **kwargs): class M2M100Model (line 3119) | class M2M100Model(metaclass=DummyObject): method __init__ (line 3122) | def __init__(self, *args, **kwargs): class M2M100PreTrainedModel (line 3126) | class M2M100PreTrainedModel(metaclass=DummyObject): method __init__ (line 3129) | def __init__(self, *args, **kwargs): class MarianForCausalLM (line 3133) | class MarianForCausalLM(metaclass=DummyObject): method __init__ (line 3136) | def __init__(self, *args, **kwargs): class MarianModel (line 3140) | class MarianModel(metaclass=DummyObject): method __init__ (line 3143) | def __init__(self, *args, **kwargs): class MarianMTModel (line 3147) | class MarianMTModel(metaclass=DummyObject): method __init__ (line 3150) | def __init__(self, *args, **kwargs): class MarkupLMForQuestionAnswering (line 3157) | class MarkupLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3160) | def __init__(self, *args, **kwargs): class MarkupLMForSequenceClassification (line 3164) | class MarkupLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 3167) | def __init__(self, *args, **kwargs): class MarkupLMForTokenClassification (line 3171) | class MarkupLMForTokenClassification(metaclass=DummyObject): method __init__ (line 3174) | def __init__(self, *args, **kwargs): class MarkupLMModel (line 3178) | class MarkupLMModel(metaclass=DummyObject): method __init__ (line 3181) | def __init__(self, *args, **kwargs): class MarkupLMPreTrainedModel (line 3185) | class MarkupLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 3188) | def __init__(self, *args, **kwargs): class MaskFormerForInstanceSegmentation (line 3195) | class MaskFormerForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 3198) | def __init__(self, *args, **kwargs): class MaskFormerModel (line 3202) | class MaskFormerModel(metaclass=DummyObject): method __init__ (line 3205) | def __init__(self, *args, **kwargs): class MaskFormerPreTrainedModel (line 3209) | class MaskFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3212) | def __init__(self, *args, **kwargs): class MBartForCausalLM (line 3216) | class MBartForCausalLM(metaclass=DummyObject): method __init__ (line 3219) | def __init__(self, *args, **kwargs): class MBartForConditionalGeneration (line 3223) | class MBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3226) | def __init__(self, *args, **kwargs): class MBartForQuestionAnswering (line 3230) | class MBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3233) | def __init__(self, *args, **kwargs): class MBartForSequenceClassification (line 3237) | class MBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 3240) | def __init__(self, *args, **kwargs): class MBartModel (line 3244) | class MBartModel(metaclass=DummyObject): method __init__ (line 3247) | def __init__(self, *args, **kwargs): class MBartPreTrainedModel (line 3251) | class MBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 3254) | def __init__(self, *args, **kwargs): class MCTCTForCTC (line 3261) | class MCTCTForCTC(metaclass=DummyObject): method __init__ (line 3264) | def __init__(self, *args, **kwargs): class MCTCTModel (line 3268) | class MCTCTModel(metaclass=DummyObject): method __init__ (line 3271) | def __init__(self, *args, **kwargs): class MCTCTPreTrainedModel (line 3275) | class MCTCTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3278) | def __init__(self, *args, **kwargs): class MegatronBertForCausalLM (line 3285) | class MegatronBertForCausalLM(metaclass=DummyObject): method __init__ (line 3288) | def __init__(self, *args, **kwargs): class MegatronBertForMaskedLM (line 3292) | class MegatronBertForMaskedLM(metaclass=DummyObject): method __init__ (line 3295) | def __init__(self, *args, **kwargs): class MegatronBertForMultipleChoice (line 3299) | class MegatronBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3302) | def __init__(self, *args, **kwargs): class MegatronBertForNextSentencePrediction (line 3306) | class MegatronBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3309) | def __init__(self, *args, **kwargs): class MegatronBertForPreTraining (line 3313) | class MegatronBertForPreTraining(metaclass=DummyObject): method __init__ (line 3316) | def __init__(self, *args, **kwargs): class MegatronBertForQuestionAnswering (line 3320) | class MegatronBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3323) | def __init__(self, *args, **kwargs): class MegatronBertForSequenceClassification (line 3327) | class MegatronBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3330) | def __init__(self, *args, **kwargs): class MegatronBertForTokenClassification (line 3334) | class MegatronBertForTokenClassification(metaclass=DummyObject): method __init__ (line 3337) | def __init__(self, *args, **kwargs): class MegatronBertModel (line 3341) | class MegatronBertModel(metaclass=DummyObject): method __init__ (line 3344) | def __init__(self, *args, **kwargs): class MegatronBertPreTrainedModel (line 3348) | class MegatronBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3351) | def __init__(self, *args, **kwargs): class MMBTForClassification (line 3355) | class MMBTForClassification(metaclass=DummyObject): method __init__ (line 3358) | def __init__(self, *args, **kwargs): class MMBTModel (line 3362) | class MMBTModel(metaclass=DummyObject): method __init__ (line 3365) | def __init__(self, *args, **kwargs): class ModalEmbeddings (line 3369) | class ModalEmbeddings(metaclass=DummyObject): method __init__ (line 3372) | def __init__(self, *args, **kwargs): class MobileBertForMaskedLM (line 3379) | class MobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 3382) | def __init__(self, *args, **kwargs): class MobileBertForMultipleChoice (line 3386) | class MobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3389) | def __init__(self, *args, **kwargs): class MobileBertForNextSentencePrediction (line 3393) | class MobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3396) | def __init__(self, *args, **kwargs): class MobileBertForPreTraining (line 3400) | class MobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 3403) | def __init__(self, *args, **kwargs): class MobileBertForQuestionAnswering (line 3407) | class MobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3410) | def __init__(self, *args, **kwargs): class MobileBertForSequenceClassification (line 3414) | class MobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3417) | def __init__(self, *args, **kwargs): class MobileBertForTokenClassification (line 3421) | class MobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 3424) | def __init__(self, *args, **kwargs): class MobileBertLayer (line 3428) | class MobileBertLayer(metaclass=DummyObject): method __init__ (line 3431) | def __init__(self, *args, **kwargs): class MobileBertModel (line 3435) | class MobileBertModel(metaclass=DummyObject): method __init__ (line 3438) | def __init__(self, *args, **kwargs): class MobileBertPreTrainedModel (line 3442) | class MobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3445) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilebert (line 3449) | def load_tf_weights_in_mobilebert(*args, **kwargs): class MobileViTForImageClassification (line 3456) | class MobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 3459) | def __init__(self, *args, **kwargs): class MobileViTForSemanticSegmentation (line 3463) | class MobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 3466) | def __init__(self, *args, **kwargs): class MobileViTModel (line 3470) | class MobileViTModel(metaclass=DummyObject): method __init__ (line 3473) | def __init__(self, *args, **kwargs): class MobileViTPreTrainedModel (line 3477) | class MobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3480) | def __init__(self, *args, **kwargs): class MPNetForMaskedLM (line 3487) | class MPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 3490) | def __init__(self, *args, **kwargs): class MPNetForMultipleChoice (line 3494) | class MPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 3497) | def __init__(self, *args, **kwargs): class MPNetForQuestionAnswering (line 3501) | class MPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3504) | def __init__(self, *args, **kwargs): class MPNetForSequenceClassification (line 3508) | class MPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 3511) | def __init__(self, *args, **kwargs): class MPNetForTokenClassification (line 3515) | class MPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 3518) | def __init__(self, *args, **kwargs): class MPNetLayer (line 3522) | class MPNetLayer(metaclass=DummyObject): method __init__ (line 3525) | def __init__(self, *args, **kwargs): class MPNetModel (line 3529) | class MPNetModel(metaclass=DummyObject): method __init__ (line 3532) | def __init__(self, *args, **kwargs): class MPNetPreTrainedModel (line 3536) | class MPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 3539) | def __init__(self, *args, **kwargs): class MT5EncoderModel (line 3543) | class MT5EncoderModel(metaclass=DummyObject): method __init__ (line 3546) | def __init__(self, *args, **kwargs): class MT5ForConditionalGeneration (line 3550) | class MT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3553) | def __init__(self, *args, **kwargs): class MT5Model (line 3557) | class MT5Model(metaclass=DummyObject): method __init__ (line 3560) | def __init__(self, *args, **kwargs): class MvpForCausalLM (line 3567) | class MvpForCausalLM(metaclass=DummyObject): method __init__ (line 3570) | def __init__(self, *args, **kwargs): class MvpForConditionalGeneration (line 3574) | class MvpForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3577) | def __init__(self, *args, **kwargs): class MvpForQuestionAnswering (line 3581) | class MvpForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3584) | def __init__(self, *args, **kwargs): class MvpForSequenceClassification (line 3588) | class MvpForSequenceClassification(metaclass=DummyObject): method __init__ (line 3591) | def __init__(self, *args, **kwargs): class MvpModel (line 3595) | class MvpModel(metaclass=DummyObject): method __init__ (line 3598) | def __init__(self, *args, **kwargs): class MvpPreTrainedModel (line 3602) | class MvpPreTrainedModel(metaclass=DummyObject): method __init__ (line 3605) | def __init__(self, *args, **kwargs): class NezhaForMaskedLM (line 3612) | class NezhaForMaskedLM(metaclass=DummyObject): method __init__ (line 3615) | def __init__(self, *args, **kwargs): class NezhaForMultipleChoice (line 3619) | class NezhaForMultipleChoice(metaclass=DummyObject): method __init__ (line 3622) | def __init__(self, *args, **kwargs): class NezhaForNextSentencePrediction (line 3626) | class NezhaForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 3629) | def __init__(self, *args, **kwargs): class NezhaForPreTraining (line 3633) | class NezhaForPreTraining(metaclass=DummyObject): method __init__ (line 3636) | def __init__(self, *args, **kwargs): class NezhaForQuestionAnswering (line 3640) | class NezhaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3643) | def __init__(self, *args, **kwargs): class NezhaForSequenceClassification (line 3647) | class NezhaForSequenceClassification(metaclass=DummyObject): method __init__ (line 3650) | def __init__(self, *args, **kwargs): class NezhaForTokenClassification (line 3654) | class NezhaForTokenClassification(metaclass=DummyObject): method __init__ (line 3657) | def __init__(self, *args, **kwargs): class NezhaModel (line 3661) | class NezhaModel(metaclass=DummyObject): method __init__ (line 3664) | def __init__(self, *args, **kwargs): class NezhaPreTrainedModel (line 3668) | class NezhaPreTrainedModel(metaclass=DummyObject): method __init__ (line 3671) | def __init__(self, *args, **kwargs): class NystromformerForMaskedLM (line 3678) | class NystromformerForMaskedLM(metaclass=DummyObject): method __init__ (line 3681) | def __init__(self, *args, **kwargs): class NystromformerForMultipleChoice (line 3685) | class NystromformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 3688) | def __init__(self, *args, **kwargs): class NystromformerForQuestionAnswering (line 3692) | class NystromformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3695) | def __init__(self, *args, **kwargs): class NystromformerForSequenceClassification (line 3699) | class NystromformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 3702) | def __init__(self, *args, **kwargs): class NystromformerForTokenClassification (line 3706) | class NystromformerForTokenClassification(metaclass=DummyObject): method __init__ (line 3709) | def __init__(self, *args, **kwargs): class NystromformerLayer (line 3713) | class NystromformerLayer(metaclass=DummyObject): method __init__ (line 3716) | def __init__(self, *args, **kwargs): class NystromformerModel (line 3720) | class NystromformerModel(metaclass=DummyObject): method __init__ (line 3723) | def __init__(self, *args, **kwargs): class NystromformerPreTrainedModel (line 3727) | class NystromformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3730) | def __init__(self, *args, **kwargs): class OpenAIGPTDoubleHeadsModel (line 3737) | class OpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 3740) | def __init__(self, *args, **kwargs): class OpenAIGPTForSequenceClassification (line 3744) | class OpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 3747) | def __init__(self, *args, **kwargs): class OpenAIGPTLMHeadModel (line 3751) | class OpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 3754) | def __init__(self, *args, **kwargs): class OpenAIGPTModel (line 3758) | class OpenAIGPTModel(metaclass=DummyObject): method __init__ (line 3761) | def __init__(self, *args, **kwargs): class OpenAIGPTPreTrainedModel (line 3765) | class OpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3768) | def __init__(self, *args, **kwargs): function load_tf_weights_in_openai_gpt (line 3772) | def load_tf_weights_in_openai_gpt(*args, **kwargs): class OPTForCausalLM (line 3779) | class OPTForCausalLM(metaclass=DummyObject): method __init__ (line 3782) | def __init__(self, *args, **kwargs): class OPTForQuestionAnswering (line 3786) | class OPTForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3789) | def __init__(self, *args, **kwargs): class OPTForSequenceClassification (line 3793) | class OPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 3796) | def __init__(self, *args, **kwargs): class OPTModel (line 3800) | class OPTModel(metaclass=DummyObject): method __init__ (line 3803) | def __init__(self, *args, **kwargs): class OPTPreTrainedModel (line 3807) | class OPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3810) | def __init__(self, *args, **kwargs): class OwlViTForObjectDetection (line 3817) | class OwlViTForObjectDetection(metaclass=DummyObject): method __init__ (line 3820) | def __init__(self, *args, **kwargs): class OwlViTModel (line 3824) | class OwlViTModel(metaclass=DummyObject): method __init__ (line 3827) | def __init__(self, *args, **kwargs): class OwlViTPreTrainedModel (line 3831) | class OwlViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3834) | def __init__(self, *args, **kwargs): class OwlViTTextModel (line 3838) | class OwlViTTextModel(metaclass=DummyObject): method __init__ (line 3841) | def __init__(self, *args, **kwargs): class OwlViTVisionModel (line 3845) | class OwlViTVisionModel(metaclass=DummyObject): method __init__ (line 3848) | def __init__(self, *args, **kwargs): class PegasusForCausalLM (line 3852) | class PegasusForCausalLM(metaclass=DummyObject): method __init__ (line 3855) | def __init__(self, *args, **kwargs): class PegasusForConditionalGeneration (line 3859) | class PegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3862) | def __init__(self, *args, **kwargs): class PegasusModel (line 3866) | class PegasusModel(metaclass=DummyObject): method __init__ (line 3869) | def __init__(self, *args, **kwargs): class PegasusPreTrainedModel (line 3873) | class PegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 3876) | def __init__(self, *args, **kwargs): class PegasusXForConditionalGeneration (line 3883) | class PegasusXForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3886) | def __init__(self, *args, **kwargs): class PegasusXModel (line 3890) | class PegasusXModel(metaclass=DummyObject): method __init__ (line 3893) | def __init__(self, *args, **kwargs): class PegasusXPreTrainedModel (line 3897) | class PegasusXPreTrainedModel(metaclass=DummyObject): method __init__ (line 3900) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationConvProcessing (line 3907) | class PerceiverForImageClassificationConvProcessing(metaclass=DummyObject): method __init__ (line 3910) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationFourier (line 3914) | class PerceiverForImageClassificationFourier(metaclass=DummyObject): method __init__ (line 3917) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationLearned (line 3921) | class PerceiverForImageClassificationLearned(metaclass=DummyObject): method __init__ (line 3924) | def __init__(self, *args, **kwargs): class PerceiverForMaskedLM (line 3928) | class PerceiverForMaskedLM(metaclass=DummyObject): method __init__ (line 3931) | def __init__(self, *args, **kwargs): class PerceiverForMultimodalAutoencoding (line 3935) | class PerceiverForMultimodalAutoencoding(metaclass=DummyObject): method __init__ (line 3938) | def __init__(self, *args, **kwargs): class PerceiverForOpticalFlow (line 3942) | class PerceiverForOpticalFlow(metaclass=DummyObject): method __init__ (line 3945) | def __init__(self, *args, **kwargs): class PerceiverForSequenceClassification (line 3949) | class PerceiverForSequenceClassification(metaclass=DummyObject): method __init__ (line 3952) | def __init__(self, *args, **kwargs): class PerceiverLayer (line 3956) | class PerceiverLayer(metaclass=DummyObject): method __init__ (line 3959) | def __init__(self, *args, **kwargs): class PerceiverModel (line 3963) | class PerceiverModel(metaclass=DummyObject): method __init__ (line 3966) | def __init__(self, *args, **kwargs): class PerceiverPreTrainedModel (line 3970) | class PerceiverPreTrainedModel(metaclass=DummyObject): method __init__ (line 3973) | def __init__(self, *args, **kwargs): class PLBartForCausalLM (line 3980) | class PLBartForCausalLM(metaclass=DummyObject): method __init__ (line 3983) | def __init__(self, *args, **kwargs): class PLBartForConditionalGeneration (line 3987) | class PLBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3990) | def __init__(self, *args, **kwargs): class PLBartForSequenceClassification (line 3994) | class PLBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 3997) | def __init__(self, *args, **kwargs): class PLBartModel (line 4001) | class PLBartModel(metaclass=DummyObject): method __init__ (line 4004) | def __init__(self, *args, **kwargs): class PLBartPreTrainedModel (line 4008) | class PLBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 4011) | def __init__(self, *args, **kwargs): class PoolFormerForImageClassification (line 4018) | class PoolFormerForImageClassification(metaclass=DummyObject): method __init__ (line 4021) | def __init__(self, *args, **kwargs): class PoolFormerModel (line 4025) | class PoolFormerModel(metaclass=DummyObject): method __init__ (line 4028) | def __init__(self, *args, **kwargs): class PoolFormerPreTrainedModel (line 4032) | class PoolFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4035) | def __init__(self, *args, **kwargs): class ProphetNetDecoder (line 4042) | class ProphetNetDecoder(metaclass=DummyObject): method __init__ (line 4045) | def __init__(self, *args, **kwargs): class ProphetNetEncoder (line 4049) | class ProphetNetEncoder(metaclass=DummyObject): method __init__ (line 4052) | def __init__(self, *args, **kwargs): class ProphetNetForCausalLM (line 4056) | class ProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 4059) | def __init__(self, *args, **kwargs): class ProphetNetForConditionalGeneration (line 4063) | class ProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4066) | def __init__(self, *args, **kwargs): class ProphetNetModel (line 4070) | class ProphetNetModel(metaclass=DummyObject): method __init__ (line 4073) | def __init__(self, *args, **kwargs): class ProphetNetPreTrainedModel (line 4077) | class ProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4080) | def __init__(self, *args, **kwargs): class QDQBertForMaskedLM (line 4087) | class QDQBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4090) | def __init__(self, *args, **kwargs): class QDQBertForMultipleChoice (line 4094) | class QDQBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4097) | def __init__(self, *args, **kwargs): class QDQBertForNextSentencePrediction (line 4101) | class QDQBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 4104) | def __init__(self, *args, **kwargs): class QDQBertForQuestionAnswering (line 4108) | class QDQBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4111) | def __init__(self, *args, **kwargs): class QDQBertForSequenceClassification (line 4115) | class QDQBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4118) | def __init__(self, *args, **kwargs): class QDQBertForTokenClassification (line 4122) | class QDQBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4125) | def __init__(self, *args, **kwargs): class QDQBertLayer (line 4129) | class QDQBertLayer(metaclass=DummyObject): method __init__ (line 4132) | def __init__(self, *args, **kwargs): class QDQBertLMHeadModel (line 4136) | class QDQBertLMHeadModel(metaclass=DummyObject): method __init__ (line 4139) | def __init__(self, *args, **kwargs): class QDQBertModel (line 4143) | class QDQBertModel(metaclass=DummyObject): method __init__ (line 4146) | def __init__(self, *args, **kwargs): class QDQBertPreTrainedModel (line 4150) | class QDQBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4153) | def __init__(self, *args, **kwargs): function load_tf_weights_in_qdqbert (line 4157) | def load_tf_weights_in_qdqbert(*args, **kwargs): class RagModel (line 4161) | class RagModel(metaclass=DummyObject): method __init__ (line 4164) | def __init__(self, *args, **kwargs): class RagPreTrainedModel (line 4168) | class RagPreTrainedModel(metaclass=DummyObject): method __init__ (line 4171) | def __init__(self, *args, **kwargs): class RagSequenceForGeneration (line 4175) | class RagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 4178) | def __init__(self, *args, **kwargs): class RagTokenForGeneration (line 4182) | class RagTokenForGeneration(metaclass=DummyObject): method __init__ (line 4185) | def __init__(self, *args, **kwargs): class RealmEmbedder (line 4192) | class RealmEmbedder(metaclass=DummyObject): method __init__ (line 4195) | def __init__(self, *args, **kwargs): class RealmForOpenQA (line 4199) | class RealmForOpenQA(metaclass=DummyObject): method __init__ (line 4202) | def __init__(self, *args, **kwargs): class RealmKnowledgeAugEncoder (line 4206) | class RealmKnowledgeAugEncoder(metaclass=DummyObject): method __init__ (line 4209) | def __init__(self, *args, **kwargs): class RealmPreTrainedModel (line 4213) | class RealmPreTrainedModel(metaclass=DummyObject): method __init__ (line 4216) | def __init__(self, *args, **kwargs): class RealmReader (line 4220) | class RealmReader(metaclass=DummyObject): method __init__ (line 4223) | def __init__(self, *args, **kwargs): class RealmRetriever (line 4227) | class RealmRetriever(metaclass=DummyObject): method __init__ (line 4230) | def __init__(self, *args, **kwargs): class RealmScorer (line 4234) | class RealmScorer(metaclass=DummyObject): method __init__ (line 4237) | def __init__(self, *args, **kwargs): function load_tf_weights_in_realm (line 4241) | def load_tf_weights_in_realm(*args, **kwargs): class ReformerAttention (line 4248) | class ReformerAttention(metaclass=DummyObject): method __init__ (line 4251) | def __init__(self, *args, **kwargs): class ReformerForMaskedLM (line 4255) | class ReformerForMaskedLM(metaclass=DummyObject): method __init__ (line 4258) | def __init__(self, *args, **kwargs): class ReformerForQuestionAnswering (line 4262) | class ReformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4265) | def __init__(self, *args, **kwargs): class ReformerForSequenceClassification (line 4269) | class ReformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 4272) | def __init__(self, *args, **kwargs): class ReformerLayer (line 4276) | class ReformerLayer(metaclass=DummyObject): method __init__ (line 4279) | def __init__(self, *args, **kwargs): class ReformerModel (line 4283) | class ReformerModel(metaclass=DummyObject): method __init__ (line 4286) | def __init__(self, *args, **kwargs): class ReformerModelWithLMHead (line 4290) | class ReformerModelWithLMHead(metaclass=DummyObject): method __init__ (line 4293) | def __init__(self, *args, **kwargs): class ReformerPreTrainedModel (line 4297) | class ReformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4300) | def __init__(self, *args, **kwargs): class RegNetForImageClassification (line 4307) | class RegNetForImageClassification(metaclass=DummyObject): method __init__ (line 4310) | def __init__(self, *args, **kwargs): class RegNetModel (line 4314) | class RegNetModel(metaclass=DummyObject): method __init__ (line 4317) | def __init__(self, *args, **kwargs): class RegNetPreTrainedModel (line 4321) | class RegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4324) | def __init__(self, *args, **kwargs): class RemBertForCausalLM (line 4331) | class RemBertForCausalLM(metaclass=DummyObject): method __init__ (line 4334) | def __init__(self, *args, **kwargs): class RemBertForMaskedLM (line 4338) | class RemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4341) | def __init__(self, *args, **kwargs): class RemBertForMultipleChoice (line 4345) | class RemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4348) | def __init__(self, *args, **kwargs): class RemBertForQuestionAnswering (line 4352) | class RemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4355) | def __init__(self, *args, **kwargs): class RemBertForSequenceClassification (line 4359) | class RemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4362) | def __init__(self, *args, **kwargs): class RemBertForTokenClassification (line 4366) | class RemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4369) | def __init__(self, *args, **kwargs): class RemBertLayer (line 4373) | class RemBertLayer(metaclass=DummyObject): method __init__ (line 4376) | def __init__(self, *args, **kwargs): class RemBertModel (line 4380) | class RemBertModel(metaclass=DummyObject): method __init__ (line 4383) | def __init__(self, *args, **kwargs): class RemBertPreTrainedModel (line 4387) | class RemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4390) | def __init__(self, *args, **kwargs): function load_tf_weights_in_rembert (line 4394) | def load_tf_weights_in_rembert(*args, **kwargs): class ResNetForImageClassification (line 4401) | class ResNetForImageClassification(metaclass=DummyObject): method __init__ (line 4404) | def __init__(self, *args, **kwargs): class ResNetModel (line 4408) | class ResNetModel(metaclass=DummyObject): method __init__ (line 4411) | def __init__(self, *args, **kwargs): class ResNetPreTrainedModel (line 4415) | class ResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4418) | def __init__(self, *args, **kwargs): class RetriBertModel (line 4425) | class RetriBertModel(metaclass=DummyObject): method __init__ (line 4428) | def __init__(self, *args, **kwargs): class RetriBertPreTrainedModel (line 4432) | class RetriBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4435) | def __init__(self, *args, **kwargs): class RobertaForCausalLM (line 4442) | class RobertaForCausalLM(metaclass=DummyObject): method __init__ (line 4445) | def __init__(self, *args, **kwargs): class RobertaForMaskedLM (line 4449) | class RobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 4452) | def __init__(self, *args, **kwargs): class RobertaForMultipleChoice (line 4456) | class RobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 4459) | def __init__(self, *args, **kwargs): class RobertaForQuestionAnswering (line 4463) | class RobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4466) | def __init__(self, *args, **kwargs): class RobertaForSequenceClassification (line 4470) | class RobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 4473) | def __init__(self, *args, **kwargs): class RobertaForTokenClassification (line 4477) | class RobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 4480) | def __init__(self, *args, **kwargs): class RobertaModel (line 4484) | class RobertaModel(metaclass=DummyObject): method __init__ (line 4487) | def __init__(self, *args, **kwargs): class RobertaPreTrainedModel (line 4491) | class RobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 4494) | def __init__(self, *args, **kwargs): class RoFormerForCausalLM (line 4501) | class RoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 4504) | def __init__(self, *args, **kwargs): class RoFormerForMaskedLM (line 4508) | class RoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 4511) | def __init__(self, *args, **kwargs): class RoFormerForMultipleChoice (line 4515) | class RoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 4518) | def __init__(self, *args, **kwargs): class RoFormerForQuestionAnswering (line 4522) | class RoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4525) | def __init__(self, *args, **kwargs): class RoFormerForSequenceClassification (line 4529) | class RoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 4532) | def __init__(self, *args, **kwargs): class RoFormerForTokenClassification (line 4536) | class RoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 4539) | def __init__(self, *args, **kwargs): class RoFormerLayer (line 4543) | class RoFormerLayer(metaclass=DummyObject): method __init__ (line 4546) | def __init__(self, *args, **kwargs): class RoFormerModel (line 4550) | class RoFormerModel(metaclass=DummyObject): method __init__ (line 4553) | def __init__(self, *args, **kwargs): class RoFormerPreTrainedModel (line 4557) | class RoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4560) | def __init__(self, *args, **kwargs): function load_tf_weights_in_roformer (line 4564) | def load_tf_weights_in_roformer(*args, **kwargs): class SegformerDecodeHead (line 4571) | class SegformerDecodeHead(metaclass=DummyObject): method __init__ (line 4574) | def __init__(self, *args, **kwargs): class SegformerForImageClassification (line 4578) | class SegformerForImageClassification(metaclass=DummyObject): method __init__ (line 4581) | def __init__(self, *args, **kwargs): class SegformerForSemanticSegmentation (line 4585) | class SegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 4588) | def __init__(self, *args, **kwargs): class SegformerLayer (line 4592) | class SegformerLayer(metaclass=DummyObject): method __init__ (line 4595) | def __init__(self, *args, **kwargs): class SegformerModel (line 4599) | class SegformerModel(metaclass=DummyObject): method __init__ (line 4602) | def __init__(self, *args, **kwargs): class SegformerPreTrainedModel (line 4606) | class SegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4609) | def __init__(self, *args, **kwargs): class SEWForCTC (line 4616) | class SEWForCTC(metaclass=DummyObject): method __init__ (line 4619) | def __init__(self, *args, **kwargs): class SEWForSequenceClassification (line 4623) | class SEWForSequenceClassification(metaclass=DummyObject): method __init__ (line 4626) | def __init__(self, *args, **kwargs): class SEWModel (line 4630) | class SEWModel(metaclass=DummyObject): method __init__ (line 4633) | def __init__(self, *args, **kwargs): class SEWPreTrainedModel (line 4637) | class SEWPreTrainedModel(metaclass=DummyObject): method __init__ (line 4640) | def __init__(self, *args, **kwargs): class SEWDForCTC (line 4647) | class SEWDForCTC(metaclass=DummyObject): method __init__ (line 4650) | def __init__(self, *args, **kwargs): class SEWDForSequenceClassification (line 4654) | class SEWDForSequenceClassification(metaclass=DummyObject): method __init__ (line 4657) | def __init__(self, *args, **kwargs): class SEWDModel (line 4661) | class SEWDModel(metaclass=DummyObject): method __init__ (line 4664) | def __init__(self, *args, **kwargs): class SEWDPreTrainedModel (line 4668) | class SEWDPreTrainedModel(metaclass=DummyObject): method __init__ (line 4671) | def __init__(self, *args, **kwargs): class SpeechEncoderDecoderModel (line 4675) | class SpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 4678) | def __init__(self, *args, **kwargs): class Speech2TextForConditionalGeneration (line 4685) | class Speech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4688) | def __init__(self, *args, **kwargs): class Speech2TextModel (line 4692) | class Speech2TextModel(metaclass=DummyObject): method __init__ (line 4695) | def __init__(self, *args, **kwargs): class Speech2TextPreTrainedModel (line 4699) | class Speech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 4702) | def __init__(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 4706) | class Speech2Text2ForCausalLM(metaclass=DummyObject): method __init__ (line 4709) | def __init__(self, *args, **kwargs): class Speech2Text2PreTrainedModel (line 4713) | class Speech2Text2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4716) | def __init__(self, *args, **kwargs): class SplinterForPreTraining (line 4723) | class SplinterForPreTraining(metaclass=DummyObject): method __init__ (line 4726) | def __init__(self, *args, **kwargs): class SplinterForQuestionAnswering (line 4730) | class SplinterForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4733) | def __init__(self, *args, **kwargs): class SplinterLayer (line 4737) | class SplinterLayer(metaclass=DummyObject): method __init__ (line 4740) | def __init__(self, *args, **kwargs): class SplinterModel (line 4744) | class SplinterModel(metaclass=DummyObject): method __init__ (line 4747) | def __init__(self, *args, **kwargs): class SplinterPreTrainedModel (line 4751) | class SplinterPreTrainedModel(metaclass=DummyObject): method __init__ (line 4754) | def __init__(self, *args, **kwargs): class SqueezeBertForMaskedLM (line 4761) | class SqueezeBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4764) | def __init__(self, *args, **kwargs): class SqueezeBertForMultipleChoice (line 4768) | class SqueezeBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4771) | def __init__(self, *args, **kwargs): class SqueezeBertForQuestionAnswering (line 4775) | class SqueezeBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4778) | def __init__(self, *args, **kwargs): class SqueezeBertForSequenceClassification (line 4782) | class SqueezeBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4785) | def __init__(self, *args, **kwargs): class SqueezeBertForTokenClassification (line 4789) | class SqueezeBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4792) | def __init__(self, *args, **kwargs): class SqueezeBertModel (line 4796) | class SqueezeBertModel(metaclass=DummyObject): method __init__ (line 4799) | def __init__(self, *args, **kwargs): class SqueezeBertModule (line 4803) | class SqueezeBertModule(metaclass=DummyObject): method __init__ (line 4806) | def __init__(self, *args, **kwargs): class SqueezeBertPreTrainedModel (line 4810) | class SqueezeBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4813) | def __init__(self, *args, **kwargs): class SwinForImageClassification (line 4820) | class SwinForImageClassification(metaclass=DummyObject): method __init__ (line 4823) | def __init__(self, *args, **kwargs): class SwinForMaskedImageModeling (line 4827) | class SwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 4830) | def __init__(self, *args, **kwargs): class SwinModel (line 4834) | class SwinModel(metaclass=DummyObject): method __init__ (line 4837) | def __init__(self, *args, **kwargs): class SwinPreTrainedModel (line 4841) | class SwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 4844) | def __init__(self, *args, **kwargs): class Swinv2ForImageClassification (line 4851) | class Swinv2ForImageClassification(metaclass=DummyObject): method __init__ (line 4854) | def __init__(self, *args, **kwargs): class Swinv2ForMaskedImageModeling (line 4858) | class Swinv2ForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 4861) | def __init__(self, *args, **kwargs): class Swinv2Model (line 4865) | class Swinv2Model(metaclass=DummyObject): method __init__ (line 4868) | def __init__(self, *args, **kwargs): class Swinv2PreTrainedModel (line 4872) | class Swinv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4875) | def __init__(self, *args, **kwargs): class T5EncoderModel (line 4882) | class T5EncoderModel(metaclass=DummyObject): method __init__ (line 4885) | def __init__(self, *args, **kwargs): class T5ForConditionalGeneration (line 4889) | class T5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4892) | def __init__(self, *args, **kwargs): class T5Model (line 4896) | class T5Model(metaclass=DummyObject): method __init__ (line 4899) | def __init__(self, *args, **kwargs): class T5PreTrainedModel (line 4903) | class T5PreTrainedModel(metaclass=DummyObject): method __init__ (line 4906) | def __init__(self, *args, **kwargs): function load_tf_weights_in_t5 (line 4910) | def load_tf_weights_in_t5(*args, **kwargs): class TimeSeriesTransformerForPrediction (line 4917) | class TimeSeriesTransformerForPrediction(metaclass=DummyObject): method __init__ (line 4920) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerModel (line 4924) | class TimeSeriesTransformerModel(metaclass=DummyObject): method __init__ (line 4927) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerPreTrainedModel (line 4931) | class TimeSeriesTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4934) | def __init__(self, *args, **kwargs): class TrajectoryTransformerModel (line 4941) | class TrajectoryTransformerModel(metaclass=DummyObject): method __init__ (line 4944) | def __init__(self, *args, **kwargs): class TrajectoryTransformerPreTrainedModel (line 4948) | class TrajectoryTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4951) | def __init__(self, *args, **kwargs): class AdaptiveEmbedding (line 4958) | class AdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 4961) | def __init__(self, *args, **kwargs): class TransfoXLForSequenceClassification (line 4965) | class TransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 4968) | def __init__(self, *args, **kwargs): class TransfoXLLMHeadModel (line 4972) | class TransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 4975) | def __init__(self, *args, **kwargs): class TransfoXLModel (line 4979) | class TransfoXLModel(metaclass=DummyObject): method __init__ (line 4982) | def __init__(self, *args, **kwargs): class TransfoXLPreTrainedModel (line 4986) | class TransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 4989) | def __init__(self, *args, **kwargs): function load_tf_weights_in_transfo_xl (line 4993) | def load_tf_weights_in_transfo_xl(*args, **kwargs): class TrOCRForCausalLM (line 5000) | class TrOCRForCausalLM(metaclass=DummyObject): method __init__ (line 5003) | def __init__(self, *args, **kwargs): class TrOCRPreTrainedModel (line 5007) | class TrOCRPreTrainedModel(metaclass=DummyObject): method __init__ (line 5010) | def __init__(self, *args, **kwargs): class UniSpeechForCTC (line 5017) | class UniSpeechForCTC(metaclass=DummyObject): method __init__ (line 5020) | def __init__(self, *args, **kwargs): class UniSpeechForPreTraining (line 5024) | class UniSpeechForPreTraining(metaclass=DummyObject): method __init__ (line 5027) | def __init__(self, *args, **kwargs): class UniSpeechForSequenceClassification (line 5031) | class UniSpeechForSequenceClassification(metaclass=DummyObject): method __init__ (line 5034) | def __init__(self, *args, **kwargs): class UniSpeechModel (line 5038) | class UniSpeechModel(metaclass=DummyObject): method __init__ (line 5041) | def __init__(self, *args, **kwargs): class UniSpeechPreTrainedModel (line 5045) | class UniSpeechPreTrainedModel(metaclass=DummyObject): method __init__ (line 5048) | def __init__(self, *args, **kwargs): class UniSpeechSatForAudioFrameClassification (line 5055) | class UniSpeechSatForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 5058) | def __init__(self, *args, **kwargs): class UniSpeechSatForCTC (line 5062) | class UniSpeechSatForCTC(metaclass=DummyObject): method __init__ (line 5065) | def __init__(self, *args, **kwargs): class UniSpeechSatForPreTraining (line 5069) | class UniSpeechSatForPreTraining(metaclass=DummyObject): method __init__ (line 5072) | def __init__(self, *args, **kwargs): class UniSpeechSatForSequenceClassification (line 5076) | class UniSpeechSatForSequenceClassification(metaclass=DummyObject): method __init__ (line 5079) | def __init__(self, *args, **kwargs): class UniSpeechSatForXVector (line 5083) | class UniSpeechSatForXVector(metaclass=DummyObject): method __init__ (line 5086) | def __init__(self, *args, **kwargs): class UniSpeechSatModel (line 5090) | class UniSpeechSatModel(metaclass=DummyObject): method __init__ (line 5093) | def __init__(self, *args, **kwargs): class UniSpeechSatPreTrainedModel (line 5097) | class UniSpeechSatPreTrainedModel(metaclass=DummyObject): method __init__ (line 5100) | def __init__(self, *args, **kwargs): class VanForImageClassification (line 5107) | class VanForImageClassification(metaclass=DummyObject): method __init__ (line 5110) | def __init__(self, *args, **kwargs): class VanModel (line 5114) | class VanModel(metaclass=DummyObject): method __init__ (line 5117) | def __init__(self, *args, **kwargs): class VanPreTrainedModel (line 5121) | class VanPreTrainedModel(metaclass=DummyObject): method __init__ (line 5124) | def __init__(self, *args, **kwargs): class VideoMAEForPreTraining (line 5131) | class VideoMAEForPreTraining(metaclass=DummyObject): method __init__ (line 5134) | def __init__(self, *args, **kwargs): class VideoMAEForVideoClassification (line 5138) | class VideoMAEForVideoClassification(metaclass=DummyObject): method __init__ (line 5141) | def __init__(self, *args, **kwargs): class VideoMAEModel (line 5145) | class VideoMAEModel(metaclass=DummyObject): method __init__ (line 5148) | def __init__(self, *args, **kwargs): class VideoMAEPreTrainedModel (line 5152) | class VideoMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 5155) | def __init__(self, *args, **kwargs): class ViltForImageAndTextRetrieval (line 5162) | class ViltForImageAndTextRetrieval(metaclass=DummyObject): method __init__ (line 5165) | def __init__(self, *args, **kwargs): class ViltForImagesAndTextClassification (line 5169) | class ViltForImagesAndTextClassification(metaclass=DummyObject): method __init__ (line 5172) | def __init__(self, *args, **kwargs): class ViltForMaskedLM (line 5176) | class ViltForMaskedLM(metaclass=DummyObject): method __init__ (line 5179) | def __init__(self, *args, **kwargs): class ViltForQuestionAnswering (line 5183) | class ViltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5186) | def __init__(self, *args, **kwargs): class ViltForTokenClassification (line 5190) | class ViltForTokenClassification(metaclass=DummyObject): method __init__ (line 5193) | def __init__(self, *args, **kwargs): class ViltLayer (line 5197) | class ViltLayer(metaclass=DummyObject): method __init__ (line 5200) | def __init__(self, *args, **kwargs): class ViltModel (line 5204) | class ViltModel(metaclass=DummyObject): method __init__ (line 5207) | def __init__(self, *args, **kwargs): class ViltPreTrainedModel (line 5211) | class ViltPreTrainedModel(metaclass=DummyObject): method __init__ (line 5214) | def __init__(self, *args, **kwargs): class VisionEncoderDecoderModel (line 5218) | class VisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 5221) | def __init__(self, *args, **kwargs): class VisionTextDualEncoderModel (line 5225) | class VisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 5228) | def __init__(self, *args, **kwargs): class VisualBertForMultipleChoice (line 5235) | class VisualBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 5238) | def __init__(self, *args, **kwargs): class VisualBertForPreTraining (line 5242) | class VisualBertForPreTraining(metaclass=DummyObject): method __init__ (line 5245) | def __init__(self, *args, **kwargs): class VisualBertForQuestionAnswering (line 5249) | class VisualBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5252) | def __init__(self, *args, **kwargs): class VisualBertForRegionToPhraseAlignment (line 5256) | class VisualBertForRegionToPhraseAlignment(metaclass=DummyObject): method __init__ (line 5259) | def __init__(self, *args, **kwargs): class VisualBertForVisualReasoning (line 5263) | class VisualBertForVisualReasoning(metaclass=DummyObject): method __init__ (line 5266) | def __init__(self, *args, **kwargs): class VisualBertLayer (line 5270) | class VisualBertLayer(metaclass=DummyObject): method __init__ (line 5273) | def __init__(self, *args, **kwargs): class VisualBertModel (line 5277) | class VisualBertModel(metaclass=DummyObject): method __init__ (line 5280) | def __init__(self, *args, **kwargs): class VisualBertPreTrainedModel (line 5284) | class VisualBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5287) | def __init__(self, *args, **kwargs): class ViTForImageClassification (line 5294) | class ViTForImageClassification(metaclass=DummyObject): method __init__ (line 5297) | def __init__(self, *args, **kwargs): class ViTForMaskedImageModeling (line 5301) | class ViTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 5304) | def __init__(self, *args, **kwargs): class ViTModel (line 5308) | class ViTModel(metaclass=DummyObject): method __init__ (line 5311) | def __init__(self, *args, **kwargs): class ViTPreTrainedModel (line 5315) | class ViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 5318) | def __init__(self, *args, **kwargs): class ViTMAEForPreTraining (line 5325) | class ViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 5328) | def __init__(self, *args, **kwargs): class ViTMAELayer (line 5332) | class ViTMAELayer(metaclass=DummyObject): method __init__ (line 5335) | def __init__(self, *args, **kwargs): class ViTMAEModel (line 5339) | class ViTMAEModel(metaclass=DummyObject): method __init__ (line 5342) | def __init__(self, *args, **kwargs): class ViTMAEPreTrainedModel (line 5346) | class ViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 5349) | def __init__(self, *args, **kwargs): class ViTMSNForImageClassification (line 5356) | class ViTMSNForImageClassification(metaclass=DummyObject): method __init__ (line 5359) | def __init__(self, *args, **kwargs): class ViTMSNModel (line 5363) | class ViTMSNModel(metaclass=DummyObject): method __init__ (line 5366) | def __init__(self, *args, **kwargs): class ViTMSNPreTrainedModel (line 5370) | class ViTMSNPreTrainedModel(metaclass=DummyObject): method __init__ (line 5373) | def __init__(self, *args, **kwargs): class Wav2Vec2ForAudioFrameClassification (line 5380) | class Wav2Vec2ForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 5383) | def __init__(self, *args, **kwargs): class Wav2Vec2ForCTC (line 5387) | class Wav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 5390) | def __init__(self, *args, **kwargs): class Wav2Vec2ForMaskedLM (line 5394) | class Wav2Vec2ForMaskedLM(metaclass=DummyObject): method __init__ (line 5397) | def __init__(self, *args, **kwargs): class Wav2Vec2ForPreTraining (line 5401) | class Wav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 5404) | def __init__(self, *args, **kwargs): class Wav2Vec2ForSequenceClassification (line 5408) | class Wav2Vec2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 5411) | def __init__(self, *args, **kwargs): class Wav2Vec2ForXVector (line 5415) | class Wav2Vec2ForXVector(metaclass=DummyObject): method __init__ (line 5418) | def __init__(self, *args, **kwargs): class Wav2Vec2Model (line 5422) | class Wav2Vec2Model(metaclass=DummyObject): method __init__ (line 5425) | def __init__(self, *args, **kwargs): class Wav2Vec2PreTrainedModel (line 5429) | class Wav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 5432) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForAudioFrameClassification (line 5439) | class Wav2Vec2ConformerForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 5442) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForCTC (line 5446) | class Wav2Vec2ConformerForCTC(metaclass=DummyObject): method __init__ (line 5449) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForPreTraining (line 5453) | class Wav2Vec2ConformerForPreTraining(metaclass=DummyObject): method __init__ (line 5456) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForSequenceClassification (line 5460) | class Wav2Vec2ConformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 5463) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForXVector (line 5467) | class Wav2Vec2ConformerForXVector(metaclass=DummyObject): method __init__ (line 5470) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerModel (line 5474) | class Wav2Vec2ConformerModel(metaclass=DummyObject): method __init__ (line 5477) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerPreTrainedModel (line 5481) | class Wav2Vec2ConformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5484) | def __init__(self, *args, **kwargs): class WavLMForAudioFrameClassification (line 5491) | class WavLMForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 5494) | def __init__(self, *args, **kwargs): class WavLMForCTC (line 5498) | class WavLMForCTC(metaclass=DummyObject): method __init__ (line 5501) | def __init__(self, *args, **kwargs): class WavLMForSequenceClassification (line 5505) | class WavLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 5508) | def __init__(self, *args, **kwargs): class WavLMForXVector (line 5512) | class WavLMForXVector(metaclass=DummyObject): method __init__ (line 5515) | def __init__(self, *args, **kwargs): class WavLMModel (line 5519) | class WavLMModel(metaclass=DummyObject): method __init__ (line 5522) | def __init__(self, *args, **kwargs): class WavLMPreTrainedModel (line 5526) | class WavLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 5529) | def __init__(self, *args, **kwargs): class WhisperForConditionalGeneration (line 5536) | class WhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5539) | def __init__(self, *args, **kwargs): class WhisperModel (line 5543) | class WhisperModel(metaclass=DummyObject): method __init__ (line 5546) | def __init__(self, *args, **kwargs): class WhisperPreTrainedModel (line 5550) | class WhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 5553) | def __init__(self, *args, **kwargs): class XCLIPModel (line 5560) | class XCLIPModel(metaclass=DummyObject): method __init__ (line 5563) | def __init__(self, *args, **kwargs): class XCLIPPreTrainedModel (line 5567) | class XCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 5570) | def __init__(self, *args, **kwargs): class XCLIPTextModel (line 5574) | class XCLIPTextModel(metaclass=DummyObject): method __init__ (line 5577) | def __init__(self, *args, **kwargs): class XCLIPVisionModel (line 5581) | class XCLIPVisionModel(metaclass=DummyObject): method __init__ (line 5584) | def __init__(self, *args, **kwargs): class XGLMForCausalLM (line 5591) | class XGLMForCausalLM(metaclass=DummyObject): method __init__ (line 5594) | def __init__(self, *args, **kwargs): class XGLMModel (line 5598) | class XGLMModel(metaclass=DummyObject): method __init__ (line 5601) | def __init__(self, *args, **kwargs): class XGLMPreTrainedModel (line 5605) | class XGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 5608) | def __init__(self, *args, **kwargs): class XLMForMultipleChoice (line 5615) | class XLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 5618) | def __init__(self, *args, **kwargs): class XLMForQuestionAnswering (line 5622) | class XLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5625) | def __init__(self, *args, **kwargs): class XLMForQuestionAnsweringSimple (line 5629) | class XLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 5632) | def __init__(self, *args, **kwargs): class XLMForSequenceClassification (line 5636) | class XLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 5639) | def __init__(self, *args, **kwargs): class XLMForTokenClassification (line 5643) | class XLMForTokenClassification(metaclass=DummyObject): method __init__ (line 5646) | def __init__(self, *args, **kwargs): class XLMModel (line 5650) | class XLMModel(metaclass=DummyObject): method __init__ (line 5653) | def __init__(self, *args, **kwargs): class XLMPreTrainedModel (line 5657) | class XLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 5660) | def __init__(self, *args, **kwargs): class XLMWithLMHeadModel (line 5664) | class XLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 5667) | def __init__(self, *args, **kwargs): class XLMProphetNetDecoder (line 5674) | class XLMProphetNetDecoder(metaclass=DummyObject): method __init__ (line 5677) | def __init__(self, *args, **kwargs): class XLMProphetNetEncoder (line 5681) | class XLMProphetNetEncoder(metaclass=DummyObject): method __init__ (line 5684) | def __init__(self, *args, **kwargs): class XLMProphetNetForCausalLM (line 5688) | class XLMProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 5691) | def __init__(self, *args, **kwargs): class XLMProphetNetForConditionalGeneration (line 5695) | class XLMProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5698) | def __init__(self, *args, **kwargs): class XLMProphetNetModel (line 5702) | class XLMProphetNetModel(metaclass=DummyObject): method __init__ (line 5705) | def __init__(self, *args, **kwargs): class XLMProphetNetPreTrainedModel (line 5709) | class XLMProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 5712) | def __init__(self, *args, **kwargs): class XLMRobertaForCausalLM (line 5719) | class XLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 5722) | def __init__(self, *args, **kwargs): class XLMRobertaForMaskedLM (line 5726) | class XLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 5729) | def __init__(self, *args, **kwargs): class XLMRobertaForMultipleChoice (line 5733) | class XLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 5736) | def __init__(self, *args, **kwargs): class XLMRobertaForQuestionAnswering (line 5740) | class XLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5743) | def __init__(self, *args, **kwargs): class XLMRobertaForSequenceClassification (line 5747) | class XLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 5750) | def __init__(self, *args, **kwargs): class XLMRobertaForTokenClassification (line 5754) | class XLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 5757) | def __init__(self, *args, **kwargs): class XLMRobertaModel (line 5761) | class XLMRobertaModel(metaclass=DummyObject): method __init__ (line 5764) | def __init__(self, *args, **kwargs): class XLMRobertaPreTrainedModel (line 5768) | class XLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5771) | def __init__(self, *args, **kwargs): class XLMRobertaXLForCausalLM (line 5778) | class XLMRobertaXLForCausalLM(metaclass=DummyObject): method __init__ (line 5781) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMaskedLM (line 5785) | class XLMRobertaXLForMaskedLM(metaclass=DummyObject): method __init__ (line 5788) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMultipleChoice (line 5792) | class XLMRobertaXLForMultipleChoice(metaclass=DummyObject): method __init__ (line 5795) | def __init__(self, *args, **kwargs): class XLMRobertaXLForQuestionAnswering (line 5799) | class XLMRobertaXLForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5802) | def __init__(self, *args, **kwargs): class XLMRobertaXLForSequenceClassification (line 5806) | class XLMRobertaXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 5809) | def __init__(self, *args, **kwargs): class XLMRobertaXLForTokenClassification (line 5813) | class XLMRobertaXLForTokenClassification(metaclass=DummyObject): method __init__ (line 5816) | def __init__(self, *args, **kwargs): class XLMRobertaXLModel (line 5820) | class XLMRobertaXLModel(metaclass=DummyObject): method __init__ (line 5823) | def __init__(self, *args, **kwargs): class XLMRobertaXLPreTrainedModel (line 5827) | class XLMRobertaXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 5830) | def __init__(self, *args, **kwargs): class XLNetForMultipleChoice (line 5837) | class XLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 5840) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnswering (line 5844) | class XLNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5847) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnsweringSimple (line 5851) | class XLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 5854) | def __init__(self, *args, **kwargs): class XLNetForSequenceClassification (line 5858) | class XLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 5861) | def __init__(self, *args, **kwargs): class XLNetForTokenClassification (line 5865) | class XLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 5868) | def __init__(self, *args, **kwargs): class XLNetLMHeadModel (line 5872) | class XLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 5875) | def __init__(self, *args, **kwargs): class XLNetModel (line 5879) | class XLNetModel(metaclass=DummyObject): method __init__ (line 5882) | def __init__(self, *args, **kwargs): class XLNetPreTrainedModel (line 5886) | class XLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 5889) | def __init__(self, *args, **kwargs): function load_tf_weights_in_xlnet (line 5893) | def load_tf_weights_in_xlnet(*args, **kwargs): class YolosForObjectDetection (line 5900) | class YolosForObjectDetection(metaclass=DummyObject): method __init__ (line 5903) | def __init__(self, *args, **kwargs): class YolosModel (line 5907) | class YolosModel(metaclass=DummyObject): method __init__ (line 5910) | def __init__(self, *args, **kwargs): class YolosPreTrainedModel (line 5914) | class YolosPreTrainedModel(metaclass=DummyObject): method __init__ (line 5917) | def __init__(self, *args, **kwargs): class YosoForMaskedLM (line 5924) | class YosoForMaskedLM(metaclass=DummyObject): method __init__ (line 5927) | def __init__(self, *args, **kwargs): class YosoForMultipleChoice (line 5931) | class YosoForMultipleChoice(metaclass=DummyObject): method __init__ (line 5934) | def __init__(self, *args, **kwargs): class YosoForQuestionAnswering (line 5938) | class YosoForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5941) | def __init__(self, *args, **kwargs): class YosoForSequenceClassification (line 5945) | class YosoForSequenceClassification(metaclass=DummyObject): method __init__ (line 5948) | def __init__(self, *args, **kwargs): class YosoForTokenClassification (line 5952) | class YosoForTokenClassification(metaclass=DummyObject): method __init__ (line 5955) | def __init__(self, *args, **kwargs): class YosoLayer (line 5959) | class YosoLayer(metaclass=DummyObject): method __init__ (line 5962) | def __init__(self, *args, **kwargs): class YosoModel (line 5966) | class YosoModel(metaclass=DummyObject): method __init__ (line 5969) | def __init__(self, *args, **kwargs): class YosoPreTrainedModel (line 5973) | class YosoPreTrainedModel(metaclass=DummyObject): method __init__ (line 5976) | def __init__(self, *args, **kwargs): class Adafactor (line 5980) | class Adafactor(metaclass=DummyObject): method __init__ (line 5983) | def __init__(self, *args, **kwargs): class AdamW (line 5987) | class AdamW(metaclass=DummyObject): method __init__ (line 5990) | def __init__(self, *args, **kwargs): function get_constant_schedule (line 5994) | def get_constant_schedule(*args, **kwargs): function get_constant_schedule_with_warmup (line 5998) | def get_constant_schedule_with_warmup(*args, **kwargs): function get_cosine_schedule_with_warmup (line 6002) | def get_cosine_schedule_with_warmup(*args, **kwargs): function get_cosine_with_hard_restarts_schedule_with_warmup (line 6006) | def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs): function get_linear_schedule_with_warmup (line 6010) | def get_linear_schedule_with_warmup(*args, **kwargs): function get_polynomial_decay_schedule_with_warmup (line 6014) | def get_polynomial_decay_schedule_with_warmup(*args, **kwargs): function get_scheduler (line 6018) | def get_scheduler(*args, **kwargs): class Conv1D (line 6022) | class Conv1D(metaclass=DummyObject): method __init__ (line 6025) | def __init__(self, *args, **kwargs): function apply_chunking_to_forward (line 6029) | def apply_chunking_to_forward(*args, **kwargs): function prune_layer (line 6033) | def prune_layer(*args, **kwargs): class Trainer (line 6037) | class Trainer(metaclass=DummyObject): method __init__ (line 6040) | def __init__(self, *args, **kwargs): function torch_distributed_zero_first (line 6044) | def torch_distributed_zero_first(*args, **kwargs): class Seq2SeqTrainer (line 6048) | class Seq2SeqTrainer(metaclass=DummyObject): method __init__ (line 6051) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_scatter_objects.py class TapasForMaskedLM (line 9) | class TapasForMaskedLM(metaclass=DummyObject): method __init__ (line 12) | def __init__(self, *args, **kwargs): class TapasForQuestionAnswering (line 16) | class TapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 19) | def __init__(self, *args, **kwargs): class TapasForSequenceClassification (line 23) | class TapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 26) | def __init__(self, *args, **kwargs): class TapasModel (line 30) | class TapasModel(metaclass=DummyObject): method __init__ (line 33) | def __init__(self, *args, **kwargs): class TapasPreTrainedModel (line 37) | class TapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 40) | def __init__(self, *args, **kwargs): function load_tf_weights_in_tapas (line 44) | def load_tf_weights_in_tapas(*args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_sentencepiece_and_speech_objects.py class Speech2TextProcessor (line 6) | class Speech2TextProcessor(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_sentencepiece_and_tokenizers_objects.py function convert_slow_tokenizer (line 9) | def convert_slow_tokenizer(*args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_sentencepiece_objects.py class AlbertTokenizer (line 6) | class AlbertTokenizer(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class BarthezTokenizer (line 13) | class BarthezTokenizer(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): class BartphoTokenizer (line 20) | class BartphoTokenizer(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): class BertGenerationTokenizer (line 27) | class BertGenerationTokenizer(metaclass=DummyObject): method __init__ (line 30) | def __init__(self, *args, **kwargs): class BigBirdTokenizer (line 34) | class BigBirdTokenizer(metaclass=DummyObject): method __init__ (line 37) | def __init__(self, *args, **kwargs): class CamembertTokenizer (line 41) | class CamembertTokenizer(metaclass=DummyObject): method __init__ (line 44) | def __init__(self, *args, **kwargs): class CpmTokenizer (line 48) | class CpmTokenizer(metaclass=DummyObject): method __init__ (line 51) | def __init__(self, *args, **kwargs): class DebertaV2Tokenizer (line 55) | class DebertaV2Tokenizer(metaclass=DummyObject): method __init__ (line 58) | def __init__(self, *args, **kwargs): class FNetTokenizer (line 62) | class FNetTokenizer(metaclass=DummyObject): method __init__ (line 65) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizer (line 69) | class LayoutXLMTokenizer(metaclass=DummyObject): method __init__ (line 72) | def __init__(self, *args, **kwargs): class M2M100Tokenizer (line 76) | class M2M100Tokenizer(metaclass=DummyObject): method __init__ (line 79) | def __init__(self, *args, **kwargs): class MarianTokenizer (line 83) | class MarianTokenizer(metaclass=DummyObject): method __init__ (line 86) | def __init__(self, *args, **kwargs): class MBart50Tokenizer (line 90) | class MBart50Tokenizer(metaclass=DummyObject): method __init__ (line 93) | def __init__(self, *args, **kwargs): class MBartTokenizer (line 97) | class MBartTokenizer(metaclass=DummyObject): method __init__ (line 100) | def __init__(self, *args, **kwargs): class MLukeTokenizer (line 104) | class MLukeTokenizer(metaclass=DummyObject): method __init__ (line 107) | def __init__(self, *args, **kwargs): class MT5Tokenizer (line 111) | class MT5Tokenizer(metaclass=DummyObject): method __init__ (line 114) | def __init__(self, *args, **kwargs): class NllbTokenizer (line 118) | class NllbTokenizer(metaclass=DummyObject): method __init__ (line 121) | def __init__(self, *args, **kwargs): class PegasusTokenizer (line 125) | class PegasusTokenizer(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): class PLBartTokenizer (line 132) | class PLBartTokenizer(metaclass=DummyObject): method __init__ (line 135) | def __init__(self, *args, **kwargs): class ReformerTokenizer (line 139) | class ReformerTokenizer(metaclass=DummyObject): method __init__ (line 142) | def __init__(self, *args, **kwargs): class RemBertTokenizer (line 146) | class RemBertTokenizer(metaclass=DummyObject): method __init__ (line 149) | def __init__(self, *args, **kwargs): class Speech2TextTokenizer (line 153) | class Speech2TextTokenizer(metaclass=DummyObject): method __init__ (line 156) | def __init__(self, *args, **kwargs): class T5Tokenizer (line 160) | class T5Tokenizer(metaclass=DummyObject): method __init__ (line 163) | def __init__(self, *args, **kwargs): class XGLMTokenizer (line 167) | class XGLMTokenizer(metaclass=DummyObject): method __init__ (line 170) | def __init__(self, *args, **kwargs): class XLMProphetNetTokenizer (line 174) | class XLMProphetNetTokenizer(metaclass=DummyObject): method __init__ (line 177) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizer (line 181) | class XLMRobertaTokenizer(metaclass=DummyObject): method __init__ (line 184) | def __init__(self, *args, **kwargs): class XLNetTokenizer (line 188) | class XLNetTokenizer(metaclass=DummyObject): method __init__ (line 191) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_speech_objects.py class MCTCTFeatureExtractor (line 6) | class MCTCTFeatureExtractor(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class Speech2TextFeatureExtractor (line 13) | class Speech2TextFeatureExtractor(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_tensorflow_text_objects.py class TFBertTokenizer (line 6) | class TFBertTokenizer(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_tf_objects.py class TensorFlowBenchmarkArguments (line 6) | class TensorFlowBenchmarkArguments(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class TensorFlowBenchmark (line 13) | class TensorFlowBenchmark(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): class TFForcedBOSTokenLogitsProcessor (line 20) | class TFForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): class TFForcedEOSTokenLogitsProcessor (line 27) | class TFForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 30) | def __init__(self, *args, **kwargs): class TFLogitsProcessor (line 34) | class TFLogitsProcessor(metaclass=DummyObject): method __init__ (line 37) | def __init__(self, *args, **kwargs): class TFLogitsProcessorList (line 41) | class TFLogitsProcessorList(metaclass=DummyObject): method __init__ (line 44) | def __init__(self, *args, **kwargs): class TFLogitsWarper (line 48) | class TFLogitsWarper(metaclass=DummyObject): method __init__ (line 51) | def __init__(self, *args, **kwargs): class TFMinLengthLogitsProcessor (line 55) | class TFMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 58) | def __init__(self, *args, **kwargs): class TFNoBadWordsLogitsProcessor (line 62) | class TFNoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 65) | def __init__(self, *args, **kwargs): class TFNoRepeatNGramLogitsProcessor (line 69) | class TFNoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 72) | def __init__(self, *args, **kwargs): class TFRepetitionPenaltyLogitsProcessor (line 76) | class TFRepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 79) | def __init__(self, *args, **kwargs): class TFTemperatureLogitsWarper (line 83) | class TFTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 86) | def __init__(self, *args, **kwargs): class TFTopKLogitsWarper (line 90) | class TFTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 93) | def __init__(self, *args, **kwargs): class TFTopPLogitsWarper (line 97) | class TFTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 100) | def __init__(self, *args, **kwargs): function tf_top_k_top_p_filtering (line 104) | def tf_top_k_top_p_filtering(*args, **kwargs): class KerasMetricCallback (line 108) | class KerasMetricCallback(metaclass=DummyObject): method __init__ (line 111) | def __init__(self, *args, **kwargs): class PushToHubCallback (line 115) | class PushToHubCallback(metaclass=DummyObject): method __init__ (line 118) | def __init__(self, *args, **kwargs): class TFLayoutLMForMaskedLM (line 125) | class TFLayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): class TFLayoutLMForQuestionAnswering (line 132) | class TFLayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 135) | def __init__(self, *args, **kwargs): class TFLayoutLMForSequenceClassification (line 139) | class TFLayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 142) | def __init__(self, *args, **kwargs): class TFLayoutLMForTokenClassification (line 146) | class TFLayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 149) | def __init__(self, *args, **kwargs): class TFLayoutLMMainLayer (line 153) | class TFLayoutLMMainLayer(metaclass=DummyObject): method __init__ (line 156) | def __init__(self, *args, **kwargs): class TFLayoutLMModel (line 160) | class TFLayoutLMModel(metaclass=DummyObject): method __init__ (line 163) | def __init__(self, *args, **kwargs): class TFLayoutLMPreTrainedModel (line 167) | class TFLayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 170) | def __init__(self, *args, **kwargs): class TFPreTrainedModel (line 174) | class TFPreTrainedModel(metaclass=DummyObject): method __init__ (line 177) | def __init__(self, *args, **kwargs): class TFSequenceSummary (line 181) | class TFSequenceSummary(metaclass=DummyObject): method __init__ (line 184) | def __init__(self, *args, **kwargs): class TFSharedEmbeddings (line 188) | class TFSharedEmbeddings(metaclass=DummyObject): method __init__ (line 191) | def __init__(self, *args, **kwargs): function shape_list (line 195) | def shape_list(*args, **kwargs): class TFAlbertForMaskedLM (line 202) | class TFAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 205) | def __init__(self, *args, **kwargs): class TFAlbertForMultipleChoice (line 209) | class TFAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 212) | def __init__(self, *args, **kwargs): class TFAlbertForPreTraining (line 216) | class TFAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 219) | def __init__(self, *args, **kwargs): class TFAlbertForQuestionAnswering (line 223) | class TFAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 226) | def __init__(self, *args, **kwargs): class TFAlbertForSequenceClassification (line 230) | class TFAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 233) | def __init__(self, *args, **kwargs): class TFAlbertForTokenClassification (line 237) | class TFAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 240) | def __init__(self, *args, **kwargs): class TFAlbertMainLayer (line 244) | class TFAlbertMainLayer(metaclass=DummyObject): method __init__ (line 247) | def __init__(self, *args, **kwargs): class TFAlbertModel (line 251) | class TFAlbertModel(metaclass=DummyObject): method __init__ (line 254) | def __init__(self, *args, **kwargs): class TFAlbertPreTrainedModel (line 258) | class TFAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 261) | def __init__(self, *args, **kwargs): class TFAutoModel (line 319) | class TFAutoModel(metaclass=DummyObject): method __init__ (line 322) | def __init__(self, *args, **kwargs): class TFAutoModelForCausalLM (line 326) | class TFAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 329) | def __init__(self, *args, **kwargs): class TFAutoModelForDocumentQuestionAnswering (line 333) | class TFAutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 336) | def __init__(self, *args, **kwargs): class TFAutoModelForImageClassification (line 340) | class TFAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 343) | def __init__(self, *args, **kwargs): class TFAutoModelForMaskedLM (line 347) | class TFAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 350) | def __init__(self, *args, **kwargs): class TFAutoModelForMultipleChoice (line 354) | class TFAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 357) | def __init__(self, *args, **kwargs): class TFAutoModelForNextSentencePrediction (line 361) | class TFAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 364) | def __init__(self, *args, **kwargs): class TFAutoModelForPreTraining (line 368) | class TFAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 371) | def __init__(self, *args, **kwargs): class TFAutoModelForQuestionAnswering (line 375) | class TFAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 378) | def __init__(self, *args, **kwargs): class TFAutoModelForSemanticSegmentation (line 382) | class TFAutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 385) | def __init__(self, *args, **kwargs): class TFAutoModelForSeq2SeqLM (line 389) | class TFAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 392) | def __init__(self, *args, **kwargs): class TFAutoModelForSequenceClassification (line 396) | class TFAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 399) | def __init__(self, *args, **kwargs): class TFAutoModelForSpeechSeq2Seq (line 403) | class TFAutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 406) | def __init__(self, *args, **kwargs): class TFAutoModelForTableQuestionAnswering (line 410) | class TFAutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 413) | def __init__(self, *args, **kwargs): class TFAutoModelForTokenClassification (line 417) | class TFAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 420) | def __init__(self, *args, **kwargs): class TFAutoModelForVision2Seq (line 424) | class TFAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 427) | def __init__(self, *args, **kwargs): class TFAutoModelWithLMHead (line 431) | class TFAutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 434) | def __init__(self, *args, **kwargs): class TFBartForConditionalGeneration (line 438) | class TFBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 441) | def __init__(self, *args, **kwargs): class TFBartModel (line 445) | class TFBartModel(metaclass=DummyObject): method __init__ (line 448) | def __init__(self, *args, **kwargs): class TFBartPretrainedModel (line 452) | class TFBartPretrainedModel(metaclass=DummyObject): method __init__ (line 455) | def __init__(self, *args, **kwargs): class TFBertEmbeddings (line 462) | class TFBertEmbeddings(metaclass=DummyObject): method __init__ (line 465) | def __init__(self, *args, **kwargs): class TFBertForMaskedLM (line 469) | class TFBertForMaskedLM(metaclass=DummyObject): method __init__ (line 472) | def __init__(self, *args, **kwargs): class TFBertForMultipleChoice (line 476) | class TFBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 479) | def __init__(self, *args, **kwargs): class TFBertForNextSentencePrediction (line 483) | class TFBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 486) | def __init__(self, *args, **kwargs): class TFBertForPreTraining (line 490) | class TFBertForPreTraining(metaclass=DummyObject): method __init__ (line 493) | def __init__(self, *args, **kwargs): class TFBertForQuestionAnswering (line 497) | class TFBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 500) | def __init__(self, *args, **kwargs): class TFBertForSequenceClassification (line 504) | class TFBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 507) | def __init__(self, *args, **kwargs): class TFBertForTokenClassification (line 511) | class TFBertForTokenClassification(metaclass=DummyObject): method __init__ (line 514) | def __init__(self, *args, **kwargs): class TFBertLMHeadModel (line 518) | class TFBertLMHeadModel(metaclass=DummyObject): method __init__ (line 521) | def __init__(self, *args, **kwargs): class TFBertMainLayer (line 525) | class TFBertMainLayer(metaclass=DummyObject): method __init__ (line 528) | def __init__(self, *args, **kwargs): class TFBertModel (line 532) | class TFBertModel(metaclass=DummyObject): method __init__ (line 535) | def __init__(self, *args, **kwargs): class TFBertPreTrainedModel (line 539) | class TFBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 542) | def __init__(self, *args, **kwargs): class TFBlenderbotForConditionalGeneration (line 546) | class TFBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 549) | def __init__(self, *args, **kwargs): class TFBlenderbotModel (line 553) | class TFBlenderbotModel(metaclass=DummyObject): method __init__ (line 556) | def __init__(self, *args, **kwargs): class TFBlenderbotPreTrainedModel (line 560) | class TFBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 563) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallForConditionalGeneration (line 567) | class TFBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 570) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallModel (line 574) | class TFBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 577) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallPreTrainedModel (line 581) | class TFBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 584) | def __init__(self, *args, **kwargs): class TFCamembertForCausalLM (line 591) | class TFCamembertForCausalLM(metaclass=DummyObject): method __init__ (line 594) | def __init__(self, *args, **kwargs): class TFCamembertForMaskedLM (line 598) | class TFCamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 601) | def __init__(self, *args, **kwargs): class TFCamembertForMultipleChoice (line 605) | class TFCamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 608) | def __init__(self, *args, **kwargs): class TFCamembertForQuestionAnswering (line 612) | class TFCamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 615) | def __init__(self, *args, **kwargs): class TFCamembertForSequenceClassification (line 619) | class TFCamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 622) | def __init__(self, *args, **kwargs): class TFCamembertForTokenClassification (line 626) | class TFCamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 629) | def __init__(self, *args, **kwargs): class TFCamembertModel (line 633) | class TFCamembertModel(metaclass=DummyObject): method __init__ (line 636) | def __init__(self, *args, **kwargs): class TFCamembertPreTrainedModel (line 640) | class TFCamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 643) | def __init__(self, *args, **kwargs): class TFCLIPModel (line 650) | class TFCLIPModel(metaclass=DummyObject): method __init__ (line 653) | def __init__(self, *args, **kwargs): class TFCLIPPreTrainedModel (line 657) | class TFCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 660) | def __init__(self, *args, **kwargs): class TFCLIPTextModel (line 664) | class TFCLIPTextModel(metaclass=DummyObject): method __init__ (line 667) | def __init__(self, *args, **kwargs): class TFCLIPVisionModel (line 671) | class TFCLIPVisionModel(metaclass=DummyObject): method __init__ (line 674) | def __init__(self, *args, **kwargs): class TFConvBertForMaskedLM (line 681) | class TFConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 684) | def __init__(self, *args, **kwargs): class TFConvBertForMultipleChoice (line 688) | class TFConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 691) | def __init__(self, *args, **kwargs): class TFConvBertForQuestionAnswering (line 695) | class TFConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 698) | def __init__(self, *args, **kwargs): class TFConvBertForSequenceClassification (line 702) | class TFConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 705) | def __init__(self, *args, **kwargs): class TFConvBertForTokenClassification (line 709) | class TFConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 712) | def __init__(self, *args, **kwargs): class TFConvBertLayer (line 716) | class TFConvBertLayer(metaclass=DummyObject): method __init__ (line 719) | def __init__(self, *args, **kwargs): class TFConvBertModel (line 723) | class TFConvBertModel(metaclass=DummyObject): method __init__ (line 726) | def __init__(self, *args, **kwargs): class TFConvBertPreTrainedModel (line 730) | class TFConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 733) | def __init__(self, *args, **kwargs): class TFConvNextForImageClassification (line 737) | class TFConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 740) | def __init__(self, *args, **kwargs): class TFConvNextModel (line 744) | class TFConvNextModel(metaclass=DummyObject): method __init__ (line 747) | def __init__(self, *args, **kwargs): class TFConvNextPreTrainedModel (line 751) | class TFConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 754) | def __init__(self, *args, **kwargs): class TFCTRLForSequenceClassification (line 761) | class TFCTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 764) | def __init__(self, *args, **kwargs): class TFCTRLLMHeadModel (line 768) | class TFCTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 771) | def __init__(self, *args, **kwargs): class TFCTRLModel (line 775) | class TFCTRLModel(metaclass=DummyObject): method __init__ (line 778) | def __init__(self, *args, **kwargs): class TFCTRLPreTrainedModel (line 782) | class TFCTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 785) | def __init__(self, *args, **kwargs): class TFCvtForImageClassification (line 792) | class TFCvtForImageClassification(metaclass=DummyObject): method __init__ (line 795) | def __init__(self, *args, **kwargs): class TFCvtModel (line 799) | class TFCvtModel(metaclass=DummyObject): method __init__ (line 802) | def __init__(self, *args, **kwargs): class TFCvtPreTrainedModel (line 806) | class TFCvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 809) | def __init__(self, *args, **kwargs): class TFData2VecVisionForImageClassification (line 813) | class TFData2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 816) | def __init__(self, *args, **kwargs): class TFData2VecVisionForSemanticSegmentation (line 820) | class TFData2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 823) | def __init__(self, *args, **kwargs): class TFData2VecVisionModel (line 827) | class TFData2VecVisionModel(metaclass=DummyObject): method __init__ (line 830) | def __init__(self, *args, **kwargs): class TFData2VecVisionPreTrainedModel (line 834) | class TFData2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 837) | def __init__(self, *args, **kwargs): class TFDebertaForMaskedLM (line 844) | class TFDebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 847) | def __init__(self, *args, **kwargs): class TFDebertaForQuestionAnswering (line 851) | class TFDebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 854) | def __init__(self, *args, **kwargs): class TFDebertaForSequenceClassification (line 858) | class TFDebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 861) | def __init__(self, *args, **kwargs): class TFDebertaForTokenClassification (line 865) | class TFDebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 868) | def __init__(self, *args, **kwargs): class TFDebertaModel (line 872) | class TFDebertaModel(metaclass=DummyObject): method __init__ (line 875) | def __init__(self, *args, **kwargs): class TFDebertaPreTrainedModel (line 879) | class TFDebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 882) | def __init__(self, *args, **kwargs): class TFDebertaV2ForMaskedLM (line 889) | class TFDebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 892) | def __init__(self, *args, **kwargs): class TFDebertaV2ForQuestionAnswering (line 896) | class TFDebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 899) | def __init__(self, *args, **kwargs): class TFDebertaV2ForSequenceClassification (line 903) | class TFDebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 906) | def __init__(self, *args, **kwargs): class TFDebertaV2ForTokenClassification (line 910) | class TFDebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 913) | def __init__(self, *args, **kwargs): class TFDebertaV2Model (line 917) | class TFDebertaV2Model(metaclass=DummyObject): method __init__ (line 920) | def __init__(self, *args, **kwargs): class TFDebertaV2PreTrainedModel (line 924) | class TFDebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 927) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassification (line 934) | class TFDeiTForImageClassification(metaclass=DummyObject): method __init__ (line 937) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassificationWithTeacher (line 941) | class TFDeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 944) | def __init__(self, *args, **kwargs): class TFDeiTForMaskedImageModeling (line 948) | class TFDeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 951) | def __init__(self, *args, **kwargs): class TFDeiTModel (line 955) | class TFDeiTModel(metaclass=DummyObject): method __init__ (line 958) | def __init__(self, *args, **kwargs): class TFDeiTPreTrainedModel (line 962) | class TFDeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 965) | def __init__(self, *args, **kwargs): class TFDistilBertForMaskedLM (line 972) | class TFDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 975) | def __init__(self, *args, **kwargs): class TFDistilBertForMultipleChoice (line 979) | class TFDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 982) | def __init__(self, *args, **kwargs): class TFDistilBertForQuestionAnswering (line 986) | class TFDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 989) | def __init__(self, *args, **kwargs): class TFDistilBertForSequenceClassification (line 993) | class TFDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 996) | def __init__(self, *args, **kwargs): class TFDistilBertForTokenClassification (line 1000) | class TFDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1003) | def __init__(self, *args, **kwargs): class TFDistilBertMainLayer (line 1007) | class TFDistilBertMainLayer(metaclass=DummyObject): method __init__ (line 1010) | def __init__(self, *args, **kwargs): class TFDistilBertModel (line 1014) | class TFDistilBertModel(metaclass=DummyObject): method __init__ (line 1017) | def __init__(self, *args, **kwargs): class TFDistilBertPreTrainedModel (line 1021) | class TFDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1024) | def __init__(self, *args, **kwargs): class TFDPRContextEncoder (line 1037) | class TFDPRContextEncoder(metaclass=DummyObject): method __init__ (line 1040) | def __init__(self, *args, **kwargs): class TFDPRPretrainedContextEncoder (line 1044) | class TFDPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 1047) | def __init__(self, *args, **kwargs): class TFDPRPretrainedQuestionEncoder (line 1051) | class TFDPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 1054) | def __init__(self, *args, **kwargs): class TFDPRPretrainedReader (line 1058) | class TFDPRPretrainedReader(metaclass=DummyObject): method __init__ (line 1061) | def __init__(self, *args, **kwargs): class TFDPRQuestionEncoder (line 1065) | class TFDPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 1068) | def __init__(self, *args, **kwargs): class TFDPRReader (line 1072) | class TFDPRReader(metaclass=DummyObject): method __init__ (line 1075) | def __init__(self, *args, **kwargs): class TFElectraForMaskedLM (line 1082) | class TFElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 1085) | def __init__(self, *args, **kwargs): class TFElectraForMultipleChoice (line 1089) | class TFElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 1092) | def __init__(self, *args, **kwargs): class TFElectraForPreTraining (line 1096) | class TFElectraForPreTraining(metaclass=DummyObject): method __init__ (line 1099) | def __init__(self, *args, **kwargs): class TFElectraForQuestionAnswering (line 1103) | class TFElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1106) | def __init__(self, *args, **kwargs): class TFElectraForSequenceClassification (line 1110) | class TFElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 1113) | def __init__(self, *args, **kwargs): class TFElectraForTokenClassification (line 1117) | class TFElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 1120) | def __init__(self, *args, **kwargs): class TFElectraModel (line 1124) | class TFElectraModel(metaclass=DummyObject): method __init__ (line 1127) | def __init__(self, *args, **kwargs): class TFElectraPreTrainedModel (line 1131) | class TFElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 1134) | def __init__(self, *args, **kwargs): class TFEncoderDecoderModel (line 1138) | class TFEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1141) | def __init__(self, *args, **kwargs): class TFEsmForMaskedLM (line 1148) | class TFEsmForMaskedLM(metaclass=DummyObject): method __init__ (line 1151) | def __init__(self, *args, **kwargs): class TFEsmForSequenceClassification (line 1155) | class TFEsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 1158) | def __init__(self, *args, **kwargs): class TFEsmForTokenClassification (line 1162) | class TFEsmForTokenClassification(metaclass=DummyObject): method __init__ (line 1165) | def __init__(self, *args, **kwargs): class TFEsmModel (line 1169) | class TFEsmModel(metaclass=DummyObject): method __init__ (line 1172) | def __init__(self, *args, **kwargs): class TFEsmPreTrainedModel (line 1176) | class TFEsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 1179) | def __init__(self, *args, **kwargs): class TFFlaubertForMultipleChoice (line 1186) | class TFFlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1189) | def __init__(self, *args, **kwargs): class TFFlaubertForQuestionAnsweringSimple (line 1193) | class TFFlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 1196) | def __init__(self, *args, **kwargs): class TFFlaubertForSequenceClassification (line 1200) | class TFFlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1203) | def __init__(self, *args, **kwargs): class TFFlaubertForTokenClassification (line 1207) | class TFFlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 1210) | def __init__(self, *args, **kwargs): class TFFlaubertModel (line 1214) | class TFFlaubertModel(metaclass=DummyObject): method __init__ (line 1217) | def __init__(self, *args, **kwargs): class TFFlaubertPreTrainedModel (line 1221) | class TFFlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1224) | def __init__(self, *args, **kwargs): class TFFlaubertWithLMHeadModel (line 1228) | class TFFlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 1231) | def __init__(self, *args, **kwargs): class TFFunnelBaseModel (line 1238) | class TFFunnelBaseModel(metaclass=DummyObject): method __init__ (line 1241) | def __init__(self, *args, **kwargs): class TFFunnelForMaskedLM (line 1245) | class TFFunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 1248) | def __init__(self, *args, **kwargs): class TFFunnelForMultipleChoice (line 1252) | class TFFunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 1255) | def __init__(self, *args, **kwargs): class TFFunnelForPreTraining (line 1259) | class TFFunnelForPreTraining(metaclass=DummyObject): method __init__ (line 1262) | def __init__(self, *args, **kwargs): class TFFunnelForQuestionAnswering (line 1266) | class TFFunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1269) | def __init__(self, *args, **kwargs): class TFFunnelForSequenceClassification (line 1273) | class TFFunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 1276) | def __init__(self, *args, **kwargs): class TFFunnelForTokenClassification (line 1280) | class TFFunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 1283) | def __init__(self, *args, **kwargs): class TFFunnelModel (line 1287) | class TFFunnelModel(metaclass=DummyObject): method __init__ (line 1290) | def __init__(self, *args, **kwargs): class TFFunnelPreTrainedModel (line 1294) | class TFFunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 1297) | def __init__(self, *args, **kwargs): class TFGPT2DoubleHeadsModel (line 1304) | class TFGPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 1307) | def __init__(self, *args, **kwargs): class TFGPT2ForSequenceClassification (line 1311) | class TFGPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1314) | def __init__(self, *args, **kwargs): class TFGPT2LMHeadModel (line 1318) | class TFGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 1321) | def __init__(self, *args, **kwargs): class TFGPT2MainLayer (line 1325) | class TFGPT2MainLayer(metaclass=DummyObject): method __init__ (line 1328) | def __init__(self, *args, **kwargs): class TFGPT2Model (line 1332) | class TFGPT2Model(metaclass=DummyObject): method __init__ (line 1335) | def __init__(self, *args, **kwargs): class TFGPT2PreTrainedModel (line 1339) | class TFGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1342) | def __init__(self, *args, **kwargs): class TFGPTJForCausalLM (line 1346) | class TFGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 1349) | def __init__(self, *args, **kwargs): class TFGPTJForQuestionAnswering (line 1353) | class TFGPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1356) | def __init__(self, *args, **kwargs): class TFGPTJForSequenceClassification (line 1360) | class TFGPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 1363) | def __init__(self, *args, **kwargs): class TFGPTJModel (line 1367) | class TFGPTJModel(metaclass=DummyObject): method __init__ (line 1370) | def __init__(self, *args, **kwargs): class TFGPTJPreTrainedModel (line 1374) | class TFGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 1377) | def __init__(self, *args, **kwargs): class TFGroupViTModel (line 1384) | class TFGroupViTModel(metaclass=DummyObject): method __init__ (line 1387) | def __init__(self, *args, **kwargs): class TFGroupViTPreTrainedModel (line 1391) | class TFGroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1394) | def __init__(self, *args, **kwargs): class TFGroupViTTextModel (line 1398) | class TFGroupViTTextModel(metaclass=DummyObject): method __init__ (line 1401) | def __init__(self, *args, **kwargs): class TFGroupViTVisionModel (line 1405) | class TFGroupViTVisionModel(metaclass=DummyObject): method __init__ (line 1408) | def __init__(self, *args, **kwargs): class TFHubertForCTC (line 1415) | class TFHubertForCTC(metaclass=DummyObject): method __init__ (line 1418) | def __init__(self, *args, **kwargs): class TFHubertModel (line 1422) | class TFHubertModel(metaclass=DummyObject): method __init__ (line 1425) | def __init__(self, *args, **kwargs): class TFHubertPreTrainedModel (line 1429) | class TFHubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1432) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForQuestionAnswering (line 1439) | class TFLayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1442) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForSequenceClassification (line 1446) | class TFLayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1449) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForTokenClassification (line 1453) | class TFLayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 1456) | def __init__(self, *args, **kwargs): class TFLayoutLMv3Model (line 1460) | class TFLayoutLMv3Model(metaclass=DummyObject): method __init__ (line 1463) | def __init__(self, *args, **kwargs): class TFLayoutLMv3PreTrainedModel (line 1467) | class TFLayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 1470) | def __init__(self, *args, **kwargs): class TFLEDForConditionalGeneration (line 1474) | class TFLEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1477) | def __init__(self, *args, **kwargs): class TFLEDModel (line 1481) | class TFLEDModel(metaclass=DummyObject): method __init__ (line 1484) | def __init__(self, *args, **kwargs): class TFLEDPreTrainedModel (line 1488) | class TFLEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 1491) | def __init__(self, *args, **kwargs): class TFLongformerForMaskedLM (line 1498) | class TFLongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 1501) | def __init__(self, *args, **kwargs): class TFLongformerForMultipleChoice (line 1505) | class TFLongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 1508) | def __init__(self, *args, **kwargs): class TFLongformerForQuestionAnswering (line 1512) | class TFLongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1515) | def __init__(self, *args, **kwargs): class TFLongformerForSequenceClassification (line 1519) | class TFLongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 1522) | def __init__(self, *args, **kwargs): class TFLongformerForTokenClassification (line 1526) | class TFLongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 1529) | def __init__(self, *args, **kwargs): class TFLongformerModel (line 1533) | class TFLongformerModel(metaclass=DummyObject): method __init__ (line 1536) | def __init__(self, *args, **kwargs): class TFLongformerPreTrainedModel (line 1540) | class TFLongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1543) | def __init__(self, *args, **kwargs): class TFLongformerSelfAttention (line 1547) | class TFLongformerSelfAttention(metaclass=DummyObject): method __init__ (line 1550) | def __init__(self, *args, **kwargs): class TFLxmertForPreTraining (line 1557) | class TFLxmertForPreTraining(metaclass=DummyObject): method __init__ (line 1560) | def __init__(self, *args, **kwargs): class TFLxmertMainLayer (line 1564) | class TFLxmertMainLayer(metaclass=DummyObject): method __init__ (line 1567) | def __init__(self, *args, **kwargs): class TFLxmertModel (line 1571) | class TFLxmertModel(metaclass=DummyObject): method __init__ (line 1574) | def __init__(self, *args, **kwargs): class TFLxmertPreTrainedModel (line 1578) | class TFLxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1581) | def __init__(self, *args, **kwargs): class TFLxmertVisualFeatureEncoder (line 1585) | class TFLxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 1588) | def __init__(self, *args, **kwargs): class TFMarianModel (line 1592) | class TFMarianModel(metaclass=DummyObject): method __init__ (line 1595) | def __init__(self, *args, **kwargs): class TFMarianMTModel (line 1599) | class TFMarianMTModel(metaclass=DummyObject): method __init__ (line 1602) | def __init__(self, *args, **kwargs): class TFMarianPreTrainedModel (line 1606) | class TFMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 1609) | def __init__(self, *args, **kwargs): class TFMBartForConditionalGeneration (line 1613) | class TFMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1616) | def __init__(self, *args, **kwargs): class TFMBartModel (line 1620) | class TFMBartModel(metaclass=DummyObject): method __init__ (line 1623) | def __init__(self, *args, **kwargs): class TFMBartPreTrainedModel (line 1627) | class TFMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 1630) | def __init__(self, *args, **kwargs): class TFMobileBertForMaskedLM (line 1640) | class TFMobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1643) | def __init__(self, *args, **kwargs): class TFMobileBertForMultipleChoice (line 1647) | class TFMobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1650) | def __init__(self, *args, **kwargs): class TFMobileBertForNextSentencePrediction (line 1654) | class TFMobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 1657) | def __init__(self, *args, **kwargs): class TFMobileBertForPreTraining (line 1661) | class TFMobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 1664) | def __init__(self, *args, **kwargs): class TFMobileBertForQuestionAnswering (line 1668) | class TFMobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1671) | def __init__(self, *args, **kwargs): class TFMobileBertForSequenceClassification (line 1675) | class TFMobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1678) | def __init__(self, *args, **kwargs): class TFMobileBertForTokenClassification (line 1682) | class TFMobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1685) | def __init__(self, *args, **kwargs): class TFMobileBertMainLayer (line 1689) | class TFMobileBertMainLayer(metaclass=DummyObject): method __init__ (line 1692) | def __init__(self, *args, **kwargs): class TFMobileBertModel (line 1696) | class TFMobileBertModel(metaclass=DummyObject): method __init__ (line 1699) | def __init__(self, *args, **kwargs): class TFMobileBertPreTrainedModel (line 1703) | class TFMobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1706) | def __init__(self, *args, **kwargs): class TFMobileViTForImageClassification (line 1710) | class TFMobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 1713) | def __init__(self, *args, **kwargs): class TFMobileViTForSemanticSegmentation (line 1717) | class TFMobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1720) | def __init__(self, *args, **kwargs): class TFMobileViTModel (line 1724) | class TFMobileViTModel(metaclass=DummyObject): method __init__ (line 1727) | def __init__(self, *args, **kwargs): class TFMobileViTPreTrainedModel (line 1731) | class TFMobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1734) | def __init__(self, *args, **kwargs): class TFMPNetForMaskedLM (line 1741) | class TFMPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 1744) | def __init__(self, *args, **kwargs): class TFMPNetForMultipleChoice (line 1748) | class TFMPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 1751) | def __init__(self, *args, **kwargs): class TFMPNetForQuestionAnswering (line 1755) | class TFMPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1758) | def __init__(self, *args, **kwargs): class TFMPNetForSequenceClassification (line 1762) | class TFMPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 1765) | def __init__(self, *args, **kwargs): class TFMPNetForTokenClassification (line 1769) | class TFMPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 1772) | def __init__(self, *args, **kwargs): class TFMPNetMainLayer (line 1776) | class TFMPNetMainLayer(metaclass=DummyObject): method __init__ (line 1779) | def __init__(self, *args, **kwargs): class TFMPNetModel (line 1783) | class TFMPNetModel(metaclass=DummyObject): method __init__ (line 1786) | def __init__(self, *args, **kwargs): class TFMPNetPreTrainedModel (line 1790) | class TFMPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1793) | def __init__(self, *args, **kwargs): class TFMT5EncoderModel (line 1797) | class TFMT5EncoderModel(metaclass=DummyObject): method __init__ (line 1800) | def __init__(self, *args, **kwargs): class TFMT5ForConditionalGeneration (line 1804) | class TFMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1807) | def __init__(self, *args, **kwargs): class TFMT5Model (line 1811) | class TFMT5Model(metaclass=DummyObject): method __init__ (line 1814) | def __init__(self, *args, **kwargs): class TFOpenAIGPTDoubleHeadsModel (line 1821) | class TFOpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 1824) | def __init__(self, *args, **kwargs): class TFOpenAIGPTForSequenceClassification (line 1828) | class TFOpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 1831) | def __init__(self, *args, **kwargs): class TFOpenAIGPTLMHeadModel (line 1835) | class TFOpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 1838) | def __init__(self, *args, **kwargs): class TFOpenAIGPTMainLayer (line 1842) | class TFOpenAIGPTMainLayer(metaclass=DummyObject): method __init__ (line 1845) | def __init__(self, *args, **kwargs): class TFOpenAIGPTModel (line 1849) | class TFOpenAIGPTModel(metaclass=DummyObject): method __init__ (line 1852) | def __init__(self, *args, **kwargs): class TFOpenAIGPTPreTrainedModel (line 1856) | class TFOpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1859) | def __init__(self, *args, **kwargs): class TFOPTForCausalLM (line 1863) | class TFOPTForCausalLM(metaclass=DummyObject): method __init__ (line 1866) | def __init__(self, *args, **kwargs): class TFOPTModel (line 1870) | class TFOPTModel(metaclass=DummyObject): method __init__ (line 1873) | def __init__(self, *args, **kwargs): class TFOPTPreTrainedModel (line 1877) | class TFOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1880) | def __init__(self, *args, **kwargs): class TFPegasusForConditionalGeneration (line 1884) | class TFPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1887) | def __init__(self, *args, **kwargs): class TFPegasusModel (line 1891) | class TFPegasusModel(metaclass=DummyObject): method __init__ (line 1894) | def __init__(self, *args, **kwargs): class TFPegasusPreTrainedModel (line 1898) | class TFPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 1901) | def __init__(self, *args, **kwargs): class TFRagModel (line 1905) | class TFRagModel(metaclass=DummyObject): method __init__ (line 1908) | def __init__(self, *args, **kwargs): class TFRagPreTrainedModel (line 1912) | class TFRagPreTrainedModel(metaclass=DummyObject): method __init__ (line 1915) | def __init__(self, *args, **kwargs): class TFRagSequenceForGeneration (line 1919) | class TFRagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 1922) | def __init__(self, *args, **kwargs): class TFRagTokenForGeneration (line 1926) | class TFRagTokenForGeneration(metaclass=DummyObject): method __init__ (line 1929) | def __init__(self, *args, **kwargs): class TFRegNetForImageClassification (line 1936) | class TFRegNetForImageClassification(metaclass=DummyObject): method __init__ (line 1939) | def __init__(self, *args, **kwargs): class TFRegNetModel (line 1943) | class TFRegNetModel(metaclass=DummyObject): method __init__ (line 1946) | def __init__(self, *args, **kwargs): class TFRegNetPreTrainedModel (line 1950) | class TFRegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1953) | def __init__(self, *args, **kwargs): class TFRemBertForCausalLM (line 1960) | class TFRemBertForCausalLM(metaclass=DummyObject): method __init__ (line 1963) | def __init__(self, *args, **kwargs): class TFRemBertForMaskedLM (line 1967) | class TFRemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1970) | def __init__(self, *args, **kwargs): class TFRemBertForMultipleChoice (line 1974) | class TFRemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1977) | def __init__(self, *args, **kwargs): class TFRemBertForQuestionAnswering (line 1981) | class TFRemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1984) | def __init__(self, *args, **kwargs): class TFRemBertForSequenceClassification (line 1988) | class TFRemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1991) | def __init__(self, *args, **kwargs): class TFRemBertForTokenClassification (line 1995) | class TFRemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1998) | def __init__(self, *args, **kwargs): class TFRemBertLayer (line 2002) | class TFRemBertLayer(metaclass=DummyObject): method __init__ (line 2005) | def __init__(self, *args, **kwargs): class TFRemBertModel (line 2009) | class TFRemBertModel(metaclass=DummyObject): method __init__ (line 2012) | def __init__(self, *args, **kwargs): class TFRemBertPreTrainedModel (line 2016) | class TFRemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2019) | def __init__(self, *args, **kwargs): class TFResNetForImageClassification (line 2026) | class TFResNetForImageClassification(metaclass=DummyObject): method __init__ (line 2029) | def __init__(self, *args, **kwargs): class TFResNetModel (line 2033) | class TFResNetModel(metaclass=DummyObject): method __init__ (line 2036) | def __init__(self, *args, **kwargs): class TFResNetPreTrainedModel (line 2040) | class TFResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2043) | def __init__(self, *args, **kwargs): class TFRobertaForCausalLM (line 2050) | class TFRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 2053) | def __init__(self, *args, **kwargs): class TFRobertaForMaskedLM (line 2057) | class TFRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2060) | def __init__(self, *args, **kwargs): class TFRobertaForMultipleChoice (line 2064) | class TFRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2067) | def __init__(self, *args, **kwargs): class TFRobertaForQuestionAnswering (line 2071) | class TFRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2074) | def __init__(self, *args, **kwargs): class TFRobertaForSequenceClassification (line 2078) | class TFRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2081) | def __init__(self, *args, **kwargs): class TFRobertaForTokenClassification (line 2085) | class TFRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2088) | def __init__(self, *args, **kwargs): class TFRobertaMainLayer (line 2092) | class TFRobertaMainLayer(metaclass=DummyObject): method __init__ (line 2095) | def __init__(self, *args, **kwargs): class TFRobertaModel (line 2099) | class TFRobertaModel(metaclass=DummyObject): method __init__ (line 2102) | def __init__(self, *args, **kwargs): class TFRobertaPreTrainedModel (line 2106) | class TFRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2109) | def __init__(self, *args, **kwargs): class TFRoFormerForCausalLM (line 2116) | class TFRoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 2119) | def __init__(self, *args, **kwargs): class TFRoFormerForMaskedLM (line 2123) | class TFRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 2126) | def __init__(self, *args, **kwargs): class TFRoFormerForMultipleChoice (line 2130) | class TFRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 2133) | def __init__(self, *args, **kwargs): class TFRoFormerForQuestionAnswering (line 2137) | class TFRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2140) | def __init__(self, *args, **kwargs): class TFRoFormerForSequenceClassification (line 2144) | class TFRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 2147) | def __init__(self, *args, **kwargs): class TFRoFormerForTokenClassification (line 2151) | class TFRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 2154) | def __init__(self, *args, **kwargs): class TFRoFormerLayer (line 2158) | class TFRoFormerLayer(metaclass=DummyObject): method __init__ (line 2161) | def __init__(self, *args, **kwargs): class TFRoFormerModel (line 2165) | class TFRoFormerModel(metaclass=DummyObject): method __init__ (line 2168) | def __init__(self, *args, **kwargs): class TFRoFormerPreTrainedModel (line 2172) | class TFRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2175) | def __init__(self, *args, **kwargs): class TFSegformerDecodeHead (line 2182) | class TFSegformerDecodeHead(metaclass=DummyObject): method __init__ (line 2185) | def __init__(self, *args, **kwargs): class TFSegformerForImageClassification (line 2189) | class TFSegformerForImageClassification(metaclass=DummyObject): method __init__ (line 2192) | def __init__(self, *args, **kwargs): class TFSegformerForSemanticSegmentation (line 2196) | class TFSegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2199) | def __init__(self, *args, **kwargs): class TFSegformerModel (line 2203) | class TFSegformerModel(metaclass=DummyObject): method __init__ (line 2206) | def __init__(self, *args, **kwargs): class TFSegformerPreTrainedModel (line 2210) | class TFSegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2213) | def __init__(self, *args, **kwargs): class TFSpeech2TextForConditionalGeneration (line 2220) | class TFSpeech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2223) | def __init__(self, *args, **kwargs): class TFSpeech2TextModel (line 2227) | class TFSpeech2TextModel(metaclass=DummyObject): method __init__ (line 2230) | def __init__(self, *args, **kwargs): class TFSpeech2TextPreTrainedModel (line 2234) | class TFSpeech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2237) | def __init__(self, *args, **kwargs): class TFSwinForImageClassification (line 2244) | class TFSwinForImageClassification(metaclass=DummyObject): method __init__ (line 2247) | def __init__(self, *args, **kwargs): class TFSwinForMaskedImageModeling (line 2251) | class TFSwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 2254) | def __init__(self, *args, **kwargs): class TFSwinModel (line 2258) | class TFSwinModel(metaclass=DummyObject): method __init__ (line 2261) | def __init__(self, *args, **kwargs): class TFSwinPreTrainedModel (line 2265) | class TFSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 2268) | def __init__(self, *args, **kwargs): class TFT5EncoderModel (line 2275) | class TFT5EncoderModel(metaclass=DummyObject): method __init__ (line 2278) | def __init__(self, *args, **kwargs): class TFT5ForConditionalGeneration (line 2282) | class TFT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2285) | def __init__(self, *args, **kwargs): class TFT5Model (line 2289) | class TFT5Model(metaclass=DummyObject): method __init__ (line 2292) | def __init__(self, *args, **kwargs): class TFT5PreTrainedModel (line 2296) | class TFT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 2299) | def __init__(self, *args, **kwargs): class TFTapasForMaskedLM (line 2306) | class TFTapasForMaskedLM(metaclass=DummyObject): method __init__ (line 2309) | def __init__(self, *args, **kwargs): class TFTapasForQuestionAnswering (line 2313) | class TFTapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2316) | def __init__(self, *args, **kwargs): class TFTapasForSequenceClassification (line 2320) | class TFTapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 2323) | def __init__(self, *args, **kwargs): class TFTapasModel (line 2327) | class TFTapasModel(metaclass=DummyObject): method __init__ (line 2330) | def __init__(self, *args, **kwargs): class TFTapasPreTrainedModel (line 2334) | class TFTapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 2337) | def __init__(self, *args, **kwargs): class TFAdaptiveEmbedding (line 2344) | class TFAdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 2347) | def __init__(self, *args, **kwargs): class TFTransfoXLForSequenceClassification (line 2351) | class TFTransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 2354) | def __init__(self, *args, **kwargs): class TFTransfoXLLMHeadModel (line 2358) | class TFTransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 2361) | def __init__(self, *args, **kwargs): class TFTransfoXLMainLayer (line 2365) | class TFTransfoXLMainLayer(metaclass=DummyObject): method __init__ (line 2368) | def __init__(self, *args, **kwargs): class TFTransfoXLModel (line 2372) | class TFTransfoXLModel(metaclass=DummyObject): method __init__ (line 2375) | def __init__(self, *args, **kwargs): class TFTransfoXLPreTrainedModel (line 2379) | class TFTransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 2382) | def __init__(self, *args, **kwargs): class TFVisionEncoderDecoderModel (line 2386) | class TFVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 2389) | def __init__(self, *args, **kwargs): class TFViTForImageClassification (line 2393) | class TFViTForImageClassification(metaclass=DummyObject): method __init__ (line 2396) | def __init__(self, *args, **kwargs): class TFViTModel (line 2400) | class TFViTModel(metaclass=DummyObject): method __init__ (line 2403) | def __init__(self, *args, **kwargs): class TFViTPreTrainedModel (line 2407) | class TFViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2410) | def __init__(self, *args, **kwargs): class TFViTMAEForPreTraining (line 2414) | class TFViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 2417) | def __init__(self, *args, **kwargs): class TFViTMAEModel (line 2421) | class TFViTMAEModel(metaclass=DummyObject): method __init__ (line 2424) | def __init__(self, *args, **kwargs): class TFViTMAEPreTrainedModel (line 2428) | class TFViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 2431) | def __init__(self, *args, **kwargs): class TFWav2Vec2ForCTC (line 2438) | class TFWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 2441) | def __init__(self, *args, **kwargs): class TFWav2Vec2Model (line 2445) | class TFWav2Vec2Model(metaclass=DummyObject): method __init__ (line 2448) | def __init__(self, *args, **kwargs): class TFWav2Vec2PreTrainedModel (line 2452) | class TFWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2455) | def __init__(self, *args, **kwargs): class TFWhisperForConditionalGeneration (line 2462) | class TFWhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2465) | def __init__(self, *args, **kwargs): class TFWhisperModel (line 2469) | class TFWhisperModel(metaclass=DummyObject): method __init__ (line 2472) | def __init__(self, *args, **kwargs): class TFWhisperPreTrainedModel (line 2476) | class TFWhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 2479) | def __init__(self, *args, **kwargs): class TFXGLMForCausalLM (line 2486) | class TFXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 2489) | def __init__(self, *args, **kwargs): class TFXGLMModel (line 2493) | class TFXGLMModel(metaclass=DummyObject): method __init__ (line 2496) | def __init__(self, *args, **kwargs): class TFXGLMPreTrainedModel (line 2500) | class TFXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2503) | def __init__(self, *args, **kwargs): class TFXLMForMultipleChoice (line 2510) | class TFXLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 2513) | def __init__(self, *args, **kwargs): class TFXLMForQuestionAnsweringSimple (line 2517) | class TFXLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2520) | def __init__(self, *args, **kwargs): class TFXLMForSequenceClassification (line 2524) | class TFXLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2527) | def __init__(self, *args, **kwargs): class TFXLMForTokenClassification (line 2531) | class TFXLMForTokenClassification(metaclass=DummyObject): method __init__ (line 2534) | def __init__(self, *args, **kwargs): class TFXLMMainLayer (line 2538) | class TFXLMMainLayer(metaclass=DummyObject): method __init__ (line 2541) | def __init__(self, *args, **kwargs): class TFXLMModel (line 2545) | class TFXLMModel(metaclass=DummyObject): method __init__ (line 2548) | def __init__(self, *args, **kwargs): class TFXLMPreTrainedModel (line 2552) | class TFXLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2555) | def __init__(self, *args, **kwargs): class TFXLMWithLMHeadModel (line 2559) | class TFXLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 2562) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMaskedLM (line 2569) | class TFXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2572) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMultipleChoice (line 2576) | class TFXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2579) | def __init__(self, *args, **kwargs): class TFXLMRobertaForQuestionAnswering (line 2583) | class TFXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2586) | def __init__(self, *args, **kwargs): class TFXLMRobertaForSequenceClassification (line 2590) | class TFXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2593) | def __init__(self, *args, **kwargs): class TFXLMRobertaForTokenClassification (line 2597) | class TFXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2600) | def __init__(self, *args, **kwargs): class TFXLMRobertaModel (line 2604) | class TFXLMRobertaModel(metaclass=DummyObject): method __init__ (line 2607) | def __init__(self, *args, **kwargs): class TFXLNetForMultipleChoice (line 2614) | class TFXLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 2617) | def __init__(self, *args, **kwargs): class TFXLNetForQuestionAnsweringSimple (line 2621) | class TFXLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2624) | def __init__(self, *args, **kwargs): class TFXLNetForSequenceClassification (line 2628) | class TFXLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 2631) | def __init__(self, *args, **kwargs): class TFXLNetForTokenClassification (line 2635) | class TFXLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 2638) | def __init__(self, *args, **kwargs): class TFXLNetLMHeadModel (line 2642) | class TFXLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 2645) | def __init__(self, *args, **kwargs): class TFXLNetMainLayer (line 2649) | class TFXLNetMainLayer(metaclass=DummyObject): method __init__ (line 2652) | def __init__(self, *args, **kwargs): class TFXLNetModel (line 2656) | class TFXLNetModel(metaclass=DummyObject): method __init__ (line 2659) | def __init__(self, *args, **kwargs): class TFXLNetPreTrainedModel (line 2663) | class TFXLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2666) | def __init__(self, *args, **kwargs): class AdamWeightDecay (line 2670) | class AdamWeightDecay(metaclass=DummyObject): method __init__ (line 2673) | def __init__(self, *args, **kwargs): class GradientAccumulator (line 2677) | class GradientAccumulator(metaclass=DummyObject): method __init__ (line 2680) | def __init__(self, *args, **kwargs): class WarmUp (line 2684) | class WarmUp(metaclass=DummyObject): method __init__ (line 2687) | def __init__(self, *args, **kwargs): function create_optimizer (line 2691) | def create_optimizer(*args, **kwargs): class TFTrainer (line 2695) | class TFTrainer(metaclass=DummyObject): method __init__ (line 2698) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_timm_and_vision_objects.py class ConditionalDetrForObjectDetection (line 9) | class ConditionalDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 12) | def __init__(self, *args, **kwargs): class ConditionalDetrForSegmentation (line 16) | class ConditionalDetrForSegmentation(metaclass=DummyObject): method __init__ (line 19) | def __init__(self, *args, **kwargs): class ConditionalDetrModel (line 23) | class ConditionalDetrModel(metaclass=DummyObject): method __init__ (line 26) | def __init__(self, *args, **kwargs): class ConditionalDetrPreTrainedModel (line 30) | class ConditionalDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 33) | def __init__(self, *args, **kwargs): class DeformableDetrForObjectDetection (line 40) | class DeformableDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class DeformableDetrModel (line 47) | class DeformableDetrModel(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class DeformableDetrPreTrainedModel (line 54) | class DeformableDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class DetrForObjectDetection (line 64) | class DetrForObjectDetection(metaclass=DummyObject): method __init__ (line 67) | def __init__(self, *args, **kwargs): class DetrForSegmentation (line 71) | class DetrForSegmentation(metaclass=DummyObject): method __init__ (line 74) | def __init__(self, *args, **kwargs): class DetrModel (line 78) | class DetrModel(metaclass=DummyObject): method __init__ (line 81) | def __init__(self, *args, **kwargs): class DetrPreTrainedModel (line 85) | class DetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 88) | def __init__(self, *args, **kwargs): class TableTransformerForObjectDetection (line 95) | class TableTransformerForObjectDetection(metaclass=DummyObject): method __init__ (line 98) | def __init__(self, *args, **kwargs): class TableTransformerModel (line 102) | class TableTransformerModel(metaclass=DummyObject): method __init__ (line 105) | def __init__(self, *args, **kwargs): class TableTransformerPreTrainedModel (line 109) | class TableTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 112) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_tokenizers_objects.py class AlbertTokenizerFast (line 6) | class AlbertTokenizerFast(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): class BartTokenizerFast (line 13) | class BartTokenizerFast(metaclass=DummyObject): method __init__ (line 16) | def __init__(self, *args, **kwargs): class BarthezTokenizerFast (line 20) | class BarthezTokenizerFast(metaclass=DummyObject): method __init__ (line 23) | def __init__(self, *args, **kwargs): class BertTokenizerFast (line 27) | class BertTokenizerFast(metaclass=DummyObject): method __init__ (line 30) | def __init__(self, *args, **kwargs): class BigBirdTokenizerFast (line 34) | class BigBirdTokenizerFast(metaclass=DummyObject): method __init__ (line 37) | def __init__(self, *args, **kwargs): class BlenderbotTokenizerFast (line 41) | class BlenderbotTokenizerFast(metaclass=DummyObject): method __init__ (line 44) | def __init__(self, *args, **kwargs): class BlenderbotSmallTokenizerFast (line 48) | class BlenderbotSmallTokenizerFast(metaclass=DummyObject): method __init__ (line 51) | def __init__(self, *args, **kwargs): class BloomTokenizerFast (line 55) | class BloomTokenizerFast(metaclass=DummyObject): method __init__ (line 58) | def __init__(self, *args, **kwargs): class CamembertTokenizerFast (line 62) | class CamembertTokenizerFast(metaclass=DummyObject): method __init__ (line 65) | def __init__(self, *args, **kwargs): class CLIPTokenizerFast (line 69) | class CLIPTokenizerFast(metaclass=DummyObject): method __init__ (line 72) | def __init__(self, *args, **kwargs): class CodeGenTokenizerFast (line 76) | class CodeGenTokenizerFast(metaclass=DummyObject): method __init__ (line 79) | def __init__(self, *args, **kwargs): class ConvBertTokenizerFast (line 83) | class ConvBertTokenizerFast(metaclass=DummyObject): method __init__ (line 86) | def __init__(self, *args, **kwargs): class CpmTokenizerFast (line 90) | class CpmTokenizerFast(metaclass=DummyObject): method __init__ (line 93) | def __init__(self, *args, **kwargs): class DebertaTokenizerFast (line 97) | class DebertaTokenizerFast(metaclass=DummyObject): method __init__ (line 100) | def __init__(self, *args, **kwargs): class DebertaV2TokenizerFast (line 104) | class DebertaV2TokenizerFast(metaclass=DummyObject): method __init__ (line 107) | def __init__(self, *args, **kwargs): class DistilBertTokenizerFast (line 111) | class DistilBertTokenizerFast(metaclass=DummyObject): method __init__ (line 114) | def __init__(self, *args, **kwargs): class DPRContextEncoderTokenizerFast (line 118) | class DPRContextEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 121) | def __init__(self, *args, **kwargs): class DPRQuestionEncoderTokenizerFast (line 125) | class DPRQuestionEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 128) | def __init__(self, *args, **kwargs): class DPRReaderTokenizerFast (line 132) | class DPRReaderTokenizerFast(metaclass=DummyObject): method __init__ (line 135) | def __init__(self, *args, **kwargs): class ElectraTokenizerFast (line 139) | class ElectraTokenizerFast(metaclass=DummyObject): method __init__ (line 142) | def __init__(self, *args, **kwargs): class FNetTokenizerFast (line 146) | class FNetTokenizerFast(metaclass=DummyObject): method __init__ (line 149) | def __init__(self, *args, **kwargs): class FunnelTokenizerFast (line 153) | class FunnelTokenizerFast(metaclass=DummyObject): method __init__ (line 156) | def __init__(self, *args, **kwargs): class GPT2TokenizerFast (line 160) | class GPT2TokenizerFast(metaclass=DummyObject): method __init__ (line 163) | def __init__(self, *args, **kwargs): class GPTNeoXTokenizerFast (line 167) | class GPTNeoXTokenizerFast(metaclass=DummyObject): method __init__ (line 170) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseTokenizer (line 174) | class GPTNeoXJapaneseTokenizer(metaclass=DummyObject): method __init__ (line 177) | def __init__(self, *args, **kwargs): class HerbertTokenizerFast (line 181) | class HerbertTokenizerFast(metaclass=DummyObject): method __init__ (line 184) | def __init__(self, *args, **kwargs): class LayoutLMTokenizerFast (line 188) | class LayoutLMTokenizerFast(metaclass=DummyObject): method __init__ (line 191) | def __init__(self, *args, **kwargs): class LayoutLMv2TokenizerFast (line 195) | class LayoutLMv2TokenizerFast(metaclass=DummyObject): method __init__ (line 198) | def __init__(self, *args, **kwargs): class LayoutLMv3TokenizerFast (line 202) | class LayoutLMv3TokenizerFast(metaclass=DummyObject): method __init__ (line 205) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizerFast (line 209) | class LayoutXLMTokenizerFast(metaclass=DummyObject): method __init__ (line 212) | def __init__(self, *args, **kwargs): class LEDTokenizerFast (line 216) | class LEDTokenizerFast(metaclass=DummyObject): method __init__ (line 219) | def __init__(self, *args, **kwargs): class LongformerTokenizerFast (line 223) | class LongformerTokenizerFast(metaclass=DummyObject): method __init__ (line 226) | def __init__(self, *args, **kwargs): class LxmertTokenizerFast (line 230) | class LxmertTokenizerFast(metaclass=DummyObject): method __init__ (line 233) | def __init__(self, *args, **kwargs): class MarkupLMTokenizerFast (line 237) | class MarkupLMTokenizerFast(metaclass=DummyObject): method __init__ (line 240) | def __init__(self, *args, **kwargs): class MBartTokenizerFast (line 244) | class MBartTokenizerFast(metaclass=DummyObject): method __init__ (line 247) | def __init__(self, *args, **kwargs): class MBart50TokenizerFast (line 251) | class MBart50TokenizerFast(metaclass=DummyObject): method __init__ (line 254) | def __init__(self, *args, **kwargs): class MobileBertTokenizerFast (line 258) | class MobileBertTokenizerFast(metaclass=DummyObject): method __init__ (line 261) | def __init__(self, *args, **kwargs): class MPNetTokenizerFast (line 265) | class MPNetTokenizerFast(metaclass=DummyObject): method __init__ (line 268) | def __init__(self, *args, **kwargs): class MT5TokenizerFast (line 272) | class MT5TokenizerFast(metaclass=DummyObject): method __init__ (line 275) | def __init__(self, *args, **kwargs): class MvpTokenizerFast (line 279) | class MvpTokenizerFast(metaclass=DummyObject): method __init__ (line 282) | def __init__(self, *args, **kwargs): class NllbTokenizerFast (line 286) | class NllbTokenizerFast(metaclass=DummyObject): method __init__ (line 289) | def __init__(self, *args, **kwargs): class OpenAIGPTTokenizerFast (line 293) | class OpenAIGPTTokenizerFast(metaclass=DummyObject): method __init__ (line 296) | def __init__(self, *args, **kwargs): class PegasusTokenizerFast (line 300) | class PegasusTokenizerFast(metaclass=DummyObject): method __init__ (line 303) | def __init__(self, *args, **kwargs): class RealmTokenizerFast (line 307) | class RealmTokenizerFast(metaclass=DummyObject): method __init__ (line 310) | def __init__(self, *args, **kwargs): class ReformerTokenizerFast (line 314) | class ReformerTokenizerFast(metaclass=DummyObject): method __init__ (line 317) | def __init__(self, *args, **kwargs): class RemBertTokenizerFast (line 321) | class RemBertTokenizerFast(metaclass=DummyObject): method __init__ (line 324) | def __init__(self, *args, **kwargs): class RetriBertTokenizerFast (line 328) | class RetriBertTokenizerFast(metaclass=DummyObject): method __init__ (line 331) | def __init__(self, *args, **kwargs): class RobertaTokenizerFast (line 335) | class RobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 338) | def __init__(self, *args, **kwargs): class RoFormerTokenizerFast (line 342) | class RoFormerTokenizerFast(metaclass=DummyObject): method __init__ (line 345) | def __init__(self, *args, **kwargs): class SplinterTokenizerFast (line 349) | class SplinterTokenizerFast(metaclass=DummyObject): method __init__ (line 352) | def __init__(self, *args, **kwargs): class SqueezeBertTokenizerFast (line 356) | class SqueezeBertTokenizerFast(metaclass=DummyObject): method __init__ (line 359) | def __init__(self, *args, **kwargs): class T5TokenizerFast (line 363) | class T5TokenizerFast(metaclass=DummyObject): method __init__ (line 366) | def __init__(self, *args, **kwargs): class XGLMTokenizerFast (line 370) | class XGLMTokenizerFast(metaclass=DummyObject): method __init__ (line 373) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizerFast (line 377) | class XLMRobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 380) | def __init__(self, *args, **kwargs): class XLNetTokenizerFast (line 384) | class XLNetTokenizerFast(metaclass=DummyObject): method __init__ (line 387) | def __init__(self, *args, **kwargs): class PreTrainedTokenizerFast (line 391) | class PreTrainedTokenizerFast(metaclass=DummyObject): method __init__ (line 394) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/dummy_vision_objects.py class ImageProcessorMixin (line 6) | class ImageProcessorMixin(metaclass=DummyObject): method __init__ (line 9) | def __init__(self, *args, **kwargs): function rescale (line 13) | def rescale(*args, **kwargs): function resize (line 17) | def resize(*args, **kwargs): function to_pil_image (line 21) | def to_pil_image(*args, **kwargs): class ImageFeatureExtractionMixin (line 25) | class ImageFeatureExtractionMixin(metaclass=DummyObject): method __init__ (line 28) | def __init__(self, *args, **kwargs): class BeitFeatureExtractor (line 32) | class BeitFeatureExtractor(metaclass=DummyObject): method __init__ (line 35) | def __init__(self, *args, **kwargs): class CLIPFeatureExtractor (line 39) | class CLIPFeatureExtractor(metaclass=DummyObject): method __init__ (line 42) | def __init__(self, *args, **kwargs): class ConditionalDetrFeatureExtractor (line 46) | class ConditionalDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 49) | def __init__(self, *args, **kwargs): class ConvNextFeatureExtractor (line 53) | class ConvNextFeatureExtractor(metaclass=DummyObject): method __init__ (line 56) | def __init__(self, *args, **kwargs): class DeformableDetrFeatureExtractor (line 60) | class DeformableDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 63) | def __init__(self, *args, **kwargs): class DeiTFeatureExtractor (line 67) | class DeiTFeatureExtractor(metaclass=DummyObject): method __init__ (line 70) | def __init__(self, *args, **kwargs): class DetrFeatureExtractor (line 74) | class DetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 77) | def __init__(self, *args, **kwargs): class DonutFeatureExtractor (line 81) | class DonutFeatureExtractor(metaclass=DummyObject): method __init__ (line 84) | def __init__(self, *args, **kwargs): class DPTFeatureExtractor (line 88) | class DPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 91) | def __init__(self, *args, **kwargs): class FlavaFeatureExtractor (line 95) | class FlavaFeatureExtractor(metaclass=DummyObject): method __init__ (line 98) | def __init__(self, *args, **kwargs): class FlavaProcessor (line 102) | class FlavaProcessor(metaclass=DummyObject): method __init__ (line 105) | def __init__(self, *args, **kwargs): class GLPNFeatureExtractor (line 109) | class GLPNFeatureExtractor(metaclass=DummyObject): method __init__ (line 112) | def __init__(self, *args, **kwargs): class ImageGPTFeatureExtractor (line 116) | class ImageGPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 119) | def __init__(self, *args, **kwargs): class LayoutLMv2FeatureExtractor (line 123) | class LayoutLMv2FeatureExtractor(metaclass=DummyObject): method __init__ (line 126) | def __init__(self, *args, **kwargs): class LayoutLMv3FeatureExtractor (line 130) | class LayoutLMv3FeatureExtractor(metaclass=DummyObject): method __init__ (line 133) | def __init__(self, *args, **kwargs): class LevitFeatureExtractor (line 137) | class LevitFeatureExtractor(metaclass=DummyObject): method __init__ (line 140) | def __init__(self, *args, **kwargs): class MaskFormerFeatureExtractor (line 144) | class MaskFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 147) | def __init__(self, *args, **kwargs): class MobileViTFeatureExtractor (line 151) | class MobileViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 154) | def __init__(self, *args, **kwargs): class OwlViTFeatureExtractor (line 158) | class OwlViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 161) | def __init__(self, *args, **kwargs): class PerceiverFeatureExtractor (line 165) | class PerceiverFeatureExtractor(metaclass=DummyObject): method __init__ (line 168) | def __init__(self, *args, **kwargs): class PoolFormerFeatureExtractor (line 172) | class PoolFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 175) | def __init__(self, *args, **kwargs): class SegformerFeatureExtractor (line 179) | class SegformerFeatureExtractor(metaclass=DummyObject): method __init__ (line 182) | def __init__(self, *args, **kwargs): class VideoMAEFeatureExtractor (line 186) | class VideoMAEFeatureExtractor(metaclass=DummyObject): method __init__ (line 189) | def __init__(self, *args, **kwargs): class ViltFeatureExtractor (line 193) | class ViltFeatureExtractor(metaclass=DummyObject): method __init__ (line 196) | def __init__(self, *args, **kwargs): class ViltProcessor (line 200) | class ViltProcessor(metaclass=DummyObject): method __init__ (line 203) | def __init__(self, *args, **kwargs): class ViTFeatureExtractor (line 207) | class ViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 210) | def __init__(self, *args, **kwargs): class YolosFeatureExtractor (line 214) | class YolosFeatureExtractor(metaclass=DummyObject): method __init__ (line 217) | def __init__(self, *args, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/fx.py function _generate_supported_model_class_names (line 62) | def _generate_supported_model_class_names( function torch_nn_embedding (line 164) | def torch_nn_embedding(self, input): function torch_nn_functional_embedding (line 168) | def torch_nn_functional_embedding( function torch_nn_layernorm (line 174) | def torch_nn_layernorm(self, input): function torch_nn_groupnorm (line 178) | def torch_nn_groupnorm(self, input): function torch_nn_linear (line 182) | def torch_nn_linear(self, input): function torch_relu (line 186) | def torch_relu(x): function torch_nn_relu (line 190) | def torch_nn_relu(self, x): function torch_nn_functional_relu (line 194) | def torch_nn_functional_relu(x, inplace=False): function torch_where (line 200) | def torch_where(condition, x, y): function torch_abs (line 206) | def torch_abs(input, *, out=None): function torch_arange (line 212) | def torch_arange(*args, **kwargs): function torch_cat (line 233) | def torch_cat(tensors, dim=None, axis=None, *, out=None): function torch_stack (line 247) | def torch_stack(tensors, dim=None, axis=None, *, out=None): function torch_add (line 259) | def torch_add(input, other, *, alpha=1, out=None): function torch_mul (line 273) | def torch_mul(input, other, *, out=None): function torch_tensor_mul (line 277) | def torch_tensor_mul(self, other): function torch_matmul (line 281) | def torch_matmul(input, other, *, out=None): function torch_bmm (line 317) | def torch_bmm(input, mat2, *, out=None): function torch_baddbmm (line 325) | def torch_baddbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None): function torch_tensor_baddbmm (line 331) | def torch_tensor_baddbmm(self, batch1, batch2, *, beta=1, alpha=1, out=N... function torch_einsum (line 335) | def torch_einsum(equation, *operands): function torch_tensor_repeat (line 341) | def torch_tensor_repeat(self, *sizes): function torch_index_select (line 348) | def torch_index_select(input, dim, index, *, out=None): function torch_tensor_index_select (line 354) | def torch_tensor_index_select(self, dim, index): function torch_roll (line 358) | def torch_roll(input, shifts, dims=None): function torch_flip (line 362) | def torch_flip(input, dims): function torch_tensor_flip (line 366) | def torch_tensor_flip(self, dims): function torch_nn_conv1d (line 370) | def torch_nn_conv1d(self, input): function torch_nn_conv2d (line 388) | def torch_nn_conv2d(self, input): function torch_squeeze (line 409) | def torch_squeeze(input, dim=None): function torch_tensor_squeeze (line 426) | def torch_tensor_squeeze(self, dim=None): function torch_unsqueeze (line 430) | def torch_unsqueeze(input, dim): function torch_tensor_unsqueeze (line 438) | def torch_tensor_unsqueeze(self, dim): function torch_unique_consecutive (line 442) | def torch_unique_consecutive(input, **kwargs): function torch_nn_functional_one_hot (line 450) | def torch_nn_functional_one_hot(tensor, num_classes=-1): function torch_nn_mseloss (line 457) | def torch_nn_mseloss(self, input, target): function torch_nn_crossentropyloss (line 465) | def torch_nn_crossentropyloss(self, input, target): function torch_nn_bcewithlogitsloss (line 473) | def torch_nn_bcewithlogitsloss(self, input, target): function operator_getitem (line 481) | def operator_getitem(a, b): class HFProxy (line 543) | class HFProxy(Proxy): method install_metadata (line 548) | def install_metadata(self, metadata): method shape (line 552) | def shape(self): method dtype (line 556) | def dtype(self): method device (line 562) | def device(self): method __len__ (line 567) | def __len__(self): method __bool__ (line 572) | def __bool__(self): method __getattr__ (line 577) | def __getattr__(self, k): method __setitem__ (line 584) | def __setitem__(self, indices, values): method __contains__ (line 587) | def __contains__(self, key): class HFAttribute (line 593) | class HFAttribute(HFProxy): method __init__ (line 594) | def __init__(self, root, attr: str): method node (line 601) | def node(self): method __call__ (line 608) | def __call__(self, *args, **kwargs): class MetaDeviceAttribute (line 612) | class MetaDeviceAttribute(HFAttribute): function _proxies_to_metas (line 616) | def _proxies_to_metas(v): function _gen_constructor_wrapper (line 627) | def _gen_constructor_wrapper(target): function _generate_random_int (line 648) | def _generate_random_int(low: int = 10, high: int = 20, forbidden_values... class HFTracer (line 657) | class HFTracer(Tracer): method __init__ (line 668) | def __init__(self, autowrap_modules=(math,), autowrap_functions=()): method _generate_dummy_input (line 679) | def _generate_dummy_input( method create_proxy (line 802) | def create_proxy(self, kind, target, args, kwargs, name=None, type_exp... method _module_getattr (line 870) | def _module_getattr(self, attr, attr_val, parameter_proxy_cache): method getattr (line 908) | def getattr(self, attr: str, attr_val: Any, parameter_proxy_cache: Dic... method call_module (line 911) | def call_module(self, m, forward, args, kwargs): method proxy (line 915) | def proxy(self, node): method trace (line 918) | def trace( method _stateless_mod_instanciation_depends_on_proxies (line 1040) | def _stateless_mod_instanciation_depends_on_proxies(self, mod: nn.Modu... method _insert_module_as_submodule (line 1047) | def _insert_module_as_submodule(self, mod: nn.Module) -> str: method path_of_module (line 1071) | def path_of_module(self, mod: nn.Module) -> str: method is_leaf_module (line 1088) | def is_leaf_module(self, m: torch.nn.Module, module_qualified_name: st... function get_concrete_args (line 1094) | def get_concrete_args(model: nn.Module, input_names: List[str]): function check_if_model_is_supported (line 1108) | def check_if_model_is_supported(model: PreTrainedModel): function symbolic_trace (line 1116) | def symbolic_trace( FILE: benchmark/third_party/transformers/src/transformers/utils/generic.py class cached_property (line 39) | class cached_property(property): method __get__ (line 48) | def __get__(self, obj, objtype=None): function is_tensor (line 62) | def is_tensor(x): function _is_numpy (line 89) | def _is_numpy(x): function is_numpy_array (line 93) | def is_numpy_array(x): function _is_torch (line 100) | def _is_torch(x): function is_torch_tensor (line 106) | def is_torch_tensor(x): function _is_torch_device (line 113) | def _is_torch_device(x): function is_torch_device (line 119) | def is_torch_device(x): function _is_tensorflow (line 126) | def _is_tensorflow(x): function is_tf_tensor (line 132) | def is_tf_tensor(x): function _is_jax (line 139) | def _is_jax(x): function is_jax_tensor (line 145) | def is_jax_tensor(x): function to_py_obj (line 152) | def to_py_obj(obj): function to_numpy (line 172) | def to_numpy(obj): class ModelOutput (line 190) | class ModelOutput(OrderedDict): method __post_init__ (line 204) | def __post_init__(self): method __delitem__ (line 248) | def __delitem__(self, *args, **kwargs): method setdefault (line 251) | def setdefault(self, *args, **kwargs): method pop (line 254) | def pop(self, *args, **kwargs): method update (line 257) | def update(self, *args, **kwargs): method __getitem__ (line 260) | def __getitem__(self, k): method __setattr__ (line 267) | def __setattr__(self, name, value): method __setitem__ (line 273) | def __setitem__(self, key, value): method to_tuple (line 279) | def to_tuple(self) -> Tuple[Any]: class ExplicitEnum (line 286) | class ExplicitEnum(str, Enum): method _missing_ (line 292) | def _missing_(cls, value): class PaddingStrategy (line 298) | class PaddingStrategy(ExplicitEnum): class TensorType (line 309) | class TensorType(ExplicitEnum): class ContextManagers (line 321) | class ContextManagers: method __init__ (line 327) | def __init__(self, context_managers: List[ContextManager]): method __enter__ (line 331) | def __enter__(self): method __exit__ (line 335) | def __exit__(self, *args, **kwargs): function find_labels (line 339) | def find_labels(model_class): function flatten_dict (line 359) | def flatten_dict(d: MutableMapping, parent_key: str = "", delimiter: str... function working_or_temp_dir (line 374) | def working_or_temp_dir(working_dir, use_temp_dir: bool = False): function transpose (line 382) | def transpose(array, axes=None): function reshape (line 399) | def reshape(array, newshape): function squeeze (line 416) | def squeeze(array, axis=None): function expand_dims (line 433) | def expand_dims(array, axis): function tensor_size (line 450) | def tensor_size(array): FILE: benchmark/third_party/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: benchmark/third_party/transformers/src/transformers/utils/hub.py function is_offline_mode (line 70) | def is_offline_mode(): function is_remote_url (line 130) | def is_remote_url(url_or_filename): function get_cached_models (line 135) | def get_cached_models(cache_dir: Union[str, Path] = None) -> List[Tuple]: function define_sagemaker_information (line 170) | def define_sagemaker_information(): function http_user_agent (line 196) | def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str: function extract_commit_hash (line 219) | def extract_commit_hash(resolved_file: Optional[str], commit_hash: Optio... function try_to_load_from_cache (line 233) | def try_to_load_from_cache( function cached_file (line 295) | def cached_file( function get_file_from_repo (line 471) | def get_file_from_repo( function download_url (line 552) | def download_url(url, proxies=None): function has_file (line 578) | def has_file( class PushToHubMixin (line 627) | class PushToHubMixin: method _create_repo (line 632) | def _create_repo( method _get_files_timestamps (line 668) | def _get_files_timestamps(self, working_dir: Union[str, os.PathLike]): method _upload_modified_files (line 674) | def _upload_modified_files( method push_to_hub (line 712) | def push_to_hub( function get_full_repo_name (line 797) | def get_full_repo_name(model_id: str, organization: Optional[str] = None... function send_example_telemetry (line 807) | def send_example_telemetry(example_name, *example_args, framework="pytor... function convert_file_size_to_int (line 845) | def convert_file_size_to_int(size: Union[int, str]): function get_checkpoint_shard_files (line 878) | def get_checkpoint_shard_files( function get_all_cached_files (line 959) | def get_all_cached_files(cache_dir=None): function extract_info_from_url (line 985) | def extract_info_from_url(url): function clean_files_for (line 997) | def clean_files_for(file): function move_to_new_cache (line 1006) | def move_to_new_cache(file, repo, filename, revision, etag, commit_hash): function move_cache (line 1032) | def move_cache(cache_dir=None, new_cache_dir=None, token=None): FILE: benchmark/third_party/transformers/src/transformers/utils/import_utils.py function is_kenlm_available (line 274) | def is_kenlm_available(): function is_torch_available (line 278) | def is_torch_available(): function is_pyctcdecode_available (line 282) | def is_pyctcdecode_available(): function is_librosa_available (line 286) | def is_librosa_available(): function is_torch_cuda_available (line 290) | def is_torch_cuda_available(): function is_torch_bf16_gpu_available (line 299) | def is_torch_bf16_gpu_available(): function is_torch_bf16_cpu_available (line 331) | def is_torch_bf16_cpu_available(): function is_torch_bf16_available (line 349) | def is_torch_bf16_available(): function is_torch_tf32_available (line 360) | def is_torch_tf32_available(): function is_torch_fx_available (line 390) | def is_torch_fx_available(): function is_bs4_available (line 394) | def is_bs4_available(): function is_torch_onnx_dict_inputs_support_available (line 398) | def is_torch_onnx_dict_inputs_support_available(): function is_tf_available (line 402) | def is_tf_available(): function is_coloredlogs_available (line 406) | def is_coloredlogs_available(): function is_tf2onnx_available (line 410) | def is_tf2onnx_available(): function is_onnx_available (line 414) | def is_onnx_available(): function is_flax_available (line 418) | def is_flax_available(): function is_ftfy_available (line 422) | def is_ftfy_available(): function is_torch_tpu_available (line 427) | def is_torch_tpu_available(check_device=True): function is_torchdynamo_available (line 445) | def is_torchdynamo_available(): function is_torch_tensorrt_fx_available (line 449) | def is_torch_tensorrt_fx_available(): function is_datasets_available (line 455) | def is_datasets_available(): function is_detectron2_available (line 459) | def is_detectron2_available(): function is_more_itertools_available (line 463) | def is_more_itertools_available(): function is_rjieba_available (line 467) | def is_rjieba_available(): function is_psutil_available (line 471) | def is_psutil_available(): function is_py3nvml_available (line 475) | def is_py3nvml_available(): function is_sacremoses_available (line 479) | def is_sacremoses_available(): function is_apex_available (line 483) | def is_apex_available(): function is_ninja_available (line 487) | def is_ninja_available(): function is_ipex_available (line 491) | def is_ipex_available(): function is_bitsandbytes_available (line 513) | def is_bitsandbytes_available(): function is_faiss_available (line 517) | def is_faiss_available(): function is_scipy_available (line 521) | def is_scipy_available(): function is_sklearn_available (line 525) | def is_sklearn_available(): function is_sentencepiece_available (line 531) | def is_sentencepiece_available(): function is_protobuf_available (line 535) | def is_protobuf_available(): function is_accelerate_available (line 541) | def is_accelerate_available(): function is_safetensors_available (line 545) | def is_safetensors_available(): function is_tokenizers_available (line 549) | def is_tokenizers_available(): function is_vision_available (line 553) | def is_vision_available(): function is_pytesseract_available (line 557) | def is_pytesseract_available(): function is_spacy_available (line 561) | def is_spacy_available(): function is_tensorflow_text_available (line 565) | def is_tensorflow_text_available(): function is_in_notebook (line 569) | def is_in_notebook(): function is_scatter_available (line 587) | def is_scatter_available(): function is_pytorch_quantization_available (line 591) | def is_pytorch_quantization_available(): function is_tensorflow_probability_available (line 595) | def is_tensorflow_probability_available(): function is_pandas_available (line 599) | def is_pandas_available(): function is_sagemaker_dp_enabled (line 603) | def is_sagemaker_dp_enabled(): function is_sagemaker_mp_enabled (line 617) | def is_sagemaker_mp_enabled(): function is_training_run_on_sagemaker (line 641) | def is_training_run_on_sagemaker(): function is_soundfile_availble (line 645) | def is_soundfile_availble(): function is_timm_available (line 649) | def is_timm_available(): function is_torchaudio_available (line 653) | def is_torchaudio_available(): function is_speech_available (line 657) | def is_speech_available(): function is_phonemizer_available (line 662) | def is_phonemizer_available(): function torch_only_method (line 666) | def torch_only_method(fn): function is_ccl_available (line 679) | def is_ccl_available(): function is_sudachi_available (line 683) | def is_sudachi_available(): function is_jumanpp_available (line 687) | def is_jumanpp_available(): function requires_backends (line 963) | def requires_backends(obj, backends): class DummyObject (line 983) | class DummyObject(type): method __getattr__ (line 989) | def __getattr__(cls, key): function torch_required (line 995) | def torch_required(func): function tf_required (line 1007) | def tf_required(func): function is_torch_fx_proxy (line 1019) | def is_torch_fx_proxy(x): class _LazyModule (line 1027) | class _LazyModule(ModuleType): method __init__ (line 1034) | def __init__(self, name, module_file, import_structure, module_spec=No... method __dir__ (line 1051) | def __dir__(self): method __getattr__ (line 1060) | def __getattr__(self, name: str) -> Any: method _get_module (line 1074) | def _get_module(self, module_name: str): method __reduce__ (line 1083) | def __reduce__(self): class OptionalDependencyNotAvailable (line 1087) | class OptionalDependencyNotAvailable(BaseException): FILE: benchmark/third_party/transformers/src/transformers/utils/logging.py function _get_default_logging_level (line 52) | def _get_default_logging_level(): function _get_library_name (line 69) | def _get_library_name() -> str: function _get_library_root_logger (line 74) | def _get_library_root_logger() -> logging.Logger: function _configure_library_root_logger (line 79) | def _configure_library_root_logger() -> None: function _reset_library_root_logger (line 97) | def _reset_library_root_logger() -> None: function get_log_levels_dict (line 111) | def get_log_levels_dict(): function get_logger (line 115) | def get_logger(name: Optional[str] = None) -> logging.Logger: function get_verbosity (line 129) | def get_verbosity() -> int: function set_verbosity (line 152) | def set_verbosity(verbosity: int) -> None: function set_verbosity_info (line 171) | def set_verbosity_info(): function set_verbosity_warning (line 176) | def set_verbosity_warning(): function set_verbosity_debug (line 181) | def set_verbosity_debug(): function set_verbosity_error (line 186) | def set_verbosity_error(): function disable_default_handler (line 191) | def disable_default_handler() -> None: function enable_default_handler (line 200) | def enable_default_handler() -> None: function add_handler (line 209) | def add_handler(handler: logging.Handler) -> None: function remove_handler (line 218) | def remove_handler(handler: logging.Handler) -> None: function disable_propagation (line 227) | def disable_propagation() -> None: function enable_propagation (line 236) | def enable_propagation() -> None: function enable_explicit_format (line 246) | def enable_explicit_format() -> None: function reset_format (line 261) | def reset_format() -> None: function warning_advice (line 273) | def warning_advice(self, *args, **kwargs): class EmptyTqdm (line 287) | class EmptyTqdm: method __init__ (line 290) | def __init__(self, *args, **kwargs): # pylint: disable=unused-argument method __iter__ (line 293) | def __iter__(self): method __getattr__ (line 296) | def __getattr__(self, _): method __enter__ (line 304) | def __enter__(self): method __exit__ (line 307) | def __exit__(self, type_, value, traceback): class _tqdm_cls (line 311) | class _tqdm_cls: method __call__ (line 312) | def __call__(self, *args, **kwargs): method set_lock (line 318) | def set_lock(self, *args, **kwargs): method get_lock (line 323) | def get_lock(self): function is_progress_bar_enabled (line 331) | def is_progress_bar_enabled() -> bool: function enable_progress_bar (line 337) | def enable_progress_bar(): function disable_progress_bar (line 344) | def disable_progress_bar(): FILE: benchmark/third_party/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 52) | def get_device_map(n_layers, devices): FILE: benchmark/third_party/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 184) | def display(self): method close (line 195) | def close(self): class NotebookTrainingTracker (line 201) | class NotebookTrainingTracker(NotebookProgressBar): method __init__ (line 211) | def __init__(self, num_steps, column_names=None): method display (line 216) | def display(self): method write_line (line 227) | def write_line(self, values): method add_child (line 246) | def add_child(self, total, prefix=None, width=300): method remove_child (line 259) | def remove_child(self): class NotebookProgressCallback (line 267) | class NotebookProgressCallback(TrainerCallback): method __init__ (line 273) | def __init__(self): method on_train_begin (line 278) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 287) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 296) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_predict (line 308) | def on_predict(self, args, state, control, **kwargs): method on_log (line 313) | def on_log(self, args, state, control, logs=None, **kwargs): method on_evaluate (line 321) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method on_train_end (line 355) | def on_train_end(self, args, state, control, **kwargs): FILE: benchmark/third_party/transformers/src/transformers/utils/versions.py function _compare_versions (line 43) | def _compare_versions(op, got_ver, want_ver, requirement, pkg, hint): function require_version (line 55) | def require_version(requirement: str, hint: Optional[str] = None) -> None: function require_version_core (line 120) | def require_version_core(requirement): FILE: benchmark/third_party/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 129) | class DataTrainingArguments: method __post_init__ (line 178) | def __post_init__(self): function main (line 198) | def main(): function tokenize_function (line 368) | def tokenize_function(examples): function _mp_fn (line 490) | def _mp_fn(index): function parse_args (line 539) | def parse_args(): function main (line 668) | def main(): function tokenize_function (line 779) | def tokenize_function(examples): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_flax_{{cookiecutter.lowercase_modelname}}.py function setup (line 141) | def setup(self): function __call__ (line 160) | def __call__(self, input_ids, token_type_ids, position_ids, attention_ma... function setup (line 181) | def setup(self): function _split_heads (line 210) | def _split_heads(self, hidden_states): function _merge_heads (line 213) | def _merge_heads(self, hidden_states): function _concatenate_to_cache (line 218) | def _concatenate_to_cache(self, key, value, query, attention_mask): function __call__ (line 249) | def __call__( function setup (line 352) | def setup(self): function __call__ (line 361) | def __call__(self, hidden_states, input_tensor, deterministic: bool = Tr... function setup (line 374) | def setup(self): function __call__ (line 378) | def __call__( function setup (line 416) | def setup(self): function __call__ (line 424) | def __call__(self, hidden_states): function setup (line 435) | def setup(self): function __call__ (line 444) | def __call__(self, hidden_states, attention_output, deterministic: bool ... function setup (line 456) | def setup(self): function __call__ (line 463) | def __call__( function setup (line 515) | def setup(self): function __call__ (line 527) | def __call__( function setup (line 597) | def setup(self): function __call__ (line 600) | def __call__( function setup (line 632) | def setup(self): function __call__ (line 639) | def __call__(self, hidden_states): function setup (line 650) | def setup(self): function __call__ (line 655) | def __call__(self, hidden_states): function setup (line 667) | def setup(self): function __call__ (line 672) | def __call__(self, hidden_states, shared_embedding=None): function setup (line 689) | def setup(self): function __call__ (line 692) | def __call__(self, hidden_states, shared_embedding=None): function setup (line 701) | def setup(self): function __call__ (line 704) | def __call__(self, pooled_output): function setup (line 713) | def setup(self): function __call__ (line 717) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): function __init__ (line 733) | def __init__( function enable_gradient_checkpointing (line 747) | def enable_gradient_checkpointing(self): function init_weights (line 755) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, para... function init_cache (line 799) | def init_cache(self, batch_size, max_length): function __call__ (line 820) | def __call__( function setup (line 923) | def setup(self): function __call__ (line 928) | def __call__( function setup (line 996) | def setup(self): function __call__ (line 1000) | def __call__( function setup (line 1058) | def setup(self): function __call__ (line 1062) | def __call__( function setup (line 1121) | def setup(self): function __call__ (line 1129) | def __call__( function setup (line 1193) | def setup(self): function __call__ (line 1198) | def __call__( function setup (line 1269) | def setup(self): function __call__ (line 1274) | def __call__( function setup (line 1334) | def setup(self): function __call__ (line 1338) | def __call__( function setup (line 1406) | def setup(self): function __call__ (line 1410) | def __call__( function prepare_inputs_for_generation (line 1472) | def prepare_inputs_for_generation(self, input_ids, max_length, attention... function update_inputs_for_generation (line 1493) | def update_inputs_for_generation(self, model_outputs, model_kwargs): function shift_tokens_right (line 1712) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... function setup (line 1734) | def setup(self) -> None: function _split_heads (line 1758) | def _split_heads(self, hidden_states): function _merge_heads (line 1761) | def _merge_heads(self, hidden_states): function _concatenate_to_cache (line 1765) | def _concatenate_to_cache(self, key, value, query, attention_mask): function __call__ (line 1796) | def __call__( function setup (line 1894) | def setup(self) -> None: function __call__ (line 1917) | def __call__( function setup (line 1951) | def setup(self): function __call__ (line 1957) | def __call__( function setup (line 2004) | def setup(self) -> None: function __call__ (line 2037) | def __call__( function setup (line 2092) | def setup(self): function __call__ (line 2098) | def __call__( function setup (line 2166) | def setup(self): function __call__ (line 2177) | def __call__(self, hidden_states: jnp.ndarray, deterministic: bool): function setup (line 2191) | def setup(self): function __call__ (line 2217) | def __call__( function setup (line 2262) | def setup(self): function __call__ (line 2289) | def __call__( function setup (line 2342) | def setup(self): function _get_encoder_module (line 2352) | def _get_encoder_module(self): function _get_decoder_module (line 2355) | def _get_decoder_module(self): function __call__ (line 2358) | def __call__( function __init__ (line 2412) | def __init__( function init_weights (line 2424) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, para... function init_cache (line 2460) | def init_cache(self, batch_size, max_length, encoder_outputs): function encode (line 2502) | def encode( function decode (line 2565) | def decode( function __call__ (line 2677) | def __call__( function setup (line 2757) | def setup(self): function _get_encoder_module (line 2767) | def _get_encoder_module(self): function _get_decoder_module (line 2770) | def _get_decoder_module(self): function __call__ (line 2773) | def __call__( function decode (line 2833) | def decode( function prepare_inputs_for_generation (line 2968) | def prepare_inputs_for_generation( function update_inputs_for_generation (line 2999) | def update_inputs_for_generation(self, model_outputs, model_kwargs): function setup (line 3058) | def setup(self): function _get_encoder_module (line 3067) | def _get_encoder_module(self): function _get_decoder_module (line 3070) | def _get_decoder_module(self): function __call__ (line 3073) | def __call__( function setup (line 3159) | def setup(self): function _get_encoder_module (line 3165) | def _get_encoder_module(self): function _get_decoder_module (line 3168) | def _get_decoder_module(self): function __call__ (line 3171) | def __call__( FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py function __init__ (line 77) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function build (line 88) | def build(self, input_shape: tf.TensorShape): function call (line 112) | def call( function __init__ (line 163) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function transpose_for_scores (line 190) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> tf... function call (line 197) | def call( function __init__ (line 281) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 290) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, traini... function __init__ (line 300) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function prune_heads (line 306) | def prune_heads(self, heads): function call (line 309) | def call( function __init__ (line 341) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 353) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: function __init__ (line 362) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 371) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, traini... function __init__ (line 381) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 394) | def call( function __init__ (line 468) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 473) | def call( function __init__ (line 538) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 554) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: function __init__ (line 564) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, i... function build (line 576) | def build(self, input_shape: tf.TensorShape): function get_output_embeddings (line 581) | def get_output_embeddings(self) -> tf.keras.layers.Layer: function set_output_embeddings (line 584) | def set_output_embeddings(self, value: tf.Variable): function get_bias (line 588) | def get_bias(self) -> Dict[str, tf.Variable]: function set_bias (line 591) | def set_bias(self, value: tf.Variable): function call (line 595) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: function __init__ (line 608) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, i... function call (line 613) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: function __init__ (line 623) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, a... function get_input_embeddings (line 633) | def get_input_embeddings(self) -> tf.keras.layers.Layer: function set_input_embeddings (line 637) | def set_input_embeddings(self, value: tf.Variable): function _prune_heads (line 642) | def _prune_heads(self, heads_to_prune): function call (line 650) | def call( function dummy_inputs (line 817) | def dummy_inputs(self): function __init__ (line 936) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 949) | def call( function serving_output (line 1005) | def serving_output( function __init__ (line 1028) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function get_lm_head (line 1040) | def get_lm_head(self) -> tf.keras.layers.Layer: function call (line 1051) | def call( function serving_output (line 1100) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: function __init__ (line 1112) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function get_lm_head (line 1121) | def get_lm_head(self) -> tf.keras.layers.Layer: function prepare_inputs_for_generation (line 1124) | def prepare_inputs_for_generation(self, inputs, past=None, attention_mas... function call (line 1143) | def call( function serving_output (line 1223) | def serving_output(self, output: TFCausalLMOutputWithCrossAttentions) ->... function __init__ (line 1240) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1256) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf.T... function __init__ (line 1273) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1289) | def call( function serving_output (line 1336) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequen... function __init__ (line 1349) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function dummy_inputs (line 1361) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: function call (line 1378) | def call( function serving (line 1465) | def serving(self, inputs: Dict[str, tf.Tensor]) -> TFMultipleChoiceModel... function serving_output (line 1471) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMulti... function __init__ (line 1485) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1504) | def call( function serving_output (line 1552) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenClas... function __init__ (line 1566) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1584) | def call( function serving_output (line 1646) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TFQu... function shift_tokens_right (line 1697) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 1719) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 1735) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function __init__ (line 1753) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): function call (line 1756) | def call(self, input_shape: tf.TensorShape, past_key_values_length: int ... function __init__ (line 1767) | def __init__( function _shape (line 1791) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): function call (line 1794) | def call( function __init__ (line 1902) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1916) | def call(self, hidden_states: tf.Tensor, attention_mask: tf.Tensor, laye... function __init__ (line 1952) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function call (line 1979) | def call( function dummy_inputs (line 2064) | def dummy_inputs(self): function serving (line 2086) | def serving(self, inputs): function __init__ (line 2225) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, e... function get_embed_tokens (line 2243) | def get_embed_tokens(self): function set_embed_tokens (line 2246) | def set_embed_tokens(self, embed_tokens): function call (line 2250) | def call( function __init__ (line 2395) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, e... function get_embed_tokens (line 2412) | def get_embed_tokens(self): function set_embed_tokens (line 2415) | def set_embed_tokens(self, embed_tokens): function call (line 2419) | def call( function compute_combined_attns_mask (line 2617) | def compute_combined_attns_mask(self, input_ids, attention_mask, input_s... function __init__ (line 2648) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function get_input_embeddings (line 2664) | def get_input_embeddings(self): function set_input_embeddings (line 2667) | def set_input_embeddings(self, new_embeddings): function call (line 2673) | def call( function __init__ (line 2755) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function get_encoder (line 2760) | def get_encoder(self): function get_decoder (line 2763) | def get_decoder(self): function call (line 2774) | def call( function serving_output (line 2817) | def serving_output(self, output): class BiasLayer (line 2838) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 2844) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 2851) | def call(self, x): function __init__ (line 2865) | def __init__(self, config, *inputs, **kwargs): function get_decoder (line 2875) | def get_decoder(self): function get_encoder (line 2878) | def get_encoder(self): function get_bias (line 2881) | def get_bias(self): function set_bias (line 2884) | def set_bias(self, value): function get_output_embeddings (line 2892) | def get_output_embeddings(self): function set_output_embeddings (line 2895) | def set_output_embeddings(self, value): function call (line 2901) | def call( function serving_output (line 2984) | def serving_output(self, output): function prepare_inputs_for_generation (line 3003) | def prepare_inputs_for_generation( function _reorder_cache (line 3032) | def _reorder_cache(past, beam_idx): function hf_compute_loss (line 3038) | def hf_compute_loss(self, labels, logits): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_{{cookiecutter.lowercase_modelname}}.py function __init__ (line 145) | def __init__(self, config): function forward (line 165) | def forward( function __init__ (line 204) | def __init__(self, config, position_embedding_type=None): function transpose_for_scores (line 228) | def transpose_for_scores(self, x): function forward (line 233) | def forward( function __init__ (line 330) | def __init__(self, config): function forward (line 336) | def forward(self, hidden_states, input_tensor): function __init__ (line 345) | def __init__(self, config, position_embedding_type=None): function prune_heads (line 351) | def prune_heads(self, heads): function forward (line 369) | def forward( function __init__ (line 395) | def __init__(self, config): function forward (line 403) | def forward(self, hidden_states): function __init__ (line 411) | def __init__(self, config): function forward (line 417) | def forward(self, hidden_states, input_tensor): function __init__ (line 426) | def __init__(self, config): function forward (line 439) | def forward( function feed_forward_chunk (line 502) | def feed_forward_chunk(self, attention_output): function __init__ (line 510) | def __init__(self, config): function forward (line 516) | def forward( function __init__ (line 608) | def __init__(self, config): function forward (line 617) | def forward(self, hidden_states): function __init__ (line 626) | def __init__(self, config): function forward (line 639) | def forward(self, hidden_states): function __init__ (line 647) | def __init__(self, config): function forward (line 651) | def forward(self, sequence_output): function _init_weights (line 668) | def _init_weights(self, module): function _set_gradient_checkpointing (line 684) | def _set_gradient_checkpointing(self, module, value=False): function __init__ (line 770) | def __init__(self, config): function get_input_embeddings (line 780) | def get_input_embeddings(self): function set_input_embeddings (line 783) | def set_input_embeddings(self, value): function _prune_heads (line 786) | def _prune_heads(self, heads_to_prune): function forward (line 801) | def forward( function __init__ (line 932) | def __init__(self, config): function get_output_embeddings (line 947) | def get_output_embeddings(self): function set_output_embeddings (line 950) | def set_output_embeddings(self, new_embeddings): function forward (line 960) | def forward( function prepare_inputs_for_generation (line 1017) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None, ... function __init__ (line 1039) | def __init__(self, config): function get_output_embeddings (line 1051) | def get_output_embeddings(self): function set_output_embeddings (line 1054) | def set_output_embeddings(self, new_embeddings): function forward (line 1059) | def forward( function prepare_inputs_for_generation (line 1170) | def prepare_inputs_for_generation(self, input_ids, past=None, attention_... function _reorder_cache (line 1183) | def _reorder_cache(self, past, beam_idx): function __init__ (line 1192) | def __init__(self, config): function forward (line 1200) | def forward(self, features, **kwargs): function __init__ (line 1216) | def __init__(self, config): function forward (line 1232) | def forward( function __init__ (line 1308) | def __init__(self, config): function forward (line 1325) | def forward( function __init__ (line 1398) | def __init__(self, config): function forward (line 1416) | def forward( function __init__ (line 1476) | def __init__(self, config): function forward (line 1495) | def forward( function shift_tokens_right (line 1613) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 1628) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 1643) | def _expand_mask( function __init__ (line 1664) | def __init__(self, num_embeddings: int, embedding_dim: int): function forward (line 1667) | def forward(self, input_ids_shape: torch.Size, past_key_values_length: i... function __init__ (line 1679) | def __init__( function _shape (line 1703) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): function forward (line 1706) | def forward( function __init__ (line 1814) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config): function forward (line 1830) | def forward( function __init__ (line 1880) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config): function forward (line 1906) | def forward( function __init__ (line 1999) | def __init__( function forward (line 2011) | def forward(self, hidden_states: torch.Tensor): function _init_weights (line 2025) | def _init_weights(self, module): function _set_gradient_checkpointing (line 2036) | def _set_gradient_checkpointing(self, module, value=False): function __init__ (line 2200) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, e... function forward (line 2227) | def forward( function __init__ (line 2368) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, e... function get_input_embeddings (line 2392) | def get_input_embeddings(self): function set_input_embeddings (line 2395) | def set_input_embeddings(self, value): function _prepare_decoder_attention_mask (line 2399) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape, i... function forward (line 2417) | def forward( function __init__ (line 2629) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config): function get_input_embeddings (line 2641) | def get_input_embeddings(self): function set_input_embeddings (line 2644) | def set_input_embeddings(self, value): function get_encoder (line 2649) | def get_encoder(self): function get_decoder (line 2652) | def get_decoder(self): function forward (line 2662) | def forward( function __init__ (line 2748) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config): function get_encoder (line 2757) | def get_encoder(self): function get_decoder (line 2760) | def get_decoder(self): function resize_token_embeddings (line 2763) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: function _resize_final_logits_bias (line 2768) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: function get_output_embeddings (line 2777) | def get_output_embeddings(self): function set_output_embeddings (line 2780) | def set_output_embeddings(self, new_embeddings): function forward (line 2786) | def forward( function prepare_inputs_for_generation (line 2879) | def prepare_inputs_for_generation( function _reorder_cache (line 2908) | def _reorder_cache(past, beam_idx): function __init__ (line 2923) | def __init__(self, config: {{cookiecutter.camelcase_modelname}}Config, *... function forward (line 2942) | def forward( function __init__ (line 3041) | def __init__(self, config): function forward (line 3059) | def forward( function __init__ (line 3154) | def __init__(self, config): function forward (line 3158) | def forward(self, *args, **kwargs): function __init__ (line 3164) | def __init__(self, config): function get_input_embeddings (line 3176) | def get_input_embeddings(self): function set_input_embeddings (line 3179) | def set_input_embeddings(self, value): function get_output_embeddings (line 3182) | def get_output_embeddings(self): function set_output_embeddings (line 3185) | def set_output_embeddings(self, new_embeddings): function set_decoder (line 3188) | def set_decoder(self, decoder): function get_decoder (line 3191) | def get_decoder(self): function forward (line 3195) | def forward( function prepare_inputs_for_generation (line 3331) | def prepare_inputs_for_generation(self, input_ids, past=None, attention_... function _reorder_cache (line 3347) | def _reorder_cache(past, beam_idx): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/test_modeling_flax_{{cookiecutter.lowercase_modelname}}.py function prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): function create_and_check_model (line 124) | def create_and_check_model( function create_and_check_lm_head (line 136) | def create_and_check_lm_head( function create_and_check_for_masked_lm (line 151) | def create_and_check_for_masked_lm( function create_and_check_for_sequence_classification (line 163) | def create_and_check_for_sequence_classification( function create_and_check_for_multiple_choice (line 177) | def create_and_check_for_multiple_choice( function create_and_check_for_token_classification (line 193) | def create_and_check_for_token_classification( function create_and_check_for_question_answering (line 206) | def create_and_check_for_question_answering( function prepare_config_and_inputs_for_common (line 220) | def prepare_config_and_inputs_for_common(self): function setUp (line 255) | def setUp(self): function test_config (line 259) | def test_config(self): function test_model (line 262) | def test_model(self): function test_for_masked_lm (line 266) | def test_for_masked_lm(self): function test_for_causal_lm (line 270) | def test_for_causal_lm(self): function test_for_multiple_choice (line 274) | def test_for_multiple_choice(self): function test_for_question_answering (line 278) | def test_for_question_answering(self): function test_for_sequence_classification (line 282) | def test_for_sequence_classification(self): function test_for_token_classification (line 286) | def test_for_token_classification(self): function test_model_from_pretrained (line 291) | def test_model_from_pretrained(self): function test_inference_masked_lm (line 313) | def test_inference_masked_lm(self): function __init__ (line 369) | def __init__( function prepare_config_and_inputs_for_common (line 406) | def prepare_config_and_inputs_for_common(self): function check_use_cache_forward (line 434) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): function check_use_cache_forward_with_attn_mask (line 474) | def check_use_cache_forward_with_attn_mask(self, model_class_name, confi... function setUp (line 557) | def setUp(self): function test_config (line 561) | def test_config(self): function test_use_cache_forward (line 564) | def test_use_cache_forward(self): function test_use_cache_forward_with_attn_mask (line 569) | def test_use_cache_forward_with_attn_mask(self): function _long_tensor (line 589) | def _long_tensor(tok_lst): class ModelIntegrationTest (line 600) | class Flax{{cookiecutter.camelcase_modelname}}ModelIntegrationTest(unitt... method test_inference_no_head (line 601) | def test_inference_no_head(self): method test_inference_with_head (line 616) | def test_inference_with_head(self): method test_seq_to_seq_generation (line 631) | def test_seq_to_seq_generation(self): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/test_modeling_tf_{{cookiecutter.lowercase_modelname}}.py function prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): function prepare_config_and_inputs_for_decoder (line 126) | def prepare_config_and_inputs_for_decoder(self): function create_and_check_model (line 153) | def create_and_check_model( function create_and_check_causal_lm_base_model (line 166) | def create_and_check_causal_lm_base_model( function create_and_check_model_as_decoder (line 182) | def create_and_check_model_as_decoder( function create_and_check_causal_lm_model (line 214) | def create_and_check_causal_lm_model( function create_and_check_causal_lm_model_as_decoder (line 230) | def create_and_check_causal_lm_model_as_decoder( function create_and_check_causal_lm_model_past (line 263) | def create_and_check_causal_lm_model_past( function create_and_check_causal_lm_model_past_with_attn_mask (line 306) | def create_and_check_causal_lm_model_past_with_attn_mask( function create_and_check_causal_lm_model_past_large_inputs (line 367) | def create_and_check_causal_lm_model_past_large_inputs( function create_and_check_decoder_model_past_large_inputs (line 419) | def create_and_check_decoder_model_past_large_inputs( function create_and_check_for_masked_lm (line 485) | def create_and_check_for_masked_lm( function create_and_check_for_sequence_classification (line 497) | def create_and_check_for_sequence_classification( function create_and_check_for_multiple_choice (line 511) | def create_and_check_for_multiple_choice( function create_and_check_for_token_classification (line 527) | def create_and_check_for_token_classification( function create_and_check_for_question_answering (line 540) | def create_and_check_for_question_answering( function prepare_config_and_inputs_for_common (line 554) | def prepare_config_and_inputs_for_common(self): function setUp (line 589) | def setUp(self): function test_config (line 593) | def test_config(self): function test_model (line 596) | def test_model(self): function test_keras_fit (line 602) | def test_keras_fit(self): function test_causal_lm_base_model (line 605) | def test_causal_lm_base_model(self): function test_model_as_decoder (line 613) | def test_model_as_decoder(self): function test_for_masked_lm (line 621) | def test_for_masked_lm(self): function test_for_causal_lm (line 625) | def test_for_causal_lm(self): function test_causal_lm_model_as_decoder (line 630) | def test_causal_lm_model_as_decoder(self): function test_causal_lm_model_past (line 635) | def test_causal_lm_model_past(self): function test_causal_lm_model_past_with_attn_mask (line 640) | def test_causal_lm_model_past_with_attn_mask(self): function test_causal_lm_model_past_with_large_inputs (line 645) | def test_causal_lm_model_past_with_large_inputs(self): function test_decoder_model_past_with_large_inputs (line 650) | def test_decoder_model_past_with_large_inputs(self): function test_for_multiple_choice (line 655) | def test_for_multiple_choice(self): function test_for_question_answering (line 659) | def test_for_question_answering(self): function test_for_sequence_classification (line 663) | def test_for_sequence_classification(self): function test_for_token_classification (line 667) | def test_for_token_classification(self): function test_model_from_pretrained (line 672) | def test_model_from_pretrained(self): function test_inference_masked_lm (line 679) | def test_inference_masked_lm(self): function __init__ (line 733) | def __init__( function prepare_config_and_inputs_for_common (line 770) | def prepare_config_and_inputs_for_common(self): function check_decoder_model_past_large_inputs (line 798) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function setUp (line 861) | def setUp(self): function test_config (line 865) | def test_config(self): function test_decoder_model_past_large_inputs (line 868) | def test_decoder_model_past_large_inputs(self): function test_model_common_attributes (line 872) | def test_model_common_attributes(self): function test_keras_fit (line 893) | def test_keras_fit(self): function _long_tensor (line 911) | def _long_tensor(tok_lst): class ModelIntegrationTest (line 922) | class TF{{cookiecutter.camelcase_modelname}}ModelIntegrationTest(unittes... method test_inference_no_head (line 923) | def test_inference_no_head(self): method test_inference_with_head (line 938) | def test_inference_with_head(self): method test_seq_to_seq_generation (line 953) | def test_seq_to_seq_generation(self): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/test_modeling_{{cookiecutter.lowercase_modelname}}.py function prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): function get_config (line 119) | def get_config(self): function prepare_config_and_inputs_for_decoder (line 135) | def prepare_config_and_inputs_for_decoder(self): function create_and_check_model (line 162) | def create_and_check_model( function create_and_check_model_as_decoder (line 173) | def create_and_check_model_as_decoder( function create_and_check_for_causal_lm (line 205) | def create_and_check_for_causal_lm( function create_and_check_for_masked_lm (line 223) | def create_and_check_for_masked_lm( function create_and_check_decoder_model_past_large_inputs (line 232) | def create_and_check_decoder_model_past_large_inputs( function create_and_check_for_question_answering (line 294) | def create_and_check_for_question_answering( function create_and_check_for_sequence_classification (line 310) | def create_and_check_for_sequence_classification( function create_and_check_for_token_classification (line 320) | def create_and_check_for_token_classification( function create_and_check_for_multiple_choice (line 330) | def create_and_check_for_multiple_choice( function prepare_config_and_inputs_for_common (line 348) | def prepare_config_and_inputs_for_common(self): function setUp (line 381) | def setUp(self): function test_config (line 385) | def test_config(self): function test_model (line 388) | def test_model(self): function test_model_various_embeddings (line 392) | def test_model_various_embeddings(self): function test_for_masked_lm (line 398) | def test_for_masked_lm(self): function test_for_multiple_choice (line 402) | def test_for_multiple_choice(self): function test_decoder_model_past_with_large_inputs (line 406) | def test_decoder_model_past_with_large_inputs(self): function test_for_question_answering (line 410) | def test_for_question_answering(self): function test_for_sequence_classification (line 414) | def test_for_sequence_classification(self): function test_for_token_classification (line 418) | def test_for_token_classification(self): function test_model_as_decoder (line 422) | def test_model_as_decoder(self): function test_model_as_decoder_with_default_input_mask (line 426) | def test_model_as_decoder_with_default_input_mask(self): function test_model_from_pretrained (line 455) | def test_model_from_pretrained(self): function test_inference_masked_lm (line 464) | def test_inference_masked_lm(self): function prepare_config_and_inputs (line 574) | def prepare_config_and_inputs(self): function prepare_config_and_inputs_for_common (line 602) | def prepare_config_and_inputs_for_common(self): function create_and_check_decoder_model_past_large_inputs (line 606) | def create_and_check_decoder_model_past_large_inputs(self, config, input... function check_encoder_decoder_model_standalone (line 637) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): function setUp (line 683) | def setUp(self): function test_config (line 687) | def test_config(self): function test_save_load_strict (line 690) | def test_save_load_strict(self): function test_decoder_model_past_with_large_inputs (line 700) | def test_decoder_model_past_with_large_inputs(self): function test_encoder_decoder_model_standalone (line 704) | def test_encoder_decoder_model_standalone(self): function test_inputs_embeds (line 709) | def test_inputs_embeds(self): function test_generate_fp16 (line 738) | def test_generate_fp16(self): function _long_tensor (line 768) | def _long_tensor(tok_lst): class ModelIntegrationTests (line 779) | class {{cookiecutter.camelcase_modelname}}ModelIntegrationTests(unittest... method default_tokenizer (line 781) | def default_tokenizer(self): method test_inference_no_head (line 784) | def test_inference_no_head(self): method test_inference_head (line 799) | def test_inference_head(self): method test_seq_to_seq_generation (line 816) | def test_seq_to_seq_generation(self): function prepare_config_and_inputs (line 912) | def prepare_config_and_inputs(self): function create_and_check_decoder_model_past (line 946) | def create_and_check_decoder_model_past( function create_and_check_decoder_model_attention_mask_past (line 982) | def create_and_check_decoder_model_attention_mask_past( function prepare_config_and_inputs_for_common (line 1027) | def prepare_config_and_inputs_for_common(self): function setUp (line 1050) | def setUp( function test_config (line 1056) | def test_config(self): function test_decoder_model_past (line 1059) | def test_decoder_model_past(self): function test_decoder_model_attn_mask_past (line 1063) | def test_decoder_model_attn_mask_past(self): function test_retain_grad_hidden_states_attentions (line 1067) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/tokenization_fast_{{cookiecutter.lowercase_modelname}}.py function __init__ (line 144) | def __init__( function build_inputs_with_special_tokens (line 169) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): function create_token_type_ids_from_sequences (line 177) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/transformers/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/tokenization_{{cookiecutter.lowercase_modelname}}.py function __init__ (line 134) | def __init__( function vocab_size (line 150) | def vocab_size(self): function get_vocab (line 153) | def get_vocab(self): function _tokenize (line 156) | def _tokenize(self, text): function _convert_token_to_id (line 159) | def _convert_token_to_id(self, token): function _convert_id_to_token (line 162) | def _convert_id_to_token(self, index): function convert_tokens_to_string (line 165) | def convert_tokens_to_string(self, tokens): function save_vocabulary (line 168) | def save_vocabulary(self, save_directory): function build_inputs_with_special_tokens (line 180) | def build_inputs_with_special_tokens( function get_special_tokens_mask (line 206) | def get_special_tokens_mask( function create_token_type_ids_from_sequences (line 233) | def create_token_type_ids_from_sequences( function prepare_for_tokenization (line 256) | def prepare_for_tokenization(self, text, is_split_into_words=False, **kw... function __init__ (line 276) | def __init__( function build_inputs_with_special_tokens (line 301) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): function create_token_type_ids_from_sequences (line 309) | def create_token_type_ids_from_sequences( FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/tests/deepspeed/test_deepspeed.py function load_json (line 66) | def load_json(path): function get_master_port (line 71) | def get_master_port(real_launcher=False): function require_deepspeed_aio (line 93) | def require_deepspeed_aio(test_case): function get_launcher (line 115) | def get_launcher(distributed=False): function parameterized_custom_name_func (line 138) | def parameterized_custom_name_func(func, param_num, param): class CoreIntegrationDeepSpeed (line 151) | class CoreIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon): method setUp (line 156) | def setUp(self): method tearDown (line 164) | def tearDown(self): method test_init_zero3_fp16 (line 170) | def test_init_zero3_fp16(self): class TrainerIntegrationDeepSpeedWithCustomConfig (line 206) | class TrainerIntegrationDeepSpeedWithCustomConfig(TestCasePlus): method setUp (line 207) | def setUp(self): method tearDown (line 238) | def tearDown(self): method get_config_dict (line 244) | def get_config_dict(self, stage): class TrainerIntegrationDeepSpeed (line 251) | class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomC... method test_hf_ds_config_mismatch (line 273) | def test_hf_ds_config_mismatch(self): method test_hf_scheduler_hf_optimizer (line 331) | def test_hf_scheduler_hf_optimizer(self): method test_ds_scheduler_hf_optimizer (line 344) | def test_ds_scheduler_hf_optimizer(self): method test_hf_scheduler_ds_optimizer (line 356) | def test_hf_scheduler_ds_optimizer(self): method test_stage3_nvme_offload (line 369) | def test_stage3_nvme_offload(self): method test_hyperparameter_search (line 384) | def test_hyperparameter_search(self): method test_hf_optimizer_with_offload (line 413) | def test_hf_optimizer_with_offload(self, stage, dtype): method test_fake_notebook_no_launcher (line 428) | def test_fake_notebook_no_launcher(self, stage, dtype): method test_early_get_last_lr (line 445) | def test_early_get_last_lr(self, stage, dtype): method test_gradient_accumulation (line 483) | def test_gradient_accumulation(self, stage, dtype): method check_saved_checkpoints_deepspeed (line 541) | def check_saved_checkpoints_deepspeed(self, output_dir, freq, total, s... method test_save_checkpoints (line 574) | def test_save_checkpoints(self, stage, dtype): method test_can_resume_training_errors (line 601) | def test_can_resume_training_errors(self, stage, dtype): method test_can_resume_training_normal (line 627) | def test_can_resume_training_normal(self, stage, dtype): method test_load_state_dict_from_zero_checkpoint (line 678) | def test_load_state_dict_from_zero_checkpoint(self, stage, dtype): method test_config_object (line 712) | def test_config_object(self): method test_load_best_model (line 745) | def test_load_best_model(self, stage, dtype): class TestDeepSpeedWithLauncher (line 836) | class TestDeepSpeedWithLauncher(TestCasePlus): method test_basic_distributed (line 857) | def test_basic_distributed(self, stage, dtype): method test_do_eval_no_train (line 860) | def test_do_eval_no_train(self): method test_fp32_non_distributed (line 872) | def test_fp32_non_distributed(self, stage, dtype): method test_fp32_distributed (line 888) | def test_fp32_distributed(self, stage, dtype): method test_resume_train_not_from_ds_checkpoint (line 903) | def test_resume_train_not_from_ds_checkpoint(self, stage, dtype): method test_inference (line 922) | def test_inference(self, dtype): method do_checks (line 940) | def do_checks(self, output_dir, do_train=True, do_eval=True, quality_c... method run_and_check (line 955) | def run_and_check( method run_trainer (line 989) | def run_trainer( method test_clm (line 1075) | def test_clm(self, stage, dtype): method test_clm_from_config_zero3_fp16 (line 1110) | def test_clm_from_config_zero3_fp16(self): FILE: benchmark/third_party/transformers/tests/deepspeed/test_model_zoo.py function get_launcher (line 141) | def get_launcher(distributed=False): function make_task_cmds (line 151) | def make_task_cmds(): function parameterized_custom_name_func (line 313) | def parameterized_custom_name_func(func, param_num, param): class TestDeepSpeedModelZoo (line 327) | class TestDeepSpeedModelZoo(TestCasePlus): method get_task_cmd (line 330) | def get_task_cmd(self, task, stage): method test_zero_to_fp32 (line 346) | def test_zero_to_fp32(self, stage, task): FILE: benchmark/third_party/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 94) | def test_run_seq2seq_no_dist(self): method test_run_seq2seq_dp (line 99) | def test_run_seq2seq_dp(self): method test_run_seq2seq_ddp (line 104) | def test_run_seq2seq_ddp(self): method test_run_seq2seq_sharded_ddp (line 111) | def test_run_seq2seq_sharded_ddp(self): method test_run_seq2seq_sharded_ddp_fp16 (line 118) | def test_run_seq2seq_sharded_ddp_fp16(self): method test_run_seq2seq_fully_sharded_ddp (line 125) | def test_run_seq2seq_fully_sharded_ddp(self): method test_run_seq2seq_fully_sharded_ddp_fp16 (line 132) | def test_run_seq2seq_fully_sharded_ddp_fp16(self): method test_run_seq2seq_apex (line 139) | def test_run_seq2seq_apex(self): method test_trainer_log_level_replica (line 155) | def test_trainer_log_level_replica(self, experiment_id): method test_run_seq2seq (line 179) | def test_run_seq2seq(self): method test_run_seq2seq_bnb (line 206) | def test_run_seq2seq_bnb(self): method run_trainer (line 287) | def run_trainer( FILE: benchmark/third_party/transformers/tests/generation/test_generation_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: benchmark/third_party/transformers/tests/generation/test_generation_beam_search.py class BeamSearchTester (line 32) | class BeamSearchTester: method __init__ (line 33) | def __init__( method prepare_beam_scorer (line 60) | def prepare_beam_scorer(self, **kwargs): method prepare_inputs (line 70) | def prepare_inputs(self): method check_beam_hypotheses (line 77) | def check_beam_hypotheses(self, input_ids, *args): method check_beam_scorer_update (line 114) | def check_beam_scorer_update(self, input_ids, next_tokens, next_indice... method check_beam_scores_finalize (line 179) | def check_beam_scores_finalize(self, input_ids, next_tokens, next_indi... class ConstrainedBeamSearchTester (line 249) | class ConstrainedBeamSearchTester: method __init__ (line 250) | def __init__( method prepare_constrained_beam_scorer (line 284) | def prepare_constrained_beam_scorer(self, **kwargs): method prepare_inputs (line 295) | def prepare_inputs(self): method check_beam_hypotheses (line 305) | def check_beam_hypotheses(self, input_ids, *args): method check_constrained_beam_scorer_update (line 342) | def check_constrained_beam_scorer_update( method check_constrained_beam_scorer_finalize (line 413) | def check_constrained_beam_scorer_finalize( method _check_sequence_inside_sequence (line 515) | def _check_sequence_inside_sequence(self, tensor_1, tensor_2): class BeamSearchTest (line 540) | class BeamSearchTest(unittest.TestCase): method setUp (line 541) | def setUp(self): method test_beam_hypotheses (line 544) | def test_beam_hypotheses(self): method test_beam_scorer_update (line 548) | def test_beam_scorer_update(self): method test_beam_scorer_finalize (line 552) | def test_beam_scorer_finalize(self): class ConstrainedBeamSearchTest (line 558) | class ConstrainedBeamSearchTest(unittest.TestCase): method setUp (line 559) | def setUp(self): method test_constrained_beam_hypotheses (line 562) | def test_constrained_beam_hypotheses(self): method test_constrained_beam_scorer_update (line 566) | def test_constrained_beam_scorer_update(self): method test_constrained_beam_scorer_finalize (line 570) | def test_constrained_beam_scorer_finalize(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_flax_logits_process.py class LogitsProcessorTest (line 42) | class LogitsProcessorTest(unittest.TestCase): method _get_uniform_logits (line 43) | def _get_uniform_logits(self, batch_size: int, length: int): method test_temperature_dist_warper (line 47) | def test_temperature_dist_warper(self): method test_top_k_dist_warper (line 78) | def test_top_k_dist_warper(self): method test_top_p_dist_warper (line 105) | def test_top_p_dist_warper(self): method test_min_length_dist_processor (line 136) | def test_min_length_dist_processor(self): method test_forced_bos_token_logits_processor (line 156) | def test_forced_bos_token_logits_processor(self): method test_forced_eos_token_logits_processor (line 177) | def test_forced_eos_token_logits_processor(self): method test_processor_list (line 199) | def test_processor_list(self): method test_processor_list_jitted (line 246) | def test_processor_list_jitted(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_flax_utils.py function ids_tensor (line 40) | def ids_tensor(shape, vocab_size, rng=None): function random_attention_mask (line 58) | def random_attention_mask(shape, rng=None): class FlaxGenerationTesterMixin (line 66) | class FlaxGenerationTesterMixin: method _get_input_ids_and_config (line 70) | def _get_input_ids_and_config(self): method test_greedy_generate_pt_fx (line 89) | def test_greedy_generate_pt_fx(self): method test_greedy_generate (line 111) | def test_greedy_generate(self): method test_sample_generate (line 127) | def test_sample_generate(self): method test_beam_search_generate (line 143) | def test_beam_search_generate(self): method test_sample_generate_logits_warper (line 160) | def test_sample_generate_logits_warper(self): method test_greedy_generate_logits_warper (line 182) | def test_greedy_generate_logits_warper(self): method test_beam_search_generate_logits_warper (line 200) | def test_beam_search_generate_logits_warper(self): method test_greedy_generate_attn_mask (line 219) | def test_greedy_generate_attn_mask(self): method test_sample_generate_attn_mask (line 239) | def test_sample_generate_attn_mask(self): method test_beam_search_generate_attn_mask (line 259) | def test_beam_search_generate_attn_mask(self): class FlaxGenerationIntegrationTests (line 281) | class FlaxGenerationIntegrationTests(unittest.TestCase): method test_validate_generation_inputs (line 282) | def test_validate_generation_inputs(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_logits_process.py class LogitsProcessorTest (line 51) | class LogitsProcessorTest(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 56) | def test_min_length_dist_processor(self): method test_temperature_dist_warper (line 75) | def test_temperature_dist_warper(self): method test_repetition_penalty_dist_process (line 106) | def test_repetition_penalty_dist_process(self): method test_top_k_dist_warper (line 127) | def test_top_k_dist_warper(self): method test_top_p_dist_warper (line 162) | def test_top_p_dist_warper(self): method test_typical_dist_warper (line 197) | def test_typical_dist_warper(self): method test_no_repeat_ngram_dist_processor (line 242) | def test_no_repeat_ngram_dist_processor(self): method test_encoder_no_repeat_ngram_dist_processor (line 263) | def test_encoder_no_repeat_ngram_dist_processor(self): method test_no_bad_words_dist_processor (line 325) | def test_no_bad_words_dist_processor(self): method test_processor_list (line 350) | def test_processor_list(self): method test_prefix_constrained_logits_processor (line 401) | def test_prefix_constrained_logits_processor(self): method test_hamming_diversity (line 421) | def test_hamming_diversity(self): method test_forced_bos_token_logits_processor (line 448) | def test_forced_bos_token_logits_processor(self): method test_forced_eos_token_logits_processor (line 468) | def test_forced_eos_token_logits_processor(self): method test_remove_nan_inf_logits_processor (line 489) | def test_remove_nan_inf_logits_processor(self): method test_exponential_decay_length_penalty (line 510) | def test_exponential_decay_length_penalty(self): method test_normalization (line 542) | def test_normalization(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_stopping_criteria.py class StoppingCriteriaTestCase (line 38) | class StoppingCriteriaTestCase(unittest.TestCase): method _get_tensors (line 39) | def _get_tensors(self, length): method test_list_criteria (line 47) | def test_list_criteria(self): method test_max_length_criteria (line 65) | def test_max_length_criteria(self): method test_max_new_tokens_criteria (line 77) | def test_max_new_tokens_criteria(self): method test_max_time_criteria (line 92) | def test_max_time_criteria(self): method test_validate_stopping_criteria (line 101) | def test_validate_stopping_criteria(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_tf_logits_process.py class TFLogitsProcessorTest (line 49) | class TFLogitsProcessorTest(unittest.TestCase): method _get_uniform_logits (line 50) | def _get_uniform_logits(self, batch_size: int, length: int): method test_min_length_dist_processor (line 55) | def test_min_length_dist_processor(self, use_xla): method test_temperature_dist_warper (line 79) | def test_temperature_dist_warper(self, use_xla): method test_repetition_penalty_dist_process (line 117) | def test_repetition_penalty_dist_process(self, use_xla): method test_top_k_dist_warper (line 147) | def test_top_k_dist_warper(self, use_xla): method test_top_p_dist_warper (line 186) | def test_top_p_dist_warper(self, use_xla): method test_no_repeat_ngram_dist_processor (line 228) | def test_no_repeat_ngram_dist_processor(self): method test_no_bad_words_dist_processor (line 255) | def test_no_bad_words_dist_processor(self, use_xla): method test_forced_bos_token_logits_processor (line 281) | def test_forced_bos_token_logits_processor(self, use_xla): method test_forced_eos_token_logits_processor (line 308) | def test_forced_eos_token_logits_processor(self, use_xla): method test_suppress_tokens_at_begin_logits_processor (line 338) | def test_suppress_tokens_at_begin_logits_processor(self, use_xla): method test_suppress_tokens_logits_processor (line 366) | def test_suppress_tokens_logits_processor(self, use_xla): method test_force_tokens_logits_processor (line 386) | def test_force_tokens_logits_processor(self, use_xla): method test_processor_list (line 418) | def test_processor_list(self, use_xla): FILE: benchmark/third_party/transformers/tests/generation/test_generation_tf_utils.py class UtilsFunctionsTest (line 30) | class UtilsFunctionsTest(unittest.TestCase): method test_top_k_top_p_filtering (line 33) | def test_top_k_top_p_filtering(self): class TFGenerationIntegrationTests (line 127) | class TFGenerationIntegrationTests(unittest.TestCase): method test_generate_tf_function_export (line 129) | def test_generate_tf_function_export(self): method test_validate_generation_inputs (line 169) | def test_validate_generation_inputs(self): FILE: benchmark/third_party/transformers/tests/generation/test_generation_utils.py class GenerationTesterMixin (line 75) | class GenerationTesterMixin: method _get_input_ids_and_config (line 80) | def _get_input_ids_and_config(self): method _get_logits_processor_and_kwargs (line 104) | def _get_logits_processor_and_kwargs( method _get_warper_and_kwargs (line 154) | def _get_warper_and_kwargs(num_beams): method _get_beam_scorer_and_kwargs (line 166) | def _get_beam_scorer_and_kwargs(batch_size, max_length, num_return_seq... method _get_diverse_beam_scorer_and_kwargs (line 184) | def _get_diverse_beam_scorer_and_kwargs(batch_size, max_length, num_re... method _get_constrained_beam_scorer_and_kwargs (line 205) | def _get_constrained_beam_scorer_and_kwargs(batch_size, max_length, co... method _get_encoder_outputs (line 224) | def _get_encoder_outputs( method _greedy_generate (line 241) | def _greedy_generate( method _sample_generate (line 303) | def _sample_generate( method _beam_search_generate (line 372) | def _beam_search_generate( method _beam_sample_generate (line 433) | def _beam_sample_generate( method _group_beam_search_generate (line 502) | def _group_beam_search_generate( method _constrained_beam_search_generate (line 563) | def _constrained_beam_search_generate( method test_greedy_generate (line 626) | def test_greedy_generate(self): method test_greedy_generate_dict_outputs (line 637) | def test_greedy_generate_dict_outputs(self): method test_greedy_generate_dict_outputs_use_cache (line 666) | def test_greedy_generate_dict_outputs_use_cache(self): method test_sample_generate (line 694) | def test_sample_generate(self): method test_sample_generate_dict_output (line 739) | def test_sample_generate_dict_output(self): method test_beam_search_generate (line 785) | def test_beam_search_generate(self): method test_beam_search_generate_dict_output (line 842) | def test_beam_search_generate_dict_output(self): method test_beam_search_generate_dict_outputs_use_cache (line 898) | def test_beam_search_generate_dict_outputs_use_cache(self): method test_beam_sample_generate (line 952) | def test_beam_sample_generate(self): method test_beam_sample_generate_dict_output (line 989) | def test_beam_sample_generate_dict_output(self): method test_generate_without_input_ids (line 1048) | def test_generate_without_input_ids(self): method test_group_beam_search_generate (line 1062) | def test_group_beam_search_generate(self): method test_group_beam_search_generate_dict_output (line 1118) | def test_group_beam_search_generate_dict_output(self): method test_constrained_beam_search_generate (line 1181) | def test_constrained_beam_search_generate(self): method test_constrained_beam_search_generate_dict_output (line 1265) | def test_constrained_beam_search_generate_dict_output(self): method test_generate_with_head_masking (line 1339) | def test_generate_with_head_masking(self): method _check_outputs (line 1378) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method _check_scores (line 1443) | def _check_scores(self, batch_size, scores, length, config): method _check_attentions_for_generate (line 1449) | def _check_attentions_for_generate( method _check_encoder_attention_for_generate (line 1473) | def _check_encoder_attention_for_generate(self, attentions, batch_size... method _check_hidden_states_for_generate (line 1481) | def _check_hidden_states_for_generate( method _check_encoder_hidden_states_for_generate (line 1500) | def _check_encoder_hidden_states_for_generate(self, hidden_states, bat... method _check_sequence_inside_sequence (line 1508) | def _check_sequence_inside_sequence(self, tensor_1, tensor_2): class UtilsFunctionsTest (line 1533) | class UtilsFunctionsTest(unittest.TestCase): method test_top_k_top_p_filtering (line 1536) | def test_top_k_top_p_filtering(self): method test_top_k_top_p_filtering_with_filter_value (line 1637) | def test_top_k_top_p_filtering_with_filter_value(self): class GenerationIntegrationTests (line 1664) | class GenerationIntegrationTests(unittest.TestCase): method test_diverse_beam_search (line 1666) | def test_diverse_beam_search(self): method test_contrastive_search_bart (line 1700) | def test_contrastive_search_bart(self): method test_contrastive_search_t5 (line 1746) | def test_contrastive_search_t5(self): method test_contrastive_search_opt (line 1791) | def test_contrastive_search_opt(self): method test_contrastive_search_gptj (line 1822) | def test_contrastive_search_gptj(self): method test_contrastive_search_gpt2 (line 1857) | def test_contrastive_search_gpt2(self): method test_max_length_backward_compat_greedy (line 1890) | def test_max_length_backward_compat_greedy(self): method test_max_length_backward_compat_sample (line 1916) | def test_max_length_backward_compat_sample(self): method test_max_length_backward_compat_beam_search (line 1942) | def test_max_length_backward_compat_beam_search(self): method test_max_length_backward_compat_group_beam_search (line 1972) | def test_max_length_backward_compat_group_beam_search(self): method test_max_length_warning_if_different (line 2006) | def test_max_length_warning_if_different(self): method test_beam_search_warning_if_max_length_is_passed (line 2089) | def test_beam_search_warning_if_max_length_is_passed(self): method test_custom_stopping_criteria_overload_error (line 2142) | def test_custom_stopping_criteria_overload_error(self): method test_custom_stopping_criteria (line 2155) | def test_custom_stopping_criteria(self): method test_stop_sequence_stopping_criteria (line 2177) | def test_stop_sequence_stopping_criteria(self): method test_custom_logits_processor (line 2196) | def test_custom_logits_processor(self): method test_max_new_tokens_encoder_decoder (line 2213) | def test_max_new_tokens_encoder_decoder(self): method test_max_new_tokens_decoder_only_contrastive_search_t5 (line 2247) | def test_max_new_tokens_decoder_only_contrastive_search_t5(self): method test_max_new_tokens_decoder_only_contrastive_search_bart (line 2283) | def test_max_new_tokens_decoder_only_contrastive_search_bart(self): method test_max_new_tokens_decoder_only_contrastive_search_gptj (line 2321) | def test_max_new_tokens_decoder_only_contrastive_search_gptj(self): method test_max_new_tokens_decoder_only_contrastive_search_gpt2 (line 2348) | def test_max_new_tokens_decoder_only_contrastive_search_gpt2(self): method test_max_new_tokens_decoder_only (line 2375) | def test_max_new_tokens_decoder_only(self): method test_encoder_decoder_generate_with_inputs_embeds (line 2402) | def test_encoder_decoder_generate_with_inputs_embeds(self): method test_encoder_decoder_generate_attention_mask (line 2417) | def test_encoder_decoder_generate_attention_mask(self): method test_decoder_generate_with_inputs_embeds (line 2442) | def test_decoder_generate_with_inputs_embeds(self): method test_generate_input_ids_as_kwarg (line 2453) | def test_generate_input_ids_as_kwarg(self): method test_generate_non_nlp_input_ids_as_kwarg (line 2464) | def test_generate_non_nlp_input_ids_as_kwarg(self): method test_generate_input_ids_as_encoder_kwarg (line 2476) | def test_generate_input_ids_as_encoder_kwarg(self): method test_generate_inputs_and_encoder_kwargs (line 2490) | def test_generate_inputs_and_encoder_kwargs(self): method test_generate_too_many_encoder_kwargs (line 2498) | def test_generate_too_many_encoder_kwargs(self): method test_generate_input_values_as_encoder_kwarg (line 2506) | def test_generate_input_values_as_encoder_kwarg(self): method test_generate_input_features_as_encoder_kwarg (line 2516) | def test_generate_input_features_as_encoder_kwarg(self): method test_generate_pixel_values_as_encoder_kwarg (line 2526) | def test_generate_pixel_values_as_encoder_kwarg(self): method test_generate_encoder_outputs_attention_mask (line 2536) | def test_generate_encoder_outputs_attention_mask(self): method test_transition_scores_beam_search_encoder_decoder (line 2552) | def test_transition_scores_beam_search_encoder_decoder(self): method test_transition_scores_beam_search_encoder_decoder_with_eos (line 2580) | def test_transition_scores_beam_search_encoder_decoder_with_eos(self): method test_transition_scores_beam_search_decoder_only (line 2607) | def test_transition_scores_beam_search_decoder_only(self): method test_transition_scores_beam_sample_encoder_decoder (line 2638) | def test_transition_scores_beam_sample_encoder_decoder(self): method test_transition_scores_group_beam_search_encoder_decoder (line 2667) | def test_transition_scores_group_beam_search_encoder_decoder(self): method test_transition_scores_early_stopping (line 2697) | def test_transition_scores_early_stopping(self): method test_log_scores_sample_decoder_only (line 2728) | def test_log_scores_sample_decoder_only(self): method test_log_scores_sample_encoder_decoder (line 2757) | def test_log_scores_sample_encoder_decoder(self): method test_beam_search_example_integration (line 2785) | def test_beam_search_example_integration(self): method test_constrained_beam_search (line 2827) | def test_constrained_beam_search(self): method test_constrained_beam_search_mixed (line 2864) | def test_constrained_beam_search_mixed(self): method test_constrained_beam_search_mixed_mixin (line 2904) | def test_constrained_beam_search_mixed_mixin(self): method test_constrained_beam_search_example_translation_mixin (line 2941) | def test_constrained_beam_search_example_translation_mixin(self): method test_constrained_beam_search_example_integration (line 2965) | def test_constrained_beam_search_example_integration(self): method test_constrained_beam_search_mixin_type_checks (line 3008) | def test_constrained_beam_search_mixin_type_checks(self): method test_validate_generation_inputs (line 3048) | def test_validate_generation_inputs(self): FILE: benchmark/third_party/transformers/tests/mixed_int8/test_mixed_int8.py class BaseMixedInt8Test (line 46) | class BaseMixedInt8Test(unittest.TestCase): method setUp (line 62) | def setUp(self): class MixedInt8Test (line 67) | class MixedInt8Test(BaseMixedInt8Test): method setUp (line 68) | def setUp(self): method tearDown (line 75) | def tearDown(self): method test_memory_footprint (line 86) | def test_memory_footprint(self): method test_generate_quality (line 99) | def test_generate_quality(self): class MixedInt8ModelClassesTest (line 111) | class MixedInt8ModelClassesTest(BaseMixedInt8Test): method setUp (line 112) | def setUp(self): method tearDown (line 132) | def tearDown(self): method test_correct_head_class (line 145) | def test_correct_head_class(self): class MixedInt8TestPipeline (line 161) | class MixedInt8TestPipeline(BaseMixedInt8Test): method setUp (line 162) | def setUp(self): method tearDown (line 165) | def tearDown(self): method test_pipeline (line 175) | def test_pipeline(self): class MixedInt8TestMultiGpu (line 195) | class MixedInt8TestMultiGpu(BaseMixedInt8Test): method setUp (line 196) | def setUp(self): method test_multi_gpu_loading (line 199) | def test_multi_gpu_loading(self): FILE: benchmark/third_party/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 73) | def prepare_config_and_inputs(self): method get_config (line 96) | def get_config(self): method create_and_check_model (line 112) | def create_and_check_model( method create_and_check_for_pretraining (line 124) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 140) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 149) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 165) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 175) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 185) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 203) | def prepare_config_and_inputs_for_common(self): class AlbertModelTest (line 219) | class AlbertModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 237) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 250) | def setUp(self): method test_config (line 254) | def test_config(self): method test_model (line 257) | def test_model(self): method test_for_pretraining (line 261) | def test_for_pretraining(self): method test_for_masked_lm (line 265) | def test_for_masked_lm(self): method test_for_multiple_choice (line 269) | def test_for_multiple_choice(self): method test_for_question_answering (line 273) | def test_for_question_answering(self): method test_for_sequence_classification (line 277) | def test_for_sequence_classification(self): method test_model_various_embeddings (line 281) | def test_model_various_embeddings(self): method test_model_from_pretrained (line 288) | def test_model_from_pretrained(self): class AlbertModelIntegrationTest (line 295) | class AlbertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 297) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/transformers/tests/models/albert/test_modeling_flax_albert.py class FlaxAlbertModelTester (line 38) | class FlaxAlbertModelTester(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 FlaxAlbertModelTest (line 119) | 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: benchmark/third_party/transformers/tests/models/albert/test_modeling_tf_albert.py class TFAlbertModelTester (line 43) | class TFAlbertModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method create_and_check_albert_model (line 130) | def create_and_check_albert_model( method create_and_check_albert_for_pretraining (line 149) | def create_and_check_albert_for_pretraining( method create_and_check_albert_for_masked_lm (line 159) | def create_and_check_albert_for_masked_lm( method create_and_check_albert_for_sequence_classification (line 167) | def create_and_check_albert_for_sequence_classification( method create_and_check_albert_for_question_answering (line 176) | def create_and_check_albert_for_question_answering( method create_and_check_albert_for_multiple_choice (line 185) | def create_and_check_albert_for_multiple_choice( method create_and_check_albert_for_token_classification (line 201) | def create_and_check_albert_for_token_classification( method prepare_config_and_inputs_for_common (line 214) | def prepare_config_and_inputs_for_common(self): class TFAlbertModelTest (line 230) | class TFAlbertModelTest(TFModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 249) | 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_albert_model (line 265) | def test_albert_model(self): method test_for_pretraining (line 269) | def test_for_pretraining(self): method test_for_masked_lm (line 273) | def test_for_masked_lm(self): method test_for_multiple_choice (line 277) | def test_for_multiple_choice(self): method test_for_sequence_classification (line 281) | def test_for_sequence_classification(self): method test_for_question_answering (line 285) | def test_for_question_answering(self): method test_model_common_attributes (line 289) | def test_model_common_attributes(self): method test_model_from_pretrained (line 311) | def test_model_from_pretrained(self): class TFAlbertModelIntegrationTest (line 318) | class TFAlbertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 320) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/auto/test_configuration_auto.py class AutoConfigTest (line 39) | class AutoConfigTest(unittest.TestCase): method test_module_spec (line 40) | def test_module_spec(self): method test_config_from_model_shortcut (line 44) | def test_config_from_model_shortcut(self): method test_config_model_type_from_local_file (line 48) | def test_config_model_type_from_local_file(self): method test_config_model_type_from_model_identifier (line 52) | def test_config_model_type_from_model_identifier(self): method test_config_for_model_str (line 56) | def test_config_for_model_str(self): method test_pattern_matching_fallback (line 60) | def test_pattern_matching_fallback(self): method test_new_config_registration (line 70) | def test_new_config_registration(self): method test_repo_not_found (line 91) | def test_repo_not_found(self): method test_revision_not_found (line 97) | def test_revision_not_found(self): method test_configuration_not_found (line 103) | def test_configuration_not_found(self): method test_from_pretrained_dynamic_config (line 110) | def test_from_pretrained_dynamic_config(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_feature_extraction_auto.py class AutoFeatureExtractorTest (line 44) | class AutoFeatureExtractorTest(unittest.TestCase): method test_feature_extractor_from_model_shortcut (line 45) | def test_feature_extractor_from_model_shortcut(self): method test_feature_extractor_from_local_directory_from_key (line 49) | def test_feature_extractor_from_local_directory_from_key(self): method test_feature_extractor_from_local_directory_from_config (line 53) | def test_feature_extractor_from_local_directory_from_config(self): method test_feature_extractor_from_local_file (line 75) | def test_feature_extractor_from_local_file(self): method test_repo_not_found (line 79) | def test_repo_not_found(self): method test_revision_not_found (line 85) | def test_revision_not_found(self): method test_feature_extractor_not_found (line 91) | def test_feature_extractor_not_found(self): method test_from_pretrained_dynamic_feature_extractor (line 98) | def test_from_pretrained_dynamic_feature_extractor(self): method test_new_feature_extractor_registration (line 104) | def test_new_feature_extractor_registration(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_modeling_auto.py class AutoModelTest (line 92) | class AutoModelTest(unittest.TestCase): method test_model_from_pretrained (line 94) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 111) | def test_model_for_pretraining_from_pretrained(self): method test_lmhead_model_from_pretrained (line 128) | def test_lmhead_model_from_pretrained(self): method test_model_for_causal_lm (line 140) | def test_model_for_causal_lm(self): method test_model_for_masked_lm (line 152) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 164) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 176) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 190) | 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 217) | def test_token_classification_model_from_pretrained(self): method test_from_pretrained_identifier (line 228) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 234) | def test_from_identifier_from_model_type(self): method test_from_pretrained_with_tuple_values (line 240) | def test_from_pretrained_with_tuple_values(self): method test_from_pretrained_dynamic_model_local (line 255) | def test_from_pretrained_dynamic_model_local(self): method test_from_pretrained_dynamic_model_distant (line 276) | def test_from_pretrained_dynamic_model_distant(self): method test_new_model_registration (line 284) | def test_new_model_registration(self): method test_repo_not_found (line 335) | def test_repo_not_found(self): method test_revision_not_found (line 341) | def test_revision_not_found(self): method test_model_file_not_found (line 347) | def test_model_file_not_found(self): method test_model_from_tf_suggestion (line 354) | def test_model_from_tf_suggestion(self): method test_model_from_flax_suggestion (line 358) | def test_model_from_flax_suggestion(self): method test_cached_model_has_minimum_calls_to_head (line 362) | def test_cached_model_has_minimum_calls_to_head(self): method test_attr_not_existing (line 379) | def test_attr_not_existing(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_modeling_flax_auto.py class FlaxAutoModelTest (line 29) | class FlaxAutoModelTest(unittest.TestCase): method test_bert_from_pretrained (line 31) | def test_bert_from_pretrained(self): method test_roberta_from_pretrained (line 43) | def test_roberta_from_pretrained(self): method test_bert_jax_jit (line 55) | def test_bert_jax_jit(self): method test_roberta_jax_jit (line 68) | def test_roberta_jax_jit(self): method test_repo_not_found (line 80) | def test_repo_not_found(self): method test_revision_not_found (line 86) | def test_revision_not_found(self): method test_model_file_not_found (line 92) | def test_model_file_not_found(self): method test_model_from_pt_suggestion (line 99) | def test_model_from_pt_suggestion(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_modeling_tf_auto.py class NewModelConfig (line 72) | class NewModelConfig(BertConfig): class TFNewModel (line 78) | class TFNewModel(TFBertModel): class TFAutoModelTest (line 83) | class TFAutoModelTest(unittest.TestCase): method test_model_from_pretrained (line 85) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 96) | def test_model_for_pretraining_from_pretrained(self): method test_model_for_causal_lm (line 107) | def test_model_for_causal_lm(self): method test_lmhead_model_from_pretrained (line 119) | def test_lmhead_model_from_pretrained(self): method test_model_for_masked_lm (line 130) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 142) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 154) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 166) | def test_question_answering_model_from_pretrained(self): method test_table_question_answering_model_from_pretrained (line 179) | def test_table_question_answering_model_from_pretrained(self): method test_from_pretrained_identifier (line 192) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 198) | def test_from_identifier_from_model_type(self): method test_from_pretrained_with_tuple_values (line 204) | 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 269) | def test_repo_not_found(self): method test_revision_not_found (line 275) | def test_revision_not_found(self): method test_model_file_not_found (line 281) | def test_model_file_not_found(self): method test_model_from_pt_suggestion (line 288) | def test_model_from_pt_suggestion(self): method test_cached_model_has_minimum_calls_to_head (line 292) | def test_cached_model_has_minimum_calls_to_head(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_modeling_tf_pytorch.py class TFPTAutoModelTest (line 72) | class TFPTAutoModelTest(unittest.TestCase): method test_model_from_pretrained (line 74) | def test_model_from_pretrained(self): method test_model_for_pretraining_from_pretrained (line 90) | def test_model_for_pretraining_from_pretrained(self): method test_model_for_causal_lm (line 106) | def test_model_for_causal_lm(self): method test_lmhead_model_from_pretrained (line 127) | def test_lmhead_model_from_pretrained(self): method test_model_for_masked_lm (line 142) | def test_model_for_masked_lm(self): method test_model_for_encoder_decoder_lm (line 163) | def test_model_for_encoder_decoder_lm(self): method test_sequence_classification_model_from_pretrained (line 184) | def test_sequence_classification_model_from_pretrained(self): method test_question_answering_model_from_pretrained (line 200) | def test_question_answering_model_from_pretrained(self): method test_from_pretrained_identifier (line 215) | def test_from_pretrained_identifier(self): method test_from_identifier_from_model_type (line 226) | def test_from_identifier_from_model_type(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_processor_auto.py class AutoFeatureExtractorTest (line 57) | class AutoFeatureExtractorTest(unittest.TestCase): method test_processor_from_model_shortcut (line 60) | def test_processor_from_model_shortcut(self): method test_processor_from_local_directory_from_repo (line 64) | def test_processor_from_local_directory_from_repo(self): method test_processor_from_local_directory_from_extractor_config (line 77) | def test_processor_from_local_directory_from_extractor_config(self): method test_processor_from_feat_extr_processor_class (line 87) | def test_processor_from_feat_extr_processor_class(self): method test_processor_from_tokenizer_processor_class (line 109) | def test_processor_from_tokenizer_processor_class(self): method test_processor_from_local_directory_from_model_config (line 131) | def test_processor_from_local_directory_from_model_config(self): method test_from_pretrained_dynamic_processor (line 145) | def test_from_pretrained_dynamic_processor(self): method test_new_processor_registration (line 169) | def test_new_processor_registration(self): method test_auto_processor_creates_tokenizer (line 205) | def test_auto_processor_creates_tokenizer(self): method test_auto_processor_creates_feature_extractor (line 209) | def test_auto_processor_creates_feature_extractor(self): class ProcessorPushToHubTester (line 215) | class ProcessorPushToHubTester(unittest.TestCase): method setUpClass (line 219) | def setUpClass(cls): method tearDownClass (line 225) | def tearDownClass(cls): method test_push_to_hub (line 241) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 253) | def test_push_to_hub_in_organization(self): method test_push_to_hub_dynamic_processor (line 269) | def test_push_to_hub_dynamic_processor(self): FILE: benchmark/third_party/transformers/tests/models/auto/test_tokenization_auto.py class AutoTokenizerTest (line 67) | class AutoTokenizerTest(unittest.TestCase): method test_tokenizer_from_pretrained (line 69) | def test_tokenizer_from_pretrained(self): method test_tokenizer_from_pretrained_identifier (line 82) | def test_tokenizer_from_pretrained_identifier(self): method test_tokenizer_from_model_type (line 87) | def test_tokenizer_from_model_type(self): method test_tokenizer_from_tokenizer_class (line 92) | def test_tokenizer_from_tokenizer_class(self): method test_tokenizer_from_type (line 100) | def test_tokenizer_from_type(self): method test_tokenizer_from_type_fast (line 115) | def test_tokenizer_from_type_fast(self): method test_tokenizer_from_type_incorrect_name (line 129) | def test_tokenizer_from_type_incorrect_name(self): method test_tokenizer_identifier_with_correct_config (line 134) | def test_tokenizer_identifier_with_correct_config(self): method test_tokenizer_identifier_non_existent (line 147) | def test_tokenizer_identifier_non_existent(self): method test_model_name_edge_cases_in_mappings (line 155) | def test_model_name_edge_cases_in_mappings(self): method test_from_pretrained_use_fast_toggle (line 174) | def test_from_pretrained_use_fast_toggle(self): method test_do_lower_case (line 179) | def test_do_lower_case(self): method test_PreTrainedTokenizerFast_from_pretrained (line 190) | def test_PreTrainedTokenizerFast_from_pretrained(self): method test_auto_tokenizer_from_local_folder (line 199) | def test_auto_tokenizer_from_local_folder(self): method test_auto_tokenizer_fast_no_slow (line 209) | def test_auto_tokenizer_fast_no_slow(self): method test_get_tokenizer_config (line 214) | def test_get_tokenizer_config(self): method test_new_tokenizer_registration (line 236) | def test_new_tokenizer_registration(self): method test_new_tokenizer_fast_registration (line 259) | def test_new_tokenizer_fast_registration(self): method test_from_pretrained_dynamic_tokenizer (line 302) | def test_from_pretrained_dynamic_tokenizer(self): method test_from_pretrained_dynamic_tokenizer_legacy_format (line 317) | def test_from_pretrained_dynamic_tokenizer_legacy_format(self): method test_repo_not_found (line 334) | def test_repo_not_found(self): method test_revision_not_found (line 340) | def test_revision_not_found(self): method test_cached_tokenizer_has_minimum_calls_to_head (line 346) | def test_cached_tokenizer_has_minimum_calls_to_head(self): FILE: benchmark/third_party/transformers/tests/models/bart/test_modeling_bart.py function prepare_bart_inputs_dict (line 49) | def prepare_bart_inputs_dict( class BartModelTester (line 80) | class BartModelTester: method __init__ (line 81) | def __init__( method prepare_config_and_inputs (line 125) | def prepare_config_and_inputs(self): method get_config (line 138) | def get_config(self): method get_pipeline_config (line 158) | def get_pipeline_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 202) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class BartHeadTests (line 236) | class BartHeadTests(unittest.TestCase): method _get_config_and_data (line 239) | def _get_config_and_data(self): method test_sequence_classification_forward (line 277) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 287) | def test_question_answering_forward(self): method test_lm_forward (line 303) | def test_lm_forward(self): method test_lm_uneven_forward (line 313) | def test_lm_uneven_forward(self): method test_generate_beam_search (line 334) | def test_generate_beam_search(self): method test_shift_tokens_right (line 364) | def test_shift_tokens_right(self): method test_tokenization (line 374) | def test_tokenization(self): method test_generate_fp16 (line 385) | def test_generate_fp16(self): method test_dummy_inputs (line 394) | def test_dummy_inputs(self): method test_resize_tokens_embeddings_more (line 399) | def test_resize_tokens_embeddings_more(self): class BartModelTest (line 417) | class BartModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method setUp (line 429) | def setUp(self): method test_config (line 433) | def test_config(self): method test_save_load_strict (line 436) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 446) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 450) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 455) | def test_inputs_embeds(self): method test_generate_fp16 (line 484) | def test_generate_fp16(self): function assert_tensors_close (line 495) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 514) | def _long_tensor(tok_lst): class FastIntegrationTests (line 520) | class FastIntegrationTests(unittest.TestCase): method tok (line 524) | def tok(self): method xsum_1_1_model (line 528) | def xsum_1_1_model(self): method test_xsum_1_1_generation (line 531) | def test_xsum_1_1_generation(self): method test_xsum_1_1_batch_generation (line 581) | def test_xsum_1_1_batch_generation(self): method test_encoder_equiv (line 714) | def test_encoder_equiv(self): class BartModelIntegrationTests (line 842) | class BartModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 844) | def default_tokenizer(self): method test_inference_no_head (line 848) | def test_inference_no_head(self): method test_base_mask_filling (line 862) | def test_base_mask_filling(self): method test_large_mask_filling (line 869) | def test_large_mask_filling(self): method test_mnli_inference (line 877) | def test_mnli_inference(self): method test_xsum_summarization_same_as_fairseq (line 905) | def test_xsum_summarization_same_as_fairseq(self): method test_xsum_config_generation_params (line 941) | def test_xsum_config_generation_params(self): method test_cnn_summarization_same_as_fairseq (line 948) | def test_cnn_summarization_same_as_fairseq(self): class BartStandaloneDecoderModelTester (line 1185) | class BartStandaloneDecoderModelTester: method __init__ (line 1186) | def __init__( method prepare_config_and_inputs (line 1241) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 1276) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 1296) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 1332) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 1379) | def prepare_config_and_inputs_for_common(self): class BartStandaloneDecoderModelTest (line 1396) | class BartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTesterM... method setUp (line 1403) | def setUp( method test_config (line 1409) | def test_config(self): method test_decoder_model_past (line 1412) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 1416) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 1420) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/bart/test_modeling_flax_bart.py function prepare_bart_inputs_dict (line 45) | def prepare_bart_inputs_dict( class FlaxBartModelTester (line 73) | class FlaxBartModelTester: 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 BartHeadTests (line 233) | class BartHeadTests(unittest.TestCase): method _get_config_and_data (line 236) | def _get_config_and_data(self): method test_sequence_classification_forward (line 273) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 280) | def test_question_answering_forward(self): method test_lm_forward (line 289) | def test_lm_forward(self): method test_lm_uneven_forward (line 296) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 315) | def test_shift_tokens_right(self): class FlaxBartModelTest (line 326) | class FlaxBartModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGen... method setUp (line 340) | def setUp(self): method test_use_cache_forward (line 343) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 348) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 353) | def test_encode(self): method test_decode (line 376) | def test_decode(self): method test_model_from_pretrained (line 410) | def test_model_from_pretrained(self): method test_summarization_fast (line 419) | def test_summarization_fast(self): method test_cnn_summarization_same_as_fairseq (line 438) | def test_cnn_summarization_same_as_fairseq(self): class FlaxBartStandaloneDecoderModelTester (line 675) | class FlaxBartStandaloneDecoderModelTester: method __init__ (line 676) | def __init__( method prepare_config_and_inputs (line 718) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 746) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 752) | def prepare_config_and_inputs_for_decoder(self): FILE: benchmark/third_party/transformers/tests/models/bart/test_modeling_tf_bart.py class TFBartModelTester (line 36) | class TFBartModelTester: 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_bart_inputs_dict (line 145) | def prepare_bart_inputs_dict( class TFBartModelTest (line 183) | class TFBartModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, unitte... method setUp (line 191) | def setUp(self): method test_config (line 195) | def test_config(self): method test_decoder_model_past_large_inputs (line 198) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 202) | def test_model_common_attributes(self): method test_saved_model_creation (line 223) | def test_saved_model_creation(self): method test_onnx_compliancy (line 228) | def test_onnx_compliancy(self): function _long_tensor (line 232) | def _long_tensor(tok_lst): class TFBartHeadTests (line 237) | class TFBartHeadTests(unittest.TestCase): method _get_config_and_data (line 240) | def _get_config_and_data(self): method test_lm_forward (line 261) | def test_lm_forward(self): method test_lm_uneven_forward (line 269) | def test_lm_uneven_forward(self): class TFBartModelIntegrationTest (line 291) | class TFBartModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 292) | def test_inference_no_head(self): method test_cnn_summarization_same_as_fairseq_hard (line 305) | def test_cnn_summarization_same_as_fairseq_hard(self): method tok (line 550) | def tok(self): class FasterTFBartModelIntegrationTests (line 556) | class FasterTFBartModelIntegrationTests(unittest.TestCase): method tok (line 560) | def tok(self): method xsum_1_1_model (line 564) | def xsum_1_1_model(self): method test_xsum_1_1_generation (line 567) | def test_xsum_1_1_generation(self): method test_xsum_1_1_xla_generation (line 616) | def test_xsum_1_1_xla_generation(self): method test_xsum_1_1_batch_generation (line 672) | def test_xsum_1_1_batch_generation(self): method test_encoder_equiv (line 803) | def test_encoder_equiv(self): FILE: benchmark/third_party/transformers/tests/models/bart/test_tokenization_bart.py class TestTokenizationBart (line 27) | class TestTokenizationBart(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method get_tokenizer (line 69) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 73) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 77) | def get_input_output_texts(self, tokenizer): method default_tokenizer (line 81) | def default_tokenizer(self): method default_tokenizer_fast (line 85) | def default_tokenizer_fast(self): method test_prepare_batch (line 89) | def test_prepare_batch(self): method test_prepare_batch_empty_target_text (line 104) | def test_prepare_batch_empty_target_text(self): method test_tokenizer_as_target_length (line 115) | def test_tokenizer_as_target_length(self): method test_prepare_batch_not_longer_than_maxlen (line 125) | def test_prepare_batch_not_longer_than_maxlen(self): method test_special_tokens (line 134) | 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: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/beit/test_feature_extraction_beit.py class BeitFeatureExtractionTester (line 37) | class BeitFeatureExtractionTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_feat_extract_dict (line 70) | def prepare_feat_extract_dict(self): function prepare_semantic_single_inputs (line 83) | def prepare_semantic_single_inputs(): function prepare_semantic_batch_inputs (line 92) | def prepare_semantic_batch_inputs(): class BeitFeatureExtractionTest (line 105) | class BeitFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 109) | def setUp(self): method feat_extract_dict (line 113) | def feat_extract_dict(self): method test_feat_extract_properties (line 116) | def test_feat_extract_properties(self): method test_batch_feature (line 126) | def test_batch_feature(self): method test_call_pil (line 129) | def test_call_pil(self): method test_call_numpy (line 161) | def test_call_numpy(self): method test_call_pytorch (line 193) | def test_call_pytorch(self): method test_call_segmentation_maps (line 225) | def test_call_segmentation_maps(self): method test_reduce_labels (line 331) | def test_reduce_labels(self): FILE: benchmark/third_party/transformers/tests/models/beit/test_modeling_beit.py class BeitModelTester (line 54) | class BeitModelTester: method __init__ (line 55) | 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 134) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_masked_lm (line 141) | def create_and_check_for_masked_lm(self, config, pixel_values, labels,... method create_and_check_for_image_classification (line 148) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 166) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 180) | def prepare_config_and_inputs_for_common(self): class BeitModelTest (line 188) | class BeitModelTest(ModelTesterMixin, unittest.TestCase): 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_multi_gpu_data_parallel_forward (line 217) | def test_multi_gpu_data_parallel_forward(self): method test_model_common_attributes (line 220) | def test_model_common_attributes(self): method test_forward_signature (line 229) | def test_forward_signature(self): method test_model (line 241) | def test_model(self): method test_for_masked_lm (line 245) | def test_for_masked_lm(self): method test_for_image_classification (line 249) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 253) | def test_for_semantic_segmentation(self): method test_training (line 257) | def test_training(self): method test_training_gradient_checkpointing (line 276) | def test_training_gradient_checkpointing(self): method test_initialization (line 300) | def test_initialization(self): method test_model_from_pretrained (line 319) | def test_model_from_pretrained(self): function prepare_img (line 326) | def prepare_img(): class BeitModelIntegrationTest (line 333) | class BeitModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 335) | def default_feature_extractor(self): method test_inference_masked_image_modeling_head (line 341) | def test_inference_masked_image_modeling_head(self): method test_inference_image_classification_head_imagenet_1k (line 367) | def test_inference_image_classification_head_imagenet_1k(self): method test_inference_image_classification_head_imagenet_22k (line 391) | def test_inference_image_classification_head_imagenet_22k(self): method test_inference_semantic_segmentation (line 417) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 460) | def test_post_processing_semantic_segmentation(self): FILE: benchmark/third_party/transformers/tests/models/beit/test_modeling_flax_beit.py class FlaxBeitModelTester (line 38) | class FlaxBeitModelTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 82) | def prepare_config_and_inputs(self): method create_and_check_model (line 107) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_lm (line 112) | def create_and_check_for_masked_lm(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 117) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 130) | def prepare_config_and_inputs_for_common(self): class FlaxBeitModelTest (line 142) | 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_feature_extractor (line 222) | def default_feature_extractor(self): method test_inference_masked_image_modeling_head (line 228) | def test_inference_masked_image_modeling_head(self): method test_inference_image_classification_head_imagenet_1k (line 253) | def test_inference_image_classification_head_imagenet_1k(self): method test_inference_image_classification_head_imagenet_22k (line 276) | def test_inference_image_classification_head_imagenet_22k(self): FILE: benchmark/third_party/transformers/tests/models/bert/test_modeling_bert.py class BertModelTester (line 46) | class BertModelTester: 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 BertModelTest (line 429) | class BertModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method _prepare_for_class (line 450) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 463) | def setUp(self): method test_config (line 467) | def test_config(self): method test_model (line 470) | def test_model(self): method test_model_various_embeddings (line 474) | def test_model_various_embeddings(self): method test_model_as_decoder (line 480) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 484) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 512) | def test_for_causal_lm(self): method test_for_masked_lm (line 516) | def test_for_masked_lm(self): method test_for_causal_lm_decoder (line 520) | def test_for_causal_lm_decoder(self): method test_decoder_model_past_with_large_inputs (line 524) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 528) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 532) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 536) | def test_for_pretraining(self): method test_for_question_answering (line 540) | def test_for_question_answering(self): method test_for_sequence_classification (line 544) | def test_for_sequence_classification(self): method test_for_token_classification (line 548) | def test_for_token_classification(self): method test_model_from_pretrained (line 553) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 560) | def test_torchscript_device_change(self): class BertModelIntegrationTest (line 583) | class BertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 585) | def test_inference_no_head_absolute_embedding(self): method test_inference_no_head_relative_embedding_key (line 598) | def test_inference_no_head_relative_embedding_key(self): method test_inference_no_head_relative_embedding_key_query (line 613) | def test_inference_no_head_relative_embedding_key_query(self): FILE: benchmark/third_party/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 155) | def setUp(self): method test_model_from_pretrained (line 159) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/bert/test_modeling_tf_bert.py class TFBertModelTester (line 45) | class TFBertModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 94) | 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_model (line 156) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 171) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 188) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 221) | 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_next_sequence_prediction (line 503) | def create_and_check_for_next_sequence_prediction( method create_and_check_for_pretraining (line 511) | def create_and_check_for_pretraining( method create_and_check_for_sequence_classification (line 520) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 534) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 550) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 563) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 577) | def prepare_config_and_inputs_for_common(self): class TFBertModelTest (line 593) | class TFBertModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, unitte... method _prepare_for_class (line 615) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 624) | def setUp(self): method test_config (line 628) | def test_config(self): method test_model (line 631) | def test_model(self): method test_causal_lm_base_model (line 636) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 644) | def test_model_as_decoder(self): method test_for_masked_lm (line 652) | def test_for_masked_lm(self): method test_for_causal_lm (line 656) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 661) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 666) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 671) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 676) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 681) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 686) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 690) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 694) | def test_for_pretraining(self): method test_for_question_answering (line 698) | def test_for_question_answering(self): method test_for_sequence_classification (line 702) | def test_for_sequence_classification(self): method test_for_token_classification (line 706) | def test_for_token_classification(self): method test_model_from_pretrained (line 710) | def test_model_from_pretrained(self): method test_model_common_attributes (line 714) | def test_model_common_attributes(self): method test_custom_load_tf_weights (line 735) | def test_custom_load_tf_weights(self): method test_onnx_compliancy (line 745) | def test_onnx_compliancy(self): class TFBertModelIntegrationTest (line 750) | class TFBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 752) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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_wordpiece_tokenizer (line 186) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 200) | def test_is_whitespace(self): method test_is_control (line 210) | def test_is_control(self): method test_is_punctuation (line 218) | def test_is_punctuation(self): method test_clean_text (line 227) | def test_clean_text(self): method test_sequence_builders (line 239) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 251) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 303) | def test_change_tokenize_chinese_chars(self): FILE: benchmark/third_party/transformers/tests/models/bert/test_tokenization_bert_tf.py class ModelToSave (line 22) | class ModelToSave(tf.keras.Model): method __init__ (line 23) | def __init__(self, tokenizer): method call (line 29) | def call(self, inputs): class BertTokenizationTest (line 36) | class BertTokenizationTest(unittest.TestCase): method setUp (line 40) | def setUp(self): method test_output_equivalence (line 62) | def test_output_equivalence(self): method test_different_pairing_styles (line 73) | def test_different_pairing_styles(self): method test_graph_mode (line 84) | def test_graph_mode(self): method test_saved_model (line 96) | def test_saved_model(self): FILE: benchmark/third_party/transformers/tests/models/bert_generation/test_modeling_bert_generation.py class BertGenerationEncoderTester (line 33) | class BertGenerationEncoderTester: method __init__ (line 34) | def __init__( method prepare_config_and_inputs (line 72) | def prepare_config_and_inputs(self): method get_config (line 86) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 101) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 122) | def create_and_check_model( method create_and_check_model_as_decoder (line 137) | def create_and_check_model_as_decoder( method create_and_check_decoder_model_past_large_inputs (line 164) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_causal_lm (line 222) | def create_and_check_for_causal_lm( method prepare_config_and_inputs_for_common (line 236) | def prepare_config_and_inputs_for_common(self): class BertGenerationEncoderTest (line 243) | class BertGenerationEncoderTest(ModelTesterMixin, GenerationTesterMixin,... method setUp (line 248) | def setUp(self): method test_config (line 252) | def test_config(self): method test_model (line 255) | def test_model(self): method test_model_as_bert (line 259) | def test_model_as_bert(self): method test_model_as_decoder (line 264) | def test_model_as_decoder(self): method test_decoder_model_past_with_large_inputs (line 268) | def test_decoder_model_past_with_large_inputs(self): method test_model_as_decoder_with_default_input_mask (line 272) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 294) | def test_for_causal_lm(self): method test_model_from_pretrained (line 299) | def test_model_from_pretrained(self): class BertGenerationEncoderIntegrationTest (line 305) | class BertGenerationEncoderIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 307) | def test_inference_no_head_absolute_embedding(self): class BertGenerationDecoderIntegrationTest (line 321) | class BertGenerationDecoderIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 323) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/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: benchmark/third_party/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 70) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 75) | def get_clean_sequence(self, tokenizer): method test_pretokenized_inputs (line 81) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_pair_input (line 84) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 87) | def test_maximum_encoding_length_single_input(self): method test_full_tokenizer (line 90) | def test_full_tokenizer(self): method test_pickle_mecab_tokenizer (line 97) | def test_pickle_mecab_tokenizer(self): method test_mecab_tokenizer_ipadic (line 117) | def test_mecab_tokenizer_ipadic(self): method test_mecab_tokenizer_unidic_lite (line 125) | def test_mecab_tokenizer_unidic_lite(self): method test_mecab_tokenizer_unidic (line 136) | def test_mecab_tokenizer_unidic(self): method test_mecab_tokenizer_lower (line 147) | def test_mecab_tokenizer_lower(self): method test_mecab_tokenizer_with_option (line 155) | def test_mecab_tokenizer_with_option(self): method test_mecab_tokenizer_no_normalize (line 169) | def test_mecab_tokenizer_no_normalize(self): method test_pickle_sudachi_tokenizer (line 178) | def test_pickle_sudachi_tokenizer(self): method test_sudachi_tokenizer_core (line 199) | def test_sudachi_tokenizer_core(self): method test_sudachi_tokenizer_split_mode_A (line 210) | def test_sudachi_tokenizer_split_mode_A(self): method test_sudachi_tokenizer_split_mode_B (line 216) | def test_sudachi_tokenizer_split_mode_B(self): method test_sudachi_tokenizer_split_mode_C (line 222) | def test_sudachi_tokenizer_split_mode_C(self): method test_sudachi_tokenizer_lower (line 228) | def test_sudachi_tokenizer_lower(self): method test_sudachi_tokenizer_no_normalize (line 239) | def test_sudachi_tokenizer_no_normalize(self): method test_sudachi_tokenizer_trim_whitespace (line 250) | def test_sudachi_tokenizer_trim_whitespace(self): method test_pickle_jumanpp_tokenizer (line 259) | def test_pickle_jumanpp_tokenizer(self): method test_jumanpp_tokenizer (line 280) | def test_jumanpp_tokenizer(self): method test_jumanpp_tokenizer_lower (line 291) | def test_jumanpp_tokenizer_lower(self): method test_jumanpp_tokenizer_no_normalize (line 302) | def test_jumanpp_tokenizer_no_normalize(self): method test_jumanpp_tokenizer_trim_whitespace (line 313) | def test_jumanpp_tokenizer_trim_whitespace(self): method test_wordpiece_tokenizer (line 321) | def test_wordpiece_tokenizer(self): method test_sentencepiece_tokenizer (line 337) | def test_sentencepiece_tokenizer(self): method test_sequence_builders (line 347) | def test_sequence_builders(self): class BertJapaneseCharacterTokenizationTest (line 362) | class BertJapaneseCharacterTokenizationTest(TokenizerTesterMixin, unitte... method setUp (line 367) | def setUp(self): method get_tokenizer (line 376) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 379) | def get_input_output_texts(self, tokenizer): method test_pretokenized_inputs (line 384) | def test_pretokenized_inputs(self): method test_maximum_encoding_length_pair_input (line 387) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 390) | def test_maximum_encoding_length_single_input(self): method test_full_tokenizer (line 393) | def test_full_tokenizer(self): method test_character_tokenizer (line 404) | def test_character_tokenizer(self): method test_sequence_builders (line 418) | def test_sequence_builders(self): class AutoTokenizerCustomTest (line 433) | class AutoTokenizerCustomTest(unittest.TestCase): method test_tokenizer_bert_japanese (line 434) | def test_tokenizer_bert_japanese(self): class BertTokenizerMismatchTest (line 440) | class BertTokenizerMismatchTest(unittest.TestCase): method test_tokenizer_mismatch_warning (line 441) | def test_tokenizer_mismatch_warning(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/big_bird/test_modeling_big_bird.py class BigBirdModelTester (line 46) | class BigBirdModelTester: method __init__ (line 47) | 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 153) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 180) | def create_and_check_model( method create_and_check_for_pretraining (line 191) | def create_and_check_for_pretraining( method create_and_check_model_as_decoder (line 207) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 239) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 257) | def create_and_check_for_masked_lm( method create_and_check_decoder_model_past_large_inputs (line 266) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_question_answering (line 328) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 344) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 354) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 364) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 382) | def prepare_config_and_inputs_for_common(self): method create_and_check_for_auto_padding (line 396) | def create_and_check_for_auto_padding( method create_and_check_for_change_to_full_attn (line 412) | def create_and_check_for_change_to_full_attn( class BigBirdModelTest (line 432) | class BigBirdModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 459) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 472) | def setUp(self): method test_config (line 476) | def test_config(self): method test_model (line 479) | def test_model(self): method test_for_pretraining (line 483) | def test_for_pretraining(self): method test_for_masked_lm (line 487) | def test_for_masked_lm(self): method test_for_multiple_choice (line 491) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 495) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 499) | def test_for_question_answering(self): method test_for_sequence_classification (line 503) | def test_for_sequence_classification(self): method test_for_token_classification (line 507) | def test_for_token_classification(self): method test_model_as_decoder (line 511) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 515) | def test_model_as_decoder_with_default_input_mask(self): method test_retain_grad_hidden_states_attentions (line 543) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 550) | def test_model_from_pretrained(self): method test_model_various_attn_type (line 555) | def test_model_various_attn_type(self): method test_fast_integration (line 561) | def test_fast_integration(self): method test_auto_padding (line 589) | def test_auto_padding(self): method test_for_change_to_full_attn (line 594) | def test_for_change_to_full_attn(self): method check_pt_flax_outputs (line 600) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... class BigBirdModelIntegrationTest (line 611) | class BigBirdModelIntegrationTest(unittest.TestCase): method _get_dummy_input_ids (line 615) | def _get_dummy_input_ids(self): method test_inference_block_sparse_pretraining (line 625) | def test_inference_block_sparse_pretraining(self): method test_inference_full_pretraining (line 654) | def test_inference_full_pretraining(self): method test_block_sparse_attention_probs (line 683) | def test_block_sparse_attention_probs(self): method test_block_sparse_context_layer (line 748) | def test_block_sparse_context_layer(self): method test_tokenizer_inference (line 796) | def test_tokenizer_inference(self): method test_inference_question_answering (line 844) | def test_inference_question_answering(self): method test_fill_mask (line 905) | def test_fill_mask(self): method test_auto_padding (line 917) | def test_auto_padding(self): FILE: benchmark/third_party/transformers/tests/models/big_bird/test_modeling_flax_big_bird.py class FlaxBigBirdModelTester (line 39) | class FlaxBigBirdModelTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 128) | def prepare_config_and_inputs_for_common(self): class FlaxBigBirdModelTest (line 136) | class FlaxBigBirdModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 156) | def setUp(self): method test_from_pretrained_save_pretrained (line 161) | def test_from_pretrained_save_pretrained(self): method test_from_pretrained_with_no_automatic_init (line 166) | def test_from_pretrained_with_no_automatic_init(self): method test_no_automatic_init (line 171) | def test_no_automatic_init(self): method test_hidden_states_output (line 176) | def test_hidden_states_output(self): method test_model_from_pretrained (line 180) | def test_model_from_pretrained(self): method test_attention_outputs (line 186) | def test_attention_outputs(self): method test_jit_compilation (line 192) | 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: benchmark/third_party/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 182) | def test_torch_encode_plus_sent_to_model(self): method test_special_tokens (line 205) | def test_special_tokens(self): method test_tokenizer_integration (line 228) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/bigbird_pegasus/test_modeling_bigbird_pegasus.py function prepare_bigbird_pegasus_inputs_dict (line 49) | def prepare_bigbird_pegasus_inputs_dict( class BigBirdPegasusModelTester (line 71) | class BigBirdPegasusModelTester: method __init__ (line 72) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method get_config (line 134) | 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_decoder_model_past_large_inputs (line 161) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 194) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): method create_and_check_model (line 226) | def create_and_check_model(self, config, inputs_dict): class BigBirdPegasusModelTest (line 235) | class BigBirdPegasusModelTest(ModelTesterMixin, GenerationTesterMixin, u... method _get_input_ids_and_config (line 258) | def _get_input_ids_and_config(self): method setUp (line 278) | def setUp(self): method test_config (line 282) | def test_config(self): method test_save_load_strict (line 285) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 295) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 299) | def test_encoder_decoder_model_standalone(self): method test_model_various_attn_type (line 303) | def test_model_various_attn_type(self): method test_generate_without_input_ids (line 309) | def test_generate_without_input_ids(self): method test_retain_grad_hidden_states_attentions (line 315) | def test_retain_grad_hidden_states_attentions(self): method test_inputs_embeds (line 322) | def test_inputs_embeds(self): method test_generate_fp16 (line 355) | def test_generate_fp16(self): method test_batched_forward_original_full (line 366) | def test_batched_forward_original_full(self): method test_batched_forward_block_sparse (line 370) | def test_batched_forward_block_sparse(self): method _check_batched_forward (line 373) | def _check_batched_forward(self, attn_type, tolerance=1e-3): method test_auto_padding (line 412) | def test_auto_padding(self): method test_for_change_to_full_attn (line 434) | def test_for_change_to_full_attn(self): class BigBirdPegasusModelIntegrationTests (line 456) | class BigBirdPegasusModelIntegrationTests(unittest.TestCase): method _get_dummy_input_ids (line 457) | def _get_dummy_input_ids(self): method _get_dummy_target_ids (line 467) | def _get_dummy_target_ids(self): method test_inference_block_sparse (line 477) | def test_inference_block_sparse(self): method test_inference_full_attn (line 500) | def test_inference_full_attn(self): method test_seq_to_seq_generation (line 521) | def test_seq_to_seq_generation(self): class BigBirdPegasusStandaloneDecoderModelTester (line 569) | class BigBirdPegasusStandaloneDecoderModelTester: method __init__ (line 570) | def __init__( method prepare_config_and_inputs (line 634) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 672) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 708) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 755) | def prepare_config_and_inputs_for_common(self): class BigBirdPegasusStandaloneDecoderModelTest (line 764) | class BigBirdPegasusStandaloneDecoderModelTest(ModelTesterMixin, Generat... method setUp (line 770) | def setUp( method test_config (line 776) | def test_config(self): method test_decoder_model_past (line 779) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 783) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 787) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot/test_modeling_blenderbot.py function prepare_blenderbot_inputs_dict (line 40) | def prepare_blenderbot_inputs_dict( class BlenderbotModelTester (line 71) | class BlenderbotModelTester: method __init__ (line 72) | def __init__( method prepare_config_and_inputs (line 116) | def prepare_config_and_inputs(self): method get_config (line 128) | def get_config(self): method get_pipeline_config (line 148) | def get_pipeline_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 BlenderbotModelTest (line 226) | class BlenderbotModelTest(ModelTesterMixin, GenerationTesterMixin, unitt... method setUp (line 234) | def setUp(self): method test_config (line 238) | def test_config(self): method test_save_load_strict (line 241) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 251) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 255) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 259) | def test_generate_fp16(self): function assert_tensors_close (line 270) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): class Blenderbot3BIntegrationTests (line 293) | class Blenderbot3BIntegrationTests(unittest.TestCase): method tokenizer (line 297) | def tokenizer(self): method test_generation_from_short_input_same_as_parlai_3B (line 301) | def test_generation_from_short_input_same_as_parlai_3B(self): class BlenderbotStandaloneDecoderModelTester (line 331) | class BlenderbotStandaloneDecoderModelTester: method __init__ (line 332) | def __init__( method prepare_config_and_inputs (line 389) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 424) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 460) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 508) | def prepare_config_and_inputs_for_common(self): class BlenderbotStandaloneDecoderModelTest (line 525) | class BlenderbotStandaloneDecoderModelTest(ModelTesterMixin, GenerationT... method setUp (line 531) | def setUp( method test_config (line 537) | def test_config(self): method test_decoder_model_past (line 540) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 544) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 548) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot/test_modeling_flax_blenderbot.py function prepare_blenderbot_inputs_dict (line 45) | def prepare_blenderbot_inputs_dict( class FlaxBlenderbotModelTester (line 73) | class FlaxBlenderbotModelTester: 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 FlaxBlenderbotModelTest (line 311) | class FlaxBlenderbotModelTest(FlaxModelTesterMixin, unittest.TestCase, F... method setUp (line 323) | def setUp(self): method test_use_cache_forward (line 326) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 331) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 336) | def test_encode(self): method test_decode (line 359) | def test_decode(self): method test_model_from_pretrained (line 393) | def test_model_from_pretrained(self): method test_generation_from_short_input_same_as_parlai_3B (line 403) | def test_generation_from_short_input_same_as_parlai_3B(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot/test_modeling_tf_blenderbot.py class TFBlenderbotModelTester (line 34) | class TFBlenderbotModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs_for_common (line 76) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 104) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_blenderbot_inputs_dict (line 140) | def prepare_blenderbot_inputs_dict( class TFBlenderbotModelTest (line 178) | class TFBlenderbotModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 185) | def setUp(self): method test_config (line 189) | def test_config(self): method test_decoder_model_past_large_inputs (line 192) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 196) | def test_model_common_attributes(self): method test_saved_model_creation (line 217) | def test_saved_model_creation(self): class TFBlenderbot400MIntegrationTests (line 223) | class TFBlenderbot400MIntegrationTests(unittest.TestCase): method tokenizer (line 228) | def tokenizer(self): method model (line 232) | def model(self): method test_generation_from_long_input (line 237) | def test_generation_from_long_input(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot/test_tokenization_blenderbot.py class Blenderbot3BTokenizerTests (line 23) | class Blenderbot3BTokenizerTests(unittest.TestCase): method tokenizer_3b (line 25) | def tokenizer_3b(self): method rust_tokenizer_3b (line 29) | def rust_tokenizer_3b(self): method test_encode_decode_cycle (line 32) | def test_encode_decode_cycle(self): method test_encode_decode_cycle_rust_tokenizer (line 39) | def test_encode_decode_cycle_rust_tokenizer(self): method test_3B_tokenization_same_as_parlai (line 46) | def test_3B_tokenization_same_as_parlai(self): method test_3B_tokenization_same_as_parlai_rust_tokenizer (line 50) | def test_3B_tokenization_same_as_parlai_rust_tokenizer(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot_small/test_modeling_blenderbot_small.py function prepare_blenderbot_small_inputs_dict (line 40) | def prepare_blenderbot_small_inputs_dict( class BlenderbotSmallModelTester (line 71) | class BlenderbotSmallModelTester: method __init__ (line 72) | def __init__( method prepare_config_and_inputs (line 116) | def prepare_config_and_inputs(self): method get_config (line 128) | def get_config(self): method prepare_config_and_inputs_for_common (line 148) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 152) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 186) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class BlenderbotSmallModelTest (line 220) | class BlenderbotSmallModelTest(ModelTesterMixin, GenerationTesterMixin, ... method setUp (line 228) | def setUp(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_generate_fp16 (line 253) | def test_generate_fp16(self): function assert_tensors_close (line 264) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): class Blenderbot90MIntegrationTests (line 284) | class Blenderbot90MIntegrationTests(unittest.TestCase): method model (line 288) | def model(self): method tokenizer (line 295) | def tokenizer(self): method test_90_generation_from_long_input (line 299) | def test_90_generation_from_long_input(self): method test_90_generation_from_short_input (line 318) | def test_90_generation_from_short_input(self): class BlenderbotSmallStandaloneDecoderModelTester (line 332) | class BlenderbotSmallStandaloneDecoderModelTester: method __init__ (line 333) | def __init__( method prepare_config_and_inputs (line 388) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 422) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 458) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 505) | def prepare_config_and_inputs_for_common(self): class BlenderbotSmallStandaloneDecoderModelTest (line 522) | class BlenderbotSmallStandaloneDecoderModelTest(ModelTesterMixin, Genera... method setUp (line 528) | def setUp( method test_config (line 534) | def test_config(self): method test_decoder_model_past (line 537) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 541) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 545) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot_small/test_modeling_flax_blenderbot_small.py function prepare_blenderbot_inputs_dict (line 44) | def prepare_blenderbot_inputs_dict( class FlaxBlenderbotSmallModelTester (line 72) | class FlaxBlenderbotSmallModelTester: method __init__ (line 73) | def __init__( method prepare_config_and_inputs (line 113) | 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_use_cache_forward (line 144) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 184) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class BlenderbotHeadTests (line 232) | class BlenderbotHeadTests(unittest.TestCase): method _get_config_and_data (line 235) | def _get_config_and_data(self): method test_lm_forward (line 273) | def test_lm_forward(self): method test_lm_uneven_forward (line 280) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 299) | def test_shift_tokens_right(self): class FlaxBlenderbotSmallModelTest (line 310) | class FlaxBlenderbotSmallModelTest(FlaxModelTesterMixin, unittest.TestCa... method setUp (line 322) | def setUp(self): method test_use_cache_forward (line 325) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 330) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 335) | def test_encode(self): method test_decode (line 358) | def test_decode(self): method test_model_from_pretrained (line 392) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot_small/test_modeling_tf_blenderbot_small.py class TFBlenderbotSmallModelTester (line 34) | class TFBlenderbotSmallModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs_for_common (line 76) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 104) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_blenderbot_small_inputs_dict (line 140) | def prepare_blenderbot_small_inputs_dict( class TFBlenderbotSmallModelTest (line 178) | class TFBlenderbotSmallModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 187) | def setUp(self): method test_config (line 191) | def test_config(self): method test_decoder_model_past_large_inputs (line 194) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 198) | def test_model_common_attributes(self): method test_saved_model_creation (line 219) | def test_saved_model_creation(self): class TFBlenderbot90MIntegrationTests (line 225) | class TFBlenderbot90MIntegrationTests(unittest.TestCase): method tokenizer (line 233) | def tokenizer(self): method model (line 238) | def model(self): method test_90_generation_from_long_input (line 243) | def test_90_generation_from_long_input(self): FILE: benchmark/third_party/transformers/tests/models/blenderbot_small/test_tokenization_blenderbot_small.py class BlenderbotSmallTokenizerTest (line 29) | class BlenderbotSmallTokenizerTest(TokenizerTesterMixin, unittest.TestCa... method setUp (line 34) | def setUp(self): method get_tokenizer (line 50) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 54) | def get_input_output_texts(self, tokenizer): method test_full_blenderbot_small_tokenizer (line 59) | def test_full_blenderbot_small_tokenizer(self): method test_special_tokens_small_tok (line 71) | def test_special_tokens_small_tok(self): method test_empty_word_small_tok (line 80) | def test_empty_word_small_tok(self): FILE: benchmark/third_party/transformers/tests/models/bloom/test_modeling_bloom.py class BloomModelTester (line 44) | class BloomModelTester: 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(self, gradient_checkpointing=False): method get_config (line 116) | def get_config(self, gradient_checkpointing=False, slow_but_exact=True): method create_and_check_bloom_model (line 138) | def create_and_check_bloom_model(self, config, input_ids, input_mask, ... method create_and_check_bloom_model_past (line 148) | def create_and_check_bloom_model_past(self, config, input_ids, input_m... method create_and_check_bloom_model_attention_mask_past (line 181) | def create_and_check_bloom_model_attention_mask_past(self, config, inp... method create_and_check_bloom_model_past_large_inputs (line 221) | def create_and_check_bloom_model_past_large_inputs(self, config, input... method create_and_check_lm_head_model (line 253) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_sequence_classification_model (line 262) | def create_and_check_sequence_classification_model(self, config, input... method create_and_check_token_classification_model (line 271) | def create_and_check_token_classification_model(self, config, input_id... method create_and_check_question_answering_model (line 279) | def create_and_check_question_answering_model(self, config, input_ids,... method create_and_check_forward_and_backwards (line 287) | def create_and_check_forward_and_backwards( method create_and_check_bloom_weight_initialization (line 300) | def create_and_check_bloom_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 308) | def prepare_config_and_inputs_for_common(self): class BloomModelTest (line 319) | class BloomModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.T... method setUp (line 339) | def setUp(self): method test_config (line 343) | def test_config(self): method test_bloom_model (line 346) | def test_bloom_model(self): method test_bloom_model_past (line 350) | def test_bloom_model_past(self): method test_bloom_model_att_mask_past (line 354) | def test_bloom_model_att_mask_past(self): method test_bloom_model_past_large_inputs (line 358) | def test_bloom_model_past_large_inputs(self): method test_bloom_lm_head_model (line 362) | def test_bloom_lm_head_model(self): method test_bloom_sequence_classification_model (line 366) | def test_bloom_sequence_classification_model(self): method test_bloom_token_classification_model (line 370) | def test_bloom_token_classification_model(self): method test_bloom_gradient_checkpointing (line 374) | def test_bloom_gradient_checkpointing(self): method test_bloom_weight_initialization (line 378) | def test_bloom_weight_initialization(self): method test_model_from_pretrained (line 383) | def test_model_from_pretrained(self): method test_simple_generation (line 390) | def test_simple_generation(self): method test_batch_generation (line 429) | def test_batch_generation(self): method test_batch_generation_padd (line 449) | def test_batch_generation_padd(self): class BloomEmbeddingTest (line 478) | class BloomEmbeddingTest(unittest.TestCase): method setUp (line 500) | def setUp(self): method test_embeddings (line 509) | def test_embeddings(self): method test_hidden_states_transformers (line 740) | def test_hidden_states_transformers(self): method test_logits (line 770) | def test_logits(self): FILE: benchmark/third_party/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_encodings_from_sample_data (line 46) | def test_encodings_from_sample_data(self): method test_padding (line 61) | def test_padding(self, max_length=6): method test_encodings_from_xnli_dataset (line 116) | def test_encodings_from_xnli_dataset(self): method test_pretrained_model_lists (line 131) | def test_pretrained_model_lists(self): FILE: benchmark/third_party/transformers/tests/models/bort/test_modeling_bort.py class BortIntegrationTest (line 31) | class BortIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 33) | def test_output_embeds_base_model(self): FILE: benchmark/third_party/transformers/tests/models/bort/test_modeling_tf_bort.py class TFBortIntegrationTest (line 32) | class TFBortIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 34) | def test_output_embeds_base_model(self): FILE: benchmark/third_party/transformers/tests/models/byt5/test_tokenization_byt5.py class ByT5TokenizationTest (line 38) | class ByT5TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 43) | def setUp(self): method t5_base_tokenizer (line 49) | def t5_base_tokenizer(self): method get_tokenizer (line 52) | def get_tokenizer(self, **kwargs) -> ByT5Tokenizer: method get_clean_sequence (line 55) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_eos_treatment (line 93) | def test_eos_treatment(self): method test_multibytes_char (line 99) | def test_multibytes_char(self): method test_prepare_batch_integration (line 120) | def test_prepare_batch_integration(self): method test_empty_target_text (line 139) | def test_empty_target_text(self): method test_max_length_integration (line 149) | def test_max_length_integration(self): method test_eos_in_input (line 160) | def test_eos_in_input(self): method test_save_and_load_tokenizer (line 175) | def test_save_and_load_tokenizer(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 226) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_decode_single_bytes (line 290) | def test_decode_single_bytes(self): method test_pretrained_model_lists (line 307) | def test_pretrained_model_lists(self): method test_get_vocab (line 311) | def test_get_vocab(self): method test_pretokenized_inputs (line 315) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 319) | def test_conversion_reversible(self): method test_convert_tokens_to_string_format (line 322) | def test_convert_tokens_to_string_format(self): method test_tokenizers_common_ids_setters (line 335) | def test_tokenizers_common_ids_setters(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/camembert/test_modeling_tf_camembert.py class TFCamembertModelIntegrationTest (line 32) | class TFCamembertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 34) | def test_output_embeds_base_model(self): FILE: benchmark/third_party/transformers/tests/models/camembert/test_tokenization_camembert.py class CamembertTokenizationTest (line 33) | class CamembertTokenizationTest(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_rust_and_python_bpe_tokenizers (line 66) | def test_rust_and_python_bpe_tokenizers(self): method test_rust_and_python_full_tokenizers (line 88) | def test_rust_and_python_full_tokenizers(self): method test_tokenizer_integration (line 111) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/canine/test_modeling_canine.py class CanineModelTester (line 41) | class CanineModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 88) | 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( method create_and_check_for_question_answering (line 138) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 154) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 164) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 174) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 192) | def prepare_config_and_inputs_for_common(self): class CanineModelTest (line 208) | class CanineModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 226) | def setUp(self): method test_config (line 231) | def test_config(self): method test_model (line 234) | def test_model(self): method test_for_multiple_choice (line 238) | def test_for_multiple_choice(self): method test_for_question_answering (line 242) | def test_for_question_answering(self): method test_for_sequence_classification (line 246) | def test_for_sequence_classification(self): method test_for_token_classification (line 250) | def test_for_token_classification(self): method test_hidden_states_output (line 254) | def test_hidden_states_output(self): method test_attention_outputs (line 298) | def test_attention_outputs(self): method test_model_outputs_equivalence (line 358) | def test_model_outputs_equivalence(self): method test_headmasking (line 427) | def test_headmasking(self): method test_inputs_embeds (line 485) | def test_inputs_embeds(self): method test_model_common_attributes (line 490) | def test_model_common_attributes(self): method test_model_from_pretrained (line 494) | def test_model_from_pretrained(self): class CanineModelIntegrationTest (line 501) | class CanineModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 503) | def test_inference_no_head(self): FILE: benchmark/third_party/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 67) | def test_encoding_keys(self): method test_max_length_integration (line 77) | def test_max_length_integration(self): method test_save_and_load_tokenizer (line 89) | 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 187) | def test_added_token_serializable(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 203) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_encode_decode_with_spaces (line 261) | def test_encode_decode_with_spaces(self): method test_tokenizers_common_ids_setters (line 276) | def test_tokenizers_common_ids_setters(self): method test_add_tokens_tokenizer (line 313) | def test_add_tokens_tokenizer(self): method test_added_tokens_do_lower_case (line 318) | def test_added_tokens_do_lower_case(self): method test_np_encode_plus_sent_to_model (line 322) | def test_np_encode_plus_sent_to_model(self): method test_torch_encode_plus_sent_to_model (line 326) | def test_torch_encode_plus_sent_to_model(self): method test_pretrained_model_lists (line 330) | def test_pretrained_model_lists(self): method test_get_vocab (line 334) | def test_get_vocab(self): method test_pretokenized_inputs (line 338) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 342) | def test_conversion_reversible(self): FILE: benchmark/third_party/transformers/tests/models/clip/test_feature_extraction_clip.py class CLIPFeatureExtractionTester (line 36) | class CLIPFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 69) | def prepare_feat_extract_dict(self): method prepare_inputs (line 81) | def prepare_inputs(self, equal_resolution=False, numpify=False, torchi... class CLIPFeatureExtractionTest (line 114) | class CLIPFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 118) | def setUp(self): method feat_extract_dict (line 122) | def feat_extract_dict(self): method test_feat_extract_properties (line 125) | def test_feat_extract_properties(self): method test_batch_feature (line 136) | def test_batch_feature(self): method test_call_pil (line 139) | def test_call_pil(self): method test_call_numpy (line 171) | def test_call_numpy(self): method test_call_pytorch (line 203) | def test_call_pytorch(self): class CLIPFeatureExtractionTestFourChannels (line 238) | class CLIPFeatureExtractionTestFourChannels(FeatureExtractionSavingTestM... method setUp (line 242) | def setUp(self): method feat_extract_dict (line 247) | def feat_extract_dict(self): method test_feat_extract_properties (line 250) | def test_feat_extract_properties(self): method test_batch_feature (line 261) | def test_batch_feature(self): method test_call_pil_four_channels (line 264) | def test_call_pil_four_channels(self): FILE: benchmark/third_party/transformers/tests/models/clip/test_modeling_clip.py class CLIPVisionModelTester (line 70) | class CLIPVisionModelTester: method __init__ (line 71) | def __init__( method prepare_config_and_inputs (line 107) | def prepare_config_and_inputs(self): method get_config (line 113) | 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 CLIPVisionModelTest (line 148) | class CLIPVisionModelTest(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_common_attributes (line 171) | def test_model_common_attributes(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 196) | def test_training(self): method test_training_gradient_checkpointing (line 199) | def test_training_gradient_checkpointing(self): method test_save_load_fast_init_from_base (line 203) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 207) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 211) | def test_model_from_pretrained(self): class CLIPTextModelTester (line 217) | class CLIPTextModelTester: method __init__ (line 218) | def __init__( method prepare_config_and_inputs (line 254) | def prepare_config_and_inputs(self): method get_config (line 272) | def get_config(self): method create_and_check_model (line 285) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 295) | def prepare_config_and_inputs_for_common(self): class CLIPTextModelTest (line 303) | class CLIPTextModelTest(ModelTesterMixin, unittest.TestCase): 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_training (line 321) | def test_training(self): method test_training_gradient_checkpointing (line 324) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 328) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 332) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 336) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 340) | def test_model_from_pretrained(self): class CLIPModelTester (line 346) | class CLIPModelTester: method __init__ (line 347) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 353) | def prepare_config_and_inputs(self): method get_config (line 361) | def get_config(self): method create_and_check_model (line 366) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 377) | def prepare_config_and_inputs_for_common(self): class CLIPModelTest (line 390) | class CLIPModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 398) | def setUp(self): method test_model (line 401) | def test_model(self): method test_hidden_states_output (line 406) | def test_hidden_states_output(self): method test_inputs_embeds (line 410) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 414) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 418) | def test_model_common_attributes(self): method test_initialization (line 422) | def test_initialization(self): method _create_and_check_torchscript (line 445) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 496) | def test_load_vision_text_config(self): method test_equivalence_pt_to_flax (line 514) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 571) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 631) | def test_model_from_pretrained(self): function prepare_img (line 638) | def prepare_img(): class CLIPModelIntegrationTest (line 646) | class CLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 648) | def test_inference(self): FILE: benchmark/third_party/transformers/tests/models/clip/test_modeling_flax_clip.py class FlaxCLIPVisionModelTester (line 27) | class FlaxCLIPVisionModelTester: method __init__ (line 28) | def __init__( method prepare_config_and_inputs (line 60) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 77) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPVisionModelTest (line 85) | class FlaxCLIPVisionModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 93) | def setUp(self): method test_forward_signature (line 96) | def test_forward_signature(self): method test_jit_compilation (line 108) | def test_jit_compilation(self): method test_hidden_states_output (line 131) | def test_hidden_states_output(self): method test_attention_outputs (line 163) | def test_attention_outputs(self): method test_save_load_from_base (line 213) | def test_save_load_from_base(self): method test_save_load_to_base (line 217) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 222) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 227) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 232) | def test_save_load_bf16_to_base_pt(self): method test_model_from_pretrained (line 236) | def test_model_from_pretrained(self): class FlaxCLIPTextModelTester (line 243) | class FlaxCLIPTextModelTester: method __init__ (line 244) | def __init__( method prepare_config_and_inputs (line 280) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 308) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPTextModelTest (line 316) | class FlaxCLIPTextModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 319) | def setUp(self): method test_save_load_from_base (line 323) | def test_save_load_from_base(self): method test_save_load_to_base (line 327) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 332) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 337) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 342) | def test_save_load_bf16_to_base_pt(self): method test_model_from_pretrained (line 346) | def test_model_from_pretrained(self): class FlaxCLIPModelTester (line 353) | class FlaxCLIPModelTester: method __init__ (line 354) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 360) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 368) | def prepare_config_and_inputs_for_common(self): class FlaxCLIPModelTest (line 380) | class FlaxCLIPModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 384) | def setUp(self): method test_hidden_states_output (line 388) | def test_hidden_states_output(self): method test_jit_compilation (line 391) | def test_jit_compilation(self): method test_forward_signature (line 414) | def test_forward_signature(self): method test_get_image_features (line 426) | def test_get_image_features(self): method test_get_text_features (line 444) | def test_get_text_features(self): method test_model_from_pretrained (line 463) | def test_model_from_pretrained(self): method test_equivalence_pt_to_flax (line 472) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 513) | def test_equivalence_flax_to_pt(self): method test_from_pretrained_save_pretrained (line 557) | def test_from_pretrained_save_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/clip/test_modeling_tf_clip.py class TFCLIPVisionModelTester (line 46) | class TFCLIPVisionModelTester: method __init__ (line 47) | def __init__( method prepare_config_and_inputs (line 79) | def prepare_config_and_inputs(self): method get_config (line 85) | def get_config(self): method create_and_check_model (line 99) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 109) | def prepare_config_and_inputs_for_common(self): class TFCLIPVisionModelTest (line 117) | class TFCLIPVisionModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 130) | def setUp(self): method test_config (line 134) | def test_config(self): method test_inputs_embeds (line 137) | def test_inputs_embeds(self): method test_graph_mode_with_inputs_embeds (line 141) | def test_graph_mode_with_inputs_embeds(self): method test_model_common_attributes (line 145) | def test_model_common_attributes(self): method test_forward_signature (line 154) | def test_forward_signature(self): method test_model (line 166) | def test_model(self): method test_attention_outputs (line 170) | def test_attention_outputs(self): method test_hidden_states_output (line 217) | def test_hidden_states_output(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 260) | def test_saved_model_creation_extended(self): class TFCLIPTextModelTester (line 316) | class TFCLIPTextModelTester: method __init__ (line 317) | def __init__( method prepare_config_and_inputs (line 353) | def prepare_config_and_inputs(self): method get_config (line 370) | def get_config(self): method create_and_check_model (line 383) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 390) | def prepare_config_and_inputs_for_common(self): class TFCLIPTextModelTest (line 398) | class TFCLIPTextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 405) | def setUp(self): method test_config (line 409) | def test_config(self): method test_model (line 412) | def test_model(self): method test_inputs_embeds (line 416) | def test_inputs_embeds(self): method test_model_from_pretrained (line 421) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 427) | def test_saved_model_creation_extended(self): class TFCLIPModelTester (line 475) | class TFCLIPModelTester: method __init__ (line 476) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 482) | def prepare_config_and_inputs(self): method get_config (line 490) | def get_config(self): method create_and_check_model (line 495) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 505) | def prepare_config_and_inputs_for_common(self): class TFCLIPModelTest (line 518) | class TFCLIPModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 526) | def setUp(self): method test_model (line 529) | def test_model(self): method test_hidden_states_output (line 534) | def test_hidden_states_output(self): method test_inputs_embeds (line 538) | def test_inputs_embeds(self): method test_model_common_attributes (line 542) | def test_model_common_attributes(self): method test_keras_save_load (line 547) | def test_keras_save_load(self): method test_model_from_pretrained (line 604) | def test_model_from_pretrained(self): method test_saved_model_creation (line 611) | def test_saved_model_creation(self): method test_saved_model_creation_extended (line 616) | def test_saved_model_creation_extended(self): method test_prepare_serving_output (line 621) | def test_prepare_serving_output(self): function prepare_img (line 626) | def prepare_img(): class TFCLIPModelIntegrationTest (line 634) | class TFCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 636) | def test_inference(self): FILE: benchmark/third_party/transformers/tests/models/clip/test_processor_clip.py class CLIPProcessorTest (line 37) | class CLIPProcessorTest(unittest.TestCase): method setUp (line 38) | def setUp(self): method get_tokenizer (line 68) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 71) | def get_rust_tokenizer(self, **kwargs): method get_feature_extractor (line 74) | def get_feature_extractor(self, **kwargs): method tearDown (line 77) | def tearDown(self): method prepare_image_inputs (line 80) | 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 115) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 132) | def test_feature_extractor(self): method test_tokenizer (line 146) | def test_tokenizer(self): method test_processor (line 161) | def test_processor(self): method test_tokenizer_decode (line 178) | def test_tokenizer_decode(self): FILE: benchmark/third_party/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 54) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 58) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 62) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 67) | def test_full_tokenizer(self): method test_check_encoding_slow_fast (line 79) | def test_check_encoding_slow_fast(self): method test_offsets_mapping_with_different_add_prefix_space_argument (line 136) | def test_offsets_mapping_with_different_add_prefix_space_argument(self): method test_log_warning (line 167) | def test_log_warning(self): method test_tokenization_python_rust_equals (line 180) | def test_tokenization_python_rust_equals(self): method test_added_tokens_do_lower_case (line 184) | def test_added_tokens_do_lower_case(self): FILE: benchmark/third_party/transformers/tests/models/codegen/test_modeling_codegen.py class CodeGenModelTester (line 34) | class CodeGenModelTester: method __init__ (line 35) | 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 131) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 151) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_codegen_model (line 180) | def create_and_check_codegen_model(self, config, input_ids, input_mask... method create_and_check_codegen_model_past (line 192) | def create_and_check_codegen_model_past(self, config, input_ids, input... method create_and_check_codegen_model_attention_mask_past (line 228) | def create_and_check_codegen_model_attention_mask_past( method create_and_check_codegen_model_past_large_inputs (line 270) | def create_and_check_codegen_model_past_large_inputs( method create_and_check_lm_head_model (line 308) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 317) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 330) | def prepare_config_and_inputs_for_common(self): class CodeGenModelTest (line 351) | class CodeGenModelTest(ModelTesterMixin, GenerationTesterMixin, unittest... method _prepare_for_class (line 362) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 366) | def setUp(self): method test_config (line 370) | def test_config(self): method test_codegen_model (line 373) | def test_codegen_model(self): method test_codegen_model_past (line 377) | def test_codegen_model_past(self): method test_codegen_model_att_mask_past (line 381) | def test_codegen_model_att_mask_past(self): method test_codegen_model_past_large_inputs (line 385) | def test_codegen_model_past_large_inputs(self): method test_codegen_lm_head_model (line 389) | def test_codegen_lm_head_model(self): method test_codegen_gradient_checkpointing (line 393) | def test_codegen_gradient_checkpointing(self): method test_batch_generation (line 398) | def test_batch_generation(self): method test_model_from_pretrained (line 454) | def test_model_from_pretrained(self): class CodeGenModelLanguageGenerationTest (line 461) | class CodeGenModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_codegen (line 463) | def test_lm_generate_codegen(self): method test_codegen_sample (line 483) | def test_codegen_sample(self): method test_codegen_sample_max_time (line 516) | def test_codegen_sample_max_time(self): FILE: benchmark/third_party/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 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_truncation (line 252) | def test_truncation(self): method test_padding_different_model_input_name (line 264) | def test_padding_different_model_input_name(self): FILE: benchmark/third_party/transformers/tests/models/conditional_detr/test_feature_extraction_conditional_detr.py class ConditionalDetrFeatureExtractionTester (line 38) | class ConditionalDetrFeatureExtractionTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): method get_expected_values (line 75) | def get_expected_values(self, image_inputs, batched=False): class ConditionalDetrFeatureExtractionTest (line 109) | class ConditionalDetrFeatureExtractionTest(FeatureExtractionSavingTestMi... method setUp (line 113) | def setUp(self): method feat_extract_dict (line 117) | def feat_extract_dict(self): method test_feat_extract_properties (line 120) | def test_feat_extract_properties(self): method test_batch_feature (line 129) | def test_batch_feature(self): method test_call_pil (line 132) | def test_call_pil(self): method test_call_numpy (line 164) | def test_call_numpy(self): method test_call_pytorch (line 197) | def test_call_pytorch(self): method test_equivalence_pad_and_create_pixel_mask (line 230) | def test_equivalence_pad_and_create_pixel_mask(self): method test_call_pytorch_with_coco_detection_annotations (line 251) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 295) | def test_call_pytorch_with_coco_panoptic_annotations(self): FILE: benchmark/third_party/transformers/tests/models/conditional_detr/test_modeling_conditional_detr.py class ConditionalDetrModelTester (line 43) | class ConditionalDetrModelTester: 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 122) | def prepare_config_and_inputs_for_common(self): method create_and_check_conditional_detr_model (line 127) | def create_and_check_conditional_detr_model(self, config, pixel_values... method create_and_check_conditional_detr_object_detection_head_model (line 139) | def create_and_check_conditional_detr_object_detection_head_model(self... class ConditionalDetrModelTest (line 158) | class ConditionalDetrModelTest(ModelTesterMixin, GenerationTesterMixin, ... method _prepare_for_class (line 175) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 201) | def setUp(self): method test_config (line 205) | def test_config(self): method test_conditional_detr_model (line 208) | def test_conditional_detr_model(self): method test_conditional_detr_object_detection_head_model (line 212) | def test_conditional_detr_object_detection_head_model(self): method test_inputs_embeds (line 217) | def test_inputs_embeds(self): method test_model_common_attributes (line 221) | def test_model_common_attributes(self): method test_generate_without_input_ids (line 225) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 229) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 233) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 237) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 339) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 375) | def test_forward_signature(self): method test_different_timm_backbone (line 396) | def test_different_timm_backbone(self): method test_initialization (line 419) | def test_initialization(self): function prepare_img (line 447) | def prepare_img(): class ConditionalDetrModelIntegrationTests (line 455) | class ConditionalDetrModelIntegrationTests(unittest.TestCase): method default_feature_extractor (line 457) | def default_feature_extractor(self): method test_inference_no_head (line 464) | def test_inference_no_head(self): method test_inference_object_detection_head (line 481) | def test_inference_object_detection_head(self): FILE: benchmark/third_party/transformers/tests/models/convbert/test_modeling_convbert.py class ConvBertModelTester (line 43) | class ConvBertModelTester: method __init__ (line 44) | 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 prepare_config_and_inputs_for_decoder (line 131) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 158) | def create_and_check_model( method create_and_check_for_masked_lm (line 169) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 178) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 194) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 204) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 214) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 232) | def prepare_config_and_inputs_for_common(self): class ConvBertModelTest (line 248) | class ConvBertModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 265) | def setUp(self): method test_config (line 269) | def test_config(self): method test_model (line 272) | def test_model(self): method test_for_masked_lm (line 276) | def test_for_masked_lm(self): method test_for_multiple_choice (line 280) | def test_for_multiple_choice(self): method test_for_question_answering (line 284) | def test_for_question_answering(self): method test_for_sequence_classification (line 288) | def test_for_sequence_classification(self): method test_for_token_classification (line 292) | def test_for_token_classification(self): method test_model_from_pretrained (line 297) | def test_model_from_pretrained(self): method test_attention_outputs (line 302) | def test_attention_outputs(self): method test_torchscript_device_change (line 419) | def test_torchscript_device_change(self): class ConvBertModelIntegrationTest (line 442) | class ConvBertModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 444) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/convbert/test_modeling_tf_convbert.py class TFConvBertModelTester (line 39) | class TFConvBertModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method create_and_check_model (line 128) | def create_and_check_model( method create_and_check_for_masked_lm (line 141) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 153) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 167) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 183) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 196) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 210) | def prepare_config_and_inputs_for_common(self): class TFConvBertModelTest (line 226) | class TFConvBertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 244) | def setUp(self): method test_config (line 248) | def test_config(self): method test_model (line 251) | def test_model(self): method test_for_masked_lm (line 255) | def test_for_masked_lm(self): method test_for_multiple_choice (line 259) | def test_for_multiple_choice(self): method test_for_question_answering (line 263) | def test_for_question_answering(self): method test_for_sequence_classification (line 267) | def test_for_sequence_classification(self): method test_for_token_classification (line 271) | def test_for_token_classification(self): method test_saved_model_creation_extended (line 276) | def test_saved_model_creation_extended(self): method test_model_from_pretrained (line 324) | def test_model_from_pretrained(self): method test_attention_outputs (line 328) | def test_attention_outputs(self): class TFConvBertModelIntegrationTest (line 391) | class TFConvBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 393) | def test_inference_masked_lm(self): FILE: benchmark/third_party/transformers/tests/models/convnext/test_feature_extraction_convnext.py class ConvNextFeatureExtractionTester (line 36) | class ConvNextFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): class ConvNextFeatureExtractionTest (line 78) | class ConvNextFeatureExtractionTest(FeatureExtractionSavingTestMixin, un... method setUp (line 82) | def setUp(self): method feat_extract_dict (line 86) | def feat_extract_dict(self): method test_feat_extract_properties (line 89) | def test_feat_extract_properties(self): method test_batch_feature (line 98) | def test_batch_feature(self): method test_call_pil (line 101) | def test_call_pil(self): method test_call_numpy (line 133) | def test_call_numpy(self): method test_call_pytorch (line 165) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/convnext/test_modeling_convnext.py class ConvNextModelTester (line 42) | class ConvNextModelTester: 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 98) | 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 117) | def prepare_config_and_inputs_for_common(self): class ConvNextModelTest (line 125) | class ConvNextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 146) | def setUp(self): method test_config (line 150) | def test_config(self): method create_and_test_config_common_properties (line 159) | def create_and_test_config_common_properties(self): method test_attention_outputs (line 163) | def test_attention_outputs(self): method test_inputs_embeds (line 167) | def test_inputs_embeds(self): method test_model_common_attributes (line 171) | 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_hidden_states_output (line 190) | def test_hidden_states_output(self): method test_for_image_classification (line 222) | def test_for_image_classification(self): method test_model_from_pretrained (line 227) | def test_model_from_pretrained(self): function prepare_img (line 234) | def prepare_img(): class ConvNextModelIntegrationTest (line 241) | class ConvNextModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 243) | def default_feature_extractor(self): method test_inference_image_classification_head (line 247) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/convnext/test_modeling_tf_convnext.py class TFConvNextModelTester (line 41) | class TFConvNextModelTester: method __init__ (line 42) | 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 TFConvNextModelTest (line 120) | class TFConvNextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self): method test_inputs_embeds (line 143) | def test_inputs_embeds(self): method test_keras_fit (line 150) | def test_keras_fit(self): method test_model_common_attributes (line 154) | 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 174) | def test_attention_outputs(self): method test_dataset_conversion (line 181) | def test_dataset_conversion(self): method test_hidden_states_output (line 184) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 213) | def test_model_outputs_equivalence(self): method test_for_image_classification (line 256) | def test_for_image_classification(self): method test_model_from_pretrained (line 261) | def test_model_from_pretrained(self): function prepare_img (line 267) | def prepare_img(): class TFConvNextModelIntegrationTest (line 274) | class TFConvNextModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 276) | def default_feature_extractor(self): method test_inference_image_classification_head (line 282) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/cpm/test_tokenization_cpm.py class CpmTokenizationTest (line 23) | class CpmTokenizationTest(XLNetModelTest): method test_pre_tokenization (line 24) | def test_pre_tokenization(self): FILE: benchmark/third_party/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 68) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method create_and_check_ctrl_model (line 123) | def create_and_check_ctrl_model(self, config, input_ids, input_mask, h... method create_and_check_lm_head_model (line 134) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method prepare_config_and_inputs_for_common (line 143) | def prepare_config_and_inputs_for_common(self): method create_and_check_ctrl_for_sequence_classification (line 162) | def create_and_check_ctrl_for_sequence_classification(self, config, in... class CTRLModelTest (line 173) | class CTRLModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method setUp (line 181) | def setUp(self): method tearDown (line 185) | def tearDown(self): method test_config (line 191) | def test_config(self): method test_ctrl_model (line 194) | def test_ctrl_model(self): method test_ctrl_lm_head_model (line 198) | def test_ctrl_lm_head_model(self): method test_model_from_pretrained (line 203) | def test_model_from_pretrained(self): class CTRLModelLanguageGenerationTest (line 210) | class CTRLModelLanguageGenerationTest(unittest.TestCase): method tearDown (line 211) | def tearDown(self): method test_lm_generate_ctrl (line 218) | def test_lm_generate_ctrl(self): FILE: benchmark/third_party/transformers/tests/models/ctrl/test_modeling_tf_ctrl.py class TFCTRLModelTester (line 37) | class TFCTRLModelTester(object): method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 67) | def prepare_config_and_inputs(self): method create_and_check_ctrl_model (line 119) | def create_and_check_ctrl_model(self, config, input_ids, input_mask, h... method create_and_check_ctrl_lm_head (line 131) | def create_and_check_ctrl_lm_head(self, config, input_ids, input_mask,... method create_and_check_ctrl_for_sequence_classification (line 137) | def create_and_check_ctrl_for_sequence_classification( method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): class TFCTRLModelTest (line 171) | class TFCTRLModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 178) | def setUp(self): method test_config (line 182) | def test_config(self): method test_ctrl_model (line 185) | def test_ctrl_model(self): method test_ctrl_lm_head (line 189) | def test_ctrl_lm_head(self): method test_ctrl_sequence_classification_model (line 193) | def test_ctrl_sequence_classification_model(self): method test_model_common_attributes (line 197) | def test_model_common_attributes(self): method test_model_from_pretrained (line 225) | def test_model_from_pretrained(self): class TFCTRLModelLanguageGenerationTest (line 232) | class TFCTRLModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_ctrl (line 234) | def test_lm_generate_ctrl(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/cvt/test_modeling_cvt.py class CvtConfigTester (line 43) | class CvtConfigTester(ConfigTester): method create_and_test_config_common_properties (line 44) | def create_and_test_config_common_properties(self): class CvtModelTester (line 50) | class CvtModelTester: method __init__ (line 51) | 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 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 138) | def prepare_config_and_inputs_for_common(self): class CvtModelTest (line 146) | class CvtModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 160) | def setUp(self): method test_config (line 164) | def test_config(self): method create_and_test_config_common_properties (line 173) | def create_and_test_config_common_properties(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_common_attributes (line 185) | def test_model_common_attributes(self): method test_forward_signature (line 188) | def test_forward_signature(self): method test_model (line 200) | def test_model(self): method test_hidden_states_output (line 204) | def test_hidden_states_output(self): method test_for_image_classification (line 240) | def test_for_image_classification(self): method test_model_from_pretrained (line 245) | def test_model_from_pretrained(self): function prepare_img (line 252) | def prepare_img(): class CvtModelIntegrationTest (line 259) | class CvtModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 261) | def default_feature_extractor(self): method test_inference_image_classification_head (line 265) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/cvt/test_modeling_tf_cvt.py class TFCvtConfigTester (line 31) | class TFCvtConfigTester(ConfigTester): method create_and_test_config_common_properties (line 32) | def create_and_test_config_common_properties(self): class TFCvtModelTester (line 38) | class TFCvtModelTester: method __init__ (line 39) | 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 107) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 117) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 123) | def prepare_config_and_inputs_for_common(self): class TFCvtModelTest (line 131) | class TFCvtModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 144) | def setUp(self): method test_config (line 148) | def test_config(self): method test_attention_outputs (line 158) | def test_attention_outputs(self): method test_inputs_embeds (line 162) | def test_inputs_embeds(self): method test_model_common_attributes (line 166) | def test_model_common_attributes(self): method test_dataset_conversion (line 173) | def test_dataset_conversion(self): method test_keras_fit (line 180) | def test_keras_fit(self): method test_forward_signature (line 183) | def test_forward_signature(self): method test_hidden_states_output (line 195) | def test_hidden_states_output(self): method test_model (line 227) | def test_model(self): method test_for_image_classification (line 231) | def test_for_image_classification(self): method test_model_from_pretrained (line 236) | def test_model_from_pretrained(self): function prepare_img (line 243) | def prepare_img(): class TFCvtModelIntegrationTest (line 250) | class TFCvtModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 252) | def default_feature_extractor(self): method test_inference_image_classification_head (line 256) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/data2vec/test_modeling_data2vec_audio.py class Data2VecAudioModelTester (line 45) | class Data2VecAudioModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 118) | def prepare_config_and_inputs(self): method get_config (line 126) | def get_config(self): method create_and_check_model (line 155) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 164) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_proj_dim (line 174) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_batch_inference (line 186) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 212) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 240) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 265) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 294) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 317) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 340) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 354) | def prepare_config_and_inputs_for_common(self): class Data2VecAudioModelTest (line 361) | class Data2VecAudioModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 376) | def setUp(self): method test_config (line 380) | def test_config(self): method test_model (line 383) | def test_model(self): method test_model_with_adapter (line 387) | def test_model_with_adapter(self): method test_model_with_adapter_proj_dim (line 391) | def test_model_with_adapter_proj_dim(self): method test_ctc_loss_inference (line 395) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 399) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 403) | def test_ctc_train(self): method test_seq_classifier_train (line 407) | def test_seq_classifier_train(self): method test_xvector_train (line 411) | def test_xvector_train(self): method test_labels_out_of_vocab (line 415) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 420) | def test_inputs_embeds(self): method test_forward_signature (line 424) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 429) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 435) | def test_model_common_attributes(self): method test_equivalence_flax_to_pt (line 440) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 445) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 448) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 488) | def test_initialization(self): method _mock_init_weights (line 522) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 536) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 559) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 583) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 587) | def test_model_from_pretrained(self): class Data2VecAudioUtilsTest (line 593) | class Data2VecAudioUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 594) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 605) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 635) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 648) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 667) | def test_compute_mask_indices_short_audio(self): class Data2VecAudioModelIntegrationTest (line 688) | class Data2VecAudioModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 689) | def _load_datasamples(self, num_samples): method _load_superb (line 698) | def _load_superb(self, task, num_samples): method test_inference_ctc_normal (line 703) | def test_inference_ctc_normal(self): method test_inference_ctc_batched (line 720) | def test_inference_ctc_batched(self): FILE: benchmark/third_party/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 75) | def prepare_config_and_inputs(self): method get_config (line 98) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 113) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 140) | def create_and_check_model( method create_and_check_model_as_decoder (line 153) | 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 204) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 272) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 281) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 291) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 309) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 325) | def prepare_config_and_inputs_for_common(self): class Data2VecTextModelTest (line 341) | class Data2VecTextModelTest(ModelTesterMixin, GenerationTesterMixin, uni... method setUp (line 357) | def setUp(self): method test_config (line 361) | def test_config(self): method test_model (line 364) | def test_model(self): method test_model_various_embeddings (line 368) | def test_model_various_embeddings(self): method test_model_as_decoder (line 374) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 378) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 406) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 410) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 414) | def test_for_masked_lm(self): method test_for_token_classification (line 418) | def test_for_token_classification(self): method test_for_multiple_choice (line 422) | def test_for_multiple_choice(self): method test_for_question_answering (line 426) | def test_for_question_answering(self): method test_model_from_pretrained (line 431) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 436) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 455) | def test_create_position_ids_from_inputs_embeds(self): class Data2VecTextModelIntegrationTest (line 479) | class Data2VecTextModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 481) | def test_inference_masked_lm(self): method test_inference_no_head (line 495) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/data2vec/test_modeling_data2vec_vision.py class Data2VecVisionModelTester (line 49) | class Data2VecVisionModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 98) | 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, pixel_l... method create_and_check_for_image_classification (line 138) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_image_segmentation (line 146) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 160) | def prepare_config_and_inputs_for_common(self): class Data2VecVisionModelTest (line 168) | class Data2VecVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 184) | def setUp(self): method test_config (line 190) | def test_config(self): method test_inputs_embeds (line 193) | def test_inputs_embeds(self): method test_multi_gpu_data_parallel_forward (line 201) | def test_multi_gpu_data_parallel_forward(self): method test_model_common_attributes (line 204) | def test_model_common_attributes(self): method test_forward_signature (line 213) | def test_forward_signature(self): method test_model (line 225) | def test_model(self): method test_for_image_segmentation (line 229) | def test_for_image_segmentation(self): method test_training (line 233) | def test_training(self): method test_training_gradient_checkpointing (line 251) | def test_training_gradient_checkpointing(self): method test_initialization (line 277) | def test_initialization(self): method check_pt_tf_outputs (line 295) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_for_image_classification (line 299) | def test_for_image_classification(self): method test_model_from_pretrained (line 304) | def test_model_from_pretrained(self): function prepare_img (line 311) | def prepare_img(): class Data2VecVisionModelIntegrationTest (line 318) | class Data2VecVisionModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 320) | def default_feature_extractor(self): method test_inference_image_classification_head_imagenet_1k (line 328) | def test_inference_image_classification_head_imagenet_1k(self): FILE: benchmark/third_party/transformers/tests/models/data2vec/test_modeling_tf_data2vec_vision.py class TFData2VecVisionModelTester (line 49) | class TFData2VecVisionModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method get_config (line 107) | def get_config(self): method create_and_check_model (line 125) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 142) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_image_segmentation (line 149) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 161) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_keras_fit (line 167) | def prepare_config_and_inputs_for_keras_fit(self): class TFData2VecVisionModelTest (line 175) | class TFData2VecVisionModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 192) | def setUp(self): method test_config (line 198) | def test_config(self): method test_inputs_embeds (line 202) | def test_inputs_embeds(self): method test_model_common_attributes (line 206) | def test_model_common_attributes(self): method test_forward_signature (line 215) | def test_forward_signature(self): method test_model (line 227) | def test_model(self): method test_for_image_segmentation (line 231) | def test_for_image_segmentation(self): method test_compile_tf_model (line 236) | def test_compile_tf_model(self): method test_attention_outputs (line 239) | def test_attention_outputs(self): method test_hidden_states_output (line 301) | def test_hidden_states_output(self): method test_keras_fit (line 346) | def test_keras_fit(self): method check_pt_tf_outputs (line 385) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_loss_computation (line 390) | def test_loss_computation(self): method test_for_image_classification (line 446) | def test_for_image_classification(self): method test_model_from_pretrained (line 451) | def test_model_from_pretrained(self): function prepare_img (line 458) | def prepare_img(): class TFData2VecVisionModelIntegrationTest (line 465) | class TFData2VecVisionModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 467) | def default_feature_extractor(self): method test_inference_image_classification_head_imagenet_1k (line 475) | def test_inference_image_classification_head_imagenet_1k(self): FILE: benchmark/third_party/transformers/tests/models/deberta/test_modeling_deberta.py class DebertaModelTester (line 37) | class DebertaModelTester(object): 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, unittest.TestCase): method setUp (line 236) | def setUp(self): method test_config (line 240) | def test_config(self): method test_deberta_model (line 243) | def test_deberta_model(self): method test_for_sequence_classification (line 247) | def test_for_sequence_classification(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_token_classification (line 259) | def test_for_token_classification(self): method test_model_from_pretrained (line 264) | def test_model_from_pretrained(self): class DebertaModelIntegrationTest (line 273) | class DebertaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 275) | def test_inference_masked_lm(self): method test_inference_no_head (line 279) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/deberta/test_modeling_tf_deberta.py class TFDebertaModelTester (line 38) | class TFDebertaModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 90) | def prepare_config_and_inputs(self): method create_and_check_model (line 128) | def create_and_check_model( method create_and_check_for_masked_lm (line 141) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 153) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 167) | 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 194) | def prepare_config_and_inputs_for_common(self): class TFDebertaModelTest (line 210) | class TFDebertaModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 227) | def setUp(self): method test_config (line 231) | def test_config(self): method test_model (line 234) | def test_model(self): method test_for_masked_lm (line 238) | def test_for_masked_lm(self): method test_for_question_answering (line 242) | def test_for_question_answering(self): method test_for_sequence_classification (line 246) | def test_for_sequence_classification(self): method test_for_token_classification (line 250) | def test_for_token_classification(self): method test_model_from_pretrained (line 255) | def test_model_from_pretrained(self): class TFDeBERTaModelIntegrationTest (line 261) | class TFDeBERTaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 263) | def test_inference_masked_lm(self): method test_inference_no_head (line 267) | def test_inference_no_head(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/deberta_v2/test_modeling_deberta_v2.py class DebertaV2ModelTester (line 38) | class DebertaV2ModelTester(object): 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, unittest.TestCase): method setUp (line 250) | def setUp(self): method test_config (line 254) | def test_config(self): method test_deberta_model (line 257) | def test_deberta_model(self): method test_for_sequence_classification (line 261) | def test_for_sequence_classification(self): method test_for_masked_lm (line 265) | def test_for_masked_lm(self): method test_for_question_answering (line 269) | def test_for_question_answering(self): method test_for_token_classification (line 273) | def test_for_token_classification(self): method test_for_multiple_choice (line 277) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 282) | def test_model_from_pretrained(self): class DebertaV2ModelIntegrationTest (line 291) | class DebertaV2ModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 293) | def test_inference_masked_lm(self): method test_inference_no_head (line 297) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/deberta_v2/test_modeling_tf_deberta_v2.py class TFDebertaV2ModelTester (line 38) | class TFDebertaV2ModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method create_and_check_model (line 130) | def create_and_check_model( method create_and_check_for_masked_lm (line 143) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 155) | 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_question_answering (line 182) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 196) | def prepare_config_and_inputs_for_common(self): class TFDebertaModelTest (line 212) | class TFDebertaModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 229) | def setUp(self): method test_config (line 233) | def test_config(self): method test_model (line 236) | def test_model(self): method test_for_masked_lm (line 240) | def test_for_masked_lm(self): method test_for_question_answering (line 244) | def test_for_question_answering(self): method test_for_sequence_classification (line 248) | def test_for_sequence_classification(self): method test_for_token_classification (line 252) | def test_for_token_classification(self): method test_model_from_pretrained (line 257) | def test_model_from_pretrained(self): class TFDeBERTaV2ModelIntegrationTest (line 263) | class TFDeBERTaV2ModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 265) | def test_inference_masked_lm(self): method test_inference_no_head (line 269) | def test_inference_no_head(self): FILE: benchmark/third_party/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 64) | def test_vocab_size(self): method test_do_lower_case (line 67) | def test_do_lower_case(self): method test_split_by_punct (line 83) | def test_split_by_punct(self): method test_do_lower_case_split_by_punct (line 99) | def test_do_lower_case_split_by_punct(self): method test_do_lower_case_split_by_punct_false (line 113) | def test_do_lower_case_split_by_punct_false(self): method test_do_lower_case_false_split_by_punct (line 129) | def test_do_lower_case_false_split_by_punct(self): method test_do_lower_case_false_split_by_punct_false (line 145) | def test_do_lower_case_false_split_by_punct_false(self): method test_rust_and_python_full_tokenizers (line 161) | def test_rust_and_python_full_tokenizers(self): method test_full_tokenizer (line 181) | def test_full_tokenizer(self): method test_sequence_builders (line 225) | def test_sequence_builders(self): method test_tokenizer_integration (line 241) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/decision_transformer/test_modeling_decision_transformer.py class DecisionTransformerModelTester (line 38) | class DecisionTransformerModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 59) | def prepare_config_and_inputs(self): method get_config (line 79) | def get_config(self): method create_and_check_model (line 89) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 111) | def prepare_config_and_inputs_for_common(self): class DecisionTransformerModelTest (line 134) | class DecisionTransformerModelTest(ModelTesterMixin, GenerationTesterMix... method setUp (line 153) | def setUp(self): method test_config (line 157) | def test_config(self): method test_model (line 160) | def test_model(self): method test_model_from_pretrained (line 165) | def test_model_from_pretrained(self): method test_forward_signature (line 170) | def test_forward_signature(self): class DecisionTransformerModelIntegrationTest (line 192) | class DecisionTransformerModelIntegrationTest(unittest.TestCase): method test_autoregressive_prediction (line 194) | def test_autoregressive_prediction(self): FILE: benchmark/third_party/transformers/tests/models/deformable_detr/test_feature_extraction_deformable_detr.py class DeformableDetrFeatureExtractionTester (line 38) | class DeformableDetrFeatureExtractionTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): method get_expected_values (line 75) | def get_expected_values(self, image_inputs, batched=False): class DeformableDetrFeatureExtractionTest (line 109) | class DeformableDetrFeatureExtractionTest(FeatureExtractionSavingTestMix... method setUp (line 113) | def setUp(self): method feat_extract_dict (line 117) | def feat_extract_dict(self): method test_feat_extract_properties (line 120) | def test_feat_extract_properties(self): method test_batch_feature (line 129) | def test_batch_feature(self): method test_call_pil (line 132) | def test_call_pil(self): method test_call_numpy (line 164) | def test_call_numpy(self): method test_call_pytorch (line 197) | def test_call_pytorch(self): method test_equivalence_pad_and_create_pixel_mask (line 230) | def test_equivalence_pad_and_create_pixel_mask(self): method test_call_pytorch_with_coco_detection_annotations (line 251) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 295) | def test_call_pytorch_with_coco_panoptic_annotations(self): FILE: benchmark/third_party/transformers/tests/models/deformable_detr/test_modeling_deformable_detr.py class DeformableDetrModelTester (line 44) | class DeformableDetrModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method prepare_config_and_inputs_for_common (line 135) | def prepare_config_and_inputs_for_common(self): method create_and_check_deformable_detr_model (line 140) | def create_and_check_deformable_detr_model(self, config, pixel_values,... method create_and_check_deformable_detr_object_detection_head_model (line 150) | def create_and_check_deformable_detr_object_detection_head_model(self,... class DeformableDetrModelTest (line 169) | class DeformableDetrModelTest(ModelTesterMixin, GenerationTesterMixin, u... method _prepare_for_class (line 178) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 204) | def setUp(self): method test_config (line 208) | def test_config(self): method test_deformable_detr_model (line 216) | def test_deformable_detr_model(self): method test_deformable_detr_object_detection_head_model (line 220) | def test_deformable_detr_object_detection_head_model(self): method test_inputs_embeds (line 225) | def test_inputs_embeds(self): method test_model_common_attributes (line 229) | def test_model_common_attributes(self): method test_generate_without_input_ids (line 233) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 237) | def test_resize_tokens_embeddings(self): method test_feed_forward_chunking (line 241) | def test_feed_forward_chunking(self): method test_attention_outputs (line 244) | def test_attention_outputs(self): method test_model_outputs_equivalence (line 343) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 417) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 454) | def test_forward_signature(self): method test_different_timm_backbone (line 475) | def test_different_timm_backbone(self): method test_initialization (line 498) | def test_initialization(self): function prepare_img (line 527) | def prepare_img(): class DeformableDetrModelIntegrationTests (line 535) | class DeformableDetrModelIntegrationTests(unittest.TestCase): method default_feature_extractor (line 537) | def default_feature_extractor(self): method test_inference_object_detection_head (line 540) | def test_inference_object_detection_head(self): method test_inference_object_detection_head_with_box_refine_two_stage (line 581) | def test_inference_object_detection_head_with_box_refine_two_stage(self): method test_inference_object_detection_head_equivalence_cpu_gpu (line 612) | def test_inference_object_detection_head_equivalence_cpu_gpu(self): FILE: benchmark/third_party/transformers/tests/models/deit/test_feature_extraction_deit.py class DeiTFeatureExtractionTester (line 36) | class DeiTFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 67) | def prepare_feat_extract_dict(self): class DeiTFeatureExtractionTest (line 81) | class DeiTFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 85) | def setUp(self): method feat_extract_dict (line 89) | def feat_extract_dict(self): method test_feat_extract_properties (line 92) | def test_feat_extract_properties(self): method test_batch_feature (line 102) | def test_batch_feature(self): method test_call_pil (line 105) | def test_call_pil(self): method test_call_numpy (line 137) | def test_call_numpy(self): method test_call_pytorch (line 169) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/deit/test_modeling_deit.py class DeiTModelTester (line 53) | class DeiTModelTester: method __init__ (line 54) | 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 127) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 134) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 153) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 171) | def prepare_config_and_inputs_for_common(self): class DeiTModelTest (line 183) | class DeiTModelTest(ModelTesterMixin, unittest.TestCase): 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_common_attributes (line 215) | def test_model_common_attributes(self): method test_forward_signature (line 224) | def test_forward_signature(self): method test_model (line 236) | def test_model(self): method test_for_masked_image_modeling (line 240) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 244) | def test_for_image_classification(self): method _prepare_for_class (line 249) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_training (line 258) | def test_training(self): method test_training_gradient_checkpointing (line 279) | def test_training_gradient_checkpointing(self): method test_problem_types (line 301) | def test_problem_types(self): method test_model_from_pretrained (line 353) | def test_model_from_pretrained(self): function prepare_img (line 360) | def prepare_img(): class DeiTModelIntegrationTest (line 367) | class DeiTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 369) | def default_feature_extractor(self): method test_inference_image_classification_head (line 377) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/deit/test_modeling_tf_deit.py class TFDeiTModelTester (line 49) | class TFDeiTModelTester: method __init__ (line 50) | 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 123) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 128) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 143) | 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 TFDeiTModelTest (line 165) | class TFDeiTModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 187) | 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_common_attributes (line 198) | def test_model_common_attributes(self): method test_forward_signature (line 207) | def test_forward_signature(self): method test_model (line 219) | def test_model(self): method test_for_masked_image_modeling (line 223) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 227) | def test_for_image_classification(self): method _prepare_for_class (line 232) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model_from_pretrained (line 242) | def test_model_from_pretrained(self): function prepare_img (line 249) | def prepare_img(): class DeiTModelIntegrationTest (line 256) | class DeiTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 258) | def default_feature_extractor(self): method test_inference_image_classification_head (line 266) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/detr/test_feature_extraction_detr.py class DetrFeatureExtractionTester (line 38) | class DetrFeatureExtractionTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): method get_expected_values (line 75) | def get_expected_values(self, image_inputs, batched=False): class DetrFeatureExtractionTest (line 109) | class DetrFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 113) | def setUp(self): method feat_extract_dict (line 117) | def feat_extract_dict(self): method test_feat_extract_properties (line 120) | def test_feat_extract_properties(self): method test_batch_feature (line 129) | def test_batch_feature(self): method test_call_pil (line 132) | def test_call_pil(self): method test_call_numpy (line 164) | def test_call_numpy(self): method test_call_pytorch (line 197) | def test_call_pytorch(self): method test_equivalence_pad_and_create_pixel_mask (line 230) | def test_equivalence_pad_and_create_pixel_mask(self): method test_call_pytorch_with_coco_detection_annotations (line 251) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 295) | def test_call_pytorch_with_coco_panoptic_annotations(self): FILE: benchmark/third_party/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 122) | def prepare_config_and_inputs_for_common(self): method create_and_check_detr_model (line 127) | def create_and_check_detr_model(self, config, pixel_values, pixel_mask... method create_and_check_detr_object_detection_head_model (line 139) | def create_and_check_detr_object_detection_head_model(self, config, pi... class DetrModelTest (line 158) | class DetrModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method _prepare_for_class (line 175) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 201) | def setUp(self): method test_config (line 205) | def test_config(self): method test_detr_model (line 208) | def test_detr_model(self): method test_detr_object_detection_head_model (line 212) | def test_detr_object_detection_head_model(self): method test_inputs_embeds (line 217) | def test_inputs_embeds(self): method test_model_common_attributes (line 221) | def test_model_common_attributes(self): method test_generate_without_input_ids (line 225) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 229) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 233) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 237) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 339) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 375) | def test_forward_signature(self): method test_different_timm_backbone (line 396) | def test_different_timm_backbone(self): method test_greyscale_images (line 419) | def test_greyscale_images(self): method test_initialization (line 439) | def test_initialization(self): function prepare_img (line 467) | def prepare_img(): class DetrModelIntegrationTests (line 475) | class DetrModelIntegrationTests(unittest.TestCase): method default_feature_extractor (line 477) | def default_feature_extractor(self): method test_inference_no_head (line 480) | def test_inference_no_head(self): method test_inference_object_detection_head (line 497) | def test_inference_object_detection_head(self): method test_inference_panoptic_segmentation_head (line 523) | def test_inference_panoptic_segmentation_head(self): FILE: benchmark/third_party/transformers/tests/models/distilbert/test_modeling_distilbert.py class DistilBertModelTester (line 40) | class DistilBertModelTester(object): method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 108) | def get_config(self): method create_and_check_distilbert_model (line 122) | def create_and_check_distilbert_model( method create_and_check_distilbert_for_masked_lm (line 132) | def create_and_check_distilbert_for_masked_lm( method create_and_check_distilbert_for_question_answering (line 141) | def create_and_check_distilbert_for_question_answering( method create_and_check_distilbert_for_sequence_classification (line 153) | def create_and_check_distilbert_for_sequence_classification( method create_and_check_distilbert_for_token_classification (line 163) | def create_and_check_distilbert_for_token_classification( method create_and_check_distilbert_for_multiple_choice (line 174) | def create_and_check_distilbert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 190) | def prepare_config_and_inputs_for_common(self): class DistilBertModelTest (line 198) | class DistilBertModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 217) | def setUp(self): method test_config (line 221) | def test_config(self): method test_distilbert_model (line 224) | def test_distilbert_model(self): method test_for_masked_lm (line 228) | def test_for_masked_lm(self): method test_for_question_answering (line 232) | def test_for_question_answering(self): method test_for_sequence_classification (line 236) | def test_for_sequence_classification(self): method test_for_token_classification (line 240) | def test_for_token_classification(self): method test_for_multiple_choice (line 244) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 249) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 256) | def test_torchscript_device_change(self): class DistilBertModelIntergrationTest (line 279) | class DistilBertModelIntergrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 281) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/transformers/tests/models/distilbert/test_modeling_flax_distilbert.py class FlaxDistilBertModelTester (line 37) | class FlaxDistilBertModelTester(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 105) | def prepare_config_and_inputs_for_common(self): class FlaxDistilBertModelTest (line 113) | 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: benchmark/third_party/transformers/tests/models/distilbert/test_modeling_tf_distilbert.py class TFDistilBertModelTester (line 40) | class TFDistilBertModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method create_and_check_distilbert_model (line 98) | def create_and_check_distilbert_model( method create_and_check_distilbert_for_masked_lm (line 112) | def create_and_check_distilbert_for_masked_lm( method create_and_check_distilbert_for_question_answering (line 120) | def create_and_check_distilbert_for_question_answering( method create_and_check_distilbert_for_sequence_classification (line 132) | def create_and_check_distilbert_for_sequence_classification( method create_and_check_distilbert_for_multiple_choice (line 141) | def create_and_check_distilbert_for_multiple_choice( method create_and_check_distilbert_for_token_classification (line 155) | def create_and_check_distilbert_for_token_classification( method prepare_config_and_inputs_for_common (line 164) | def prepare_config_and_inputs_for_common(self): class TFDistilBertModelTest (line 172) | class TFDistilBertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 189) | def setUp(self): method test_config (line 193) | def test_config(self): method test_distilbert_model (line 196) | def test_distilbert_model(self): method test_for_masked_lm (line 200) | def test_for_masked_lm(self): method test_for_question_answering (line 204) | def test_for_question_answering(self): method test_for_sequence_classification (line 208) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 212) | def test_for_multiple_choice(self): method test_for_token_classification (line 216) | def test_for_token_classification(self): method test_model_from_pretrained (line 221) | def test_model_from_pretrained(self): class TFDistilBertModelIntegrationTest (line 228) | class TFDistilBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 230) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/donut/test_feature_extraction_donut.py class DonutFeatureExtractionTester (line 36) | class DonutFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 69) | def prepare_feat_extract_dict(self): class DonutFeatureExtractionTest (line 84) | class DonutFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitt... method setUp (line 88) | def setUp(self): method feat_extract_dict (line 92) | def feat_extract_dict(self): method test_feat_extract_properties (line 95) | def test_feat_extract_properties(self): method test_batch_feature (line 106) | def test_batch_feature(self): method test_call_pil (line 109) | def test_call_pil(self): method test_call_numpy (line 141) | def test_call_numpy(self): method test_call_pytorch (line 173) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/donut/test_modeling_donut_swin.py class DonutSwinModelTester (line 37) | class DonutSwinModelTester: method __init__ (line 38) | 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 123) | def create_and_check_model(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 134) | def prepare_config_and_inputs_for_common(self): class DonutSwinModelTest (line 146) | class DonutSwinModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 155) | def setUp(self): method test_config (line 159) | def test_config(self): method create_and_test_config_common_properties (line 168) | def create_and_test_config_common_properties(self): method test_model (line 171) | def test_model(self): method test_inputs_embeds (line 175) | def test_inputs_embeds(self): method test_model_common_attributes (line 179) | 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 check_hidden_states_output (line 260) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 301) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 320) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 348) | def test_model_from_pretrained(self): method test_initialization (line 353) | def test_initialization(self): FILE: benchmark/third_party/transformers/tests/models/dpr/test_modeling_dpr.py class DPRModelTester (line 38) | class DPRModelTester: method __init__ (line 39) | 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_context_encoder (line 128) | def create_and_check_context_encoder( method create_and_check_question_encoder (line 139) | def create_and_check_question_encoder( method create_and_check_reader (line 150) | def create_and_check_reader( method prepare_config_and_inputs_for_common (line 165) | def prepare_config_and_inputs_for_common(self): class DPRModelTest (line 181) | class DPRModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 198) | def setUp(self): method test_config (line 202) | def test_config(self): method test_context_encoder_model (line 205) | def test_context_encoder_model(self): method test_question_encoder_model (line 209) | def test_question_encoder_model(self): method test_reader_model (line 213) | def test_reader_model(self): method test_init_changed_config (line 217) | def test_init_changed_config(self): method test_model_from_pretrained (line 231) | def test_model_from_pretrained(self): class DPRModelIntegrationTest (line 250) | class DPRModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 252) | def test_inference_no_head(self): method test_reader_inference (line 282) | def test_reader_inference(self): FILE: benchmark/third_party/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, unittest.TestCase): 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: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/dpt/test_feature_extraction_dpt.py class DPTFeatureExtractionTester (line 36) | class DPTFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 63) | def prepare_feat_extract_dict(self): class DPTFeatureExtractionTest (line 75) | class DPTFeatureExtractionTest(FeatureExtractionSavingTestMixin, unittes... method setUp (line 79) | def setUp(self): method feat_extract_dict (line 83) | def feat_extract_dict(self): method test_feat_extract_properties (line 86) | def test_feat_extract_properties(self): method test_call_pil (line 94) | def test_call_pil(self): method test_call_numpy (line 126) | def test_call_numpy(self): method test_call_pytorch (line 158) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/dpt/test_modeling_dpt.py class DPTModelTester (line 44) | class DPTModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 88) | 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_depth_estimation (line 123) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method create_and_check_for_semantic_segmentation (line 131) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 141) | def prepare_config_and_inputs_for_common(self): class DPTModelTest (line 149) | class DPTModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 161) | 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_common_attributes (line 172) | def test_model_common_attributes(self): method test_forward_signature (line 181) | def test_forward_signature(self): method test_model (line 193) | def test_model(self): method test_for_depth_estimation (line 197) | def test_for_depth_estimation(self): method test_for_semantic_segmentation (line 201) | def test_for_semantic_segmentation(self): method test_training (line 205) | def test_training(self): method test_training_gradient_checkpointing (line 223) | def test_training_gradient_checkpointing(self): method test_model_from_pretrained (line 243) | def test_model_from_pretrained(self): function prepare_img (line 250) | def prepare_img(): class DPTModelIntegrationTest (line 258) | class DPTModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 259) | def test_inference_depth_estimation(self): method test_inference_semantic_segmentation (line 281) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 302) | def test_post_processing_semantic_segmentation(self): FILE: benchmark/third_party/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 72) | def prepare_config_and_inputs(self): method get_config (line 105) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 121) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_electra_model (line 149) | def create_and_check_electra_model( method create_and_check_electra_model_as_decoder (line 168) | def create_and_check_electra_model_as_decoder( method create_and_check_electra_for_masked_lm (line 200) | def create_and_check_electra_for_masked_lm( method create_and_check_electra_for_causal_lm (line 217) | def create_and_check_electra_for_causal_lm( method create_and_check_electra_for_token_classification (line 235) | def create_and_check_electra_for_token_classification( method create_and_check_electra_for_pretraining (line 253) | def create_and_check_electra_for_pretraining( method create_and_check_electra_for_sequence_classification (line 271) | def create_and_check_electra_for_sequence_classification( method create_and_check_electra_for_question_answering (line 289) | def create_and_check_electra_for_question_answering( method create_and_check_electra_for_multiple_choice (line 313) | def create_and_check_electra_for_multiple_choice( method prepare_config_and_inputs_for_common (line 339) | def prepare_config_and_inputs_for_common(self): class ElectraModelTest (line 356) | class ElectraModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 375) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 385) | def setUp(self): method test_config (line 389) | def test_config(self): method test_electra_model (line 392) | def test_electra_model(self): method test_electra_model_as_decoder (line 396) | def test_electra_model_as_decoder(self): method test_electra_model_various_embeddings (line 400) | def test_electra_model_various_embeddings(self): method test_for_masked_lm (line 406) | def test_for_masked_lm(self): method test_for_token_classification (line 410) | def test_for_token_classification(self): method test_for_pre_training (line 414) | def test_for_pre_training(self): method test_for_sequence_classification (line 418) | def test_for_sequence_classification(self): method test_for_question_answering (line 422) | def test_for_question_answering(self): method test_for_multiple_choice (line 426) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 431) | def test_model_from_pretrained(self): method test_for_causal_lm (line 436) | def test_for_causal_lm(self): class ElectraModelIntegrationTest (line 442) | class ElectraModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 444) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/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 126) | def setUp(self): method test_model_from_pretrained (line 130) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/electra/test_modeling_tf_electra.py class TFElectraModelTester (line 40) | class TFElectraModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 69) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 104) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 131) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 145) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 161) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_base_model_past (line 193) | def create_and_check_causal_lm_base_model_past( method create_and_check_causal_lm_base_model_past_with_attn_mask (line 236) | def create_and_check_causal_lm_base_model_past_with_attn_mask( method create_and_check_causal_lm_base_model_past_large_inputs (line 297) | def create_and_check_causal_lm_base_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 349) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 415) | def create_and_check_for_masked_lm( method create_and_check_for_pretraining (line 423) | def create_and_check_for_pretraining( method create_and_check_for_sequence_classification (line 431) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 440) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 456) | def create_and_check_for_question_answering( method create_and_check_for_token_classification (line 465) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 474) | def prepare_config_and_inputs_for_common(self): class TFElectraModelTest (line 490) | class TFElectraModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 508) | def setUp(self): method test_config (line 512) | def test_config(self): method test_model (line 515) | def test_model(self): method test_causal_lm_base_model (line 520) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 528) | def test_model_as_decoder(self): method test_causal_lm_base_model_past (line 536) | def test_causal_lm_base_model_past(self): method test_causal_lm_base_model_past_with_attn_mask (line 541) | def test_causal_lm_base_model_past_with_attn_mask(self): method test_causal_lm_base_model_past_with_large_inputs (line 546) | def test_causal_lm_base_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 551) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 556) | def test_for_masked_lm(self): method test_for_pretraining (line 560) | def test_for_pretraining(self): method test_for_question_answering (line 564) | def test_for_question_answering(self): method test_for_sequence_classification (line 568) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 572) | def test_for_multiple_choice(self): method test_for_token_classification (line 576) | def test_for_token_classification(self): method test_model_from_pretrained (line 581) | def test_model_from_pretrained(self): class TFElectraModelIntegrationTest (line 589) | class TFElectraModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 591) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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 484) | def create_and_check_encoder_decoder_shared_weights( method test_encoder_decoder_model (line 566) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 570) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 574) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 578) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_encoder_decoder_model_from_pretrained_using_model_paths (line 582) | def test_encoder_decoder_model_from_pretrained_using_model_paths(self): method test_save_and_load_from_pretrained (line 586) | def test_save_and_load_from_pretrained(self): method test_save_and_load_from_encoder_decoder_pretrained (line 590) | def test_save_and_load_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_labels (line 594) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 598) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_output_attentions_from_config (line 602) | def test_encoder_decoder_model_output_attentions_from_config(self): method test_encoder_decoder_model_generate (line 606) | def test_encoder_decoder_model_generate(self): method test_encoder_decoder_model_shared_weights (line 610) | def test_encoder_decoder_model_shared_weights(self): method test_training_gradient_checkpointing (line 614) | def test_training_gradient_checkpointing(self): method test_real_model_save_load_from_pretrained (line 636) | def test_real_model_save_load_from_pretrained(self): class BertEncoderDecoderModelTest (line 668) | class BertEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model (line 669) | def get_pretrained_model(self): method get_encoder_decoder_model (line 672) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 677) | def prepare_config_and_inputs(self): method test_relative_position_embeds (line 719) | def test_relative_position_embeds(self): method test_bert2bert_summarization (line 738) | def test_bert2bert_summarization(self): class BertGenerationEncoderDecoderModelTest (line 767) | class BertGenerationEncoderDecoderModelTest(EncoderDecoderMixin, unittes... method get_pretrained_model (line 768) | def get_pretrained_model(self): method get_encoder_decoder_model (line 773) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 778) | def prepare_config_and_inputs(self): method test_roberta2roberta_summarization (line 812) | def test_roberta2roberta_summarization(self): class RoBertaEncoderDecoderModelTest (line 837) | class RoBertaEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestC... method get_encoder_decoder_model (line 838) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 843) | def prepare_config_and_inputs(self): method get_pretrained_model (line 885) | def get_pretrained_model(self): class GPT2EncoderDecoderModelTest (line 890) | class GPT2EncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 891) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 896) | def prepare_config_and_inputs(self): method get_pretrained_model (line 942) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 945) | def test_encoder_decoder_model_shared_weights(self): method test_bert2gpt2_summarization (line 949) | def test_bert2gpt2_summarization(self): class ProphetNetEncoderDecoderModelTest (line 968) | class ProphetNetEncoderDecoderModelTest(EncoderDecoderMixin, unittest.Te... 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): method get_pretrained_model (line 1014) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 1019) | def test_encoder_decoder_model_shared_weights(self): class BartEncoderDecoderModelTest (line 1024) | class BartEncoderDecoderModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 1025) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 1030) | def prepare_config_and_inputs(self): method get_pretrained_model (line 1070) | def get_pretrained_model(self): method test_encoder_decoder_model_shared_weights (line 1073) | def test_encoder_decoder_model_shared_weights(self): class EncoderDecoderModelTest (line 1078) | class EncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 1079) | def get_from_encoderdecoder_pretrained_model(self): method get_decoder_config (line 1082) | def get_decoder_config(self): method get_encoderdecoder_model (line 1088) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 1091) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 1096) | def _check_configuration_tie(self, model): method test_configuration_tie (line 1101) | def test_configuration_tie(self): FILE: benchmark/third_party/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 336) | def check_equivalence_pt_to_flax(self, config, decoder_config, inputs_... method check_equivalence_flax_to_pt (line 348) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 359) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 363) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 367) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 371) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_from_encoder_decoder_pretrained (line 375) | def test_encoder_decoder_model_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 379) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 383) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 387) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 392) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 427) | def test_real_model_save_load_from_pretrained(self): class FlaxGPT2EncoderDecoderModelTest (line 457) | class FlaxGPT2EncoderDecoderModelTest(FlaxEncoderDecoderMixin, unittest.... method get_encoder_decoder_model (line 458) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 463) | def prepare_config_and_inputs(self): method get_pretrained_model (line 489) | def get_pretrained_model(self): method test_bert2gpt2_summarization (line 493) | def test_bert2gpt2_summarization(self): class FlaxBartEncoderDecoderModelTest (line 513) | class FlaxBartEncoderDecoderModelTest(FlaxEncoderDecoderMixin, unittest.... method get_encoder_decoder_model (line 514) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 519) | def prepare_config_and_inputs(self): method get_pretrained_model (line 545) | 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 587) | class FlaxEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 588) | def get_from_encoderdecoder_pretrained_model(self): method _check_configuration_tie (line 591) | def _check_configuration_tie(self, model): method test_configuration_tie (line 599) | def test_configuration_tie(self): FILE: benchmark/third_party/transformers/tests/models/encoder_decoder/test_modeling_tf_encoder_decoder.py class TFEncoderDecoderMixin (line 62) | class TFEncoderDecoderMixin: method get_encoder_decoder_model (line 63) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 66) | def prepare_config_and_inputs(self): method get_pretrained_model (line 69) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 72) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 105) | 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 184) | def check_save_and_load( method check_encoder_decoder_model_labels (line 224) | def check_encoder_decoder_model_labels( method _check_output_with_attentions (line 258) | def _check_output_with_attentions( method check_encoder_decoder_model_output_attentions (line 292) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_output_attentions_from_config (line 320) | def check_encoder_decoder_model_output_attentions_from_config( method check_encoder_decoder_model_generate (line 369) | def check_encoder_decoder_model_generate(self, input_ids, config, deco... method check_pt_tf_outputs (line 385) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 472) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 492) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method check_pt_tf_equivalence (line 520) | def check_pt_tf_equivalence(self, tf_model, pt_model, tf_inputs_dict): method check_pt_to_tf_equivalence (line 532) | def check_pt_to_tf_equivalence(self, config, decoder_config, tf_inputs... method check_tf_to_pt_equivalence (line 549) | def check_tf_to_pt_equivalence(self, config, decoder_config, tf_inputs... 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_save_and_load_from_pretrained (line 584) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_labels (line 588) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 592) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_output_attentions_from_config (line 596) | def test_encoder_decoder_model_output_attentions_from_config(self): method test_encoder_decoder_model_generate (line 600) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 604) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_tf_model_equivalence (line 609) | def test_pt_tf_model_equivalence(self): method test_model_save_load_from_pretrained (line 673) | def test_model_save_load_from_pretrained(self): class TFBertEncoderDecoderModelTest (line 703) | class TFBertEncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.Test... method setUp (line 704) | def setUp(self): method get_pretrained_model (line 708) | def get_pretrained_model(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_bert2bert_summarization (line 764) | def test_bert2bert_summarization(self): class TFGPT2EncoderDecoderModelTest (line 803) | class TFGPT2EncoderDecoderModelTest(TFEncoderDecoderMixin, unittest.Test... method setUp (line 804) | def setUp(self): method get_pretrained_model (line 808) | def get_pretrained_model(self): method get_encoder_decoder_model (line 814) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 819) | def prepare_config_and_inputs(self): method test_bert2gpt2_summarization (line 865) | 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 1023) | def get_decoder_config(self): method get_encoderdecoder_model (line 1029) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 1032) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 1039) | def _check_configuration_tie(self, model): method test_configuration_tie (line 1044) | def test_configuration_tie(self): class TFEncoderDecoderModelSaveLoadTests (line 1058) | class TFEncoderDecoderModelSaveLoadTests(unittest.TestCase): method get_encoder_decoder_config (line 1059) | def get_encoder_decoder_config(self): method get_encoder_decoder_config_small (line 1064) | def get_encoder_decoder_config_small(self): method test_encoder_decoder_save_load_from_encoder_decoder (line 1071) | def test_encoder_decoder_save_load_from_encoder_decoder(self): method test_encoder_decoder_save_load_from_encoder_decoder_from_pt (line 1114) | def test_encoder_decoder_save_load_from_encoder_decoder_from_pt(self): method test_encoder_decoder_from_pretrained (line 1163) | def test_encoder_decoder_from_pretrained(self): FILE: benchmark/third_party/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, unittest.T... method _prepare_for_class (line 449) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 462) | def setUp(self): method test_config (line 466) | def test_config(self): method test_model (line 469) | def test_model(self): method test_model_various_embeddings (line 473) | def test_model_various_embeddings(self): method test_model_as_decoder (line 479) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 483) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 511) | def test_for_causal_lm(self): method test_for_masked_lm (line 515) | def test_for_masked_lm(self): method test_for_causal_lm_decoder (line 519) | def test_for_causal_lm_decoder(self): method test_decoder_model_past_with_large_inputs (line 523) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 527) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 531) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 535) | def test_for_pretraining(self): method test_for_question_answering (line 539) | def test_for_question_answering(self): method test_for_sequence_classification (line 543) | def test_for_sequence_classification(self): method test_for_token_classification (line 547) | def test_for_token_classification(self): method test_model_from_pretrained (line 552) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 559) | def test_torchscript_device_change(self): FILE: benchmark/third_party/transformers/tests/models/esm/test_modeling_esm.py class EsmModelTester (line 39) | class EsmModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 67) | def prepare_config_and_inputs(self): method get_config (line 86) | def get_config(self): method create_and_check_model (line 102) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method create_and_check_for_masked_lm (line 113) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 122) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 132) | def prepare_config_and_inputs_for_common(self): class EsmModelTest (line 147) | class EsmModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 164) | def setUp(self): method test_config (line 168) | def test_config(self): method test_model (line 171) | def test_model(self): method test_model_various_embeddings (line 175) | def test_model_various_embeddings(self): method test_for_masked_lm (line 181) | def test_for_masked_lm(self): method test_for_token_classification (line 185) | def test_for_token_classification(self): method test_model_from_pretrained (line 190) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 195) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 220) | def test_create_position_ids_from_inputs_embeds(self): method test_resize_embeddings_untied (line 243) | def test_resize_embeddings_untied(self): method test_resize_tokens_embeddings (line 247) | def test_resize_tokens_embeddings(self): class EsmModelIntegrationTest (line 252) | class EsmModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 254) | def test_inference_masked_lm(self): method test_inference_no_head (line 272) | def test_inference_no_head(self): FILE: benchmark/third_party/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 61) | def prepare_config_and_inputs(self): method get_config (line 80) | def get_config(self): method create_and_check_model (line 99) | def create_and_check_model(self, config, input_ids, input_mask, sequen... method prepare_config_and_inputs_for_common (line 110) | def prepare_config_and_inputs_for_common(self): class EsmFoldModelTest (line 125) | class EsmFoldModelTest(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_attention_outputs (line 145) | def test_attention_outputs(self): method test_correct_missing_keys (line 149) | def test_correct_missing_keys(self): method test_resize_embeddings_untied (line 153) | def test_resize_embeddings_untied(self): method test_resize_tokens_embeddings (line 157) | def test_resize_tokens_embeddings(self): method test_inputs_embeds (line 161) | def test_inputs_embeds(self): method test_head_pruning (line 165) | def test_head_pruning(self): method test_head_pruning_integration (line 169) | def test_head_pruning_integration(self): method test_head_pruning_save_load_from_config_init (line 173) | def test_head_pruning_save_load_from_config_init(self): method test_head_pruning_save_load_from_pretrained (line 177) | def test_head_pruning_save_load_from_pretrained(self): method test_headmasking (line 181) | def test_headmasking(self): method test_hidden_states_output (line 185) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 189) | def test_retain_grad_hidden_states_attentions(self): method test_model_outputs_equivalence (line 193) | def test_model_outputs_equivalence(self): method test_save_load_fast_init_from_base (line 197) | def test_save_load_fast_init_from_base(self): method test_feed_forward_chunking (line 201) | def test_feed_forward_chunking(self): method test_initialization (line 205) | def test_initialization(self): method test_torchscript_output_attentions (line 209) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 213) | def test_torchscript_output_hidden_state(self): method test_torchscript_simple (line 217) | def test_torchscript_simple(self): method test_multi_gpu_data_parallel_forward (line 221) | def test_multi_gpu_data_parallel_forward(self): class EsmModelIntegrationTest (line 226) | class EsmModelIntegrationTest(TestCasePlus): method test_inference_protein_folding (line 228) | def test_inference_protein_folding(self): FILE: benchmark/third_party/transformers/tests/models/esm/test_modeling_tf_esm.py class TFEsmModelTester (line 40) | class TFEsmModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 67) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 99) | 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, sequen... method create_and_check_model_as_decoder (line 136) | def create_and_check_model_as_decoder( method create_and_check_for_masked_lm (line 166) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 173) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 182) | def prepare_config_and_inputs_for_common(self): class TFEsmModelTest (line 197) | class TFEsmModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 212) | def setUp(self): method test_config (line 216) | def test_config(self): method test_model (line 219) | def test_model(self): method test_model_as_decoder (line 224) | def test_model_as_decoder(self): method test_for_masked_lm (line 232) | def test_for_masked_lm(self): method test_for_token_classification (line 236) | def test_for_token_classification(self): method test_model_from_pretrained (line 241) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 247) | def test_resize_token_embeddings(self): method test_save_load_after_resize_token_embeddings (line 251) | def test_save_load_after_resize_token_embeddings(self): class TFEsmModelIntegrationTest (line 256) | class TFEsmModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 258) | def test_inference_masked_lm(self): method test_inference_no_head (line 272) | def test_inference_no_head(self): FILE: benchmark/third_party/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 42) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_tokenizer (line 45) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method test_tokenizer_single_example (line 48) | def test_tokenizer_single_example(self): method test_tokenizer_encode_single (line 55) | def test_tokenizer_encode_single(self): method test_tokenizer_call_no_pad (line 61) | def test_tokenizer_call_no_pad(self): method test_tokenizer_call_pad (line 69) | def test_tokenizer_call_pad(self): method test_tokenize_special_tokens (line 77) | def test_tokenize_special_tokens(self): FILE: benchmark/third_party/transformers/tests/models/flaubert/test_modeling_flaubert.py class FlaubertModelTester (line 41) | class FlaubertModelTester(object): method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 75) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_flaubert_model (line 132) | def create_and_check_flaubert_model( method create_and_check_flaubert_lm_head (line 152) | def create_and_check_flaubert_lm_head( method create_and_check_flaubert_simple_qa (line 172) | def create_and_check_flaubert_simple_qa( method create_and_check_flaubert_qa (line 194) | def create_and_check_flaubert_qa( method create_and_check_flaubert_sequence_classif (line 246) | def create_and_check_flaubert_sequence_classif( method create_and_check_flaubert_token_classif (line 268) | def create_and_check_flaubert_token_classif( method create_and_check_flaubert_multiple_choice (line 288) | def create_and_check_flaubert_multiple_choice( method prepare_config_and_inputs_for_common (line 315) | def prepare_config_and_inputs_for_common(self): class FlaubertModelTest (line 338) | class FlaubertModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 355) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 369) | def setUp(self): method test_config (line 373) | def test_config(self): method test_flaubert_model (line 376) | def test_flaubert_model(self): method test_flaubert_lm_head (line 380) | def test_flaubert_lm_head(self): method test_flaubert_simple_qa (line 384) | def test_flaubert_simple_qa(self): method test_flaubert_qa (line 388) | def test_flaubert_qa(self): method test_flaubert_sequence_classif (line 392) | def test_flaubert_sequence_classif(self): method test_flaubert_token_classif (line 396) | def test_flaubert_token_classif(self): method test_flaubert_multiple_choice (line 400) | def test_flaubert_multiple_choice(self): method test_model_from_pretrained (line 405) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 412) | def test_torchscript_device_change(self): class FlaubertModelIntegrationTest (line 435) | class FlaubertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 437) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/transformers/tests/models/flaubert/test_modeling_tf_flaubert.py class TFFlaubertModelTester (line 41) | class TFFlaubertModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method create_and_check_flaubert_model (line 131) | def create_and_check_flaubert_model( method create_and_check_flaubert_lm_head (line 151) | def create_and_check_flaubert_lm_head( method create_and_check_flaubert_qa (line 170) | def create_and_check_flaubert_qa( method create_and_check_flaubert_sequence_classif (line 191) | def create_and_check_flaubert_sequence_classif( method create_and_check_flaubert_for_token_classification (line 211) | def create_and_check_flaubert_for_token_classification( method create_and_check_flaubert_for_multiple_choice (line 229) | def create_and_check_flaubert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 254) | def prepare_config_and_inputs_for_common(self): class TFFlaubertModelTest (line 277) | class TFFlaubertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 297) | def setUp(self): method test_config (line 301) | def test_config(self): method test_flaubert_model (line 304) | def test_flaubert_model(self): method test_flaubert_lm_head (line 308) | def test_flaubert_lm_head(self): method test_flaubert_qa (line 312) | def test_flaubert_qa(self): method test_flaubert_sequence_classif (line 316) | def test_flaubert_sequence_classif(self): method test_for_token_classification (line 320) | def test_for_token_classification(self): method test_for_multiple_choice (line 324) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 329) | def test_model_from_pretrained(self): class TFFlaubertModelIntegrationTest (line 338) | class TFFlaubertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 340) | def test_output_embeds_base_model(self): FILE: benchmark/third_party/transformers/tests/models/flava/test_feature_extraction_flava.py class FlavaFeatureExtractionTester (line 45) | class FlavaFeatureExtractionTester(unittest.TestCase): method __init__ (line 46) | def __init__( method prepare_feat_extract_dict (line 108) | def prepare_feat_extract_dict(self): method get_expected_image_size (line 135) | def get_expected_image_size(self): method get_expected_mask_size (line 138) | def get_expected_mask_size(self): method get_expected_codebook_image_size (line 145) | def get_expected_codebook_image_size(self): class FlavaFeatureExtractionTest (line 154) | class FlavaFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitt... method setUp (line 159) | def setUp(self): method feat_extract_dict (line 163) | def feat_extract_dict(self): method test_feat_extract_properties (line 166) | def test_feat_extract_properties(self): method test_batch_feature (line 186) | def test_batch_feature(self): method test_call_pil (line 189) | def test_call_pil(self): method _test_call_framework (line 227) | def _test_call_framework(self, instance_class, prepare_kwargs): method test_call_numpy (line 305) | def test_call_numpy(self): method test_call_pytorch (line 308) | def test_call_pytorch(self): method test_masking (line 311) | def test_masking(self): method test_codebook_pixels (line 321) | def test_codebook_pixels(self): FILE: benchmark/third_party/transformers/tests/models/flava/test_modeling_flava.py class FlavaImageModelTester (line 75) | class FlavaImageModelTester: method __init__ (line 76) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method get_config (line 123) | def get_config(self): method create_and_check_model (line 142) | def create_and_check_model(self, config, pixel_values, bool_masked_pos): method prepare_config_and_inputs_for_common (line 155) | def prepare_config_and_inputs_for_common(self): class FlavaImageModelTest (line 163) | class FlavaImageModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 176) | def setUp(self): method test_config (line 180) | def test_config(self): method test_inputs_embeds (line 183) | def test_inputs_embeds(self): method test_model_common_attributes (line 187) | def test_model_common_attributes(self): method test_forward_signature (line 196) | def test_forward_signature(self): method test_model (line 208) | def test_model(self): method test_attention_outputs (line 212) | def test_attention_outputs(self): method test_hidden_states_output (line 268) | def test_hidden_states_output(self): method test_training (line 307) | def test_training(self): method test_training_gradient_checkpointing (line 310) | def test_training_gradient_checkpointing(self): method test_save_load_fast_init_from_base (line 315) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 320) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 324) | def test_model_from_pretrained(self): class FlavaTextModelTester (line 330) | class FlavaTextModelTester: method __init__ (line 331) | def __init__( method prepare_config_and_inputs (line 377) | def prepare_config_and_inputs(self): method get_config (line 400) | def get_config(self): method create_and_check_model (line 419) | def create_and_check_model(self, config, input_ids, token_type_ids, in... method prepare_config_and_inputs_for_common (line 429) | def prepare_config_and_inputs_for_common(self): class FlavaTextModelTest (line 437) | class FlavaTextModelTest(ModelTesterMixin, unittest.TestCase): 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_training (line 455) | def test_training(self): method test_training_gradient_checkpointing (line 458) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 461) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 467) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 472) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 476) | def test_model_from_pretrained(self): class FlavaMultimodalModelTester (line 482) | class FlavaMultimodalModelTester: method __init__ (line 483) | def __init__( method prepare_config_and_inputs (line 519) | def prepare_config_and_inputs(self): method get_config (line 537) | def get_config(self): method create_and_check_model (line 553) | def create_and_check_model(self, config, hidden_states, input_mask): method prepare_config_and_inputs_for_common (line 563) | def prepare_config_and_inputs_for_common(self): class FlavaMultimodalModelTest (line 571) | class FlavaMultimodalModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 579) | def setUp(self): method test_config (line 585) | def test_config(self): method test_model (line 588) | def test_model(self): method test_forward_signature (line 592) | def test_forward_signature(self): method test_model_common_attributes (line 604) | def test_model_common_attributes(self): method test_training (line 608) | def test_training(self): method test_training_gradient_checkpointing (line 611) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 614) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 620) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 625) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 629) | def test_model_from_pretrained(self): class FlavaImageCodebookTester (line 635) | class FlavaImageCodebookTester: method __init__ (line 636) | def __init__(self, parent, batch_size=12, image_size=112, num_channels... method prepare_config_and_inputs (line 642) | def prepare_config_and_inputs(self): method get_config (line 648) | def get_config(self): method create_and_check_model (line 651) | def create_and_check_model(self, config, pixel_values): method prepare_config_and_inputs_for_common (line 661) | def prepare_config_and_inputs_for_common(self): class FlavaImageCodebookTest (line 669) | class FlavaImageCodebookTest(ModelTesterMixin, unittest.TestCase): method setUp (line 678) | def setUp(self): method test_model (line 682) | def test_model(self): method test_forward_signature (line 686) | def test_forward_signature(self): method test_attention_outputs (line 699) | def test_attention_outputs(self): method test_model_common_attributes (line 702) | def test_model_common_attributes(self): method test_training (line 706) | def test_training(self): method test_hidden_states_output (line 709) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 712) | def test_retain_grad_hidden_states_attentions(self): method test_training_gradient_checkpointing (line 716) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 719) | def test_inputs_embeds(self): method test_model_outputs_equivalence (line 723) | def test_model_outputs_equivalence(self): method test_save_load_fast_init_from_base (line 728) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 733) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 737) | def test_model_from_pretrained(self): class FlavaModelTester (line 743) | class FlavaModelTester: method __init__ (line 746) | def __init__( method test_config (line 767) | def test_config(self): method prepare_config_and_inputs_for_common (line 770) | def prepare_config_and_inputs_for_common(self): method get_config (line 784) | def get_config(self): method create_and_check_model (line 796) | def create_and_check_model(self, config, inputs): method _test_model (line 801) | def _test_model(self, config, inputs, test_image=False, test_text=False): class FlavaModelTest (line 849) | class FlavaModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 857) | def setUp(self): method test_model (line 860) | def test_model(self): method test_hidden_states_output (line 865) | def test_hidden_states_output(self): method test_inputs_embeds (line 869) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 873) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 877) | def test_model_common_attributes(self): method test_initialization (line 881) | def test_initialization(self): method _create_and_check_torchscript (line 904) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_image_text_config (line 965) | def test_load_image_text_config(self): method test_model_from_pretrained (line 988) | def test_model_from_pretrained(self): class FlavaForPreTrainingTester (line 994) | class FlavaForPreTrainingTester(FlavaModelTester): method prepare_config_and_inputs_for_common (line 997) | def prepare_config_and_inputs_for_common(self): method _test_model (line 1026) | def _test_model(self, config, inputs, test_image=False, test_text=False): class FlavaForPreTrainingTest (line 1142) | class FlavaForPreTrainingTest(FlavaModelTest): function prepare_img (line 1149) | def prepare_img(): class FlavaModelIntegrationTest (line 1157) | class FlavaModelIntegrationTest(unittest.TestCase): method test_inference (line 1159) | def test_inference(self): class FlavaForPreTrainingIntegrationTest (line 1185) | class FlavaForPreTrainingIntegrationTest(unittest.TestCase): method test_inference (line 1187) | def test_inference(self): FILE: benchmark/third_party/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 85) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 88) | def get_rust_tokenizer(self, **kwargs): method get_feature_extractor (line 91) | def get_feature_extractor(self, **kwargs): method tearDown (line 94) | def tearDown(self): method prepare_image_inputs (line 97) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 108) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 132) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 149) | def test_feature_extractor(self): method test_tokenizer (line 176) | def test_tokenizer(self): method test_processor (line 191) | def test_processor(self): method test_tokenizer_decode (line 223) | def test_tokenizer_decode(self): FILE: benchmark/third_party/transformers/tests/models/fnet/test_modeling_fnet.py class FNetConfigTester (line 52) | class FNetConfigTester(ConfigTester): method create_and_test_config_common_properties (line 53) | def create_and_test_config_common_properties(self): class FNetModelTester (line 61) | class FNetModelTester: method __init__ (line 62) | def __init__( method prepare_config_and_inputs (line 104) | def prepare_config_and_inputs(self): method get_config (line 123) | def get_config(self): method create_and_check_fourier_transform (line 138) | def create_and_check_fourier_transform(self, config): method create_and_check_model (line 157) | def create_and_check_model(self, config, input_ids, token_type_ids, se... method create_and_check_for_pretraining (line 165) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 180) | def create_and_check_for_masked_lm( method create_and_check_for_next_sentence_prediction (line 189) | def create_and_check_for_next_sentence_prediction( method create_and_check_for_question_answering (line 202) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 217) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 227) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 237) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 253) | def prepare_config_and_inputs_for_common(self): class FNetModelTest (line 268) | class FNetModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 291) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_attention_outputs (line 305) | def test_attention_outputs(self): method test_model_outputs_equivalence (line 308) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 367) | def test_retain_grad_hidden_states_attentions(self): 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_for_pretraining (line 402) | def test_for_pretraining(self): method test_for_masked_lm (line 406) | def test_for_masked_lm(self): method test_for_multiple_choice (line 410) | def test_for_multiple_choice(self): method test_for_question_answering (line 414) | def test_for_question_answering(self): method test_for_sequence_classification (line 418) | def test_for_sequence_classification(self): method test_for_token_classification (line 422) | def test_for_token_classification(self): method test_model_from_pretrained (line 427) | def test_model_from_pretrained(self): class FNetModelIntegrationTest (line 434) | class FNetModelIntegrationTest(unittest.TestCase): method test_inference_for_masked_lm (line 436) | def test_inference_for_masked_lm(self): method test_inference_long_sentence (line 513) | def test_inference_long_sentence(self): method test_inference_for_next_sentence_prediction (line 535) | def test_inference_for_next_sentence_prediction(self): method test_inference_model (line 551) | def test_inference_model(self): FILE: benchmark/third_party/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 175) | def test_special_tokens_initialization_from_slow(self): method test_padding (line 195) | def test_padding(self, max_length=50): method test_save_pretrained (line 414) | def test_save_pretrained(self): method test_save_slow_from_fast_and_reload_fast (line 418) | def test_save_slow_from_fast_and_reload_fast(self): method assert_batch_padded_input_match (line 421) | def assert_batch_padded_input_match( method test_tokenizer_integration (line 441) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/fsmt/test_modeling_fsmt.py class FSMTModelTester (line 45) | class FSMTModelTester: method __init__ (line 46) | 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 prepare_config_and_inputs_for_common (line 105) | def prepare_config_and_inputs_for_common(self): function prepare_fsmt_inputs_dict (line 113) | def prepare_fsmt_inputs_dict( class FSMTModelTest (line 138) | class FSMTModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method setUp (line 145) | def setUp(self): method test_config (line 157) | def test_config(self): method test_model_common_attributes (line 161) | def test_model_common_attributes(self): method test_initialization_more (line 171) | def test_initialization_more(self): method test_advanced_inputs (line 189) | def test_advanced_inputs(self): method test_save_load_missing_keys (line 219) | def test_save_load_missing_keys(self): method test_export_to_onnx (line 231) | def test_export_to_onnx(self): method test_resize_tokens_embeddings (line 245) | def test_resize_tokens_embeddings(self): method test_inputs_embeds (line 249) | def test_inputs_embeds(self): method test_tie_model_weights (line 253) | def test_tie_model_weights(self): method test_resize_embeddings_untied (line 257) | def test_resize_embeddings_untied(self): class FSMTHeadTests (line 262) | class FSMTHeadTests(unittest.TestCase): method _get_config (line 267) | def _get_config(self): method _get_config_and_data (line 285) | def _get_config_and_data(self): method test_generate_beam_search (line 310) | def test_generate_beam_search(self): method test_shift_tokens_right (line 327) | def test_shift_tokens_right(self): method test_generate_fp16 (line 336) | def test_generate_fp16(self): method test_dummy_inputs (line 345) | def test_dummy_inputs(self): method test_prepare_fsmt_decoder_inputs (line 350) | def test_prepare_fsmt_decoder_inputs(self): function _assert_tensors_equal (line 366) | def _assert_tensors_equal(a, b, atol=1e-12, prefix=""): function _long_tensor (line 380) | def _long_tensor(tok_lst): class FSMTModelIntegrationTests (line 398) | class FSMTModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 404) | def default_tokenizer(self): method default_model (line 408) | def default_model(self): method get_tokenizer (line 411) | def get_tokenizer(self, mname): method get_model (line 416) | def get_model(self, mname): method test_inference_no_head (line 424) | def test_inference_no_head(self): method translation_setup (line 443) | def translation_setup(self, pair): method test_translation_direct (line 463) | def test_translation_direct(self, pair): method test_translation_pipeline (line 474) | def test_translation_pipeline(self, pair): class TestSinusoidalPositionalEmbeddings (line 483) | class TestSinusoidalPositionalEmbeddings(unittest.TestCase): method test_basic (line 487) | def test_basic(self): method test_odd_embed_dim (line 504) | def test_odd_embed_dim(self): method test_positional_emb_weights_against_marian (line 512) | def test_positional_emb_weights_against_marian(self): FILE: benchmark/third_party/transformers/tests/models/fsmt/test_tokenization_fsmt.py class FSMTTokenizationTest (line 32) | class FSMTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method tokenizer_ru_en (line 87) | def tokenizer_ru_en(self): method tokenizer_en_ru (line 91) | def tokenizer_en_ru(self): method test_online_tokenizer_config (line 94) | def test_online_tokenizer_config(self): method test_full_tokenizer (line 103) | def test_full_tokenizer(self): method test_sequence_builders (line 117) | def test_sequence_builders(self): method test_match_encode_decode (line 130) | def test_match_encode_decode(self): method test_tokenizer_lower (line 156) | def test_tokenizer_lower(self): method test_torch_encode_plus_sent_to_model (line 163) | def test_torch_encode_plus_sent_to_model(self): method test_np_encode_plus_sent_to_model (line 167) | def test_np_encode_plus_sent_to_model(self): FILE: benchmark/third_party/transformers/tests/models/funnel/test_modeling_funnel.py class FunnelModelTester (line 43) | class FunnelModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs(self): method get_config (line 144) | def get_config(self): method create_and_check_model (line 162) | def create_and_check_model( method create_and_check_base_model (line 189) | def create_and_check_base_model( method create_and_check_for_pretraining (line 216) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 234) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 251) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 269) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 295) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 313) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 337) | def prepare_config_and_inputs_for_common(self): class FunnelModelTest (line 354) | class FunnelModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 370) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 380) | def setUp(self): method test_config (line 384) | def test_config(self): method test_model (line 387) | def test_model(self): method test_for_pretraining (line 391) | def test_for_pretraining(self): method test_for_masked_lm (line 395) | def test_for_masked_lm(self): method test_for_token_classification (line 399) | def test_for_token_classification(self): method test_for_question_answering (line 403) | def test_for_question_answering(self): method _mock_init_weights (line 408) | def _mock_init_weights(self, module): class FunnelBaseModelTest (line 421) | class FunnelBaseModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 428) | def setUp(self): method test_config (line 432) | def test_config(self): method test_base_model (line 435) | def test_base_model(self): method test_for_sequence_classification (line 439) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 443) | def test_for_multiple_choice(self): method test_training (line 448) | def test_training(self): method _mock_init_weights (line 463) | def _mock_init_weights(self, module): class FunnelModelIntegrationTest (line 478) | class FunnelModelIntegrationTest(unittest.TestCase): method test_inference_tiny_model (line 479) | def test_inference_tiny_model(self): method test_inference_model (line 503) | def test_inference_model(self): FILE: benchmark/third_party/transformers/tests/models/funnel/test_modeling_tf_funnel.py class TFFunnelModelTester (line 41) | class TFFunnelModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 109) | def prepare_config_and_inputs(self): method create_and_check_model (line 155) | def create_and_check_model( method create_and_check_base_model (line 185) | def create_and_check_base_model( method create_and_check_for_pretraining (line 215) | def create_and_check_for_pretraining( method create_and_check_for_masked_lm (line 230) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 245) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 261) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 284) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 300) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 316) | def prepare_config_and_inputs_for_common(self): class TFFunnelModelTest (line 332) | class TFFunnelModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 347) | def setUp(self): method test_config (line 351) | def test_config(self): method test_model (line 354) | def test_model(self): method test_for_pretraining (line 358) | def test_for_pretraining(self): method test_for_masked_lm (line 362) | def test_for_masked_lm(self): method test_for_token_classification (line 366) | def test_for_token_classification(self): method test_for_question_answering (line 370) | def test_for_question_answering(self): method test_saved_model_creation (line 375) | def test_saved_model_creation(self): method test_compile_tf_model (line 378) | def test_compile_tf_model(self): class TFFunnelBaseModelTest (line 384) | class TFFunnelBaseModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 391) | def setUp(self): method test_config (line 395) | def test_config(self): method test_base_model (line 398) | def test_base_model(self): method test_for_sequence_classification (line 402) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 406) | def test_for_multiple_choice(self): method test_saved_model_creation (line 411) | def test_saved_model_creation(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/glpn/test_feature_extraction_glpn.py class GLPNFeatureExtractionTester (line 36) | class GLPNFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 59) | def prepare_feat_extract_dict(self): class GLPNFeatureExtractionTest (line 69) | class GLPNFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 73) | def setUp(self): method feat_extract_dict (line 77) | def feat_extract_dict(self): method test_feat_extract_properties (line 80) | def test_feat_extract_properties(self): method test_batch_feature (line 87) | def test_batch_feature(self): method test_call_pil (line 90) | def test_call_pil(self): method test_call_numpy (line 103) | def test_call_numpy(self): method test_call_pytorch (line 116) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/glpn/test_modeling_glpn.py class GLPNConfigTester (line 42) | class GLPNConfigTester(ConfigTester): method create_and_test_config_common_properties (line 43) | def create_and_test_config_common_properties(self): class GLPNModelTester (line 50) | class GLPNModelTester: method __init__ (line 51) | 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_depth_estimation (line 128) | def create_and_check_for_depth_estimation(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 138) | def prepare_config_and_inputs_for_common(self): class GLPNModelTest (line 146) | class GLPNModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 154) | def setUp(self): method test_config (line 158) | def test_config(self): method test_model (line 161) | def test_model(self): method test_for_depth_estimation (line 165) | def test_for_depth_estimation(self): method test_inputs_embeds (line 170) | def test_inputs_embeds(self): method test_model_common_attributes (line 174) | def test_model_common_attributes(self): method test_forward_signature (line 177) | def test_forward_signature(self): method test_attention_outputs (line 189) | def test_attention_outputs(self): method test_hidden_states_output (line 258) | def test_hidden_states_output(self): method test_training (line 294) | def test_training(self): method test_model_from_pretrained (line 319) | def test_model_from_pretrained(self): function prepare_img (line 326) | def prepare_img(): class GLPNModelIntegrationTest (line 334) | class GLPNModelIntegrationTest(unittest.TestCase): method test_inference_depth_estimation (line 336) | def test_inference_depth_estimation(self): FILE: benchmark/third_party/transformers/tests/models/gpt2/test_modeling_flax_gpt2.py class FlaxGPT2ModelTester (line 42) | class FlaxGPT2ModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 85) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_decoder (line 112) | def prepare_config_and_inputs_for_decoder(self): method check_use_cache_forward (line 126) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 156) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGPT2ModelTest (line 191) | class FlaxGPT2ModelTest(FlaxModelTesterMixin, FlaxGenerationTesterMixin,... method setUp (line 196) | def setUp(self): method test_use_cache_forward (line 199) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 204) | def test_use_cache_forward_with_attn_mask(self): method test_batch_generation (line 212) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 236) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 284) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 333) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/gpt2/test_modeling_gpt2.py class GPT2ModelTester (line 43) | class GPT2ModelTester: 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( method get_config (line 145) | def get_config( method get_pipeline_config (line 169) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 174) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt2_model (line 203) | def create_and_check_gpt2_model(self, config, input_ids, input_mask, h... method create_and_check_gpt2_model_past (line 215) | def create_and_check_gpt2_model_past(self, config, input_ids, input_ma... method create_and_check_gpt2_model_attention_mask_past (line 251) | def create_and_check_gpt2_model_attention_mask_past( method create_and_check_gpt2_model_past_large_inputs (line 293) | def create_and_check_gpt2_model_past_large_inputs( method create_and_check_lm_head_model (line 331) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 340) | def create_and_check_forward_and_backwards( method create_and_check_double_lm_head_model (line 353) | def create_and_check_double_lm_head_model( method create_and_check_gpt2_for_sequence_classification (line 379) | def create_and_check_gpt2_for_sequence_classification( method create_and_check_gpt2_for_token_classification (line 389) | def create_and_check_gpt2_for_token_classification( method create_and_check_gpt2_weight_initialization (line 399) | def create_and_check_gpt2_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 407) | def prepare_config_and_inputs_for_common(self): class GPT2ModelTest (line 432) | class GPT2ModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method _prepare_for_class (line 446) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 468) | def setUp(self): method test_config (line 472) | def test_config(self): method test_gpt2_model (line 475) | def test_gpt2_model(self): method test_gpt2_model_past (line 479) | def test_gpt2_model_past(self): method test_gpt2_model_att_mask_past (line 483) | def test_gpt2_model_att_mask_past(self): method test_gpt2_model_past_large_inputs (line 487) | def test_gpt2_model_past_large_inputs(self): method test_gpt2_lm_head_model (line 491) | def test_gpt2_lm_head_model(self): method test_gpt2_double_lm_head_model (line 495) | def test_gpt2_double_lm_head_model(self): method test_gpt2_sequence_classification_model (line 499) | def test_gpt2_sequence_classification_model(self): method test_gpt2_token_classification_model (line 503) | def test_gpt2_token_classification_model(self): method test_gpt2_gradient_checkpointing (line 507) | def test_gpt2_gradient_checkpointing(self): method test_gpt2_scale_attn_by_inverse_layer_idx (line 511) | def test_gpt2_scale_attn_by_inverse_layer_idx(self): method test_gpt2_reorder_and_upcast_attn (line 515) | def test_gpt2_reorder_and_upcast_attn(self): method test_gpt2_weight_initialization (line 519) | def test_gpt2_weight_initialization(self): method test_batch_generation (line 524) | def test_batch_generation(self): method test_batch_generation_2heads (line 583) | def test_batch_generation_2heads(self): method test_model_from_pretrained (line 643) | def test_model_from_pretrained(self): class GPT2ModelLanguageGenerationTest (line 650) | class GPT2ModelLanguageGenerationTest(unittest.TestCase): method _test_lm_generate_gpt2_helper (line 651) | def _test_lm_generate_gpt2_helper( method test_lm_generate_gpt2 (line 683) | def test_lm_generate_gpt2(self): method test_lm_generate_gpt2_with_gradient_checkpointing (line 687) | def test_lm_generate_gpt2_with_gradient_checkpointing(self): method test_lm_generate_gpt2_with_reorder_and_upcast_attn (line 691) | def test_lm_generate_gpt2_with_reorder_and_upcast_attn(self): method test_lm_generate_gpt2_with_scale_attn_by_inverse_layer_idx (line 695) | def test_lm_generate_gpt2_with_scale_attn_by_inverse_layer_idx(self): method test_gpt2_sample (line 699) | def test_gpt2_sample(self): method test_gpt2_sample_max_time (line 727) | def test_gpt2_sample_max_time(self): FILE: benchmark/third_party/transformers/tests/models/gpt2/test_modeling_tf_gpt2.py class TFGPT2ModelTester (line 40) | class TFGPT2ModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 72) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 127) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt2_model (line 156) | def create_and_check_gpt2_model(self, config, input_ids, input_mask, h... method create_and_check_gpt2_model_past (line 172) | def create_and_check_gpt2_model_past(self, config, input_ids, input_ma... method create_and_check_gpt2_model_attention_mask_past (line 204) | def create_and_check_gpt2_model_attention_mask_past( method create_and_check_gpt2_model_past_large_inputs (line 246) | def create_and_check_gpt2_model_past_large_inputs( method create_and_check_gpt2_lm_head (line 287) | def create_and_check_gpt2_lm_head(self, config, input_ids, input_mask,... method create_and_check_gpt2_double_head (line 297) | def create_and_check_gpt2_double_head( method create_and_check_gpt2_for_sequence_classification (line 318) | def create_and_check_gpt2_for_sequence_classification( method prepare_config_and_inputs_for_common (line 333) | def prepare_config_and_inputs_for_common(self): class TFGPT2ModelTest (line 357) | class TFGPT2ModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, unitte... method setUp (line 369) | def setUp(self): method test_config (line 373) | def test_config(self): method test_gpt2_model (line 376) | def test_gpt2_model(self): method test_gpt2_model_past (line 380) | def test_gpt2_model_past(self): method test_gpt2_model_att_mask_past (line 384) | def test_gpt2_model_att_mask_past(self): method test_gpt2_model_past_large_inputs (line 388) | def test_gpt2_model_past_large_inputs(self): method test_gpt2_lm_head (line 392) | def test_gpt2_lm_head(self): method test_gpt2_double_head (line 396) | def test_gpt2_double_head(self): method test_model_common_attributes (line 400) | def test_model_common_attributes(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 456) | def test_onnx_compliancy(self): class TFGPT2ModelLanguageGenerationTest (line 461) | class TFGPT2ModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_greedy_distilgpt2_batch_special (line 463) | def test_lm_generate_greedy_distilgpt2_batch_special(self): method test_lm_generate_sample_distilgpt2_batch_special (line 490) | def test_lm_generate_sample_distilgpt2_batch_special(self): method test_lm_generate_greedy_distilgpt2_beam_search_special (line 524) | def test_lm_generate_greedy_distilgpt2_beam_search_special(self): method test_lm_generate_distilgpt2_left_padding (line 551) | def test_lm_generate_distilgpt2_left_padding(self): method test_lm_generate_gpt2_greedy_xla (line 584) | def test_lm_generate_gpt2_greedy_xla(self): method test_lm_generate_gpt2_sample_xla (line 608) | def test_lm_generate_gpt2_sample_xla(self): method test_lm_generate_gpt2_beam_search_xla (line 644) | def test_lm_generate_gpt2_beam_search_xla(self): FILE: benchmark/third_party/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 129) | def test_pretokenized_inputs(self, *args, **kwargs): method test_padding (line 134) | def test_padding(self, max_length=15): method test_padding_if_pad_token_set_slow (line 178) | def test_padding_if_pad_token_set_slow(self): method test_add_bos_token_slow (line 229) | def test_add_bos_token_slow(self): method test_padding_different_model_input_name (line 251) | def test_padding_different_model_input_name(self): method test_special_tokens_mask_input_pairs_and_bos_token (line 254) | def test_special_tokens_mask_input_pairs_and_bos_token(self): class OPTTokenizationTest (line 281) | class OPTTokenizationTest(unittest.TestCase): method test_serialize_deserialize_fast_opt (line 282) | def test_serialize_deserialize_fast_opt(self): method test_fast_slow_equivalence (line 303) | def test_fast_slow_equivalence(self): method test_users_can_modify_bos (line 313) | def test_users_can_modify_bos(self): FILE: benchmark/third_party/transformers/tests/models/gpt_neo/test_modeling_flax_gpt_neo.py class FlaxGPTNeoModelTester (line 42) | class FlaxGPTNeoModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 112) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 118) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 148) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGPTNeoModelTest (line 183) | 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 230) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 278) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 327) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/gpt_neo/test_modeling_gpt_neo.py class GPTNeoModelTester (line 41) | class GPTNeoModelTester: method __init__ (line 42) | 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): method get_config (line 139) | def get_config(self): method get_pipeline_config (line 154) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 159) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gpt_neo_model (line 188) | def create_and_check_gpt_neo_model(self, config, input_ids, input_mask... method create_and_check_gpt_neo_model_past (line 201) | def create_and_check_gpt_neo_model_past(self, config, input_ids, input... method create_and_check_gpt_neo_model_attention_mask_past (line 237) | def create_and_check_gpt_neo_model_attention_mask_past( method create_and_check_gpt_neo_model_past_large_inputs (line 279) | def create_and_check_gpt_neo_model_past_large_inputs( method create_and_check_lm_head_model (line 317) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_gpt_neo_for_sequence_classification (line 326) | def create_and_check_gpt_neo_for_sequence_classification( method create_and_check_forward_and_backwards (line 336) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 349) | def prepare_config_and_inputs_for_common(self): class GPTNeoModelTest (line 374) | class GPTNeoModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.... method _prepare_for_class (line 386) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 390) | def setUp(self): method test_config (line 394) | def test_config(self): method test_gpt_neo_model (line 397) | def test_gpt_neo_model(self): method test_gpt_neo_model_past (line 401) | def test_gpt_neo_model_past(self): method test_gpt_neo_model_att_mask_past (line 405) | def test_gpt_neo_model_att_mask_past(self): method test_gpt_neo_model_past_large_inputs (line 409) | def test_gpt_neo_model_past_large_inputs(self): method test_gpt_neo_lm_head_model (line 413) | def test_gpt_neo_lm_head_model(self): method test_gpt_neo_sequence_classification_model (line 417) | def test_gpt_neo_sequence_classification_model(self): method test_gpt_neo_gradient_checkpointing (line 421) | def test_gpt_neo_gradient_checkpointing(self): method _get_hidden_states (line 425) | def _get_hidden_states(self): method test_local_attn_probs (line 443) | def test_local_attn_probs(self): class GPTNeoModelLanguageGenerationTest (line 471) | class GPTNeoModelLanguageGenerationTest(unittest.TestCase): method model (line 473) | def model(self): method tokenizer (line 477) | def tokenizer(self): method test_lm_generate_gpt_neo (line 481) | def test_lm_generate_gpt_neo(self): method test_gpt_neo_sample (line 497) | def test_gpt_neo_sample(self): method test_batch_generation (line 511) | def test_batch_generation(self): method test_model_from_pretrained (line 554) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/gpt_neox/test_modeling_gpt_neox.py class GPTNeoXModelTester (line 33) | class GPTNeoXModelTester: method __init__ (line 34) | 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_decoder (line 113) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 120) | def create_and_check_model(self, config, input_ids, input_mask): method create_and_check_model_as_decoder (line 128) | def create_and_check_model_as_decoder(self, config, input_ids, input_m... method create_and_check_for_causal_lm (line 136) | def create_and_check_for_causal_lm(self, config, input_ids, input_mask... method create_and_check_decoder_model_past_large_inputs (line 143) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method prepare_config_and_inputs_for_common (line 180) | def prepare_config_and_inputs_for_common(self): class GPTNeoXModelTest (line 188) | class GPTNeoXModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 197) | def setUp(self): method test_config (line 201) | def test_config(self): method test_model (line 204) | def test_model(self): method test_model_as_decoder (line 208) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 212) | def test_model_as_decoder_with_default_input_mask(self): method test_decoder_model_past_large_inputs (line 220) | def test_decoder_model_past_large_inputs(self): method test_model_for_causal_lm (line 224) | def test_model_for_causal_lm(self): method test_feed_forward_chunking (line 229) | def test_feed_forward_chunking(self): FILE: benchmark/third_party/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, unittest.TestCase): method setUp (line 201) | def setUp(self): method test_config (line 205) | def test_config(self): method test_model (line 208) | def test_model(self): method test_model_as_decoder (line 212) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 216) | def test_model_as_decoder_with_default_input_mask(self): method test_decoder_model_past_large_inputs (line 224) | def test_decoder_model_past_large_inputs(self): method test_model_for_causal_lm (line 228) | def test_model_for_causal_lm(self): method test_generation (line 233) | def test_generation(self): FILE: benchmark/third_party/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 131) | def test_conversion_reversible(self): method test_padding_different_model_input_name (line 135) | def test_padding_different_model_input_name(self): FILE: benchmark/third_party/transformers/tests/models/gptj/test_modeling_flax_gptj.py class FlaxGPTJModelTester (line 42) | class FlaxGPTJModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 87) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 109) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 115) | def check_use_cache_forward(self, model_class_name, config, input_ids,... method check_use_cache_forward_with_attn_mask (line 145) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxGPTJModelTest (line 180) | 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 227) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 275) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 324) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/gptj/test_modeling_gptj.py class GPTJModelTester (line 41) | class GPTJModelTester: method __init__ (line 42) | 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): method get_config (line 138) | def get_config(self): method get_pipeline_config (line 158) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 163) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_gptj_model (line 192) | def create_and_check_gptj_model(self, config, input_ids, input_mask, h... method create_and_check_gptj_model_past (line 204) | def create_and_check_gptj_model_past(self, config, input_ids, input_ma... method create_and_check_gptj_model_attention_mask_past (line 240) | def create_and_check_gptj_model_attention_mask_past( method create_and_check_gptj_model_past_large_inputs (line 282) | def create_and_check_gptj_model_past_large_inputs( method create_and_check_lm_head_model (line 320) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 329) | def create_and_check_forward_and_backwards( method prepare_config_and_inputs_for_common (line 342) | def prepare_config_and_inputs_for_common(self): class GPTJModelTest (line 363) | class GPTJModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method _prepare_for_class (line 378) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 382) | def setUp(self): method test_config (line 386) | def test_config(self): method test_gptj_model (line 389) | def test_gptj_model(self): method test_gptj_model_past (line 393) | def test_gptj_model_past(self): method test_gptj_model_att_mask_past (line 397) | def test_gptj_model_att_mask_past(self): method test_gptj_model_past_large_inputs (line 401) | def test_gptj_model_past_large_inputs(self): method test_gptj_lm_head_model (line 405) | def test_gptj_lm_head_model(self): method test_gptj_gradient_checkpointing (line 409) | def test_gptj_gradient_checkpointing(self): method test_batch_generation (line 414) | def test_batch_generation(self): method test_model_from_pretrained (line 474) | def test_model_from_pretrained(self): class GPTJModelLanguageGenerationTest (line 481) | class GPTJModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_gptj (line 483) | def test_lm_generate_gptj(self): method test_gptj_sample (line 503) | def test_gptj_sample(self): method test_gptj_sample_max_time (line 536) | def test_gptj_sample_max_time(self): FILE: benchmark/third_party/transformers/tests/models/gptj/test_modeling_tf_gptj.py class TFGPTJModelTester (line 38) | class TFGPTJModelTester: method __init__ (line 39) | def __init__(self, parent): method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method create_and_check_gptj_model (line 124) | def create_and_check_gptj_model(self, config, input_ids, input_mask, h... method create_and_check_gptj_model_past (line 140) | def create_and_check_gptj_model_past(self, config, input_ids, input_ma... method create_and_check_gptj_model_attention_mask_past (line 172) | def create_and_check_gptj_model_attention_mask_past( method create_and_check_gptj_model_past_large_inputs (line 214) | def create_and_check_gptj_model_past_large_inputs( method create_and_check_gptj_lm_head_model (line 255) | def create_and_check_gptj_lm_head_model(self, config, input_ids, input... method prepare_config_and_inputs_for_common (line 265) | def prepare_config_and_inputs_for_common(self): class TFGPTJModelTest (line 289) | class TFGPTJModelTest(TFModelTesterMixin, TFCoreModelTesterMixin, unitte... method setUp (line 303) | def setUp(self): method test_config (line 307) | def test_config(self): method test_gptj_model (line 310) | def test_gptj_model(self): method test_gptj_model_past (line 314) | def test_gptj_model_past(self): method test_gptj_model_att_mask_past (line 318) | def test_gptj_model_att_mask_past(self): method test_gptj_model_past_large_inputs (line 322) | def test_gptj_model_past_large_inputs(self): method test_gptj_lm_head_model (line 326) | def test_gptj_lm_head_model(self): method test_model_common_attributes (line 330) | def test_model_common_attributes(self): method test_model_from_pretrained (line 353) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 358) | def test_resize_token_embeddings(self): class TFGPTJModelLanguageGenerationTest (line 365) | class TFGPTJModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_gptj (line 366) | def test_lm_generate_gptj(self): method test_gptj_sample (line 376) | def test_gptj_sample(self): method _get_beam_search_test_objects (line 389) | def _get_beam_search_test_objects(self): method test_batch_beam_search (line 410) | def test_batch_beam_search(self): method test_batch_left_padding (line 419) | def test_batch_left_padding(self): method test_xla_beam_search (line 438) | def test_xla_beam_search(self): FILE: benchmark/third_party/transformers/tests/models/groupvit/test_modeling_groupvit.py class GroupViTVisionModelTester (line 55) | class GroupViTVisionModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 98) | 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, pixel_values): method prepare_config_and_inputs_for_common (line 132) | def prepare_config_and_inputs_for_common(self): class GroupViTVisionModelTest (line 140) | class GroupViTVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 153) | 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_pt_tf_model_equivalence (line 167) | def test_pt_tf_model_equivalence(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_attention_outputs (line 203) | def test_attention_outputs(self): method test_training (line 266) | def test_training(self): method test_training_gradient_checkpointing (line 269) | def test_training_gradient_checkpointing(self): method test_save_load_fast_init_from_base (line 273) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 277) | def test_save_load_fast_init_to_base(self): method test_retain_grad_hidden_states_attentions (line 281) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 341) | def test_model_from_pretrained(self): class GroupViTTextModelTester (line 347) | class GroupViTTextModelTester: method __init__ (line 348) | def __init__( method prepare_config_and_inputs (line 384) | def prepare_config_and_inputs(self): method get_config (line 403) | def get_config(self): method create_and_check_model (line 416) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 426) | def prepare_config_and_inputs_for_common(self): class GroupViTTextModelTest (line 434) | class GroupViTTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 440) | def setUp(self): method test_config (line 444) | def test_config(self): method test_model (line 447) | def test_model(self): method test_training (line 451) | def test_training(self): method test_training_gradient_checkpointing (line 454) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 458) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 462) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 466) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 470) | def test_model_from_pretrained(self): class GroupViTModelTester (line 476) | class GroupViTModelTester: method __init__ (line 477) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 483) | def prepare_config_and_inputs(self): method get_config (line 491) | def get_config(self): method create_and_check_model (line 496) | 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 GroupViTModelTest (line 520) | class GroupViTModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 527) | def setUp(self): method test_model (line 530) | def test_model(self): method test_hidden_states_output (line 535) | def test_hidden_states_output(self): method test_inputs_embeds (line 539) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 543) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 547) | def test_model_common_attributes(self): method test_pt_tf_model_equivalence (line 551) | def test_pt_tf_model_equivalence(self): method test_initialization (line 563) | def test_initialization(self): method _create_and_check_torchscript (line 586) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 637) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 653) | def test_model_from_pretrained(self): function prepare_img (line 660) | def prepare_img(): class GroupViTModelIntegrationTest (line 668) | class GroupViTModelIntegrationTest(unittest.TestCase): method test_inference (line 670) | def test_inference(self): FILE: benchmark/third_party/transformers/tests/models/groupvit/test_modeling_tf_groupvit.py class TFGroupViTVisionModelTester (line 55) | class TFGroupViTVisionModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 98) | 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, pixel_values): method prepare_config_and_inputs_for_common (line 130) | def prepare_config_and_inputs_for_common(self): class TFGroupViTVisionModelTest (line 138) | class TFGroupViTVisionModelTest(TFModelTesterMixin, 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_saved_model_creation (line 171) | def test_saved_model_creation(self): method test_graph_mode_with_inputs_embeds (line 175) | def test_graph_mode_with_inputs_embeds(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_attention_outputs (line 203) | def test_attention_outputs(self): method test_hidden_states_output (line 257) | def test_hidden_states_output(self): method test_pt_tf_model_equivalence (line 290) | def test_pt_tf_model_equivalence(self): method test_model_from_pretrained (line 309) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 319) | def test_saved_model_creation_extended(self): class TFGroupViTTextModelTester (line 371) | class TFGroupViTTextModelTester: method __init__ (line 372) | def __init__( method prepare_config_and_inputs (line 408) | def prepare_config_and_inputs(self): method get_config (line 426) | def get_config(self): method create_and_check_model (line 439) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 446) | def prepare_config_and_inputs_for_common(self): class TFGroupViTTextModelTest (line 454) | class TFGroupViTTextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 461) | def setUp(self): method test_config (line 465) | def test_config(self): method test_model (line 468) | def test_model(self): method test_inputs_embeds (line 473) | def test_inputs_embeds(self): method test_model_from_pretrained (line 477) | def test_model_from_pretrained(self): method test_saved_model_creation_extended (line 483) | def test_saved_model_creation_extended(self): class TFGroupViTModelTester (line 531) | class TFGroupViTModelTester: method __init__ (line 532) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 538) | def prepare_config_and_inputs(self): method get_config (line 546) | def get_config(self): method create_and_check_model (line 551) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 561) | def prepare_config_and_inputs_for_common(self): class TFGroupViTModelTest (line 574) | class TFGroupViTModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 582) | def setUp(self): method test_model (line 585) | def test_model(self): method test_hidden_states_output (line 590) | def test_hidden_states_output(self): method test_inputs_embeds (line 594) | def test_inputs_embeds(self): method test_model_common_attributes (line 598) | def test_model_common_attributes(self): method test_keras_fit (line 602) | def test_keras_fit(self): method test_pt_tf_model_equivalence (line 606) | def test_pt_tf_model_equivalence(self): method test_keras_save_load (line 626) | def test_keras_save_load(self): method test_model_from_pretrained (line 683) | def test_model_from_pretrained(self): method test_saved_model_creation (line 690) | def test_saved_model_creation(self): method test_saved_model_creation_extended (line 695) | def test_saved_model_creation_extended(self): method test_prepare_serving_output (line 700) | def test_prepare_serving_output(self): function prepare_img (line 705) | def prepare_img(): class TFGroupViTModelIntegrationTest (line 713) | class TFGroupViTModelIntegrationTest(unittest.TestCase): method test_inference (line 715) | def test_inference(self): FILE: benchmark/third_party/transformers/tests/models/herbert/test_tokenization_herbert.py class HerbertTokenizationTest (line 29) | class HerbertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_input_output_texts (line 78) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 83) | def test_full_tokenizer(self): method test_rust_and_python_full_tokenizers (line 95) | def test_rust_and_python_full_tokenizers(self): method test_sequence_builders (line 118) | def test_sequence_builders(self): FILE: benchmark/third_party/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, unittest.TestCase): 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_ctc_loss_inference (line 324) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 328) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 332) | def test_ctc_train(self): method test_seq_classifier_train (line 336) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 340) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 345) | def test_inputs_embeds(self): method test_forward_signature (line 349) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 354) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 360) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 363) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 403) | def test_initialization(self): method _create_and_check_torch_fx_tracing (line 429) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method _mock_init_weights (line 540) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 553) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 557) | def test_model_from_pretrained(self): class HubertRobustModelTest (line 563) | class HubertRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 568) | def setUp(self): method test_config (line 574) | def test_config(self): method test_model (line 577) | def test_model(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_seq_classifier_loss_inference (line 589) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 593) | def test_ctc_train(self): method test_seq_classifier_train (line 597) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 601) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 606) | def test_inputs_embeds(self): method test_forward_signature (line 610) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 615) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 621) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 624) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 664) | def test_initialization(self): method _mock_init_weights (line 690) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 703) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 707) | def test_model_from_pretrained(self): class HubertUtilsTest (line 713) | class HubertUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 714) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 725) | def test_compute_mask_indices_overlap(self): class HubertModelIntegrationTest (line 742) | class HubertModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 743) | def _load_datasamples(self, num_samples): method _load_superb (line 754) | def _load_superb(self, task, num_samples): method test_inference_ctc_batched (line 761) | def test_inference_ctc_batched(self): method test_inference_keyword_spotting (line 786) | def test_inference_keyword_spotting(self): method test_inference_intent_classification (line 807) | def test_inference_intent_classification(self): method test_inference_speaker_identification (line 846) | def test_inference_speaker_identification(self): method test_inference_emotion_recognition (line 872) | def test_inference_emotion_recognition(self): method test_inference_distilhubert (line 894) | def test_inference_distilhubert(self): FILE: benchmark/third_party/transformers/tests/models/hubert/test_modeling_tf_hubert.py class TFHubertModelTester (line 40) | class TFHubertModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 99) | def prepare_config_and_inputs(self): method create_and_check_model (line 127) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 134) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 159) | def check_ctc_loss(self, config, input_values, *args): method check_training (line 183) | def check_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 206) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 214) | def prepare_config_and_inputs_for_common(self): class TFHubertModelTest (line 221) | class TFHubertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 228) | def setUp(self): method test_config (line 232) | def test_config(self): method test_forward_signature (line 236) | def test_forward_signature(self): method test_keyword_and_dict_args (line 249) | def test_keyword_and_dict_args(self): method test_model (line 266) | def test_model(self): method test_hidden_states_output (line 270) | def test_hidden_states_output(self): method test_ctc_loss_inference (line 296) | def test_ctc_loss_inference(self): method test_train (line 300) | def test_train(self): method test_labels_out_of_vocab (line 304) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 309) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 314) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 320) | def test_model_common_attributes(self): method test_model_from_pretrained (line 324) | def test_model_from_pretrained(self): method test_loss_computation (line 329) | def test_loss_computation(self): class TFHubertRobustModelTest (line 334) | class TFHubertRobustModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 340) | def setUp(self): method test_forward_signature (line 351) | def test_forward_signature(self): method test_keyword_and_dict_args (line 364) | def test_keyword_and_dict_args(self): method test_config (line 381) | def test_config(self): method test_model (line 384) | def test_model(self): method test_hidden_states_output (line 388) | def test_hidden_states_output(self): method test_batched_inference (line 414) | def test_batched_inference(self): method test_ctc_loss_inference (line 418) | def test_ctc_loss_inference(self): method test_train (line 422) | def test_train(self): method test_labels_out_of_vocab (line 426) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 431) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 436) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 442) | def test_model_common_attributes(self): method test_model_from_pretrained (line 446) | def test_model_from_pretrained(self): method test_loss_computation (line 451) | def test_loss_computation(self): class TFHubertUtilsTest (line 456) | class TFHubertUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 457) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 469) | def test_compute_mask_indices_overlap(self): class TFHubertModelIntegrationTest (line 485) | class TFHubertModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 486) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal (line 497) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 512) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 531) | def test_inference_ctc_robust_batched(self): FILE: benchmark/third_party/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 80) | def prepare_config_and_inputs(self): method get_config (line 103) | def get_config(self): method get_pipeline_config (line 119) | def get_pipeline_config(self): method create_and_check_model (line 124) | def create_and_check_model( method create_and_check_for_masked_lm (line 137) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 146) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 156) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 174) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 190) | def prepare_config_and_inputs_for_common(self): class IBertModelTest (line 206) | class IBertModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 226) | def setUp(self): method test_config (line 230) | def test_config(self): method test_model (line 233) | def test_model(self): method test_model_various_embeddings (line 237) | def test_model_various_embeddings(self): method test_for_masked_lm (line 244) | def test_for_masked_lm(self): method test_for_token_classification (line 248) | def test_for_token_classification(self): method test_for_multiple_choice (line 252) | def test_for_multiple_choice(self): method test_for_question_answering (line 256) | def test_for_question_answering(self): method test_model_from_pretrained (line 261) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 266) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 285) | def test_create_position_ids_from_inputs_embeds(self): method test_model_common_attributes (line 308) | def test_model_common_attributes(self): method test_feed_forward_chunking (line 319) | def test_feed_forward_chunking(self): method test_inputs_embeds (line 323) | def test_inputs_embeds(self): class IBertModelIntegrationTest (line 355) | class IBertModelIntegrationTest(unittest.TestCase): method test_quant_embedding (line 356) | def test_quant_embedding(self): method test_quant_act (line 375) | def test_quant_act(self): method test_quant_linear (line 452) | def test_quant_linear(self): method test_int_gelu (line 485) | def test_int_gelu(self): method test_force_dequant_gelu (line 503) | def test_force_dequant_gelu(self): method test_int_softmax (line 530) | def test_int_softmax(self): method test_force_dequant_softmax (line 561) | def test_force_dequant_softmax(self): method test_int_layernorm (line 590) | def test_int_layernorm(self): method test_force_dequant_layernorm (line 617) | def test_force_dequant_layernorm(self): method quantize (line 650) | def quantize(self, model): method test_inference_masked_lm (line 668) | def test_inference_masked_lm(self): method test_inference_classification_head (line 688) | def test_inference_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/imagegpt/test_feature_extraction_imagegpt.py class ImageGPTFeatureExtractionTester (line 40) | class ImageGPTFeatureExtractionTester(unittest.TestCase): method __init__ (line 41) | def __init__( method prepare_feat_extract_dict (line 63) | def prepare_feat_extract_dict(self): class ImageGPTFeatureExtractionTest (line 80) | class ImageGPTFeatureExtractionTest(FeatureExtractionSavingTestMixin, un... method setUp (line 84) | def setUp(self): method feat_extract_dict (line 88) | def feat_extract_dict(self): method test_feat_extract_properties (line 91) | def test_feat_extract_properties(self): method test_feat_extract_to_json_string (line 98) | def test_feat_extract_to_json_string(self): method test_feat_extract_to_json_file (line 107) | def test_feat_extract_to_json_file(self): method test_feat_extract_from_and_save_pretrained (line 122) | def test_feat_extract_from_and_save_pretrained(self): method test_init_without_params (line 137) | def test_init_without_params(self): function prepare_images (line 141) | def prepare_images(): class ImageGPTFeatureExtractorIntegrationTest (line 154) | class ImageGPTFeatureExtractorIntegrationTest(unittest.TestCase): method test_image (line 156) | def test_image(self): FILE: benchmark/third_party/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, unittes... method _prepare_for_class (line 277) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method _check_scores (line 289) | def _check_scores(self, batch_size, scores, length, config): method setUp (line 295) | def setUp(self): method test_config (line 299) | def test_config(self): method test_imagegpt_model (line 302) | def test_imagegpt_model(self): method test_imagegpt_causal_lm (line 306) | def test_imagegpt_causal_lm(self): method test_imagegpt_image_classification (line 310) | def test_imagegpt_image_classification(self): method test_model_from_pretrained (line 315) | def test_model_from_pretrained(self): method test_forward_signature (line 320) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 332) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 379) | def test_resize_embeddings_untied(self): method test_inputs_embeds (line 428) | def test_inputs_embeds(self): method _create_and_check_torchscript (line 447) | def _create_and_check_torchscript(self, config, inputs_dict): function prepare_img (line 520) | def prepare_img(): class ImageGPTModelIntegrationTest (line 527) | class ImageGPTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 529) | def default_feature_extractor(self): method test_inference_causal_lm_head (line 533) | def test_inference_causal_lm_head(self): FILE: benchmark/third_party/transformers/tests/models/layoutlm/test_modeling_layoutlm.py class LayoutLMModelTester (line 36) | class LayoutLMModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method get_config (line 125) | def get_config(self): method create_and_check_model (line 140) | def create_and_check_model( method create_and_check_for_masked_lm (line 152) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 161) | 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 183) | 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 LayoutLMModelTest (line 222) | class LayoutLMModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 237) | def setUp(self): method test_config (line 241) | def test_config(self): method test_model (line 244) | def test_model(self): method test_model_various_embeddings (line 248) | def test_model_various_embeddings(self): method test_for_masked_lm (line 254) | def test_for_masked_lm(self): method test_for_sequence_classification (line 258) | def test_for_sequence_classification(self): method test_for_token_classification (line 262) | def test_for_token_classification(self): method test_for_question_answering (line 266) | def test_for_question_answering(self): function prepare_layoutlm_batch_inputs (line 271) | def prepare_layoutlm_batch_inputs(): class LayoutLMModelIntegrationTest (line 286) | class LayoutLMModelIntegrationTest(unittest.TestCase): method test_forward_pass_no_head (line 288) | def test_forward_pass_no_head(self): method test_forward_pass_sequence_classification (line 310) | def test_forward_pass_sequence_classification(self): method test_forward_pass_token_classification (line 338) | def test_forward_pass_token_classification(self): method test_forward_pass_question_answering (line 363) | def test_forward_pass_question_answering(self): FILE: benchmark/third_party/transformers/tests/models/layoutlm/test_modeling_tf_layoutlm.py class TFLayoutLMModelTester (line 40) | class TFLayoutLMModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method create_and_check_model (line 141) | def create_and_check_model( method create_and_check_for_masked_lm (line 152) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 160) | 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_question_answering (line 178) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 187) | def prepare_config_and_inputs_for_common(self): class TFLayoutLMModelTest (line 209) | class TFLayoutLMModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 226) | def setUp(self): method test_config (line 230) | def test_config(self): method test_model (line 233) | def test_model(self): method test_for_masked_lm (line 237) | def test_for_masked_lm(self): method test_for_sequence_classification (line 241) | def test_for_sequence_classification(self): method test_for_token_classification (line 245) | def test_for_token_classification(self): method test_for_question_answering (line 249) | def test_for_question_answering(self): method test_model_from_pretrained (line 254) | def test_model_from_pretrained(self): method test_onnx_compliancy (line 261) | def test_onnx_compliancy(self): function prepare_layoutlm_batch_inputs (line 265) | def prepare_layoutlm_batch_inputs(): class TFLayoutLMModelIntegrationTest (line 280) | class TFLayoutLMModelIntegrationTest(unittest.TestCase): method test_forward_pass_no_head (line 282) | def test_forward_pass_no_head(self): method test_forward_pass_sequence_classification (line 303) | def test_forward_pass_sequence_classification(self): method test_forward_pass_token_classification (line 329) | def test_forward_pass_token_classification(self): method test_forward_pass_question_answering (line 346) | def test_forward_pass_question_answering(self): FILE: benchmark/third_party/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 72) | def test_special_tokens_as_you_expect(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv2/test_feature_extraction_layoutlmv2.py class LayoutLMv2FeatureExtractionTester (line 36) | class LayoutLMv2FeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 59) | def prepare_feat_extract_dict(self): class LayoutLMv2FeatureExtractionTest (line 65) | class LayoutLMv2FeatureExtractionTest(FeatureExtractionSavingTestMixin, ... method setUp (line 69) | def setUp(self): method feat_extract_dict (line 73) | def feat_extract_dict(self): method test_feat_extract_properties (line 76) | def test_feat_extract_properties(self): method test_batch_feature (line 82) | def test_batch_feature(self): method test_call_pil (line 85) | def test_call_pil(self): method test_call_numpy (line 120) | def test_call_numpy(self): method test_call_pytorch (line 152) | def test_call_pytorch(self): method test_layoutlmv2_integration_test (line 184) | def test_layoutlmv2_integration_test(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv2/test_modeling_layoutlmv2.py class LayoutLMv2ModelTester (line 47) | class LayoutLMv2ModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 108) | 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 184) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 201) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 218) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 236) | def prepare_config_and_inputs_for_common(self): class LayoutLMv2ModelTest (line 260) | class LayoutLMv2ModelTest(ModelTesterMixin, unittest.TestCase): 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_save_load_fast_init_from_base (line 316) | def test_save_load_fast_init_from_base(self): method test_attention_outputs (line 364) | def test_attention_outputs(self): method test_hidden_states_output (line 426) | def test_hidden_states_output(self): method test_model_from_pretrained (line 466) | def test_model_from_pretrained(self): method test_initialization (line 471) | def test_initialization(self): function prepare_layoutlmv2_batch_inputs (line 489) | def prepare_layoutlmv2_batch_inputs(): class LayoutLMv2ModelIntegrationTest (line 504) | class LayoutLMv2ModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 506) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv2/test_processor_layoutlmv2.py class LayoutLMv2ProcessorTest (line 37) | class LayoutLMv2ProcessorTest(unittest.TestCase): method setUp (line 41) | def setUp(self): method get_tokenizer (line 74) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 77) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 80) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_feature_extractor (line 83) | def get_feature_extractor(self, **kwargs): method tearDown (line 86) | def tearDown(self): method test_save_load_pretrained_default (line 89) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 104) | def test_save_load_pretrained_additional_features(self): method test_overflowing_tokens (line 137) | def test_overflowing_tokens(self): class LayoutLMv2ProcessorIntegrationTests (line 173) | class LayoutLMv2ProcessorIntegrationTests(unittest.TestCase): method get_images (line 175) | def get_images(self): method get_tokenizers (line 187) | def get_tokenizers(self): method test_processor_case_1 (line 193) | def test_processor_case_1(self): method test_processor_case_2 (line 248) | def test_processor_case_2(self): method test_processor_case_3 (line 302) | def test_processor_case_3(self): method test_processor_case_4 (line 367) | def test_processor_case_4(self): method test_processor_case_5 (line 418) | def test_processor_case_5(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv2/test_tokenization_layoutlmv2.py class LayoutLMv2TokenizationTest (line 56) | class LayoutLMv2TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 64) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 70) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 79) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 86) | def get_question_words_and_boxes_batch(self): method setUp (line 96) | def setUp(self): method get_input_output_texts (line 120) | def get_input_output_texts(self, tokenizer): method test_chinese (line 125) | def test_chinese(self): method test_basic_tokenizer_lower (line 130) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 138) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 146) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 154) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 162) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 169) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 176) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 183) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 190) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 204) | def test_is_whitespace(self): method test_is_control (line 214) | def test_is_control(self): method test_is_punctuation (line 222) | def test_is_punctuation(self): method test_clean_text (line 231) | def test_clean_text(self): method test_sequence_builders (line 238) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 254) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 283) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 300) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 360) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 378) | def test_right_and_left_truncation(self): method test_encode_plus_with_padding (line 381) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 483) | def test_internal_consistency(self): method test_mask_output (line 504) | def test_mask_output(self): method test_number_of_added_tokens (line 518) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 547) | def test_padding_to_max_length(self): method test_padding (line 582) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 801) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 844) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 867) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 932) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 935) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 987) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 1024) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 1032) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 1057) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 1080) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 1097) | def test_save_and_load_tokenizer(self): method test_right_and_left_padding (line 1124) | def test_right_and_left_padding(self): method test_token_type_ids (line 1187) | def test_token_type_ids(self): method test_offsets_mapping (line 1220) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1268) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1315) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1336) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1390) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1421) | def test_compare_add_special_tokens(self): method test_layoutlmv2_truncation_integration_test (line 1458) | def test_layoutlmv2_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1478) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1519) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1543) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1581) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1618) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1717) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1731) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1767) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1830) | def test_alignement_methods(self): method get_clean_sequence (line 1833) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_maximum_encoding_length_pair_input (line 1868) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2230) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2352) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2356) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2360) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2364) | def test_only_label_first_subword(self): method test_layoutlmv2_integration_test (line 2392) | def test_layoutlmv2_integration_test(self): method test_np_encode_plus_sent_to_model (line 2482) | def test_np_encode_plus_sent_to_model(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv3/test_feature_extraction_layoutlmv3.py class LayoutLMv3FeatureExtractionTester (line 36) | class LayoutLMv3FeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 59) | def prepare_feat_extract_dict(self): class LayoutLMv3FeatureExtractionTest (line 65) | class LayoutLMv3FeatureExtractionTest(FeatureExtractionSavingTestMixin, ... method setUp (line 69) | def setUp(self): method feat_extract_dict (line 73) | def feat_extract_dict(self): method test_feat_extract_properties (line 76) | def test_feat_extract_properties(self): method test_batch_feature (line 82) | def test_batch_feature(self): method test_call_pil (line 85) | def test_call_pil(self): method test_call_numpy (line 120) | def test_call_numpy(self): method test_call_pytorch (line 152) | def test_call_pytorch(self): method test_LayoutLMv3_integration_test (line 184) | def test_LayoutLMv3_integration_test(self): FILE: benchmark/third_party/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, unittest.TestCase): 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 329) | def test_config(self): method test_model (line 332) | def test_model(self): method test_model_various_embeddings (line 336) | def test_model_various_embeddings(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_for_question_answering (line 350) | def test_for_question_answering(self): method test_model_from_pretrained (line 355) | def test_model_from_pretrained(self): function prepare_img (line 362) | def prepare_img(): class LayoutLMv3ModelIntegrationTest (line 368) | class LayoutLMv3ModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 370) | def default_feature_extractor(self): method test_inference_no_head (line 374) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv3/test_modeling_tf_layoutlmv3.py class TFLayoutLMv3ModelTester (line 54) | class TFLayoutLMv3ModelTester: method __init__ (line 55) | def __init__( method prepare_config_and_inputs (line 119) | def prepare_config_and_inputs(self): method create_and_check_model (line 173) | def create_and_check_model(self, config, input_ids, bbox, pixel_values... method create_and_check_for_sequence_classification (line 202) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 218) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 234) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 252) | def prepare_config_and_inputs_for_common(self): class TFLayoutLMv3ModelTest (line 266) | class TFLayoutLMv3ModelTest(TFModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 283) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 309) | def setUp(self): method test_config (line 313) | def test_config(self): method test_loss_computation (line 316) | def test_loss_computation(self): method test_model (line 383) | def test_model(self): method test_model_various_embeddings (line 396) | def test_model_various_embeddings(self): method test_for_sequence_classification (line 411) | def test_for_sequence_classification(self): method test_for_token_classification (line 426) | def test_for_token_classification(self): method test_for_question_answering (line 441) | def test_for_question_answering(self): method test_model_from_pretrained (line 457) | def test_model_from_pretrained(self): function prepare_img (line 464) | def prepare_img(): class TFLayoutLMv3ModelIntegrationTest (line 470) | class TFLayoutLMv3ModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 472) | def default_feature_extractor(self): method test_inference_no_head (line 476) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv3/test_processor_layoutlmv3.py class LayoutLMv3ProcessorTest (line 37) | class LayoutLMv3ProcessorTest(unittest.TestCase): method setUp (line 41) | def setUp(self): method get_tokenizer (line 87) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 90) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 93) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_feature_extractor (line 96) | def get_feature_extractor(self, **kwargs): method tearDown (line 99) | def tearDown(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): class LayoutLMv3ProcessorIntegrationTests (line 153) | class LayoutLMv3ProcessorIntegrationTests(unittest.TestCase): method get_images (line 155) | def get_images(self): method get_tokenizers (line 167) | def get_tokenizers(self): method test_processor_case_1 (line 173) | def test_processor_case_1(self): method test_processor_case_2 (line 228) | def test_processor_case_2(self): method test_processor_case_3 (line 282) | def test_processor_case_3(self): method test_processor_case_4 (line 347) | def test_processor_case_4(self): method test_processor_case_5 (line 398) | def test_processor_case_5(self): FILE: benchmark/third_party/transformers/tests/models/layoutlmv3/test_tokenization_layoutlmv3.py class LayoutLMv3TokenizationTest (line 51) | class LayoutLMv3TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_words_and_boxes (line 60) | def get_words_and_boxes(self): method get_words_and_boxes_batch (line 66) | def get_words_and_boxes_batch(self): method get_question_words_and_boxes (line 75) | def get_question_words_and_boxes(self): method get_question_words_and_boxes_batch (line 82) | def get_question_words_and_boxes_batch(self): method setUp (line 92) | def setUp(self): method get_tokenizer (line 129) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 133) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 137) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 142) | def test_full_tokenizer(self): method test_sequence_builders (line 154) | def test_sequence_builders(self): method test_add_special_tokens (line 170) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 187) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 247) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 265) | def test_right_and_left_truncation(self): method test_encode_plus_with_padding (line 268) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 370) | def test_internal_consistency(self): method test_mask_output (line 391) | def test_mask_output(self): method test_number_of_added_tokens (line 405) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 434) | def test_padding_to_max_length(self): method test_padding (line 469) | 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 819) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 822) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 874) | 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_padding (line 1011) | def test_right_and_left_padding(self): method test_token_type_ids (line 1074) | def test_token_type_ids(self): method test_offsets_mapping (line 1106) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1154) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1201) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1222) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1276) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1307) | def test_compare_add_special_tokens(self): method test_layoutlmv3_truncation_integration_test (line 1344) | def test_layoutlmv3_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1364) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1405) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1429) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1467) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1504) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1603) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1617) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1653) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1721) | def test_alignement_methods(self): method get_clean_sequence (line 1724) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_added_token_with_space_before (line 1758) | def test_added_token_with_space_before(self): method test_maximum_encoding_length_pair_input (line 1789) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2151) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2274) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2278) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2282) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2286) | def test_only_label_first_subword(self): method test_layoutlmv3_integration_test (line 2318) | def test_layoutlmv3_integration_test(self): method test_np_encode_plus_sent_to_model (line 2408) | def test_np_encode_plus_sent_to_model(self): method test_tf_encode_plus_sent_to_model (line 2413) | def test_tf_encode_plus_sent_to_model(self): FILE: benchmark/third_party/transformers/tests/models/layoutxlm/test_processor_layoutxlm.py class LayoutXLMProcessorTest (line 43) | class LayoutXLMProcessorTest(unittest.TestCase): method setUp (line 47) | def setUp(self): method get_tokenizer (line 62) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 65) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 68) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_feature_extractor (line 71) | def get_feature_extractor(self, **kwargs): method tearDown (line 74) | def tearDown(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_overflowing_tokens (line 130) | def test_overflowing_tokens(self): class LayoutXLMProcessorIntegrationTests (line 168) | class LayoutXLMProcessorIntegrationTests(unittest.TestCase): method get_images (line 170) | def get_images(self): method get_tokenizers (line 182) | def get_tokenizers(self): method test_processor_case_1 (line 188) | def test_processor_case_1(self): method test_processor_case_2 (line 243) | def test_processor_case_2(self): method test_processor_case_3 (line 297) | def test_processor_case_3(self): method test_processor_case_4 (line 362) | def test_processor_case_4(self): method test_processor_case_5 (line 413) | def test_processor_case_5(self): FILE: benchmark/third_party/transformers/tests/models/layoutxlm/test_tokenization_layoutxlm.py class LayoutXLMTokenizationTest (line 57) | 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_save_sentencepiece_tokenizer (line 112) | def test_save_sentencepiece_tokenizer(self) -> None: method test_sequence_builders (line 149) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 165) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 194) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 211) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 271) | def test_encode_decode_with_spaces(self): method test_encode_plus_with_padding (line 288) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 390) | def test_internal_consistency(self): method test_mask_output (line 411) | def test_mask_output(self): method test_number_of_added_tokens (line 425) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 454) | def test_padding_to_max_length(self): method test_padding (line 489) | def test_padding(self, max_length=50): method test_padding_warning_message_fast_tokenizer (line 708) | def test_padding_warning_message_fast_tokenizer(self): method test_call (line 751) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 774) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 839) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 842) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 894) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 931) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 939) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 964) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 987) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 1004) | def test_save_and_load_tokenizer(self): method test_right_and_left_truncation (line 1032) | def test_right_and_left_truncation(self): method test_right_and_left_padding (line 1035) | def test_right_and_left_padding(self): method test_token_type_ids (line 1098) | def test_token_type_ids(self): method test_offsets_mapping (line 1131) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1180) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1222) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1243) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1297) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1328) | def test_compare_add_special_tokens(self): method test_layoutxlm_truncation_integration_test (line 1365) | def test_layoutxlm_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1385) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1426) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1450) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1488) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1525) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1624) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1638) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1674) | def test_batch_encode_dynamic_overflowing(self): method test_save_pretrained (line 1737) | def test_save_pretrained(self): method test_alignement_methods (line 1809) | def test_alignement_methods(self): method test_maximum_encoding_length_pair_input (line 1813) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 1817) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 1821) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 1825) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 1829) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 1833) | def test_only_label_first_subword(self): method test_layoutxlm_integration_test (line 1857) | def test_layoutxlm_integration_test(self): method test_np_encode_plus_sent_to_model (line 1947) | def test_np_encode_plus_sent_to_model(self): FILE: benchmark/third_party/transformers/tests/models/led/test_modeling_led.py function prepare_led_inputs_dict (line 46) | def prepare_led_inputs_dict( class LEDModelTester (line 77) | class LEDModelTester: method __init__ (line 78) | def __init__( method prepare_config_and_inputs (line 131) | def prepare_config_and_inputs(self): method get_config (line 144) | def get_config(self): method get_pipeline_config (line 163) | def get_pipeline_config(self): method prepare_config_and_inputs_for_common (line 169) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 177) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 211) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): method check_global_attention (line 245) | def check_global_attention(self, config, inputs_dict): class LEDModelTest (line 271) | class LEDModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Tes... method setUp (line 283) | def setUp(self): method test_config (line 287) | def test_config(self): method test_save_load_strict (line 290) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 300) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 304) | def test_encoder_decoder_model_standalone(self): method test_global_attention (line 308) | def test_global_attention(self): method test_inputs_embeds (line 313) | def test_inputs_embeds(self): method test_generate_fp16 (line 342) | def test_generate_fp16(self): method test_retain_grad_hidden_states_attentions (line 352) | def test_retain_grad_hidden_states_attentions(self): method test_attention_outputs (line 356) | def test_attention_outputs(self): function assert_tensors_close (line 430) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 449) | def _long_tensor(tok_lst): class LEDModelIntegrationTests (line 460) | class LEDModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 469) | def default_tokenizer(self): method test_inference_no_head (line 472) | def test_inference_no_head(self): method test_inference_head (line 489) | def test_inference_head(self): method test_seq_to_seq_generation (line 506) | def test_seq_to_seq_generation(self): FILE: benchmark/third_party/transformers/tests/models/led/test_modeling_tf_led.py class TFLEDModelTester (line 33) | class TFLEDModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs_for_common (line 89) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 123) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_led_inputs_dict (line 158) | def prepare_led_inputs_dict( class TFLEDModelTest (line 192) | class TFLEDModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 200) | def setUp(self): method test_config (line 204) | def test_config(self): method test_decoder_model_past_large_inputs (line 207) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 211) | def test_model_common_attributes(self): method test_attention_outputs (line 231) | def test_attention_outputs(self): method test_xla_mode (line 301) | def test_xla_mode(self): method test_saved_model_creation (line 306) | def test_saved_model_creation(self): method test_generate_with_headmasking (line 309) | def test_generate_with_headmasking(self): function _long_tensor (line 314) | def _long_tensor(tok_lst): class TFLEDModelIntegrationTest (line 323) | class TFLEDModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 324) | def test_inference_no_head(self): method test_inference_with_head (line 340) | def test_inference_with_head(self): FILE: benchmark/third_party/transformers/tests/models/levit/test_feature_extraction_levit.py class LevitFeatureExtractionTester (line 36) | class LevitFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): class LevitFeatureExtractionTest (line 78) | class LevitFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitt... method setUp (line 82) | def setUp(self): method feat_extract_dict (line 86) | def feat_extract_dict(self): method test_feat_extract_properties (line 89) | def test_feat_extract_properties(self): method test_batch_feature (line 98) | def test_batch_feature(self): method test_call_pil (line 101) | def test_call_pil(self): method test_call_numpy (line 133) | def test_call_numpy(self): method test_call_pytorch (line 165) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/levit/test_modeling_levit.py class LevitConfigTester (line 51) | class LevitConfigTester(ConfigTester): method create_and_test_config_common_properties (line 52) | def create_and_test_config_common_properties(self): class LevitModelTester (line 58) | class LevitModelTester: method __init__ (line 59) | def __init__( method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_config (line 116) | 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_for_image_classification (line 150) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 158) | def prepare_config_and_inputs_for_common(self): class LevitModelTest (line 166) | class LevitModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 184) | def setUp(self): method test_config (line 188) | def test_config(self): method create_and_test_config_common_properties (line 197) | def create_and_test_config_common_properties(self): method test_inputs_embeds (line 201) | def test_inputs_embeds(self): method test_model_common_attributes (line 205) | def test_model_common_attributes(self): method test_attention_outputs (line 209) | def test_attention_outputs(self): method test_forward_signature (line 212) | def test_forward_signature(self): method test_hidden_states_output (line 224) | def test_hidden_states_output(self): method _prepare_for_class (line 276) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_model (line 285) | def test_model(self): method test_for_image_classification (line 289) | def test_for_image_classification(self): method test_training (line 294) | def test_training(self): method test_training_gradient_checkpointing (line 315) | def test_training_gradient_checkpointing(self): method test_problem_types (line 337) | def test_problem_types(self): method test_model_from_pretrained (line 388) | def test_model_from_pretrained(self): function prepare_img (line 395) | def prepare_img(): class LevitModelIntegrationTest (line 402) | class LevitModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 404) | def default_feature_extractor(self): method test_inference_image_classification_head (line 408) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/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, unittest.Te... method setUp (line 236) | def setUp(self): method test_config (line 240) | def test_config(self): method test_model (line 243) | def test_model(self): method test_model_various_embeddings (line 247) | def test_model_various_embeddings(self): method test_for_token_classification (line 253) | def test_for_token_classification(self): method test_for_question_answering (line 257) | def test_for_question_answering(self): method test_model_from_pretrained (line 262) | def test_model_from_pretrained(self): class LiltModelIntegrationTest (line 270) | class LiltModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 271) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/longformer/test_modeling_longformer.py class LongformerModelTester (line 40) | class LongformerModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 77) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method get_pipeline_config (line 116) | def get_pipeline_config(self): method create_and_check_attention_mask_determinism (line 121) | def create_and_check_attention_mask_determinism( method create_and_check_model (line 133) | def create_and_check_model( method create_and_check_model_with_global_attention_mask (line 145) | def create_and_check_model_with_global_attention_mask( method create_and_check_for_masked_lm (line 167) | 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 193) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 203) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 213) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 233) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_question_answering (line 255) | def prepare_config_and_inputs_for_question_answering(self): class LongformerModelTest (line 277) | class LongformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 294) | def setUp(self): method test_config (line 298) | def test_config(self): method test_model (line 301) | def test_model(self): method test_model_attention_mask_determinism (line 305) | def test_model_attention_mask_determinism(self): method test_model_global_attention_mask (line 309) | def test_model_global_attention_mask(self): method test_for_masked_lm (line 313) | def test_for_masked_lm(self): method test_for_question_answering (line 317) | def test_for_question_answering(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_multiple_choice (line 329) | def test_for_multiple_choice(self): method test_retain_grad_hidden_states_attentions (line 333) | def test_retain_grad_hidden_states_attentions(self): class LongformerModelIntegrationTest (line 341) | class LongformerModelIntegrationTest(unittest.TestCase): method _get_hidden_states (line 342) | def _get_hidden_states(self): method test_diagonalize (line 392) | def test_diagonalize(self): method test_pad_and_transpose_last_two_dims (line 422) | def test_pad_and_transpose_last_two_dims(self): method test_chunk (line 434) | def test_chunk(self): method test_mask_invalid_locations (line 455) | def test_mask_invalid_locations(self): method test_layer_local_attn (line 480) | def test_layer_local_attn(self): method test_layer_global_attn (line 514) | def test_layer_global_attn(self): method test_layer_attn_probs (line 565) | def test_layer_attn_probs(self): method test_inference_no_head (line 654) | def test_inference_no_head(self): method test_inference_no_head_long (line 670) | def test_inference_no_head_long(self): method test_inference_masked_lm_long (line 691) | def test_inference_masked_lm_long(self): FILE: benchmark/third_party/transformers/tests/models/longformer/test_modeling_tf_longformer.py class TFLongformerModelTester (line 42) | class TFLongformerModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 77) | def prepare_config_and_inputs(self): method create_and_check_attention_mask_determinism (line 113) | def create_and_check_attention_mask_determinism( method create_and_check_model (line 123) | def create_and_check_model( method create_and_check_model_with_global_attention_mask (line 137) | def create_and_check_model_with_global_attention_mask( method create_and_check_for_masked_lm (line 165) | 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 207) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 224) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_question_answering (line 251) | def prepare_config_and_inputs_for_question_answering(self): class TFLongformerModelTest (line 273) | class TFLongformerModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 290) | def setUp(self): method test_config (line 294) | def test_config(self): method test_model_attention_mask_determinism (line 297) | def test_model_attention_mask_determinism(self): method test_model (line 301) | def test_model(self): method test_model_global_attention_mask (line 305) | def test_model_global_attention_mask(self): method test_for_masked_lm (line 309) | def test_for_masked_lm(self): method test_for_question_answering (line 313) | def test_for_question_answering(self): method test_for_sequence_classification (line 317) | def test_for_sequence_classification(self): method test_for_token_classification (line 321) | def test_for_token_classification(self): method test_for_multiple_choice (line 325) | def test_for_multiple_choice(self): method test_saved_model_creation (line 330) | def test_saved_model_creation(self): method test_xla_mode (line 333) | def test_xla_mode(self): class TFLongformerModelIntegrationTest (line 341) | class TFLongformerModelIntegrationTest(unittest.TestCase): method _get_hidden_states (line 342) | def _get_hidden_states(self): method test_diagonalize (line 391) | def test_diagonalize(self): method test_pad_and_transpose_last_two_dims (line 412) | def test_pad_and_transpose_last_two_dims(self): method test_mask_invalid_locations (line 429) | def test_mask_invalid_locations(self): method test_chunk (line 447) | def test_chunk(self): method test_layer_local_attn (line 466) | def test_layer_local_attn(self): method test_layer_global_attn (line 492) | def test_layer_global_attn(self): method test_layer_attn_probs (line 538) | def test_layer_attn_probs(self): method test_inference_no_head (line 616) | def test_inference_no_head(self): method test_inference_no_head_long (line 632) | def test_inference_no_head_long(self): method test_inference_masked_lm_long (line 657) | def test_inference_masked_lm_long(self): method test_inference_masked_lm (line 681) | def test_inference_masked_lm(self): FILE: benchmark/third_party/transformers/tests/models/longformer/test_tokenization_longformer.py class LongformerTokenizationTest (line 32) | class LongformerTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 38) | 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 longformer_dict_integration_testing (line 99) | def longformer_dict_integration_testing(self): method test_sequence_builders (line 109) | def test_sequence_builders(self): method test_space_encoding (line 128) | 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: benchmark/third_party/transformers/tests/models/longt5/test_modeling_flax_longt5.py class FlaxLongT5ModelTester (line 57) | class FlaxLongT5ModelTester: method __init__ (line 58) | 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 244) | def setUp(self): method test_config (line 248) | def test_config(self): method test_model (line 251) | def test_model(self): method test_model_v1_1 (line 255) | def test_model_v1_1(self): method test_use_cache_forward_with_attn_mask (line 263) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 268) | def test_encode(self): method test_decode (line 291) | def test_decode(self): method test_shift_right (line 324) | def test_shift_right(self): method test_save_load_from_base (line 342) | def test_save_load_from_base(self): method test_save_load_to_base (line 365) | def test_save_load_to_base(self): method test_attention_outputs (line 387) | def test_attention_outputs(self): method test_save_load_from_base_pt (line 475) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 505) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 534) | def test_save_load_bf16_to_base_pt(self): class FlaxLongT5TGlobalModelTest (line 563) | class FlaxLongT5TGlobalModelTest(FlaxLongT5ModelTest): method setUp (line 564) | def setUp(self): method test_attention_outputs (line 568) | def test_attention_outputs(self): class FlaxLongT5ModelIntegrationTests (line 660) | class FlaxLongT5ModelIntegrationTests(unittest.TestCase): method expected_summary (line 663) | def expected_summary(self): method test_summarization (line 675) | def test_summarization(self): FILE: benchmark/third_party/transformers/tests/models/longt5/test_modeling_longt5.py class LongT5ModelTester (line 45) | class LongT5ModelTester: method __init__ (line 46) | def __init__( method get_large_model_config (line 103) | def get_large_model_config(self): method prepare_config_and_inputs (line 106) | def prepare_config_and_inputs(self): method get_pipeline_config (line 131) | def get_pipeline_config(self): method get_config (line 152) | def get_config(self): method check_prepare_lm_labels_via_shift_left (line 173) | def check_prepare_lm_labels_via_shift_left( method create_and_check_model (line 212) | def create_and_check_model( method create_and_check_with_lm_head (line 242) | def create_and_check_with_lm_head( method create_and_check_decoder_model_past (line 262) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 299) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 350) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 388) | def create_and_check_generate_with_past_key_values( method create_and_check_encoder_decoder_shared_weights (line 406) | def create_and_check_encoder_decoder_shared_weights( method prepare_config_and_inputs_for_common (line 482) | def prepare_config_and_inputs_for_common(self): class LongT5ModelTest (line 504) | class LongT5ModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.... method setUp (line 515) | def setUp(self): method test_config (line 519) | def test_config(self): method test_shift_right (line 522) | def test_shift_right(self): method test_model (line 526) | def test_model(self): method test_with_lm_head (line 530) | def test_with_lm_head(self): method test_decoder_model_past (line 534) | def test_decoder_model_past(self): method test_decoder_model_past_with_attn_mask (line 538) | def test_decoder_model_past_with_attn_mask(self): method test_decoder_model_past_with_3d_attn_mask (line 542) | def test_decoder_model_past_with_3d_attn_mask(self): method test_decoder_model_past_with_large_inputs (line 570) | def test_decoder_model_past_with_large_inputs(self): method test_generate_with_past_key_values (line 574) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 578) | def test_encoder_decoder_shared_weights(self): method test_model_from_pretrained (line 583) | def test_model_from_pretrained(self): method test_export_to_onnx (line 593) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 606) | def test_generate_with_head_masking(self): method test_attention_outputs (line 640) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 749) | def _check_encoder_attention_for_generate(self, attentions, batch_size... class LongT5TGlobalModelTest (line 760) | class LongT5TGlobalModelTest(LongT5ModelTest): method setUp (line 761) | def setUp(self): method test_attention_outputs (line 767) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 878) | def _check_encoder_attention_for_generate(self, attentions, batch_size... class LongT5EncoderOnlyModelTester (line 896) | class LongT5EncoderOnlyModelTester: method __init__ (line 897) | def __init__( method get_large_model_config (line 948) | def get_large_model_config(self): method prepare_config_and_inputs (line 951) | def prepare_config_and_inputs(self): method create_and_check_model (line 983) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 1001) | def prepare_config_and_inputs_for_common(self): class LongT5EncoderOnlyModelTest (line 1016) | class LongT5EncoderOnlyModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 1023) | def setUp(self): method test_config (line 1027) | def test_config(self): method test_model (line 1030) | def test_model(self): method test_attention_outputs (line 1034) | def test_attention_outputs(self): class LongT5EncoderOnlyTGlobalModelTest (line 1099) | class LongT5EncoderOnlyTGlobalModelTest(LongT5EncoderOnlyModelTest): method setUp (line 1100) | def setUp(self): method test_attention_outputs (line 1106) | def test_attention_outputs(self): function use_task_specific_params (line 1174) | def use_task_specific_params(model, task): class LongT5ModelIntegrationTests (line 1181) | class LongT5ModelIntegrationTests(unittest.TestCase): method model (line 1183) | def model(self): method tokenizer (line 1189) | def tokenizer(self): method expected_summary (line 1192) | def expected_summary(self): method test_summarization (line 1204) | def test_summarization(self): method test_inference_hidden_states (line 1290) | def test_inference_hidden_states(self): FILE: benchmark/third_party/transformers/tests/models/luke/test_modeling_luke.py class LukeModelTester (line 43) | class LukeModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 120) | def prepare_config_and_inputs(self): method get_config (line 192) | def get_config(self): method create_and_check_model (line 211) | def create_and_check_model( method create_and_check_for_masked_lm (line 252) | def create_and_check_for_masked_lm( method create_and_check_for_entity_classification (line 294) | def create_and_check_for_entity_classification( method create_and_check_for_entity_pair_classification (line 329) | def create_and_check_for_entity_pair_classification( method create_and_check_for_entity_span_classification (line 364) | def create_and_check_for_entity_span_classification( method create_and_check_for_question_answering (line 406) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 441) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 475) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 509) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 556) | def prepare_config_and_inputs_for_common(self): class LukeModelTest (line 588) | class LukeModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 610) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 668) | def setUp(self): method test_config (line 672) | def test_config(self): method test_model (line 675) | def test_model(self): method test_model_from_pretrained (line 680) | def test_model_from_pretrained(self): method test_for_masked_lm (line 685) | def test_for_masked_lm(self): method test_for_masked_lm_with_word_only (line 689) | def test_for_masked_lm_with_word_only(self): method test_for_question_answering (line 694) | def test_for_question_answering(self): method test_for_sequence_classification (line 698) | def test_for_sequence_classification(self): method test_for_token_classification (line 702) | def test_for_token_classification(self): method test_for_multiple_choice (line 706) | def test_for_multiple_choice(self): method test_for_entity_classification (line 710) | def test_for_entity_classification(self): method test_for_entity_pair_classification (line 714) | def test_for_entity_pair_classification(self): method test_for_entity_span_classification (line 718) | def test_for_entity_span_classification(self): method test_attention_outputs (line 722) | def test_attention_outputs(self): method test_entity_hidden_states_output (line 779) | def test_entity_hidden_states_output(self): method test_retain_grad_entity_hidden_states (line 814) | def test_retain_grad_entity_hidden_states(self): class LukeModelIntegrationTests (line 839) | class LukeModelIntegrationTests(unittest.TestCase): method test_inference_base_model (line 841) | def test_inference_base_model(self): method test_inference_large_model (line 876) | def test_inference_large_model(self): FILE: benchmark/third_party/transformers/tests/models/luke/test_tokenization_luke.py class LukeTokenizerTest (line 30) | class LukeTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 40) | 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 133) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 136) | def test_embeded_special_tokens(self): method test_padding_entity_inputs (line 165) | def test_padding_entity_inputs(self): method test_if_tokenize_single_text_raise_error_with_invalid_inputs (line 180) | def test_if_tokenize_single_text_raise_error_with_invalid_inputs(self): method test_if_tokenize_entity_classification_raise_error_with_invalid_inputs (line 202) | def test_if_tokenize_entity_classification_raise_error_with_invalid_in... method test_if_tokenize_entity_pair_classification_raise_error_with_invalid_inputs (line 217) | def test_if_tokenize_entity_pair_classification_raise_error_with_inval... method test_if_tokenize_entity_span_classification_raise_error_with_invalid_inputs (line 229) | def test_if_tokenize_entity_span_classification_raise_error_with_inval... class LukeTokenizerIntegrationTests (line 243) | class LukeTokenizerIntegrationTests(unittest.TestCase): method setUp (line 247) | def setUp(self): method test_single_text_no_padding_or_truncation (line 250) | def test_single_text_no_padding_or_truncation(self): method test_single_text_only_entity_spans_no_padding_or_truncation (line 291) | def test_single_text_only_entity_spans_no_padding_or_truncation(self): method test_single_text_padding_pytorch_tensors (line 325) | def test_single_text_padding_pytorch_tensors(self): method test_text_pair_no_padding_or_truncation (line 353) | def test_text_pair_no_padding_or_truncation(self): method test_text_pair_only_entity_spans_no_padding_or_truncation (line 405) | def test_text_pair_only_entity_spans_no_padding_or_truncation(self): method test_text_pair_padding_pytorch_tensors (line 447) | def test_text_pair_padding_pytorch_tensors(self): method test_entity_classification_no_padding_or_truncation (line 481) | def test_entity_classification_no_padding_or_truncation(self): method test_entity_classification_padding_pytorch_tensors (line 517) | def test_entity_classification_padding_pytorch_tensors(self): method test_entity_pair_classification_no_padding_or_truncation (line 545) | def test_entity_pair_classification_no_padding_or_truncation(self): method test_entity_pair_classification_padding_pytorch_tensors (line 580) | def test_entity_pair_classification_padding_pytorch_tensors(self): method test_entity_span_classification_no_padding_or_truncation (line 610) | def test_entity_span_classification_no_padding_or_truncation(self): method test_entity_span_classification_padding_pytorch_tensors (line 640) | def test_entity_span_classification_padding_pytorch_tensors(self): FILE: benchmark/third_party/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 190) | def get_config(self): method create_and_check_lxmert_model (line 225) | def create_and_check_lxmert_model( method create_and_check_lxmert_for_question_answering (line 267) | def create_and_check_lxmert_for_question_answering( method create_and_check_lxmert_for_pretraining (line 315) | def create_and_check_lxmert_for_pretraining( method resize_lxmert_num_qa_labels (line 401) | def resize_lxmert_num_qa_labels( method prepare_config_and_inputs_for_common (line 501) | def prepare_config_and_inputs_for_common(self, return_obj_labels=False): class LxmertModelTest (line 534) | class LxmertModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 544) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 559) | def setUp(self): method test_config (line 563) | def test_config(self): method test_lxmert_model (line 566) | def test_lxmert_model(self): method test_lxmert_question_answering (line 570) | def test_lxmert_question_answering(self): method test_lxmert_pretraining (line 574) | def test_lxmert_pretraining(self): method test_lxmert_question_answering_labels_resize (line 578) | def test_lxmert_question_answering_labels_resize(self): method test_model_from_pretrained (line 583) | def test_model_from_pretrained(self): method test_attention_outputs (line 589) | def test_attention_outputs(self): method test_hidden_states_output (line 673) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 710) | def test_retain_grad_hidden_states_attentions(self): method prepare_tf_inputs_from_pt_inputs (line 743) | def prepare_tf_inputs_from_pt_inputs(self, pt_inputs_dict): class LxmertModelIntegrationTest (line 770) | class LxmertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 772) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/transformers/tests/models/lxmert/test_modeling_tf_lxmert.py class TFLxmertModelTester (line 35) | class TFLxmertModelTester(object): method __init__ (line 36) | def __init__( method prepare_config_and_inputs (line 119) | def prepare_config_and_inputs(self): method create_and_check_lxmert_model (line 209) | def create_and_check_lxmert_model( method prepare_config_and_inputs_for_common (line 249) | def prepare_config_and_inputs_for_common(self, return_obj_labels=False): method create_and_check_lxmert_for_pretraining (line 280) | def create_and_check_lxmert_for_pretraining( class TFLxmertModelTest (line 366) | class TFLxmertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 372) | def setUp(self): method test_config (line 376) | def test_config(self): method test_lxmert_model (line 379) | def test_lxmert_model(self): method test_lxmert_for_pretraining (line 383) | def test_lxmert_for_pretraining(self): method test_model_from_pretrained (line 388) | def test_model_from_pretrained(self): method test_attention_outputs (line 393) | def test_attention_outputs(self): method test_hidden_states_output (line 460) | def test_hidden_states_output(self): method prepare_pt_inputs_from_tf_inputs (line 491) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method test_save_load (line 517) | def test_save_load(self): method test_compile_tf_model (line 533) | def test_compile_tf_model(self): method test_model_common_attributes (line 582) | def test_model_common_attributes(self): method test_saved_model_creation (line 604) | def test_saved_model_creation(self): method test_saved_model_creation_extended (line 608) | def test_saved_model_creation_extended(self): class TFLxmertModelIntegrationTest (line 672) | class TFLxmertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 674) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/m2m_100/test_modeling_m2m_100.py function prepare_m2m_100_inputs_dict (line 38) | def prepare_m2m_100_inputs_dict( class M2M100ModelTester (line 69) | class M2M100ModelTester: method __init__ (line 70) | def __init__( method prepare_config_and_inputs (line 112) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 155) | 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 M2M100ModelTest (line 223) | class M2M100ModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.... 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_encoder_decoder_model_standalone (line 259) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 263) | def test_inputs_embeds(self): method test_generate_fp16 (line 292) | def test_generate_fp16(self): function _long_tensor (line 303) | def _long_tensor(tok_lst): class M2M100ModelIntegrationTests (line 314) | class M2M100ModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 316) | def default_tokenizer(self): method test_inference_no_head (line 319) | def test_inference_no_head(self): method test_inference_head (line 334) | def test_inference_head(self): method test_seq_to_seq_generation (line 351) | def test_seq_to_seq_generation(self): FILE: benchmark/third_party/transformers/tests/models/m2m_100/test_tokenization_m2m_100.py class M2M100TokenizationTest (line 50) | class M2M100TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 56) | def setUp(self): method get_tokenizer (line 69) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 72) | def get_input_output_texts(self, tokenizer): method test_convert_token_and_id (line 78) | def test_convert_token_and_id(self): method test_get_vocab (line 86) | def test_get_vocab(self): method test_vocab_size (line 94) | def test_vocab_size(self): method test_pretrained_model_lists (line 98) | def test_pretrained_model_lists(self): method test_full_tokenizer (line 101) | def test_full_tokenizer(self): method test_tokenizer_integration (line 119) | def test_tokenizer_integration(self): class M2M100TokenizerIntegrationTest (line 134) | class M2M100TokenizerIntegrationTest(unittest.TestCase): method setUpClass (line 150) | def setUpClass(cls): method check_language_codes (line 157) | def check_language_codes(self): method test_get_vocab (line 163) | def test_get_vocab(self): method test_tokenizer_batch_encode_plus (line 166) | def test_tokenizer_batch_encode_plus(self): method test_tokenizer_decode_ignores_language_codes (line 171) | def test_tokenizer_decode_ignores_language_codes(self): method test_special_tokens_unaffacted_by_save_load (line 181) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 189) | def test_batch_fairseq_parity(self): method test_src_lang_setter (line 211) | def test_src_lang_setter(self): method test_tokenizer_target_mode (line 221) | def test_tokenizer_target_mode(self): method test_tokenizer_translation (line 237) | def test_tokenizer_translation(self): FILE: benchmark/third_party/transformers/tests/models/marian/test_modeling_flax_marian.py function prepare_marian_inputs_dict (line 42) | def prepare_marian_inputs_dict( class FlaxMarianModelTester (line 70) | class FlaxMarianModelTester: method __init__ (line 71) | def __init__( method prepare_config_and_inputs (line 111) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 138) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 142) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 182) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxMarianModelTest (line 230) | class FlaxMarianModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxG... method setUp (line 235) | def setUp(self): method test_use_cache_forward (line 238) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 243) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 248) | def test_encode(self): method test_decode (line 271) | def test_decode(self): method test_model_from_pretrained (line 305) | def test_model_from_pretrained(self): class MarianIntegrationTest (line 317) | class MarianIntegrationTest(unittest.TestCase): method setUpClass (line 322) | def setUpClass(cls) -> None: method tokenizer (line 327) | def tokenizer(self): method eos_token_id (line 331) | def eos_token_id(self) -> int: method model (line 335) | def model(self): method _assert_generated_batch_equal_expected (line 340) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 344) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_EN_FR (line 359) | class TestMarian_EN_FR(MarianIntegrationTest): method test_batch_generation_en_fr (line 372) | def test_batch_generation_en_fr(self): class TestMarian_FR_EN (line 379) | class TestMarian_FR_EN(MarianIntegrationTest): method test_batch_generation_fr_en (line 392) | def test_batch_generation_fr_en(self): class TestMarian_MT_EN (line 399) | class TestMarian_MT_EN(MarianIntegrationTest): method test_batch_generation_mt_en (line 408) | def test_batch_generation_mt_en(self): class TestMarian_EN_DE (line 415) | class TestMarian_EN_DE(MarianIntegrationTest): method test_batch_generation_en_de (line 436) | def test_batch_generation_en_de(self): class TestMarian_en_zh (line 443) | class TestMarian_en_zh(MarianIntegrationTest): method test_batch_generation_eng_zho (line 450) | def test_batch_generation_eng_zho(self): class TestMarian_RU_FR (line 457) | class TestMarian_RU_FR(MarianIntegrationTest): method test_batch_generation_ru_fr (line 464) | def test_batch_generation_ru_fr(self): class TestMarian_en_ROMANCE (line 471) | class TestMarian_en_ROMANCE(MarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 488) | def test_batch_generation_en_ROMANCE_multi(self): FILE: benchmark/third_party/transformers/tests/models/marian/test_modeling_marian.py function prepare_marian_inputs_dict (line 54) | def prepare_marian_inputs_dict( class MarianModelTester (line 85) | class MarianModelTester: method __init__ (line 86) | def __init__( method prepare_config_and_inputs (line 132) | def prepare_config_and_inputs(self): method get_config (line 144) | def get_config(self): method prepare_config_and_inputs_for_common (line 165) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 169) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 203) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class MarianModelTest (line 237) | class MarianModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.... method setUp (line 245) | def setUp(self): method test_config (line 249) | def test_config(self): method test_save_load_strict (line 252) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 262) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 266) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 270) | def test_generate_fp16(self): method test_share_encoder_decoder_embeddings (line 280) | def test_share_encoder_decoder_embeddings(self): method test_resize_decoder_token_embeddings (line 306) | def test_resize_decoder_token_embeddings(self): method test_tie_word_embeddings_decoder (line 329) | def test_tie_word_embeddings_decoder(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 ModelManagementTests (line 356) | class ModelManagementTests(unittest.TestCase): method test_model_names (line 359) | def test_model_names(self): class MarianIntegrationTest (line 370) | class MarianIntegrationTest(unittest.TestCase): method setUpClass (line 392) | def setUpClass(cls) -> None: method tokenizer (line 397) | def tokenizer(self): method eos_token_id (line 401) | def eos_token_id(self) -> int: method model (line 405) | def model(self): method _assert_generated_batch_equal_expected (line 417) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 421) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_EN_DE_More (line 435) | class TestMarian_EN_DE_More(MarianIntegrationTest): method test_forward (line 437) | def test_forward(self): method test_unk_support (line 461) | def test_unk_support(self): method test_pad_not_split (line 467) | def test_pad_not_split(self): method test_batch_generation_en_de (line 473) | def test_batch_generation_en_de(self): method test_auto_config (line 476) | def test_auto_config(self): class TestMarian_EN_FR (line 483) | class TestMarian_EN_FR(MarianIntegrationTest): method test_batch_generation_en_fr (line 496) | def test_batch_generation_en_fr(self): class TestMarian_FR_EN (line 502) | class TestMarian_FR_EN(MarianIntegrationTest): method test_batch_generation_fr_en (line 515) | def test_batch_generation_fr_en(self): class TestMarian_RU_FR (line 521) | class TestMarian_RU_FR(MarianIntegrationTest): method test_batch_generation_ru_fr (line 528) | def test_batch_generation_ru_fr(self): class TestMarian_MT_EN (line 534) | class TestMarian_MT_EN(MarianIntegrationTest): method test_batch_generation_mt_en (line 543) | def test_batch_generation_mt_en(self): class TestMarian_en_zh (line 549) | class TestMarian_en_zh(MarianIntegrationTest): method test_batch_generation_eng_zho (line 556) | def test_batch_generation_eng_zho(self): class TestMarian_en_ROMANCE (line 562) | class TestMarian_en_ROMANCE(MarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 579) | def test_batch_generation_en_ROMANCE_multi(self): method test_pipeline (line 583) | def test_pipeline(self): class TestMarian_FI_EN_V2 (line 592) | class TestMarian_FI_EN_V2(MarianIntegrationTest): method setUpClass (line 602) | def setUpClass(cls) -> None: method test_batch_generation_en_fr (line 607) | def test_batch_generation_en_fr(self): class TestConversionUtils (line 612) | class TestConversionUtils(unittest.TestCase): method test_renaming_multilingual (line 613) | def test_renaming_multilingual(self): method test_undoing_renaming (line 623) | def test_undoing_renaming(self): class MarianStandaloneDecoderModelTester (line 635) | class MarianStandaloneDecoderModelTester: method __init__ (line 636) | def __init__( method prepare_config_and_inputs (line 691) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 725) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 761) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 808) | def prepare_config_and_inputs_for_common(self): class MarianStandaloneDecoderModelTest (line 825) | class MarianStandaloneDecoderModelTest(ModelTesterMixin, GenerationTeste... method setUp (line 831) | def setUp( method test_config (line 837) | def test_config(self): method test_decoder_model_past (line 840) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 844) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 848) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/marian/test_modeling_tf_marian.py class TFMarianModelTester (line 36) | class TFMarianModelTester: 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_marian_inputs_dict (line 142) | def prepare_marian_inputs_dict( class TFMarianModelTest (line 180) | class TFMarianModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 187) | def setUp(self): method test_config (line 191) | def test_config(self): method test_decoder_model_past_large_inputs (line 194) | def test_decoder_model_past_large_inputs(self): method test_compile_tf_model (line 198) | def test_compile_tf_model(self): method test_model_common_attributes (line 229) | def test_model_common_attributes(self): method test_saved_model_creation (line 250) | def test_saved_model_creation(self): class AbstractMarianIntegrationTest (line 255) | class AbstractMarianIntegrationTest(unittest.TestCase): method setUpClass (line 259) | def setUpClass(cls) -> None: method tokenizer (line 264) | def tokenizer(self) -> MarianTokenizer: method eos_token_id (line 268) | def eos_token_id(self) -> int: method model (line 272) | def model(self): method _assert_generated_batch_equal_expected (line 282) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 286) | def translate_src_text(self, **tokenizer_kwargs): class TestMarian_MT_EN (line 298) | class TestMarian_MT_EN(AbstractMarianIntegrationTest): method test_batch_generation_mt_en (line 308) | def test_batch_generation_mt_en(self): class TestMarian_en_zh (line 315) | class TestMarian_en_zh(AbstractMarianIntegrationTest): method test_batch_generation_en_zh (line 323) | def test_batch_generation_en_zh(self): class TestMarian_en_ROMANCE (line 330) | class TestMarian_en_ROMANCE(AbstractMarianIntegrationTest): method test_batch_generation_en_ROMANCE_multi (line 348) | def test_batch_generation_en_ROMANCE_multi(self): method test_pipeline (line 353) | def test_pipeline(self): FILE: benchmark/third_party/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 136) | def test_tokenizer_integration_seperate_vocabs(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/markuplm/test_modeling_markuplm.py class MarkupLMModelTester (line 41) | class MarkupLMModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 100) | def prepare_config_and_inputs(self): method get_config (line 138) | def get_config(self): method create_and_check_model (line 158) | def create_and_check_model( method create_and_check_for_sequence_classification (line 179) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 204) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 229) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 255) | def prepare_config_and_inputs_for_common(self): class MarkupLMModelTest (line 278) | class MarkupLMModelTest(ModelTesterMixin, unittest.TestCase): 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_for_sequence_classification (line 301) | def test_for_sequence_classification(self): method test_for_token_classification (line 305) | def test_for_token_classification(self): method test_for_question_answering (line 309) | def test_for_question_answering(self): function prepare_html_string (line 314) | def prepare_html_string(): class MarkupLMModelIntegrationTest (line 334) | class MarkupLMModelIntegrationTest(unittest.TestCase): method default_processor (line 336) | def default_processor(self): method test_forward_pass_no_head (line 344) | def test_forward_pass_no_head(self): FILE: benchmark/third_party/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 74) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 77) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method get_tokenizers (line 80) | def get_tokenizers(self, **kwargs) -> List[PreTrainedTokenizerBase]: method get_feature_extractor (line 83) | def get_feature_extractor(self, **kwargs): method tearDown (line 86) | def tearDown(self): method test_save_load_pretrained_default (line 89) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 104) | def test_save_load_pretrained_additional_features(self): class MarkupLMProcessorIntegrationTests (line 140) | class MarkupLMProcessorIntegrationTests(unittest.TestCase): method get_html_strings (line 142) | def get_html_strings(self): method get_tokenizers (line 174) | def get_tokenizers(self): method test_processor_case_1 (line 180) | def test_processor_case_1(self): method test_processor_case_2 (line 215) | def test_processor_case_2(self): method test_processor_case_3 (line 260) | def test_processor_case_3(self): method test_processor_case_4 (line 342) | def test_processor_case_4(self): method test_processor_case_5 (line 398) | def test_processor_case_5(self): FILE: benchmark/third_party/transformers/tests/models/markuplm/test_tokenization_markuplm.py class MarkupLMTokenizationTest (line 43) | class MarkupLMTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 50) | def setUp(self): method get_nodes_and_xpaths (line 73) | def get_nodes_and_xpaths(self): method get_nodes_and_xpaths_batch (line 79) | def get_nodes_and_xpaths_batch(self): method get_question_nodes_and_xpaths (line 88) | def get_question_nodes_and_xpaths(self): method get_question_nodes_and_xpaths_batch (line 95) | def get_question_nodes_and_xpaths_batch(self): method get_input_output_texts (line 105) | def get_input_output_texts(self, tokenizer): method test_add_special_tokens (line 110) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 126) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 186) | def test_encode_decode_with_spaces(self): method test_right_and_left_truncation (line 204) | def test_right_and_left_truncation(self): method test_encode_plus_with_padding (line 207) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 309) | def test_internal_consistency(self): method test_mask_output (line 327) | def test_mask_output(self): method test_number_of_added_tokens (line 341) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 369) | def test_padding_to_max_length(self): method test_padding (line 404) | def test_padding(self, max_length=50): method test_call (line 615) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 638) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 705) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 708) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 760) | def test_padding_to_multiple_of(self): method test_tokenizer_slow_store_full_signature (line 799) | def test_tokenizer_slow_store_full_signature(self): method test_build_inputs_with_special_tokens (line 807) | def test_build_inputs_with_special_tokens(self): method test_special_tokens_mask_input_pairs (line 832) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 855) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 872) | def test_save_and_load_tokenizer(self): method test_right_and_left_padding (line 899) | def test_right_and_left_padding(self): method test_token_type_ids (line 962) | def test_token_type_ids(self): method test_offsets_mapping (line 993) | def test_offsets_mapping(self): method test_torch_encode_plus_sent_to_model (line 1041) | def test_torch_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 1082) | def test_rust_and_python_full_tokenizers(self): method test_tokenization_python_rust_equals (line 1103) | def test_tokenization_python_rust_equals(self): method test_embeded_special_tokens (line 1165) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 1188) | def test_compare_add_special_tokens(self): method test_markuplm_truncation_integration_test (line 1225) | def test_markuplm_truncation_integration_test(self): method test_batch_encode_plus_tensors (line 1245) | def test_batch_encode_plus_tensors(self): method test_sequence_ids (line 1288) | def test_sequence_ids(self): method test_special_tokens_initialization (line 1312) | def test_special_tokens_initialization(self): method test_training_new_tokenizer (line 1347) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 1386) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_prepare_for_model (line 1485) | def test_prepare_for_model(self): method test_padding_different_model_input_name (line 1499) | def test_padding_different_model_input_name(self): method test_batch_encode_dynamic_overflowing (line 1535) | def test_batch_encode_dynamic_overflowing(self): method test_alignement_methods (line 1597) | def test_alignement_methods(self): method get_clean_sequence (line 1600) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method test_maximum_encoding_length_pair_input (line 1636) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 2015) | def test_maximum_encoding_length_single_input(self): method test_pretokenized_inputs (line 2136) | def test_pretokenized_inputs(self): method test_compare_pretokenized_inputs (line 2140) | def test_compare_pretokenized_inputs(self): method test_compare_prepare_for_model (line 2144) | def test_compare_prepare_for_model(self): method test_only_label_first_subword (line 2148) | def test_only_label_first_subword(self): method test_markuplm_integration_test (line 2171) | def test_markuplm_integration_test(self): method test_np_encode_plus_sent_to_model (line 2264) | def test_np_encode_plus_sent_to_model(self): method test_padding_warning_message_fast_tokenizer (line 2267) | def test_padding_warning_message_fast_tokenizer(self): FILE: benchmark/third_party/transformers/tests/models/maskformer/test_feature_extraction_maskformer.py class MaskFormerFeatureExtractionTester (line 39) | class MaskFormerFeatureExtractionTester(unittest.TestCase): method __init__ (line 40) | def __init__( method prepare_feat_extract_dict (line 79) | def prepare_feat_extract_dict(self): method get_expected_values (line 93) | def get_expected_values(self, image_inputs, batched=False): method get_fake_maskformer_outputs (line 124) | def get_fake_maskformer_outputs(self): class MaskFormerFeatureExtractionTest (line 134) | class MaskFormerFeatureExtractionTest(FeatureExtractionSavingTestMixin, ... method setUp (line 138) | def setUp(self): method feat_extract_dict (line 142) | def feat_extract_dict(self): method test_feat_extract_properties (line 145) | def test_feat_extract_properties(self): method test_batch_feature (line 156) | def test_batch_feature(self): method test_call_pil (line 159) | def test_call_pil(self): method test_call_numpy (line 191) | def test_call_numpy(self): method test_call_pytorch (line 224) | def test_call_pytorch(self): method test_equivalence_pad_and_create_pixel_mask (line 257) | def test_equivalence_pad_and_create_pixel_mask(self): method comm_get_feature_extractor_inputs (line 279) | def comm_get_feature_extractor_inputs( method test_init_without_params (line 311) | def test_init_without_params(self): method test_with_size_divisibility (line 314) | def test_with_size_divisibility(self): method test_call_with_segmentation_maps (line 327) | def test_call_with_segmentation_maps(self): method test_binary_mask_to_rle (line 348) | def test_binary_mask_to_rle(self): method test_post_process_segmentation (line 359) | def test_post_process_segmentation(self): method test_post_process_semantic_segmentation (line 382) | def test_post_process_semantic_segmentation(self): method test_post_process_panoptic_segmentation (line 402) | def test_post_process_panoptic_segmentation(self): FILE: benchmark/third_party/transformers/tests/models/maskformer/test_modeling_maskformer.py class MaskFormerModelTester (line 43) | class MaskFormerModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method get_config (line 83) | def get_config(self): method prepare_config_and_inputs_for_common (line 100) | def prepare_config_and_inputs_for_common(self): method check_output_hidden_state (line 105) | def check_output_hidden_state(self, output, config): method create_and_check_maskformer_model (line 114) | def create_and_check_maskformer_model(self, config, pixel_values, pixe... method create_and_check_maskformer_instance_segmentation_head_model (line 135) | def create_and_check_maskformer_instance_segmentation_head_model( class MaskFormerModelTest (line 175) | class MaskFormerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 184) | def setUp(self): method test_config (line 188) | def test_config(self): method test_maskformer_model (line 191) | def test_maskformer_model(self): method test_maskformer_instance_segmentation_head_model (line 195) | def test_maskformer_instance_segmentation_head_model(self): method test_inputs_embeds (line 200) | def test_inputs_embeds(self): method test_model_common_attributes (line 204) | def test_model_common_attributes(self): method test_generate_without_input_ids (line 208) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 212) | def test_resize_tokens_embeddings(self): method test_multi_gpu_data_parallel_forward (line 219) | def test_multi_gpu_data_parallel_forward(self): method test_forward_signature (line 222) | def test_forward_signature(self): method test_model_from_pretrained (line 235) | def test_model_from_pretrained(self): method test_model_with_labels (line 240) | def test_model_with_labels(self): method test_hidden_states_output (line 252) | def test_hidden_states_output(self): method test_attention_outputs (line 256) | def test_attention_outputs(self): method test_training (line 264) | def test_training(self): method test_retain_grad_hidden_states_attentions (line 278) | def test_retain_grad_hidden_states_attentions(self): function prepare_img (line 315) | def prepare_img(): class MaskFormerModelIntegrationTest (line 322) | class MaskFormerModelIntegrationTest(unittest.TestCase): method model_checkpoints (line 324) | def model_checkpoints(self): method default_feature_extractor (line 328) | def default_feature_extractor(self): method test_inference_no_head (line 331) | def test_inference_no_head(self): method test_inference_instance_segmentation_head (line 372) | def test_inference_instance_segmentation_head(self): method test_with_segmentation_maps_and_loss (line 409) | def test_with_segmentation_maps_and_loss(self): FILE: benchmark/third_party/transformers/tests/models/mbart/test_modeling_flax_mbart.py function prepare_mbart_inputs_dict (line 48) | def prepare_mbart_inputs_dict( class FlaxMBartModelTester (line 76) | class FlaxMBartModelTester(unittest.TestCase): method __init__ (line 77) | def __init__( method prepare_config_and_inputs (line 119) | 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_use_cache_forward (line 151) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 191) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class MBartHeadTests (line 239) | class MBartHeadTests(unittest.TestCase): method _get_config_and_data (line 242) | def _get_config_and_data(self): method test_sequence_classification_forward (line 279) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 286) | def test_question_answering_forward(self): method test_lm_forward (line 295) | def test_lm_forward(self): method test_lm_uneven_forward (line 302) | def test_lm_uneven_forward(self): method test_shift_tokens_right (line 321) | def test_shift_tokens_right(self): class FlaxMBartModelTest (line 332) | class FlaxMBartModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGe... method setUp (line 346) | def setUp(self): method test_use_cache_forward (line 349) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 354) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 359) | def test_encode(self): method test_decode (line 382) | def test_decode(self): method test_model_from_pretrained (line 416) | def test_model_from_pretrained(self): class FlaxMBartModelIntegrationTest (line 428) | class FlaxMBartModelIntegrationTest(unittest.TestCase): method tokenizer (line 438) | def tokenizer(self): method model (line 442) | def model(self): method _assert_generated_batch_equal_expected (line 446) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 450) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation_en_ro (line 463) | def test_batch_generation_en_ro(self): FILE: benchmark/third_party/transformers/tests/models/mbart/test_modeling_mbart.py function prepare_mbart_inputs_dict (line 46) | def prepare_mbart_inputs_dict( class MBartModelTester (line 77) | class MBartModelTester: method __init__ (line 78) | def __init__( method prepare_config_and_inputs (line 122) | def prepare_config_and_inputs(self): method get_config (line 135) | def get_config(self): method prepare_config_and_inputs_for_common (line 155) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 159) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 193) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class MBartModelTest (line 227) | class MBartModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.T... method setUp (line 239) | def setUp(self): method test_config (line 243) | def test_config(self): method test_save_load_strict (line 246) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 256) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 260) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 265) | def test_inputs_embeds(self): method test_generate_fp16 (line 294) | def test_generate_fp16(self): function assert_tensors_close (line 305) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 324) | def _long_tensor(tok_lst): class AbstractSeq2SeqIntegrationTest (line 331) | class AbstractSeq2SeqIntegrationTest(unittest.TestCase): method setUpClass (line 336) | def setUpClass(cls): method model (line 341) | def model(self): class MBartEnroIntegrationTest (line 352) | class MBartEnroIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_enro_generate_one (line 367) | def test_enro_generate_one(self): method test_enro_generate_batch (line 377) | def test_enro_generate_batch(self): method test_mbart_enro_config (line 385) | def test_mbart_enro_config(self): method test_mbart_fast_forward (line 397) | def test_mbart_fast_forward(self): class MBartCC25IntegrationTest (line 423) | class MBartCC25IntegrationTest(AbstractSeq2SeqIntegrationTest): method test_cc25_generate (line 432) | def test_cc25_generate(self): method test_fill_mask (line 442) | def test_fill_mask(self): class MBartStandaloneDecoderModelTester (line 453) | class MBartStandaloneDecoderModelTester: method __init__ (line 454) | def __init__( method prepare_config_and_inputs (line 509) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 543) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 579) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 626) | def prepare_config_and_inputs_for_common(self): class MBartStandaloneDecoderModelTest (line 643) | class MBartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTester... method setUp (line 649) | def setUp( method test_config (line 655) | def test_config(self): method test_decoder_model_past (line 658) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 662) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 666) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/mbart/test_modeling_tf_mbart.py class TFMBartModelTester (line 34) | class TFMBartModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs_for_common (line 75) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 103) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): method test_compile_tf_model (line 118) | def test_compile_tf_model(self): function prepare_mbart_inputs_dict (line 145) | def prepare_mbart_inputs_dict( class TFMBartModelTest (line 183) | class TFMBartModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 190) | def setUp(self): method test_config (line 194) | def test_config(self): method test_decoder_model_past_large_inputs (line 197) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 201) | def test_model_common_attributes(self): method test_saved_model_creation (line 222) | def test_saved_model_creation(self): class TFMBartModelIntegrationTest (line 229) | class TFMBartModelIntegrationTest(unittest.TestCase): method tokenizer (line 239) | def tokenizer(self): method model (line 243) | def model(self): method _assert_generated_batch_equal_expected (line 247) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 251) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation_en_ro (line 260) | def test_batch_generation_en_ro(self): FILE: benchmark/third_party/transformers/tests/models/mbart/test_tokenization_mbart.py class MBartTokenizationTest (line 43) | class MBartTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 49) | def setUp(self): method test_full_tokenizer (line 56) | def test_full_tokenizer(self): method test_save_pretrained (line 133) | def test_save_pretrained(self): class MBartEnroIntegrationTest (line 208) | class MBartEnroIntegrationTest(unittest.TestCase): method setUpClass (line 223) | def setUpClass(cls): method check_language_codes (line 230) | def check_language_codes(self): method test_enro_tokenizer_batch_encode_plus (line 235) | def test_enro_tokenizer_batch_encode_plus(self): method test_enro_tokenizer_decode_ignores_language_codes (line 239) | def test_enro_tokenizer_decode_ignores_language_codes(self): method test_enro_tokenizer_truncation (line 247) | def test_enro_tokenizer_truncation(self): method test_mask_token (line 256) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 259) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 267) | def test_batch_fairseq_parity(self): method test_enro_tokenizer_prepare_batch (line 278) | def test_enro_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 301) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 313) | def test_tokenizer_translation(self): FILE: benchmark/third_party/transformers/tests/models/mbart50/test_tokenization_mbart50.py class MBart50TokenizationTest (line 43) | class MBart50TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 49) | 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_vocab_size (line 72) | def test_vocab_size(self): method test_full_tokenizer (line 75) | def test_full_tokenizer(self): method test_tokenizer_integration (line 111) | def test_tokenizer_integration(self): method test_save_pretrained (line 123) | def test_save_pretrained(self): class MBart50OneToManyIntegrationTest (line 198) | class MBart50OneToManyIntegrationTest(unittest.TestCase): method setUpClass (line 213) | def setUpClass(cls): method check_language_codes (line 220) | def check_language_codes(self): method test_tokenizer_batch_encode_plus (line 226) | def test_tokenizer_batch_encode_plus(self): method test_tokenizer_decode_ignores_language_codes (line 230) | def test_tokenizer_decode_ignores_language_codes(self): method test_tokenizer_truncation (line 238) | def test_tokenizer_truncation(self): method test_mask_token (line 247) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 250) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 258) | def test_batch_fairseq_parity(self): method test_tokenizer_prepare_batch (line 270) | def test_tokenizer_prepare_batch(self): method test_seq2seq_max_target_length (line 292) | def test_seq2seq_max_target_length(self): method test_tokenizer_translation (line 304) | def test_tokenizer_translation(self): FILE: benchmark/third_party/transformers/tests/models/mctct/test_feature_extraction_mctct.py function floats_list (line 35) | def floats_list(shape, scale=1.0, rng=None, name=None): class MCTCTFeatureExtractionTester (line 51) | class MCTCTFeatureExtractionTester(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 MCTCTFeatureExtractionTest (line 106) | class MCTCTFeatureExtractionTest(SequenceFeatureExtractionTestMixin, uni... method setUp (line 110) | def setUp(self): method _check_zero_mean_unit_variance (line 113) | def _check_zero_mean_unit_variance(self, input_vector): method test_call (line 117) | def test_call(self): method test_cepstral_mean_and_variance_normalization (line 140) | def test_cepstral_mean_and_variance_normalization(self): method test_cepstral_mean_and_variance_normalization_np (line 161) | def test_cepstral_mean_and_variance_normalization_np(self): method test_cepstral_mean_and_variance_normalization_trunc_max_length (line 186) | def test_cepstral_mean_and_variance_normalization_trunc_max_length(self): method test_cepstral_mean_and_variance_normalization_trunc_longest (line 205) | def test_cepstral_mean_and_variance_normalization_trunc_longest(self): method test_double_precision_pad (line 247) | def test_double_precision_pad(self): method test_different_window (line 260) | def test_different_window(self): FILE: benchmark/third_party/transformers/tests/models/mctct/test_modeling_mctct.py class MCTCTModelTester (line 36) | class MCTCTModelTester: method __init__ (line 37) | 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 140) | def create_and_check_model(self, config, input_features, attention_mask): method create_and_check_model_for_ctc (line 150) | def create_and_check_model_for_ctc(self, config, input_features, atten... method create_and_check_batch_inference (line 161) | def create_and_check_batch_inference(self, config, input_features, *ar... method check_ctc_loss (line 187) | def check_ctc_loss(self, config, input_features, *args): method check_ctc_training (line 217) | def check_ctc_training(self, config, input_features, *args): method check_labels_out_of_vocab (line 243) | def check_labels_out_of_vocab(self, config, input_features, *args): method prepare_config_and_inputs_for_common (line 257) | def prepare_config_and_inputs_for_common(self): class MCTCTModelTest (line 264) | class MCTCTModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 270) | def setUp(self): method test_config (line 274) | def test_config(self): method test_model (line 277) | def test_model(self): method test_ctc_loss_inference (line 281) | def test_ctc_loss_inference(self): method test_ctc_train (line 285) | def test_ctc_train(self): method test_labels_out_of_vocab (line 289) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 294) | def test_inputs_embeds(self): method test_forward_signature (line 298) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 319) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 323) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 326) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 364) | def test_initialization(self): method _mock_init_weights (line 398) | def _mock_init_weights(self, module): method test_model_from_pretrained (line 413) | def test_model_from_pretrained(self): class MCTCTRobustModelTest (line 419) | class MCTCTRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 425) | def setUp(self): method test_config (line 429) | def test_config(self): method test_model (line 432) | def test_model(self): method test_batched_inference (line 436) | def test_batched_inference(self): method test_ctc_loss_inference (line 440) | def test_ctc_loss_inference(self): method test_ctc_train (line 444) | def test_ctc_train(self): method test_labels_out_of_vocab (line 448) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 453) | def test_inputs_embeds(self): method test_forward_signature (line 457) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 462) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 468) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 471) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 511) | def test_initialization(self): method _mock_init_weights (line 545) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 560) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 564) | def test_model_from_pretrained(self): class MCTCTModelIntegrationTest (line 572) | class MCTCTModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 573) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal (line 582) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 599) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 623) | def test_inference_ctc_robust_batched(self): FILE: benchmark/third_party/transformers/tests/models/mctct/test_processor_mctct.py class MCTCTProcessorTest (line 35) | class MCTCTProcessorTest(unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 63) | def get_tokenizer(self, **kwargs_init): 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_tokenizer (line 120) | def test_tokenizer(self): method test_tokenizer_decode (line 135) | def test_tokenizer_decode(self): FILE: benchmark/third_party/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, unittest.TestCase): method _prepare_for_class (line 291) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 304) | def setUp(self): method test_config (line 308) | def test_config(self): method test_megatron_bert_model (line 311) | def test_megatron_bert_model(self): method test_for_masked_lm (line 315) | def test_for_masked_lm(self): method test_for_multiple_choice (line 319) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 323) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 327) | def test_for_pretraining(self): method test_for_question_answering (line 331) | def test_for_question_answering(self): method test_for_sequence_classification (line 335) | def test_for_sequence_classification(self): method test_for_token_classification (line 339) | def test_for_token_classification(self): function _long_tensor (line 344) | def _long_tensor(tok_lst): class MegatronBertModelIntegrationTests (line 358) | class MegatronBertModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 361) | def test_inference_no_head(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/mluke/test_tokenization_mluke.py class MLukeTokenizerTest (line 30) | class MLukeTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 35) | def setUp(self): method get_tokenizer (line 40) | 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 96) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 99) | def test_embeded_special_tokens(self): method test_padding_entity_inputs (line 128) | def test_padding_entity_inputs(self): method test_if_tokenize_single_text_raise_error_with_invalid_inputs (line 143) | def test_if_tokenize_single_text_raise_error_with_invalid_inputs(self): method test_if_tokenize_entity_classification_raise_error_with_invalid_inputs (line 165) | def test_if_tokenize_entity_classification_raise_error_with_invalid_in... method test_if_tokenize_entity_pair_classification_raise_error_with_invalid_inputs (line 180) | def test_if_tokenize_entity_pair_classification_raise_error_with_inval... method test_if_tokenize_entity_span_classification_raise_error_with_invalid_inputs (line 192) | def test_if_tokenize_entity_span_classification_raise_error_with_inval... class MLukeTokenizerIntegrationTests (line 206) | class MLukeTokenizerIntegrationTests(unittest.TestCase): method setUpClass (line 211) | def setUpClass(cls): method test_single_text_no_padding_or_truncation (line 224) | def test_single_text_no_padding_or_truncation(self): method test_single_text_only_entity_spans_no_padding_or_truncation (line 270) | def test_single_text_only_entity_spans_no_padding_or_truncation(self): method test_single_text_padding_pytorch_tensors (line 317) | def test_single_text_padding_pytorch_tensors(self): method test_text_pair_no_padding_or_truncation (line 346) | def test_text_pair_no_padding_or_truncation(self): method test_text_pair_only_entity_spans_no_padding_or_truncation (line 405) | def test_text_pair_only_entity_spans_no_padding_or_truncation(self): method test_text_pair_padding_pytorch_tensors (line 462) | def test_text_pair_padding_pytorch_tensors(self): method test_entity_classification_no_padding_or_truncation (line 497) | def test_entity_classification_no_padding_or_truncation(self): method test_entity_classification_padding_pytorch_tensors (line 531) | def test_entity_classification_padding_pytorch_tensors(self): method test_entity_pair_classification_no_padding_or_truncation (line 554) | def test_entity_pair_classification_no_padding_or_truncation(self): method test_entity_pair_classification_padding_pytorch_tensors (line 591) | def test_entity_pair_classification_padding_pytorch_tensors(self): method test_entity_span_classification_no_padding_or_truncation (line 620) | def test_entity_span_classification_no_padding_or_truncation(self): method test_entity_span_classification_padding_pytorch_tensors (line 649) | def test_entity_span_classification_padding_pytorch_tensors(self): FILE: benchmark/third_party/transformers/tests/models/mobilebert/test_modeling_mobilebert.py class MobileBertModelTester (line 43) | class MobileBertModelTester: method __init__ (line 44) | 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 create_and_check_mobilebert_model (line 134) | def create_and_check_mobilebert_model( method create_and_check_mobilebert_for_masked_lm (line 147) | def create_and_check_mobilebert_for_masked_lm( method create_and_check_mobilebert_for_next_sequence_prediction (line 156) | def create_and_check_mobilebert_for_next_sequence_prediction( method create_and_check_mobilebert_for_pretraining (line 170) | def create_and_check_mobilebert_for_pretraining( method create_and_check_mobilebert_for_question_answering (line 186) | def create_and_check_mobilebert_for_question_answering( method create_and_check_mobilebert_for_sequence_classification (line 202) | def create_and_check_mobilebert_for_sequence_classification( method create_and_check_mobilebert_for_token_classification (line 212) | def create_and_check_mobilebert_for_token_classification( method create_and_check_mobilebert_for_multiple_choice (line 222) | def create_and_check_mobilebert_for_multiple_choice( method prepare_config_and_inputs_for_common (line 240) | def prepare_config_and_inputs_for_common(self): class MobileBertModelTest (line 256) | class MobileBertModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 275) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 288) | def setUp(self): method test_config (line 292) | def test_config(self): method test_mobilebert_model (line 295) | def test_mobilebert_model(self): method test_for_masked_lm (line 299) | def test_for_masked_lm(self): method test_for_multiple_choice (line 303) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 307) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 311) | def test_for_pretraining(self): method test_for_question_answering (line 315) | def test_for_question_answering(self): method test_for_sequence_classification (line 319) | def test_for_sequence_classification(self): method test_for_token_classification (line 323) | def test_for_token_classification(self): function _long_tensor (line 328) | def _long_tensor(tok_lst): class MobileBertModelIntegrationTests (line 342) | class MobileBertModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 344) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/mobilebert/test_modeling_tf_mobilebert.py class TFMobileBertModelTest (line 44) | class TFMobileBertModelTest(TFModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 64) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... class TFMobileBertModelTester (line 73) | class TFMobileBertModelTester(object): method __init__ (line 74) | def __init__( method prepare_config_and_inputs (line 124) | def prepare_config_and_inputs(self): method create_and_check_mobilebert_model (line 160) | def create_and_check_mobilebert_model( method create_and_check_mobilebert_for_masked_lm (line 177) | def create_and_check_mobilebert_for_masked_lm( method create_and_check_mobilebert_for_next_sequence_prediction (line 185) | def create_and_check_mobilebert_for_next_sequence_prediction( method create_and_check_mobilebert_for_pretraining (line 193) | def create_and_check_mobilebert_for_pretraining( method create_and_check_mobilebert_for_sequence_classification (line 204) | def create_and_check_mobilebert_for_sequence_classification( method create_and_check_mobilebert_for_multiple_choice (line 213) | def create_and_check_mobilebert_for_multiple_choice( method create_and_check_mobilebert_for_token_classification (line 229) | def create_and_check_mobilebert_for_token_classification( method create_and_check_mobilebert_for_question_answering (line 238) | def create_and_check_mobilebert_for_question_answering( method prepare_config_and_inputs_for_common (line 247) | def prepare_config_and_inputs_for_common(self): method setUp (line 261) | def setUp(self): method test_config (line 265) | def test_config(self): method test_mobilebert_model (line 268) | def test_mobilebert_model(self): method test_for_masked_lm (line 272) | def test_for_masked_lm(self): method test_for_multiple_choice (line 276) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 280) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 284) | def test_for_pretraining(self): method test_for_question_answering (line 288) | def test_for_question_answering(self): method test_for_sequence_classification (line 292) | def test_for_sequence_classification(self): method test_for_token_classification (line 296) | def test_for_token_classification(self): method test_model_common_attributes (line 300) | def test_model_common_attributes(self): method test_saved_model_creation (line 322) | def test_saved_model_creation(self): method test_model_from_pretrained (line 326) | def test_model_from_pretrained(self): class TFMobileBertModelIntegrationTest (line 334) | class TFMobileBertModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 336) | def test_inference_masked_lm(self): FILE: benchmark/third_party/transformers/tests/models/mobilebert/test_tokenization_mobilebert.py class MobileBERTTokenizationTest (line 37) | class MobileBERTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 46) | def setUp(self): 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_rust_and_python_full_tokenizers (line 87) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 128) | def test_chinese(self): method test_basic_tokenizer_lower (line 133) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 141) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 149) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 157) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 165) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 172) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 179) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 186) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 193) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 207) | def test_is_whitespace(self): method test_is_control (line 217) | def test_is_control(self): method test_is_punctuation (line 225) | def test_is_punctuation(self): method test_clean_text (line 234) | def test_clean_text(self): method test_sequence_builders (line 246) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 258) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 310) | def test_change_tokenize_chinese_chars(self): FILE: benchmark/third_party/transformers/tests/models/mobilevit/test_feature_extraction_mobilevit.py class MobileViTFeatureExtractionTester (line 36) | class MobileViTFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 63) | def prepare_feat_extract_dict(self): class MobileViTFeatureExtractionTest (line 75) | class MobileViTFeatureExtractionTest(FeatureExtractionSavingTestMixin, u... method setUp (line 79) | def setUp(self): method feat_extract_dict (line 83) | def feat_extract_dict(self): method test_feat_extract_properties (line 86) | def test_feat_extract_properties(self): method test_batch_feature (line 94) | def test_batch_feature(self): method test_call_pil (line 97) | def test_call_pil(self): method test_call_numpy (line 129) | def test_call_numpy(self): method test_call_pytorch (line 161) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/mobilevit/test_modeling_mobilevit.py class MobileViTConfigTester (line 42) | class MobileViTConfigTester(ConfigTester): method create_and_test_config_common_properties (line 43) | def create_and_test_config_common_properties(self): class MobileViTModelTester (line 50) | class MobileViTModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 91) | 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, 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, unittest.TestCase): method setUp (line 193) | 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_common_attributes (line 205) | def test_model_common_attributes(self): method test_attention_outputs (line 209) | def test_attention_outputs(self): method test_forward_signature (line 212) | def test_forward_signature(self): method test_model (line 224) | def test_model(self): method test_hidden_states_output (line 228) | def test_hidden_states_output(self): method test_for_image_classification (line 266) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 270) | def test_for_semantic_segmentation(self): method test_model_from_pretrained (line 275) | def test_model_from_pretrained(self): function prepare_img (line 282) | def prepare_img(): class MobileViTModelIntegrationTest (line 289) | class MobileViTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 291) | def default_feature_extractor(self): method test_inference_image_classification_head (line 295) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 315) | def test_inference_semantic_segmentation(self): method test_post_processing_semantic_segmentation (line 345) | def test_post_processing_semantic_segmentation(self): FILE: benchmark/third_party/transformers/tests/models/mobilevit/test_modeling_tf_mobilevit.py class TFMobileViTConfigTester (line 43) | class TFMobileViTConfigTester(ConfigTester): method create_and_test_config_common_properties (line 44) | def create_and_test_config_common_properties(self): class TFMobileViTModelTester (line 51) | class TFMobileViTModelTester: method __init__ (line 52) | 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 120) | def create_and_check_model(self, config, pixel_values, labels, pixel_l... method create_and_check_for_image_classification (line 128) | def create_and_check_for_image_classification(self, config, pixel_valu... method create_and_check_for_semantic_segmentation (line 134) | def create_and_check_for_semantic_segmentation(self, config, pixel_val... method prepare_config_and_inputs_for_common (line 149) | def prepare_config_and_inputs_for_common(self): class MobileViTModelTest (line 157) | class MobileViTModelTest(TFModelTesterMixin, unittest.TestCase): 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_common_attributes (line 187) | def test_model_common_attributes(self): method test_attention_outputs (line 191) | def test_attention_outputs(self): method test_compile_tf_model (line 195) | def test_compile_tf_model(self): method test_forward_signature (line 198) | def test_forward_signature(self): method test_model (line 210) | def test_model(self): method test_hidden_states_output (line 214) | def test_hidden_states_output(self): method test_for_image_classification (line 249) | def test_for_image_classification(self): method test_for_semantic_segmentation (line 253) | def test_for_semantic_segmentation(self): method test_dataset_conversion (line 261) | def test_dataset_conversion(self): method check_keras_fit_results (line 264) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=2e-1, rto... method test_keras_fit (line 271) | def test_keras_fit(self): method test_loss_computation (line 284) | def test_loss_computation(self): method test_model_from_pretrained (line 361) | def test_model_from_pretrained(self): function prepare_img (line 368) | def prepare_img(): class TFMobileViTModelIntegrationTest (line 374) | class TFMobileViTModelIntegrationTest(unittest.TestCase): method test_inference_image_classification_head (line 376) | def test_inference_image_classification_head(self): method test_inference_semantic_segmentation (line 395) | def test_inference_semantic_segmentation(self): FILE: benchmark/third_party/transformers/tests/models/mpnet/test_modeling_mpnet.py class MPNetModelTester (line 39) | class MPNetModelTester: method __init__ (line 40) | def __init__( method get_large_model_config (line 88) | def get_large_model_config(self): method prepare_config_and_inputs (line 91) | def prepare_config_and_inputs(self): method get_config (line 109) | def get_config(self): method create_and_check_mpnet_model (line 123) | def create_and_check_mpnet_model( method create_and_check_mpnet_for_question_answering (line 134) | def create_and_check_mpnet_for_question_answering( method create_and_check_mpnet_for_sequence_classification (line 149) | 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 175) | def create_and_check_mpnet_for_token_classification( method prepare_config_and_inputs_for_common (line 185) | def prepare_config_and_inputs_for_common(self): class MPNetModelTest (line 193) | class MPNetModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 210) | def setUp(self): method test_config (line 214) | def test_config(self): method test_mpnet_model (line 217) | def test_mpnet_model(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_for_question_answering (line 233) | def test_for_question_answering(self): class MPNetModelIntegrationTest (line 239) | class MPNetModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 241) | def test_inference_no_head(self): FILE: benchmark/third_party/transformers/tests/models/mpnet/test_modeling_tf_mpnet.py class TFMPNetModelTester (line 39) | class TFMPNetModelTester: method __init__ (line 40) | def __init__( method prepare_config_and_inputs (line 88) | def prepare_config_and_inputs(self): method create_and_check_mpnet_model (line 117) | def create_and_check_mpnet_model( method create_and_check_mpnet_for_masked_lm (line 127) | def create_and_check_mpnet_for_masked_lm( 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 147) | def create_and_check_mpnet_for_sequence_classification( method create_and_check_mpnet_for_multiple_choice (line 156) | def create_and_check_mpnet_for_multiple_choice( method create_and_check_mpnet_for_token_classification (line 170) | def create_and_check_mpnet_for_token_classification( method prepare_config_and_inputs_for_common (line 179) | def prepare_config_and_inputs_for_common(self): class TFMPNetModelTest (line 187) | class TFMPNetModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 204) | def setUp(self): method test_config (line 208) | def test_config(self): method test_mpnet_model (line 211) | def test_mpnet_model(self): method test_for_masked_lm (line 215) | def test_for_masked_lm(self): method test_for_question_answering (line 219) | def test_for_question_answering(self): method test_for_sequence_classification (line 223) | def test_for_sequence_classification(self): method test_for_multiple_choice (line 227) | def test_for_multiple_choice(self): method test_for_token_classification (line 231) | def test_for_token_classification(self): method test_model_from_pretrained (line 236) | def test_model_from_pretrained(self): class TFMPNetModelIntegrationTest (line 243) | class TFMPNetModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 245) | def test_inference_masked_lm(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/mt5/test_modeling_flax_mt5.py class MT5IntegrationTest (line 32) | class MT5IntegrationTest(unittest.TestCase): method test_small_integration_test (line 34) | def test_small_integration_test(self): FILE: benchmark/third_party/transformers/tests/models/mt5/test_modeling_mt5.py class MT5IntegrationTest (line 28) | class MT5IntegrationTest(unittest.TestCase): method test_small_integration_test (line 30) | def test_small_integration_test(self): FILE: benchmark/third_party/transformers/tests/models/mt5/test_modeling_tf_mt5.py class TFMT5ModelTest (line 29) | class TFMT5ModelTest(unittest.TestCase): # no mixin with common tests -... method test_resize_embeddings (line 31) | def test_resize_embeddings(self): class TFMT5ModelIntegrationTest (line 48) | class TFMT5ModelIntegrationTest(unittest.TestCase): method test_small_integration_test (line 50) | def test_small_integration_test(self): FILE: benchmark/third_party/transformers/tests/models/mvp/test_modeling_mvp.py function prepare_mvp_inputs_dict (line 47) | def prepare_mvp_inputs_dict( class MvpModelTester (line 78) | class MvpModelTester: method __init__ (line 79) | def __init__( method prepare_config_and_inputs (line 117) | def prepare_config_and_inputs(self): method get_config (line 130) | def get_config(self): method get_pipeline_config (line 148) | def get_pipeline_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 MvpHeadTests (line 226) | class MvpHeadTests(unittest.TestCase): method _get_config_and_data (line 229) | def _get_config_and_data(self): method test_sequence_classification_forward (line 267) | def test_sequence_classification_forward(self): method test_question_answering_forward (line 278) | def test_question_answering_forward(self): method test_lm_forward (line 294) | def test_lm_forward(self): method test_lm_uneven_forward (line 304) | def test_lm_uneven_forward(self): method test_generate_beam_search (line 325) | def test_generate_beam_search(self): method test_shift_tokens_right (line 355) | def test_shift_tokens_right(self): method test_tokenization (line 365) | def test_tokenization(self): method test_generate_fp16 (line 376) | def test_generate_fp16(self): method test_dummy_inputs (line 385) | def test_dummy_inputs(self): method test_resize_tokens_embeddings_more (line 390) | def test_resize_tokens_embeddings_more(self): class MvpModelTest (line 408) | class MvpModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Tes... method setUp (line 420) | def setUp(self): method test_config (line 424) | def test_config(self): method test_save_load_strict (line 427) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 437) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 441) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 446) | def test_inputs_embeds(self): method test_generate_fp16 (line 475) | def test_generate_fp16(self): function assert_tensors_close (line 486) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 505) | def _long_tensor(tok_lst): class MvpModelIntegrationTests (line 512) | class MvpModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 514) | def default_tokenizer(self): method test_inference_no_head (line 518) | def test_inference_no_head(self): method test_summarization_inference (line 532) | def test_summarization_inference(self): class MvpStandaloneDecoderModelTester (line 550) | class MvpStandaloneDecoderModelTester: method __init__ (line 551) | def __init__( method prepare_config_and_inputs (line 606) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 641) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_decoder_model_past (line 661) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 697) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 744) | def prepare_config_and_inputs_for_common(self): class MvpStandaloneDecoderModelTest (line 761) | class MvpStandaloneDecoderModelTest(ModelTesterMixin, GenerationTesterMi... method setUp (line 768) | def setUp( method test_config (line 774) | def test_config(self): method test_decoder_model_past (line 777) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 781) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 785) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/mvp/test_tokenization_mvp.py class TestTokenizationMvp (line 27) | class TestTokenizationMvp(TokenizerTesterMixin, unittest.TestCase): method setUp (line 34) | def setUp(self): method get_tokenizer (line 69) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 73) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 77) | def get_input_output_texts(self, tokenizer): method default_tokenizer (line 81) | def default_tokenizer(self): method default_tokenizer_fast (line 85) | def default_tokenizer_fast(self): method test_prepare_batch (line 89) | def test_prepare_batch(self): method test_prepare_batch_empty_target_text (line 104) | def test_prepare_batch_empty_target_text(self): method test_tokenizer_as_target_length (line 115) | def test_tokenizer_as_target_length(self): method test_prepare_batch_not_longer_than_maxlen (line 125) | def test_prepare_batch_not_longer_than_maxlen(self): method test_special_tokens (line 134) | def test_special_tokens(self): method test_pretokenized_inputs (line 149) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 152) | def test_embeded_special_tokens(self): FILE: benchmark/third_party/transformers/tests/models/nezha/test_modeling_nezha.py class NezhaModelTester (line 45) | class NezhaModelTester: method __init__ (line 46) | 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_masked_lm (line 209) | def create_and_check_for_masked_lm( method create_and_check_for_next_sequence_prediction (line 218) | def create_and_check_for_next_sequence_prediction( method create_and_check_for_pretraining (line 232) | def create_and_check_for_pretraining( method create_and_check_for_question_answering (line 248) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 264) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 274) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 284) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 302) | def prepare_config_and_inputs_for_common(self): class NezhaModelTest (line 318) | class NezhaModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.T... method _prepare_for_class (line 337) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 350) | def setUp(self): method test_config (line 354) | def test_config(self): method test_model (line 357) | def test_model(self): method test_model_as_decoder (line 361) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 365) | def test_model_as_decoder_with_default_input_mask(self): method test_for_masked_lm (line 393) | def test_for_masked_lm(self): method test_for_multiple_choice (line 397) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 401) | def test_for_next_sequence_prediction(self): method test_for_pretraining (line 405) | def test_for_pretraining(self): method test_for_question_answering (line 409) | def test_for_question_answering(self): method test_for_sequence_classification (line 413) | def test_for_sequence_classification(self): method test_for_token_classification (line 417) | def test_for_token_classification(self): method test_model_from_pretrained (line 422) | def test_model_from_pretrained(self): method test_torchscript_device_change (line 429) | def test_torchscript_device_change(self): class NezhaModelIntegrationTest (line 452) | class NezhaModelIntegrationTest(unittest.TestCase): method test_inference_nezha_model (line 454) | def test_inference_nezha_model(self): method test_inference_nezha_masked_lm (line 467) | def test_inference_nezha_masked_lm(self): FILE: benchmark/third_party/transformers/tests/models/nllb/test_tokenization_nllb.py class NllbTokenizationTest (line 50) | class NllbTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 57) | def setUp(self): method test_full_tokenizer (line 64) | def test_full_tokenizer(self): method test_save_pretrained (line 140) | def test_save_pretrained(self): method test_prepare_seq2seq_batch (line 206) | def test_prepare_seq2seq_batch(self): method test_save_slow_from_fast_and_reload_fast (line 255) | def test_save_slow_from_fast_and_reload_fast(self): method test_special_tokens_initialization (line 258) | def test_special_tokens_initialization(self): class NllbDistilledIntegrationTest (line 296) | class NllbDistilledIntegrationTest(unittest.TestCase): method setUpClass (line 327) | def setUpClass(cls): method test_language_codes (line 334) | def test_language_codes(self): method test_enro_tokenizer_batch_encode_plus (line 339) | def test_enro_tokenizer_batch_encode_plus(self): method test_enro_tokenizer_decode_ignores_language_codes (line 343) | def test_enro_tokenizer_decode_ignores_language_codes(self): method test_enro_tokenizer_truncation (line 354) | def test_enro_tokenizer_truncation(self): method test_mask_token (line 363) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 366) | def test_special_tokens_unaffacted_by_save_load(self): method test_enro_tokenizer_prepare_batch (line 374) | def test_enro_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 398) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 414) | def test_tokenizer_translation(self): FILE: benchmark/third_party/transformers/tests/models/nystromformer/test_modeling_nystromformer.py class NystromformerModelTester (line 41) | class NystromformerModelTester: 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_masked_lm (line 140) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 149) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 165) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 175) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 185) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 203) | def prepare_config_and_inputs_for_common(self): class NystromformerModelTest (line 219) | class NystromformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 236) | def setUp(self): method test_config (line 240) | def test_config(self): method test_model (line 243) | def test_model(self): method test_model_various_embeddings (line 247) | def test_model_various_embeddings(self): method test_for_masked_lm (line 253) | def test_for_masked_lm(self): method test_for_multiple_choice (line 257) | def test_for_multiple_choice(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_model_from_pretrained (line 274) | def test_model_from_pretrained(self): class NystromformerModelIntegrationTest (line 281) | class NystromformerModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 283) | def test_inference_no_head(self): method test_masked_lm_end_to_end (line 300) | def test_masked_lm_end_to_end(self): FILE: benchmark/third_party/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 68) | def prepare_config_and_inputs(self): method create_and_check_openai_gpt_model (line 110) | def create_and_check_openai_gpt_model(self, config, input_ids, head_ma... method create_and_check_lm_head_model (line 121) | def create_and_check_lm_head_model(self, config, input_ids, head_mask,... method create_and_check_double_lm_head_model (line 130) | def create_and_check_double_lm_head_model(self, config, input_ids, hea... method create_and_check_openai_gpt_for_sequence_classification (line 139) | def create_and_check_openai_gpt_for_sequence_classification( method prepare_config_and_inputs_for_common (line 151) | def prepare_config_and_inputs_for_common(self): class OpenAIGPTModelTest (line 172) | class OpenAIGPTModelTest(ModelTesterMixin, GenerationTesterMixin, unitte... method _prepare_for_class (line 184) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 206) | def setUp(self): method test_config (line 210) | def test_config(self): method test_openai_gpt_model (line 213) | def test_openai_gpt_model(self): method test_openai_gpt_lm_head_model (line 217) | def test_openai_gpt_lm_head_model(self): method test_openai_gpt_double_lm_head_model (line 221) | def test_openai_gpt_double_lm_head_model(self): method test_openai_gpt_classification_model (line 225) | def test_openai_gpt_classification_model(self): method test_model_from_pretrained (line 230) | def test_model_from_pretrained(self): class OPENAIGPTModelLanguageGenerationTest (line 237) | class OPENAIGPTModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_openai_gpt (line 239) | def test_lm_generate_openai_gpt(self): FILE: benchmark/third_party/transformers/tests/models/openai/test_modeling_tf_openai.py class TFOpenAIGPTModelTester (line 38) | class TFOpenAIGPTModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 68) | def prepare_config_and_inputs(self): method create_and_check_openai_gpt_model (line 120) | def create_and_check_openai_gpt_model(self, config, input_ids, input_m... method create_and_check_openai_gpt_lm_head (line 132) | def create_and_check_openai_gpt_lm_head(self, config, input_ids, input... method create_and_check_openai_gpt_double_head (line 138) | def create_and_check_openai_gpt_double_head( 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 174) | def prepare_config_and_inputs_for_common(self): class TFOpenAIGPTModelTest (line 194) | class TFOpenAIGPTModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 207) | def setUp(self): method test_config (line 211) | def test_config(self): method test_openai_gpt_model (line 214) | def test_openai_gpt_model(self): method test_openai_gpt_lm_head (line 218) | def test_openai_gpt_lm_head(self): method test_openai_gpt_double_head (line 222) | def test_openai_gpt_double_head(self): method test_model_common_attributes (line 226) | def test_model_common_attributes(self): method test_openai_gpt_sequence_classification_model (line 244) | def test_openai_gpt_sequence_classification_model(self): method test_model_from_pretrained (line 249) | def test_model_from_pretrained(self): class TFOPENAIGPTModelLanguageGenerationTest (line 256) | class TFOPENAIGPTModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_openai_gpt (line 258) | def test_lm_generate_openai_gpt(self): FILE: benchmark/third_party/transformers/tests/models/openai/test_tokenization_openai.py class OpenAIGPTTokenizationTest (line 29) | class OpenAIGPTTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 37) | def setUp(self): method get_input_output_texts (line 74) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 77) | def test_full_tokenizer(self): method test_padding (line 89) | def test_padding(self, max_length=15): method test_padding_different_model_input_name (line 134) | def test_padding_different_model_input_name(self): class OpenAIGPTTokenizationTestWithSpacy (line 141) | class OpenAIGPTTokenizationTestWithSpacy(OpenAIGPTTokenizationTest): FILE: benchmark/third_party/transformers/tests/models/opt/test_modeling_flax_opt.py function prepare_opt_inputs_dict (line 39) | def prepare_opt_inputs_dict(config, input_ids, attention_mask=None, head... class FlaxOPTModelTester (line 49) | class FlaxOPTModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 95) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 120) | def prepare_config_and_inputs_for_common(self): method check_use_cache_forward (line 124) | def check_use_cache_forward(self, model_class_name, config, inputs_dict): method check_use_cache_forward_with_attn_mask (line 158) | def check_use_cache_forward_with_attn_mask(self, model_class_name, con... class FlaxOPTModelTest (line 202) | class FlaxOPTModelTest(FlaxModelTesterMixin, unittest.TestCase, FlaxGene... method setUp (line 206) | def setUp(self): method test_use_cache_forward (line 209) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 214) | def test_use_cache_forward_with_attn_mask(self): method test_model_from_pretrained (line 220) | def test_model_from_pretrained(self): class FlaxOPTModelIntegrationTests (line 230) | class FlaxOPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 232) | def test_inference_no_head(self): class FlaxOPTEmbeddingsTest (line 246) | class FlaxOPTEmbeddingsTest(unittest.TestCase): method setUp (line 247) | def setUp(self): method test_logits (line 251) | def test_logits(self): class FlaxOPTGenerationTest (line 281) | class FlaxOPTGenerationTest(unittest.TestCase): method prompts (line 283) | def prompts(self): method test_generation_pre_attn_layer_norm (line 291) | def test_generation_pre_attn_layer_norm(self): method test_generation_post_attn_layer_norm (line 317) | def test_generation_post_attn_layer_norm(self): method test_jitted_batch_generation (line 342) | def test_jitted_batch_generation(self): FILE: benchmark/third_party/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 186) | class OPTModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Tes... method setUp (line 198) | def setUp(self): method test_config (line 202) | def test_config(self): method test_save_load_strict (line 205) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 215) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 219) | def test_inputs_embeds(self): method test_generate_fp16 (line 248) | def test_generate_fp16(self): method test_opt_sequence_classification_model (line 258) | def test_opt_sequence_classification_model(self): method test_opt_sequence_classification_model_for_multi_label (line 270) | def test_opt_sequence_classification_model_for_multi_label(self): function assert_tensors_close (line 286) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 305) | def _long_tensor(tok_lst): class OPTModelIntegrationTests (line 310) | class OPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 312) | def test_inference_no_head(self): class OPTEmbeddingsTest (line 335) | class OPTEmbeddingsTest(unittest.TestCase): method setUp (line 336) | def setUp(self): method test_load_model (line 340) | def test_load_model(self): method test_logits (line 346) | def test_logits(self): class OPTGenerationTest (line 373) | class OPTGenerationTest(unittest.TestCase): method prompts (line 375) | def prompts(self): method test_generation_pre_attn_layer_norm (line 383) | def test_generation_pre_attn_layer_norm(self): method test_batch_generation (line 407) | def test_batch_generation(self): method test_generation_post_attn_layer_norm (line 448) | def test_generation_post_attn_layer_norm(self): method test_batched_nan_fp16 (line 473) | def test_batched_nan_fp16(self): FILE: benchmark/third_party/transformers/tests/models/opt/test_modeling_tf_opt.py function prepare_opt_inputs_dict (line 33) | def prepare_opt_inputs_dict(config, input_ids, attention_mask=None, head... class TFOPTModelTester (line 40) | class TFOPTModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs_for_common (line 88) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 113) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): class TFOPTModelTest (line 149) | class TFOPTModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 157) | def setUp(self): method test_config (line 161) | def test_config(self): method test_decoder_model_past_large_inputs (line 164) | def test_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 168) | def test_model_common_attributes(self): method test_resize_token_embeddings (line 182) | def test_resize_token_embeddings(self): method test_saved_model_creation (line 231) | def test_saved_model_creation(self): function _long_tensor (line 235) | def _long_tensor(tok_lst): class TFOPTHeadTests (line 240) | class TFOPTHeadTests(unittest.TestCase): method _get_config_and_data (line 243) | def _get_config_and_data(self): class OPTModelIntegrationTests (line 263) | class OPTModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 265) | def test_inference_no_head(self): class TFOPTEmbeddingsTest (line 285) | class TFOPTEmbeddingsTest(unittest.TestCase): method setUp (line 286) | def setUp(self): method test_logits (line 290) | def test_logits(self): class TFOPTGenerationTest (line 320) | class TFOPTGenerationTest(unittest.TestCase): method prompts (line 322) | def prompts(self): method test_generation_pre_attn_layer_norm (line 330) | def test_generation_pre_attn_layer_norm(self): method test_batch_generation (line 354) | def test_batch_generation(self): method test_generation_post_attn_layer_norm (line 393) | def test_generation_post_attn_layer_norm(self): FILE: benchmark/third_party/transformers/tests/models/owlvit/test_feature_extraction_owlvit.py class OwlViTFeatureExtractionTester (line 36) | class OwlViTFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 69) | def prepare_feat_extract_dict(self): class OwlViTFeatureExtractionTest (line 84) | class OwlViTFeatureExtractionTest(FeatureExtractionSavingTestMixin, unit... method setUp (line 88) | def setUp(self): method feat_extract_dict (line 92) | def feat_extract_dict(self): method test_feat_extract_properties (line 95) | def test_feat_extract_properties(self): method test_call_pil (line 106) | def test_call_pil(self): method test_call_numpy (line 139) | def test_call_numpy(self): method test_call_pytorch (line 171) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/owlvit/test_modeling_owlvit.py class OwlViTVisionModelTester (line 55) | class OwlViTVisionModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 92) | def prepare_config_and_inputs(self): method get_config (line 98) | def get_config(self): method create_and_check_model (line 112) | 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 OwlViTVisionModelTest (line 133) | class OwlViTVisionModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 145) | def setUp(self): method test_config (line 151) | def test_config(self): method test_inputs_embeds (line 155) | def test_inputs_embeds(self): method test_model_common_attributes (line 158) | 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_training (line 184) | def test_training(self): method test_training_gradient_checkpointing (line 188) | def test_training_gradient_checkpointing(self): method test_save_load_fast_init_from_base (line 192) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 196) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 200) | def test_model_from_pretrained(self): class OwlViTTextModelTester (line 206) | class OwlViTTextModelTester: method __init__ (line 207) | def __init__( method prepare_config_and_inputs (line 245) | def prepare_config_and_inputs(self): method get_config (line 264) | def get_config(self): method create_and_check_model (line 277) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 288) | def prepare_config_and_inputs_for_common(self): class OwlViTTextModelTest (line 296) | class OwlViTTextModelTest(ModelTesterMixin, unittest.TestCase): 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_training (line 315) | def test_training(self): method test_training_gradient_checkpointing (line 319) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 323) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 327) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 331) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 335) | def test_model_from_pretrained(self): class OwlViTModelTester (line 341) | class OwlViTModelTester: method __init__ (line 342) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 350) | def prepare_config_and_inputs(self): method get_config (line 356) | def get_config(self): method create_and_check_model (line 359) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 380) | def prepare_config_and_inputs_for_common(self): class OwlViTModelTest (line 393) | class OwlViTModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 401) | def setUp(self): method test_model (line 404) | def test_model(self): method test_hidden_states_output (line 409) | def test_hidden_states_output(self): method test_inputs_embeds (line 413) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 417) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 421) | def test_model_common_attributes(self): method test_initialization (line 425) | def test_initialization(self): method _create_and_check_torchscript (line 448) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 495) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 511) | def test_model_from_pretrained(self): class OwlViTForObjectDetectionTester (line 517) | class OwlViTForObjectDetectionTester: method __init__ (line 518) | def __init__(self, parent, is_training=True): method prepare_config_and_inputs (line 526) | def prepare_config_and_inputs(self): method get_config (line 532) | def get_config(self): method create_and_check_model (line 535) | def create_and_check_model(self, config, pixel_values, input_ids, atte... method prepare_config_and_inputs_for_common (line 564) | def prepare_config_and_inputs_for_common(self): class OwlViTForObjectDetectionTest (line 576) | class OwlViTForObjectDetectionTest(ModelTesterMixin, unittest.TestCase): method setUp (line 584) | def setUp(self): method test_model (line 587) | def test_model(self): method test_hidden_states_output (line 592) | def test_hidden_states_output(self): method test_inputs_embeds (line 596) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 600) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 604) | def test_model_common_attributes(self): method test_initialization (line 608) | def test_initialization(self): method test_forward_signature (line 612) | def test_forward_signature(self): method test_save_load_fast_init_from_base (line 616) | def test_save_load_fast_init_from_base(self): method test_training (line 620) | def test_training(self): method test_training_gradient_checkpointing (line 624) | def test_training_gradient_checkpointing(self): method _create_and_check_torchscript (line 627) | def _create_and_check_torchscript(self, config, inputs_dict): method test_model_outputs_equivalence (line 674) | def test_model_outputs_equivalence(self): method test_model_from_pretrained (line 721) | def test_model_from_pretrained(self): function prepare_img (line 728) | def prepare_img(): class OwlViTModelIntegrationTest (line 736) | class OwlViTModelIntegrationTest(unittest.TestCase): method test_inference (line 738) | def test_inference(self): method test_inference_object_detection (line 769) | def test_inference_object_detection(self): FILE: benchmark/third_party/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 68) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 71) | def get_rust_tokenizer(self, **kwargs): method get_feature_extractor (line 74) | def get_feature_extractor(self, **kwargs): method tearDown (line 77) | def tearDown(self): method prepare_image_inputs (line 80) | 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 115) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 132) | def test_feature_extractor(self): method test_tokenizer (line 146) | def test_tokenizer(self): method test_processor (line 161) | def test_processor(self): method test_processor_with_text_list (line 178) | def test_processor_with_text_list(self): method test_processor_with_nested_text_list (line 193) | def test_processor_with_nested_text_list(self): method test_processor_case (line 211) | def test_processor_case(self): method test_tokenizer_decode (line 230) | def test_tokenizer_decode(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/pegasus/test_modeling_pegasus.py function prepare_pegasus_inputs_dict (line 37) | def prepare_pegasus_inputs_dict( class PegasusModelTester (line 68) | class PegasusModelTester: method __init__ (line 69) | def __init__( method prepare_config_and_inputs (line 113) | def prepare_config_and_inputs(self): method get_pipeline_config (line 126) | def get_pipeline_config(self): method get_config (line 144) | 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 202) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PegasusModelTest (line 236) | class PegasusModelTest(ModelTesterMixin, GenerationTesterMixin, unittest... method setUp (line 245) | def setUp(self): method test_config (line 249) | def test_config(self): method test_save_load_strict (line 252) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 262) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 266) | def test_encoder_decoder_model_standalone(self): method test_generate_fp16 (line 270) | def test_generate_fp16(self): function assert_tensors_close (line 281) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 300) | def _long_tensor(tok_lst): class PegasusXSUMIntegrationTest (line 307) | class PegasusXSUMIntegrationTest(AbstractSeq2SeqIntegrationTest): method model (line 320) | def model(self): method test_pegasus_xsum_summary (line 324) | def test_pegasus_xsum_summary(self): class PegasusStandaloneDecoderModelTester (line 346) | class PegasusStandaloneDecoderModelTester: method __init__ (line 347) | def __init__( method prepare_config_and_inputs (line 402) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 436) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 472) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 519) | def prepare_config_and_inputs_for_common(self): class PegasusStandaloneDecoderModelTest (line 536) | class PegasusStandaloneDecoderModelTest(ModelTesterMixin, GenerationTest... method setUp (line 543) | def setUp( method test_config (line 549) | def test_config(self): method test_decoder_model_past (line 552) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 556) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 560) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/pegasus/test_modeling_tf_pegasus.py class TFPegasusModelTester (line 34) | class TFPegasusModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs_for_common (line 76) | def prepare_config_and_inputs_for_common(self): method check_decoder_model_past_large_inputs (line 104) | def check_decoder_model_past_large_inputs(self, config, inputs_dict): function prepare_pegasus_inputs_dict (line 140) | def prepare_pegasus_inputs_dict( class TFPegasusModelTest (line 178) | class TFPegasusModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 185) | def setUp(self): method test_config (line 189) | def test_config(self): method test_decoder_model_past_large_inputs (line 192) | def test_decoder_model_past_large_inputs(self): method test_compile_tf_model (line 196) | def test_compile_tf_model(self): method test_model_common_attributes (line 227) | def test_model_common_attributes(self): method test_saved_model_creation (line 248) | def test_saved_model_creation(self): class TFPegasusIntegrationTests (line 255) | class TFPegasusIntegrationTests(unittest.TestCase): method tokenizer (line 268) | def tokenizer(self): method model (line 272) | def model(self): method _assert_generated_batch_equal_expected (line 276) | def _assert_generated_batch_equal_expected(self, **tokenizer_kwargs): method translate_src_text (line 280) | def translate_src_text(self, **tokenizer_kwargs): method test_batch_generation (line 292) | def test_batch_generation(self): FILE: benchmark/third_party/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 136) | class BigBirdPegasusTokenizationTest(TokenizerTesterMixin, unittest.Test... method setUp (line 143) | def setUp(self): method _large_tokenizer (line 151) | def _large_tokenizer(self): method get_tokenizer (line 154) | def get_tokenizer(self, **kwargs) -> PegasusTokenizer: method get_input_output_texts (line 157) | def get_input_output_texts(self, tokenizer): method test_mask_tokens_rust_pegasus (line 160) | def test_mask_tokens_rust_pegasus(self): method test_large_seq2seq_truncation (line 172) | def test_large_seq2seq_truncation(self): method test_equivalence_to_orig_tokenizer (line 185) | def test_equivalence_to_orig_tokenizer(self): FILE: benchmark/third_party/transformers/tests/models/pegasus_x/test_modeling_pegasus_x.py function prepare_pegasus_x_inputs_dict (line 39) | def prepare_pegasus_x_inputs_dict( class PegasusXModelTester (line 59) | class PegasusXModelTester: method __init__ (line 60) | def __init__( method prepare_config_and_inputs (line 98) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 126) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 130) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 163) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PegasusXModelTest (line 197) | class PegasusXModelTest(ModelTesterMixin, GenerationTesterMixin, unittes... method setUp (line 205) | def setUp(self): method test_torchscript_output_attentions (line 212) | def test_torchscript_output_attentions(self): method test_config (line 215) | def test_config(self): method test_save_load_strict (line 218) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 228) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 232) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 236) | def test_inputs_embeds(self): method test_generate_fp16 (line 265) | def test_generate_fp16(self): method test_attention_outputs (line 275) | def test_attention_outputs(self): method _check_encoder_attention_for_generate (line 385) | def _check_encoder_attention_for_generate(self, attentions, batch_size... method _check_encoder_hidden_states_for_generate (line 399) | def _check_encoder_hidden_states_for_generate(self, hidden_states, bat... method test_hidden_states_output (line 413) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 466) | def test_retain_grad_hidden_states_attentions(self): method round_up (line 528) | def round_up(cls, n, k): function assert_tensors_close (line 532) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 551) | def _long_tensor(tok_lst): class PegasusXModelIntegrationTests (line 562) | class PegasusXModelIntegrationTests(unittest.TestCase): method default_tokenizer (line 564) | def default_tokenizer(self): method test_inference_no_head (line 567) | def test_inference_no_head(self): method test_inference_head (line 583) | def test_inference_head(self): method test_seq_to_seq_generation (line 600) | def test_seq_to_seq_generation(self): class PegasusXStandaloneDecoderModelTester (line 646) | class PegasusXStandaloneDecoderModelTester: method __init__ (line 647) | def __init__( method prepare_config_and_inputs (line 702) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 736) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 772) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 817) | def prepare_config_and_inputs_for_common(self): class PegasusXStandaloneDecoderModelTest (line 834) | class PegasusXStandaloneDecoderModelTest(ModelTesterMixin, GenerationTes... method setUp (line 841) | def setUp( method test_config (line 847) | def test_config(self): method test_decoder_model_past (line 850) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 854) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 858) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/perceiver/test_modeling_perceiver.py class PerceiverModelTester (line 66) | class PerceiverModelTester: method __init__ (line 67) | def __init__( method prepare_config_and_inputs (line 135) | def prepare_config_and_inputs(self, model_class=None): method get_config (line 177) | def get_config(self): method get_pipeline_config (line 202) | def get_pipeline_config(self): method create_and_check_for_masked_lm (line 209) | def create_and_check_for_masked_lm(self, config, inputs, input_mask, s... method create_and_check_for_sequence_classification (line 216) | def create_and_check_for_sequence_classification(self, config, inputs,... method create_and_check_for_image_classification_learned (line 223) | def create_and_check_for_image_classification_learned( method create_and_check_for_image_classification_fourier (line 232) | def create_and_check_for_image_classification_fourier( method create_and_check_for_image_classification_conv (line 241) | def create_and_check_for_image_classification_conv( method prepare_config_and_inputs_for_common (line 250) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_model_class (line 256) | def prepare_config_and_inputs_for_model_class(self, model_class): class PerceiverModelTest (line 265) | class PerceiverModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 287) | def setUp(self): method _prepare_for_class (line 291) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 314) | def test_config(self): method test_for_masked_lm (line 322) | def test_for_masked_lm(self): method test_for_sequence_classification (line 326) | def test_for_sequence_classification(self): method test_for_image_classification_learned (line 330) | def test_for_image_classification_learned(self): method test_for_image_classification_fourier (line 336) | def test_for_image_classification_fourier(self): method test_for_image_classification_conv (line 342) | def test_for_image_classification_conv(self): method test_model_common_attributes (line 348) | def test_model_common_attributes(self): method test_training (line 356) | def test_training(self): method test_forward_signature (line 378) | def test_forward_signature(self): method test_determinism (line 390) | def test_determinism(self): method test_attention_outputs (line 419) | def test_attention_outputs(self): method test_hidden_states_output (line 486) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 519) | def test_model_outputs_equivalence(self): method test_retain_grad_hidden_states_attentions (line 601) | def test_retain_grad_hidden_states_attentions(self): method test_feed_forward_chunking (line 629) | def test_feed_forward_chunking(self): method test_save_load (line 656) | def test_save_load(self): method test_correct_missing_keys (line 701) | def test_correct_missing_keys(self): method test_problem_types (line 726) | def test_problem_types(self): method test_multi_gpu_data_parallel_forward (line 778) | def test_multi_gpu_data_parallel_forward(self): method test_save_load_fast_init_from_base (line 782) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 786) | def test_save_load_fast_init_to_base(self): method test_resize_tokens_embeddings (line 790) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 794) | def test_resize_embeddings_untied(self): method test_inputs_embeds (line 798) | def test_inputs_embeds(self): method test_load_with_mismatched_shapes (line 802) | def test_load_with_mismatched_shapes(self): method test_model_from_pretrained (line 806) | def test_model_from_pretrained(self): function prepare_img (line 813) | def prepare_img(): function prepare_optical_flow_images (line 819) | def prepare_optical_flow_images(): function normalize (line 827) | def normalize(img): function extract_image_patches (line 831) | def extract_image_patches(x, kernel, stride=1, dilation=1): class PerceiverModelIntegrationTest (line 849) | class PerceiverModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 851) | def test_inference_masked_lm(self): method test_inference_image_classification (line 886) | def test_inference_image_classification(self): method test_inference_image_classification_fourier (line 911) | def test_inference_image_classification_fourier(self): method test_inference_image_classification_conv (line 936) | def test_inference_image_classification_conv(self): method test_inference_optical_flow (line 961) | def test_inference_optical_flow(self): FILE: benchmark/third_party/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 133) | def test_empty_target_text(self): method test_max_length_integration (line 143) | def test_max_length_integration(self): method test_save_and_load_tokenizer (line 155) | 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_pretrained_model_lists (line 274) | def test_pretrained_model_lists(self): method test_get_vocab (line 278) | def test_get_vocab(self): method test_pretokenized_inputs (line 282) | def test_pretokenized_inputs(self): method test_conversion_reversible (line 286) | def test_conversion_reversible(self): method test_convert_tokens_to_string_format (line 289) | def test_convert_tokens_to_string_format(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/plbart/test_modeling_plbart.py function prepare_plbart_inputs_dict (line 44) | def prepare_plbart_inputs_dict( class PLBartModelTester (line 75) | class PLBartModelTester: method __init__ (line 76) | def __init__( method prepare_config_and_inputs (line 114) | def prepare_config_and_inputs(self): method get_config (line 125) | def get_config(self): method prepare_config_and_inputs_for_common (line 143) | def prepare_config_and_inputs_for_common(self): method create_and_check_decoder_model_past_large_inputs (line 147) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 182) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class PLBartModelTest (line 216) | class PLBartModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.... method setUp (line 226) | def setUp(self): method test_config (line 230) | def test_config(self): method test_save_load_strict (line 233) | def test_save_load_strict(self): method test_decoder_model_past_with_large_inputs (line 243) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 247) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 252) | def test_inputs_embeds(self): method test_generate_fp16 (line 281) | def test_generate_fp16(self): function assert_tensors_close (line 292) | def assert_tensors_close(a, b, atol=1e-12, prefix=""): function _long_tensor (line 311) | def _long_tensor(tok_lst): class AbstractSeq2SeqIntegrationTest (line 318) | class AbstractSeq2SeqIntegrationTest(unittest.TestCase): method setUpClass (line 323) | def setUpClass(cls): method model (line 328) | def model(self): class PLBartJavaCsIntegrationTest (line 339) | class PLBartJavaCsIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_java_cs_generate_one (line 351) | def test_java_cs_generate_one(self): method test_java_cs_generate_batch (line 362) | def test_java_cs_generate_batch(self): method test_plbart_java_cs_config (line 369) | def test_plbart_java_cs_config(self): method test_plbart_fast_forward (line 381) | def test_plbart_fast_forward(self): class PLBartBaseIntegrationTest (line 407) | class PLBartBaseIntegrationTest(AbstractSeq2SeqIntegrationTest): method test_base_generate (line 413) | def test_base_generate(self): method test_fill_mask (line 423) | def test_fill_mask(self): class PLBartStandaloneDecoderModelTester (line 434) | class PLBartStandaloneDecoderModelTester: method __init__ (line 435) | def __init__( method prepare_config_and_inputs (line 490) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 519) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 555) | def create_and_check_decoder_model_attention_mask_past( method prepare_config_and_inputs_for_common (line 602) | def prepare_config_and_inputs_for_common(self): class PLBartStandaloneDecoderModelTest (line 610) | class PLBartStandaloneDecoderModelTest(ModelTesterMixin, GenerationTeste... method setUp (line 616) | def setUp(self): method test_config (line 620) | def test_config(self): method test_decoder_model_past (line 623) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 627) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 631) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/plbart/test_tokenization_plbart.py class PLBartTokenizationTest (line 42) | class PLBartTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 47) | def setUp(self): method test_full_base_tokenizer (line 54) | def test_full_base_tokenizer(self): method test_full_multi_tokenizer (line 134) | def test_full_multi_tokenizer(self): class PLBartPythonEnIntegrationTest (line 217) | class PLBartPythonEnIntegrationTest(unittest.TestCase): method setUpClass (line 257) | def setUpClass(cls): method check_language_codes (line 264) | def check_language_codes(self): method test_python_en_tokenizer_batch_encode_plus (line 269) | def test_python_en_tokenizer_batch_encode_plus(self): method test_python_en_tokenizer_decode_ignores_language_codes (line 273) | def test_python_en_tokenizer_decode_ignores_language_codes(self): method test_python_en_tokenizer_truncation (line 281) | def test_python_en_tokenizer_truncation(self): method test_mask_token (line 290) | def test_mask_token(self): method test_special_tokens_unaffacted_by_save_load (line 293) | def test_special_tokens_unaffacted_by_save_load(self): method test_batch_fairseq_parity (line 301) | def test_batch_fairseq_parity(self): method test_python_en_tokenizer_prepare_batch (line 312) | def test_python_en_tokenizer_prepare_batch(self): method test_seq2seq_max_length (line 334) | def test_seq2seq_max_length(self): method test_tokenizer_translation (line 346) | def test_tokenizer_translation(self): FILE: benchmark/third_party/transformers/tests/models/poolformer/test_feature_extraction_poolformer.py class PoolFormerFeatureExtractionTester (line 35) | class PoolFormerFeatureExtractionTester(unittest.TestCase): method __init__ (line 36) | def __init__( method prepare_feat_extract_dict (line 62) | def prepare_feat_extract_dict(self): class PoolFormerFeatureExtractionTest (line 75) | class PoolFormerFeatureExtractionTest(FeatureExtractionSavingTestMixin, ... method setUp (line 79) | def setUp(self): method feat_extract_dict (line 83) | def feat_extract_dict(self): method test_feat_extract_properties (line 86) | def test_feat_extract_properties(self): method test_batch_feature (line 95) | def test_batch_feature(self): method test_call_pil (line 98) | def test_call_pil(self): method test_call_numpy (line 131) | def test_call_numpy(self): method test_call_pytorch (line 163) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/poolformer/test_modeling_poolformer.py class PoolFormerConfigTester (line 42) | class PoolFormerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 43) | def create_and_test_config_common_properties(self): class PoolFormerModelTester (line 49) | class PoolFormerModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method create_and_check_model (line 106) | def create_and_check_model(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 116) | def prepare_config_and_inputs_for_common(self): class PoolFormerModelTest (line 124) | class PoolFormerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 134) | def setUp(self): method test_config (line 138) | def test_config(self): method test_model (line 141) | def test_model(self): method test_attention_outputs (line 146) | def test_attention_outputs(self): method test_inputs_embeds (line 150) | def test_inputs_embeds(self): method test_model_common_attributes (line 154) | def test_model_common_attributes(self): method test_hidden_states_output (line 157) | def test_hidden_states_output(self): method test_training (line 193) | def test_training(self): method test_forward_signature (line 210) | def test_forward_signature(self): method test_model_from_pretrained (line 223) | def test_model_from_pretrained(self): function prepare_img (line 230) | def prepare_img(): class PoolFormerModelIntegrationTest (line 236) | class PoolFormerModelIntegrationTest(unittest.TestCase): method test_inference_image_classification_head (line 238) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/prophetnet/test_modeling_prophetnet.py class ProphetNetModelTester (line 42) | class ProphetNetModelTester: method __init__ (line 43) | 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, unitt... method setUp (line 896) | def setUp(self): method test_config (line 900) | def test_config(self): method test_model (line 903) | def test_model(self): method test_lm_model (line 907) | def test_lm_model(self): method test_only_decoder_causal_model (line 911) | def test_only_decoder_causal_model(self): method test_fast_integration (line 915) | def test_fast_integration(self): method test_shared_weights (line 919) | def test_shared_weights(self): method test_shift_labels_via_shift_left (line 923) | def test_shift_labels_via_shift_left(self): method test_decoder_model_generate (line 928) | def test_decoder_model_generate(self): method test_encoder_decoder_model_generate (line 932) | def test_encoder_decoder_model_generate(self): method test_attn_mask_model (line 936) | def test_attn_mask_model(self): method test_config_save (line 940) | def test_config_save(self): method test_causal_lm_from_pretrained (line 949) | def test_causal_lm_from_pretrained(self): method test_fp16_forward (line 954) | def test_fp16_forward(self): method test_attention_outputs (line 959) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 1066) | def test_retain_grad_hidden_states_attentions(self): method test_generate_with_head_masking (line 1092) | def test_generate_with_head_masking(self): class ProphetNetStandaloneDecoderModelTest (line 1098) | class ProphetNetStandaloneDecoderModelTest(ModelTesterMixin, GenerationT... method setUp (line 1106) | def setUp(self): method test_config (line 1110) | def test_config(self): method test_decoder_model_past (line 1113) | def test_decoder_model_past(self): method test_decoder_model_attn_mask_past (line 1117) | def test_decoder_model_attn_mask_past(self): method test_retain_grad_hidden_states_attentions (line 1121) | def test_retain_grad_hidden_states_attentions(self): class ProphetNetStandaloneEncoderModelTest (line 1127) | class ProphetNetStandaloneEncoderModelTest(ModelTesterMixin, unittest.Te... method setUp (line 1134) | def setUp(self): method test_config (line 1138) | def test_config(self): class ProphetNetModelIntegrationTest (line 1143) | class ProphetNetModelIntegrationTest(unittest.TestCase): method test_pretrained_checkpoint_hidden_states (line 1145) | def test_pretrained_checkpoint_hidden_states(self): method test_cnndm_inference (line 1222) | def test_cnndm_inference(self): method test_question_gen_inference (line 1277) | def test_question_gen_inference(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/qdqbert/test_modeling_qdqbert.py class QDQBertModelTester (line 44) | class QDQBertModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 129) | 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 183) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 215) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 233) | def create_and_check_for_masked_lm( method create_and_check_model_for_causal_lm_as_decoder (line 242) | def create_and_check_model_for_causal_lm_as_decoder( method create_and_check_decoder_model_past_large_inputs (line 275) | 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_question_answering (line 351) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 367) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 377) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 387) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 405) | def prepare_config_and_inputs_for_common(self): class QDQBertModelTest (line 422) | class QDQBertModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 440) | def setUp(self): method test_config (line 444) | def test_config(self): method test_model (line 447) | def test_model(self): method test_model_various_embeddings (line 451) | def test_model_various_embeddings(self): method test_model_as_decoder (line 457) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 461) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 489) | def test_for_causal_lm(self): method test_for_masked_lm (line 493) | def test_for_masked_lm(self): method test_for_causal_lm_decoder (line 497) | def test_for_causal_lm_decoder(self): method test_decoder_model_past_with_large_inputs (line 501) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 505) | def test_for_multiple_choice(self): method test_for_next_sequence_prediction (line 509) | def test_for_next_sequence_prediction(self): method test_for_question_answering (line 513) | def test_for_question_answering(self): method test_for_sequence_classification (line 517) | def test_for_sequence_classification(self): method test_for_token_classification (line 521) | def test_for_token_classification(self): method test_model_from_pretrained (line 526) | def test_model_from_pretrained(self): method test_feed_forward_chunking (line 532) | def test_feed_forward_chunking(self): class QDQBertModelIntegrationTest (line 539) | class QDQBertModelIntegrationTest(unittest.TestCase): method test_inference_no_head_absolute_embedding (line 541) | def test_inference_no_head_absolute_embedding(self): FILE: benchmark/third_party/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 113) | def setUp(self): method dpr_tokenizer (line 181) | def dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method dpr_ctx_encoder_tokenizer (line 185) | def dpr_ctx_encoder_tokenizer(self) -> DPRContextEncoderTokenizer: method bart_tokenizer (line 189) | def bart_tokenizer(self) -> BartTokenizer: method t5_tokenizer (line 193) | def t5_tokenizer(self) -> BartTokenizer: method tearDown (line 196) | def tearDown(self): method get_retriever (line 203) | def get_retriever(self, config): method check_model_with_retriever (line 227) | def check_model_with_retriever( method check_model_with_end2end_retriever (line 259) | def check_model_with_end2end_retriever( method check_model_generate_from_context_input_ids (line 299) | def check_model_generate_from_context_input_ids( method check_model_generate (line 346) | def check_model_generate( method check_model_without_retriever (line 367) | def check_model_without_retriever( method check_model_custom_n_docs (line 426) | def check_model_custom_n_docs( method check_model_with_mismatch_n_docs_value (line 487) | def check_model_with_mismatch_n_docs_value( method check_model_with_encoder_outputs (line 545) | def check_model_with_encoder_outputs( method test_model_with_retriever (line 587) | def test_model_with_retriever(self): method test_model_with_end2end_retriever (line 591) | def test_model_with_end2end_retriever(self): method test_model_without_retriever (line 595) | def test_model_without_retriever(self): method test_model_with_encoder_outputs (line 599) | def test_model_with_encoder_outputs(self): method test_model_generate (line 603) | def test_model_generate(self): method test_model_with_custom_n_docs (line 607) | def test_model_with_custom_n_docs(self): method test_model_with_mismatch_n_docs_value (line 612) | def test_model_with_mismatch_n_docs_value(self): class RagDPRBartTest (line 621) | class RagDPRBartTest(RagTestMixin, unittest.TestCase): method config_and_inputs (line 623) | def config_and_inputs(self): class RagDPRT5Test (line 652) | class RagDPRT5Test(RagTestMixin, unittest.TestCase): method config_and_inputs (line 654) | def config_and_inputs(self): class RagModelIntegrationTests (line 684) | class RagModelIntegrationTests(unittest.TestCase): method tearDown (line 685) | def tearDown(self): method sequence_model (line 692) | def sequence_model(self): method token_model (line 702) | def token_model(self): method get_rag_config (line 711) | 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 995) | def test_rag_token_generate_batch(self): class RagModelSaveLoadTests (line 1037) | class RagModelSaveLoadTests(unittest.TestCase): method tearDown (line 1038) | def tearDown(self): method get_rag_config (line 1044) | def get_rag_config(self): method test_rag_sequence_from_pretrained (line 1070) | def test_rag_sequence_from_pretrained(self): method test_rag_token_from_pretrained (line 1129) | def test_rag_token_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/rag/test_modeling_tf_rag.py function require_retrieval (line 44) | def require_retrieval(test_case): class TFRagTestMixin (line 60) | 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 269) | def check_model_without_retriever( method check_model_custom_n_docs (line 327) | def check_model_custom_n_docs( method check_model_with_mismatch_n_docs_value (line 386) | def check_model_with_mismatch_n_docs_value( method check_model_with_encoder_outputs (line 442) | def check_model_with_encoder_outputs( method test_model_with_retriever (line 484) | def test_model_with_retriever(self): method test_model_without_retriever (line 488) | def test_model_without_retriever(self): method test_model_generate_from_context_input_ids (line 492) | def test_model_generate_from_context_input_ids(self): method test_model_with_encoder_outputs (line 496) | def test_model_with_encoder_outputs(self): method test_model_generate (line 500) | def test_model_generate(self): method test_model_with_custom_n_docs (line 504) | def test_model_with_custom_n_docs(self): method test_model_with_mismatch_n_docs_value (line 509) | def test_model_with_mismatch_n_docs_value(self): class TFRagDPRBartTest (line 518) | class TFRagDPRBartTest(TFRagTestMixin, unittest.TestCase): method config_and_inputs (line 520) | def config_and_inputs(self): class TFRagModelIntegrationTests (line 551) | class TFRagModelIntegrationTests(unittest.TestCase): method token_model (line 553) | def token_model(self): method sequence_model (line 559) | def sequence_model(self): method token_model_nq_checkpoint (line 564) | def token_model_nq_checkpoint(self, retriever): method get_rag_config (line 567) | def get_rag_config(self): method test_rag_sequence_inference (line 593) | def test_rag_sequence_inference(self): method test_rag_token_inference (line 628) | def test_rag_token_inference(self): method test_rag_token_inference_nq_checkpoint (line 663) | def test_rag_token_inference_nq_checkpoint(self): method test_rag_token_inference_save_pretrained (line 702) | def test_rag_token_inference_save_pretrained(self): method test_init_and_from_pretrained (line 748) | def test_init_and_from_pretrained(self): method test_data_questions (line 779) | def test_data_questions(self): method test_rag_token_greedy_search (line 792) | def test_rag_token_greedy_search(self): method test_rag_token_generate_batch (line 825) | def test_rag_token_generate_batch(self): method test_rag_sequence_generate_batch (line 868) | def test_rag_sequence_generate_batch(self): method test_rag_sequence_generate_batch_from_context_input_ids (line 905) | def test_rag_sequence_generate_batch_from_context_input_ids(self): class TFRagModelSaveLoadTests (line 952) | class TFRagModelSaveLoadTests(unittest.TestCase): method get_rag_config (line 953) | def get_rag_config(self): method test_rag_sequence_from_pretrained (line 979) | def test_rag_sequence_from_pretrained(self): method test_rag_token_from_pretrained (line 1030) | def test_rag_token_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/rag/test_retrieval_rag.py class RagRetrieverTest (line 43) | class RagRetrieverTest(TestCase): method setUp (line 44) | def setUp(self): method get_dpr_tokenizer (line 108) | def get_dpr_tokenizer(self) -> DPRQuestionEncoderTokenizer: method get_dpr_ctx_encoder_tokenizer (line 111) | def get_dpr_ctx_encoder_tokenizer(self) -> DPRContextEncoderTokenizer: method get_bart_tokenizer (line 114) | def get_bart_tokenizer(self) -> BartTokenizer: method tearDown (line 117) | def tearDown(self): method get_dummy_dataset (line 120) | def get_dummy_dataset(self): method get_dummy_canonical_hf_index_retriever (line 132) | def get_dummy_canonical_hf_index_retriever(self): method get_dummy_custom_hf_index_retriever (line 148) | def get_dummy_custom_hf_index_retriever(self, from_disk: bool): method get_dummy_legacy_index_retriever (line 177) | def get_dummy_legacy_index_retriever(self): method test_canonical_hf_index_retriever_retrieve (line 208) | def test_canonical_hf_index_retriever_retrieve(self): method test_canonical_hf_index_retriever_save_and_from_pretrained (line 223) | def test_canonical_hf_index_retriever_save_and_from_pretrained(self): method test_custom_hf_index_retriever_retrieve (line 237) | def test_custom_hf_index_retriever_retrieve(self): method test_custom_hf_index_retriever_save_and_from_pretrained (line 252) | def test_custom_hf_index_retriever_save_and_from_pretrained(self): method test_custom_hf_index_retriever_retrieve_from_disk (line 264) | def test_custom_hf_index_retriever_retrieve_from_disk(self): method test_custom_hf_index_retriever_save_and_from_pretrained_from_disk (line 279) | def test_custom_hf_index_retriever_save_and_from_pretrained_from_disk(... method test_legacy_index_retriever_retrieve (line 291) | def test_legacy_index_retriever_retrieve(self): method test_legacy_hf_index_retriever_save_and_from_pretrained (line 306) | def test_legacy_hf_index_retriever_save_and_from_pretrained(self): method test_hf_index_retriever_call (line 321) | def test_hf_index_retriever_call(self): method test_custom_hf_index_end2end_retriever_call (line 362) | def test_custom_hf_index_end2end_retriever_call(self): FILE: benchmark/third_party/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 126) | def test_pretrained_token_nq_tokenizer(self): method test_pretrained_sequence_nq_tokenizer (line 149) | def test_pretrained_sequence_nq_tokenizer(self): FILE: benchmark/third_party/transformers/tests/models/realm/test_modeling_realm.py class RealmModelTester (line 43) | class RealmModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 120) | def prepare_config_and_inputs(self): method get_config (line 170) | def get_config(self): method create_and_check_embedder (line 187) | def create_and_check_embedder( method create_and_check_encoder (line 205) | def create_and_check_encoder( method create_and_check_reader (line 232) | def create_and_check_reader( method create_and_check_scorer (line 259) | def create_and_check_scorer( method prepare_config_and_inputs_for_common (line 288) | def prepare_config_and_inputs_for_common(self): class RealmModelTest (line 306) | class RealmModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 325) | def setUp(self): method test_config (line 330) | def test_config(self): method test_embedder (line 333) | def test_embedder(self): method test_encoder (line 337) | def test_encoder(self): method test_model_various_embeddings (line 341) | def test_model_various_embeddings(self): method test_scorer (line 348) | def test_scorer(self): method test_training (line 352) | def test_training(self): method test_embedder_from_pretrained (line 419) | def test_embedder_from_pretrained(self): method test_encoder_from_pretrained (line 424) | def test_encoder_from_pretrained(self): method test_open_qa_from_pretrained (line 429) | def test_open_qa_from_pretrained(self): method test_reader_from_pretrained (line 434) | def test_reader_from_pretrained(self): method test_scorer_from_pretrained (line 439) | def test_scorer_from_pretrained(self): class RealmModelIntegrationTest (line 445) | class RealmModelIntegrationTest(unittest.TestCase): method test_inference_embedder (line 447) | def test_inference_embedder(self): method test_inference_encoder (line 461) | def test_inference_encoder(self): method test_inference_open_qa (line 480) | def test_inference_open_qa(self): method test_inference_reader (line 510) | def test_inference_reader(self): method test_inference_scorer (line 543) | def test_inference_scorer(self): FILE: benchmark/third_party/transformers/tests/models/realm/test_retrieval_realm.py class RealmRetrieverTest (line 30) | class RealmRetrieverTest(TestCase): method setUp (line 31) | def setUp(self): method get_tokenizer (line 73) | def get_tokenizer(self) -> RealmTokenizer: method tearDown (line 76) | def tearDown(self): method get_config (line 79) | def get_config(self): method get_dummy_dataset (line 83) | def get_dummy_dataset(self): method get_dummy_block_records (line 93) | def get_dummy_block_records(self): method get_dummy_retriever (line 107) | def get_dummy_retriever(self): method test_retrieve (line 114) | def test_retrieve(self): method test_block_has_answer (line 149) | def test_block_has_answer(self): method test_save_load_pretrained (line 172) | def test_save_load_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/realm/test_tokenization_realm.py class RealmTokenizationTest (line 35) | class RealmTokenizationTest(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 239) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 251) | def test_offsets_with_special_characters(self): method test_batch_encode_candidates (line 304) | def test_batch_encode_candidates(self): FILE: benchmark/third_party/transformers/tests/models/reformer/test_modeling_reformer.py class ReformerModelTester (line 49) | class ReformerModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 140) | def prepare_config_and_inputs(self): method get_config (line 160) | def get_config(self): method get_pipeline_config (line 189) | def get_pipeline_config(self): method create_and_check_reformer_model (line 197) | def create_and_check_reformer_model(self, config, input_ids, input_mas... method create_and_check_reformer_model_with_lm_backward (line 209) | def create_and_check_reformer_model_with_lm_backward(self, config, inp... method create_and_check_reformer_with_lm (line 221) | def create_and_check_reformer_with_lm(self, config, input_ids, input_m... method create_and_check_reformer_with_mlm (line 230) | def create_and_check_reformer_with_mlm(self, config, input_ids, input_... method create_and_check_reformer_model_with_attn_mask (line 238) | def create_and_check_reformer_model_with_attn_mask( method create_and_check_reformer_layer_dropout_seed (line 286) | def create_and_check_reformer_layer_dropout_seed( method create_and_check_reformer_feed_backward_chunking (line 329) | def create_and_check_reformer_feed_backward_chunking(self, config, inp... method create_and_check_reformer_random_seed (line 373) | def create_and_check_reformer_random_seed(self, config, input_ids, inp... method create_and_check_reformer_model_fp16_forward (line 404) | def create_and_check_reformer_model_fp16_forward(self, config, input_i... method create_and_check_reformer_model_generate (line 412) | def create_and_check_reformer_model_generate(self, config, input_ids, ... method create_and_check_reformer_model_fp16_generate (line 425) | def create_and_check_reformer_model_fp16_generate(self, config, input_... method create_and_check_reformer_no_chunking (line 436) | def create_and_check_reformer_no_chunking(self, config, input_ids, inp... method create_and_check_reformer_for_question_answering (line 448) | def create_and_check_reformer_for_question_answering(self, config, inp... method create_and_check_past_buckets_states (line 461) | def create_and_check_past_buckets_states(self, config, input_ids, inpu... method prepare_config_and_inputs_for_common (line 488) | def prepare_config_and_inputs_for_common(self): method create_and_check_reformer_for_sequence_classification (line 494) | def create_and_check_reformer_for_sequence_classification( class ReformerTesterMixin (line 506) | class ReformerTesterMixin: method test_config (line 511) | def test_config(self): method test_reformer_model (line 514) | def test_reformer_model(self): method test_reformer_lm_model_backward (line 518) | def test_reformer_lm_model_backward(self): method test_reformer_model_attn_masking (line 522) | def test_reformer_model_attn_masking(self): method test_reformer_with_lm (line 527) | def test_reformer_with_lm(self): method test_reformer_with_mlm (line 531) | def test_reformer_with_mlm(self): method test_reformer_layer_training_dropout (line 535) | def test_reformer_layer_training_dropout(self): method test_reformer_chunking_backward_equality (line 540) | def test_reformer_chunking_backward_equality(self): method test_reformer_no_chunking (line 544) | def test_reformer_no_chunking(self): method test_reformer_qa_answering (line 548) | def test_reformer_qa_answering(self): method test_reformer_cached_inference (line 552) | def test_reformer_cached_inference(self): method test_reformer_cached_generate (line 556) | def test_reformer_cached_generate(self): method test_dropout_random_seed_is_changing (line 561) | def test_dropout_random_seed_is_changing(self): method test_reformer_model_fp16_forward (line 566) | def test_reformer_model_fp16_forward(self): method test_reformer_model_fp16_generate (line 571) | def test_reformer_model_fp16_generate(self): method test_multi_gpu_data_parallel_forward (line 582) | def test_multi_gpu_data_parallel_forward(self): method test_for_sequence_classification (line 585) | 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 599) | class ReformerLocalAttnModelTest(ReformerTesterMixin, GenerationTesterMi... method setUp (line 611) | def setUp(self): method test_model_from_pretrained (line 616) | def test_model_from_pretrained(self): method _check_attentions_for_generate (line 621) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 658) | def _check_hidden_states_for_generate( class ReformerLSHAttnModelTest (line 686) | class ReformerLSHAttnModelTest(ReformerTesterMixin, ModelTesterMixin, Ge... method setUp (line 697) | def setUp(self): method _check_attentions_for_generate (line 739) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 777) | def _check_hidden_states_for_generate( method test_problem_types (line 803) | def test_problem_types(self): class ReformerIntegrationTests (line 811) | class ReformerIntegrationTests(unittest.TestCase): method _get_basic_config_and_input (line 816) | def _get_basic_config_and_input(self): method _get_hidden_states (line 850) | def _get_hidden_states(self): method _get_attn_mask (line 932) | def _get_attn_mask(self): method _get_input_ids_and_mask (line 935) | def _get_input_ids_and_mask(self): method test_lsh_layer_forward (line 1022) | def test_lsh_layer_forward(self): method test_lsh_layer_forward_complex (line 1040) | def test_lsh_layer_forward_complex(self): method test_local_layer_forward (line 1063) | def test_local_layer_forward(self): method test_local_layer_forward_complex (line 1081) | def test_local_layer_forward_complex(self): method test_lsh_model_forward (line 1103) | def test_lsh_model_forward(self): method test_local_model_forward (line 1120) | def test_local_model_forward(self): method test_lm_model_forward (line 1136) | def test_lm_model_forward(self): method test_local_lm_model_grad (line 1154) | def test_local_lm_model_grad(self): method test_lsh_lm_model_grad (line 1192) | def test_lsh_lm_model_grad(self): method test_pretrained_generate_crime_and_punish (line 1232) | def test_pretrained_generate_crime_and_punish(self): method test_pretrained_generate_use_cache_equality (line 1249) | def test_pretrained_generate_use_cache_equality(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/regnet/test_modeling_regnet.py class RegNetModelTester (line 43) | class RegNetModelTester: method __init__ (line 44) | 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 94) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 105) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 113) | def prepare_config_and_inputs_for_common(self): class RegNetModelTest (line 121) | class RegNetModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 134) | def setUp(self): method test_config (line 138) | def test_config(self): method create_and_test_config_common_properties (line 147) | def create_and_test_config_common_properties(self): method test_attention_outputs (line 151) | def test_attention_outputs(self): method test_inputs_embeds (line 155) | def test_inputs_embeds(self): method test_model_common_attributes (line 159) | def test_model_common_attributes(self): method test_forward_signature (line 162) | def test_forward_signature(self): method test_model (line 174) | def test_model(self): method test_initialization (line 178) | def test_initialization(self): method test_hidden_states_output (line 194) | 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 RegNetModelIntegrationTest (line 247) | class RegNetModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 249) | def default_feature_extractor(self): method test_inference_image_classification_head (line 257) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/regnet/test_modeling_tf_regnet.py class TFRegNetModelTester (line 41) | class TFRegNetModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 71) | def prepare_config_and_inputs(self): method get_config (line 81) | def get_config(self): method create_and_check_model (line 91) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 100) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 106) | def prepare_config_and_inputs_for_common(self): class TFRegNetModelTest (line 114) | class TFRegNetModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 128) | def setUp(self): method create_and_test_config_common_properties (line 132) | def create_and_test_config_common_properties(self): method test_inputs_embeds (line 136) | def test_inputs_embeds(self): method test_keras_fit (line 143) | def test_keras_fit(self): method test_model_common_attributes (line 147) | def test_model_common_attributes(self): method test_attention_outputs (line 151) | def test_attention_outputs(self): method test_forward_signature (line 154) | def test_forward_signature(self): method test_model (line 166) | def test_model(self): method test_hidden_states_output (line 170) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 201) | def test_model_outputs_equivalence(self): method test_for_image_classification (line 244) | def test_for_image_classification(self): method test_model_from_pretrained (line 249) | def test_model_from_pretrained(self): function prepare_img (line 256) | def prepare_img(): class RegNetModelIntegrationTest (line 263) | class RegNetModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 265) | def default_feature_extractor(self): method test_inference_image_classification_head (line 273) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/rembert/test_modeling_rembert.py class RemBertModelTester (line 43) | class RemBertModelTester: 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_model_as_decoder (line 172) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 204) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 222) | def create_and_check_for_masked_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_question_answering (line 293) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 309) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 319) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 329) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 347) | def prepare_config_and_inputs_for_common(self): class RemBertModelTest (line 363) | class RemBertModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 380) | def setUp(self): method test_config (line 384) | def test_config(self): method test_model (line 387) | def test_model(self): method test_model_various_embeddings (line 391) | def test_model_various_embeddings(self): method test_for_masked_lm (line 397) | def test_for_masked_lm(self): method test_for_multiple_choice (line 401) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 405) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 409) | def test_for_question_answering(self): method test_for_sequence_classification (line 413) | def test_for_sequence_classification(self): method test_for_token_classification (line 417) | def test_for_token_classification(self): method test_model_as_decoder (line 421) | 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_model_from_pretrained (line 454) | def test_model_from_pretrained(self): class RemBertModelIntegrationTest (line 461) | class RemBertModelIntegrationTest(unittest.TestCase): method test_inference_model (line 463) | def test_inference_model(self): FILE: benchmark/third_party/transformers/tests/models/rembert/test_modeling_tf_rembert.py class TFRemBertModelTester (line 40) | class TFRemBertModelTester: method __init__ (line 41) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 131) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 158) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 171) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 187) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 219) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 234) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 266) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 309) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 370) | 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 488) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 500) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 514) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 530) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 543) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 557) | def prepare_config_and_inputs_for_common(self): class TFRemBertModelTest (line 573) | class TFRemBertModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 592) | def setUp(self): method test_config (line 596) | def test_config(self): method test_model (line 599) | def test_model(self): method test_causal_lm_base_model (line 604) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 612) | def test_model_as_decoder(self): method test_for_masked_lm (line 620) | def test_for_masked_lm(self): method test_for_causal_lm (line 624) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 629) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 634) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 639) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 644) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 649) | def test_decoder_model_past_with_large_inputs(self): method test_for_multiple_choice (line 654) | def test_for_multiple_choice(self): method test_for_question_answering (line 658) | def test_for_question_answering(self): method test_for_sequence_classification (line 662) | def test_for_sequence_classification(self): method test_for_token_classification (line 666) | def test_for_token_classification(self): method test_model_from_pretrained (line 671) | def test_model_from_pretrained(self): class TFRemBertModelIntegrationTest (line 677) | class TFRemBertModelIntegrationTest(unittest.TestCase): method test_inference_model (line 679) | def test_inference_model(self): FILE: benchmark/third_party/transformers/tests/models/resnet/test_modeling_resnet.py class ResNetModelTester (line 43) | class ResNetModelTester: method __init__ (line 44) | 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 94) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 105) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 113) | def prepare_config_and_inputs_for_common(self): class ResNetModelTest (line 121) | class ResNetModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 135) | def setUp(self): method test_config (line 139) | def test_config(self): method create_and_test_config_common_properties (line 148) | def create_and_test_config_common_properties(self): method test_attention_outputs (line 152) | def test_attention_outputs(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_initialization (line 179) | def test_initialization(self): method test_hidden_states_output (line 195) | def test_hidden_states_output(self): method test_for_image_classification (line 229) | def test_for_image_classification(self): method test_model_from_pretrained (line 234) | def test_model_from_pretrained(self): function prepare_img (line 241) | def prepare_img(): class ResNetModelIntegrationTest (line 248) | class ResNetModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 250) | def default_feature_extractor(self): method test_inference_image_classification_head (line 258) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/resnet/test_modeling_tf_resnet.py class TFResNetModelTester (line 44) | class TFResNetModelTester: method __init__ (line 45) | 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 96) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_classification (line 105) | 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 TFResNetModelTest (line 119) | class TFResNetModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 133) | def setUp(self): method test_config (line 137) | def test_config(self): method create_and_test_config_common_properties (line 146) | def create_and_test_config_common_properties(self): method test_inputs_embeds (line 150) | def test_inputs_embeds(self): method test_attention_outputs (line 154) | def test_attention_outputs(self): method test_model_common_attributes (line 158) | def test_model_common_attributes(self): method test_forward_signature (line 161) | def test_forward_signature(self): method test_model (line 173) | def test_model(self): method test_hidden_states_output (line 177) | 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): function prepare_img (line 219) | def prepare_img(): class TFResNetModelIntegrationTest (line 226) | class TFResNetModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 228) | def default_feature_extractor(self): method test_inference_image_classification_head (line 236) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/retribert/test_tokenization_retribert.py class RetriBertTokenizationTest (line 37) | class RetriBertTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 46) | 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_rust_and_python_full_tokenizers (line 82) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 123) | def test_chinese(self): method test_basic_tokenizer_lower (line 128) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 136) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 144) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 152) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 160) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 167) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 174) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 181) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 188) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 202) | def test_is_whitespace(self): method test_is_control (line 212) | def test_is_control(self): method test_is_punctuation (line 220) | def test_is_punctuation(self): method test_clean_text (line 229) | def test_clean_text(self): method test_sequence_builders (line 241) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 253) | def test_offsets_with_special_characters(self): method test_change_tokenize_chinese_chars (line 305) | def test_change_tokenize_chinese_chars(self): method test_torch_encode_plus_sent_to_model (line 345) | def test_torch_encode_plus_sent_to_model(self): FILE: benchmark/third_party/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 152) | def setUp(self): method test_model_from_pretrained (line 156) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/roberta/test_modeling_roberta.py class RobertaModelTester (line 49) | class RobertaModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 77) | def prepare_config_and_inputs(self): method get_config (line 100) | def get_config(self): method get_pipeline_config (line 115) | def get_pipeline_config(self): method prepare_config_and_inputs_for_decoder (line 120) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 147) | def create_and_check_model( method create_and_check_model_as_decoder (line 160) | 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 211) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 279) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 288) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 298) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 316) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 332) | def prepare_config_and_inputs_for_common(self): class RobertaModelTest (line 348) | class RobertaModelTest(ModelTesterMixin, GenerationTesterMixin, unittest... method setUp (line 366) | def setUp(self): method test_config (line 370) | def test_config(self): method test_model (line 373) | def test_model(self): method test_model_various_embeddings (line 377) | def test_model_various_embeddings(self): method test_model_as_decoder (line 383) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 387) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 415) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 419) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 423) | def test_for_masked_lm(self): method test_for_token_classification (line 427) | def test_for_token_classification(self): method test_for_multiple_choice (line 431) | def test_for_multiple_choice(self): method test_for_question_answering (line 435) | def test_for_question_answering(self): method test_model_from_pretrained (line 440) | def test_model_from_pretrained(self): method test_create_position_ids_respects_padding_index (line 445) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 464) | def test_create_position_ids_from_inputs_embeds(self): class RobertaModelIntegrationTest (line 488) | class RobertaModelIntegrationTest(TestCasePlus): method test_inference_masked_lm (line 490) | def test_inference_masked_lm(self): method test_inference_no_head (line 510) | def test_inference_no_head(self): method test_inference_classification_head (line 528) | def test_inference_classification_head(self): method test_lm_head_ignore_keys (line 545) | def test_lm_head_ignore_keys(self): FILE: benchmark/third_party/transformers/tests/models/roberta/test_modeling_tf_roberta.py class TFRobertaModelTester (line 42) | class TFRobertaModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 70) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_decoder (line 105) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 132) | def create_and_check_model( method create_and_check_causal_lm_base_model (line 146) | def create_and_check_causal_lm_base_model( method create_and_check_model_as_decoder (line 162) | def create_and_check_model_as_decoder( method create_and_check_causal_lm_model (line 194) | def create_and_check_causal_lm_model( method create_and_check_causal_lm_model_as_decoder (line 210) | def create_and_check_causal_lm_model_as_decoder( method create_and_check_causal_lm_model_past (line 242) | def create_and_check_causal_lm_model_past( method create_and_check_causal_lm_model_past_with_attn_mask (line 291) | def create_and_check_causal_lm_model_past_with_attn_mask( method create_and_check_causal_lm_model_past_large_inputs (line 361) | def create_and_check_causal_lm_model_past_large_inputs( method create_and_check_decoder_model_past_large_inputs (line 420) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 493) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 500) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 509) | def create_and_check_for_question_answering( method create_and_check_for_multiple_choice (line 518) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 534) | def prepare_config_and_inputs_for_common(self): class TFRobertaModelTest (line 550) | class TFRobertaModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 567) | def setUp(self): method test_config (line 571) | def test_config(self): method test_model (line 574) | def test_model(self): method test_causal_lm_base_model (line 579) | def test_causal_lm_base_model(self): method test_model_as_decoder (line 587) | def test_model_as_decoder(self): method test_for_masked_lm (line 595) | def test_for_masked_lm(self): method test_for_causal_lm (line 599) | def test_for_causal_lm(self): method test_causal_lm_model_as_decoder (line 604) | def test_causal_lm_model_as_decoder(self): method test_causal_lm_model_past (line 609) | def test_causal_lm_model_past(self): method test_causal_lm_model_past_with_attn_mask (line 614) | def test_causal_lm_model_past_with_attn_mask(self): method test_causal_lm_model_past_with_large_inputs (line 619) | def test_causal_lm_model_past_with_large_inputs(self): method test_decoder_model_past_with_large_inputs (line 624) | def test_decoder_model_past_with_large_inputs(self): method test_for_token_classification (line 629) | def test_for_token_classification(self): method test_for_question_answering (line 633) | def test_for_question_answering(self): method test_for_multiple_choice (line 637) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 642) | def test_model_from_pretrained(self): class TFRobertaModelIntegrationTest (line 651) | class TFRobertaModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 653) | def test_inference_masked_lm(self): method test_inference_no_head (line 667) | def test_inference_no_head(self): method test_inference_classification_head (line 679) | def test_inference_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/roberta/test_tokenization_roberta.py class RobertaTokenizationTest (line 30) | class RobertaTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 36) | def setUp(self): method get_tokenizer (line 73) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 77) | def get_rust_tokenizer(self, **kwargs): method get_input_output_texts (line 81) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer (line 86) | def test_full_tokenizer(self): method roberta_dict_integration_testing (line 97) | def roberta_dict_integration_testing(self): method test_sequence_builders (line 107) | def test_sequence_builders(self): method test_space_encoding (line 126) | def test_space_encoding(self): method test_pretokenized_inputs (line 166) | def test_pretokenized_inputs(self): method test_embeded_special_tokens (line 169) | def test_embeded_special_tokens(self): method test_change_add_prefix_space_and_trim_offsets_args (line 201) | 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 215) | def test_offsets_mapping_with_different_add_prefix_space_and_trim_spac... FILE: benchmark/third_party/transformers/tests/models/roformer/test_modeling_flax_roformer.py class FlaxRoFormerModelTester (line 37) | class FlaxRoFormerModelTester(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): class FlaxRoFormerModelTest (line 118) | 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: benchmark/third_party/transformers/tests/models/roformer/test_modeling_roformer.py class RoFormerModelTester (line 46) | class RoFormerModelTester: 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 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 172) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 204) | def create_and_check_for_causal_lm( method create_and_check_for_masked_lm (line 222) | def create_and_check_for_masked_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_question_answering (line 293) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 309) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 319) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 329) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 347) | def prepare_config_and_inputs_for_common(self): class RoFormerModelTest (line 363) | class RoFormerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 380) | def setUp(self): method test_config (line 384) | def test_config(self): method test_model (line 387) | def test_model(self): method test_for_masked_lm (line 391) | def test_for_masked_lm(self): method test_for_multiple_choice (line 395) | def test_for_multiple_choice(self): method test_decoder_model_past_with_large_inputs (line 399) | def test_decoder_model_past_with_large_inputs(self): method test_for_question_answering (line 403) | def test_for_question_answering(self): method test_for_sequence_classification (line 407) | def test_for_sequence_classification(self): method test_for_token_classification (line 411) | def test_for_token_classification(self): method test_model_as_decoder (line 415) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 419) | def test_model_as_decoder_with_default_input_mask(self): method test_model_from_pretrained (line 448) | def test_model_from_pretrained(self): class RoFormerModelIntegrationTest (line 455) | class RoFormerModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 457) | def test_inference_masked_lm(self): class RoFormerSinusoidalPositionalEmbeddingTest (line 478) | class RoFormerSinusoidalPositionalEmbeddingTest(unittest.TestCase): method test_basic (line 481) | def test_basic(self): method test_positional_emb_weights_against_roformer (line 493) | def test_positional_emb_weights_against_roformer(self): class RoFormerSelfAttentionRotaryPositionEmbeddingTest (line 512) | class RoFormerSelfAttentionRotaryPositionEmbeddingTest(unittest.TestCase): method test_apply_rotary_position_embeddings (line 515) | def test_apply_rotary_position_embeddings(self): FILE: benchmark/third_party/transformers/tests/models/roformer/test_modeling_tf_roformer.py class TFRoFormerModelTester (line 44) | class TFRoFormerModelTester: method __init__ (line 45) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method create_and_check_model (line 129) | def create_and_check_model( method create_and_check_lm_head (line 142) | def create_and_check_lm_head( method create_and_check_for_masked_lm (line 157) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 169) | def create_and_check_for_sequence_classification( method create_and_check_for_multiple_choice (line 183) | def create_and_check_for_multiple_choice( method create_and_check_for_token_classification (line 199) | def create_and_check_for_token_classification( method create_and_check_for_question_answering (line 212) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 226) | def prepare_config_and_inputs_for_common(self): class TFRoFormerModelTest (line 242) | class TFRoFormerModelTest(TFModelTesterMixin, unittest.TestCase): 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_causal_lm (line 276) | def test_for_causal_lm(self): method test_for_multiple_choice (line 280) | def test_for_multiple_choice(self): method test_for_question_answering (line 284) | def test_for_question_answering(self): method test_for_sequence_classification (line 288) | def test_for_sequence_classification(self): method test_for_token_classification (line 292) | def test_for_token_classification(self): method test_model_from_pretrained (line 297) | def test_model_from_pretrained(self): class TFRoFormerModelIntegrationTest (line 303) | class TFRoFormerModelIntegrationTest(unittest.TestCase): method test_inference_masked_lm (line 305) | def test_inference_masked_lm(self): class TFRoFormerSinusoidalPositionalEmbeddingTest (line 332) | class TFRoFormerSinusoidalPositionalEmbeddingTest(unittest.TestCase): method test_basic (line 335) | def test_basic(self): method test_positional_emb_weights_against_roformer (line 346) | def test_positional_emb_weights_against_roformer(self): class TFRoFormerSelfAttentionRotaryPositionEmbeddingTest (line 363) | class TFRoFormerSelfAttentionRotaryPositionEmbeddingTest(unittest.TestCa... method test_apply_rotary_position_embeddings (line 366) | def test_apply_rotary_position_embeddings(self): FILE: benchmark/third_party/transformers/tests/models/roformer/test_tokenization_roformer.py class RoFormerTokenizationTest (line 26) | class RoFormerTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 36) | def get_tokenizer(self, **kwargs): method get_rust_tokenizer (line 39) | def get_rust_tokenizer(self, **kwargs): method get_chinese_input_output_texts (line 42) | def get_chinese_input_output_texts(self): method test_tokenizer (line 47) | def test_tokenizer(self): method test_rust_tokenizer (line 58) | def test_rust_tokenizer(self): method test_training_new_tokenizer (line 68) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 72) | 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: benchmark/third_party/transformers/tests/models/segformer/test_feature_extraction_segformer.py class SegformerFeatureExtractionTester (line 37) | class SegformerFeatureExtractionTester(unittest.TestCase): method __init__ (line 38) | def __init__( method prepare_feat_extract_dict (line 64) | def prepare_feat_extract_dict(self): function prepare_semantic_single_inputs (line 75) | def prepare_semantic_single_inputs(): function prepare_semantic_batch_inputs (line 84) | def prepare_semantic_batch_inputs(): class SegformerFeatureExtractionTest (line 97) | class SegformerFeatureExtractionTest(FeatureExtractionSavingTestMixin, u... method setUp (line 101) | def setUp(self): method feat_extract_dict (line 105) | def feat_extract_dict(self): method test_feat_extract_properties (line 108) | def test_feat_extract_properties(self): method test_batch_feature (line 117) | def test_batch_feature(self): method test_call_pil (line 120) | def test_call_pil(self): method test_call_numpy (line 152) | def test_call_numpy(self): method test_call_pytorch (line 184) | def test_call_pytorch(self): method test_call_segmentation_maps (line 216) | def test_call_segmentation_maps(self): method test_reduce_labels (line 322) | def test_reduce_labels(self): FILE: benchmark/third_party/transformers/tests/models/segformer/test_modeling_segformer.py class SegformerConfigTester (line 47) | class SegformerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 48) | def create_and_test_config_common_properties(self): class SegformerModelTester (line 55) | class SegformerModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 96) | def prepare_config_and_inputs(self): method get_config (line 106) | def get_config(self): method create_and_check_model (line 120) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_image_segmentation (line 130) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 144) | def prepare_config_and_inputs_for_common(self): class SegformerModelTest (line 152) | class SegformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 169) | def setUp(self): method test_config (line 173) | def test_config(self): method test_model (line 176) | def test_model(self): method test_for_image_segmentation (line 180) | def test_for_image_segmentation(self): method test_inputs_embeds (line 185) | def test_inputs_embeds(self): method test_model_common_attributes (line 189) | def test_model_common_attributes(self): method test_forward_signature (line 192) | def test_forward_signature(self): method test_attention_outputs (line 204) | def test_attention_outputs(self): method test_hidden_states_output (line 273) | def test_hidden_states_output(self): method test_training (line 309) | def test_training(self): method test_model_from_pretrained (line 328) | def test_model_from_pretrained(self): function prepare_img (line 335) | def prepare_img(): class SegformerModelIntegrationTest (line 341) | class SegformerModelIntegrationTest(unittest.TestCase): method test_inference_image_segmentation_ade (line 343) | def test_inference_image_segmentation_ade(self): method test_inference_image_segmentation_city (line 372) | def test_inference_image_segmentation_city(self): method test_post_processing_semantic_segmentation (line 401) | def test_post_processing_semantic_segmentation(self): FILE: benchmark/third_party/transformers/tests/models/segformer/test_modeling_tf_segformer.py class TFSegformerConfigTester (line 42) | class TFSegformerConfigTester(ConfigTester): method create_and_test_config_common_properties (line 43) | def create_and_test_config_common_properties(self): class TFSegformerModelTester (line 50) | class TFSegformerModelTester: method __init__ (line 51) | 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_image_segmentation (line 124) | def create_and_check_for_image_segmentation(self, config, pixel_values... method prepare_config_and_inputs_for_common (line 136) | def prepare_config_and_inputs_for_common(self): method prepare_config_and_inputs_for_keras_fit (line 142) | def prepare_config_and_inputs_for_keras_fit(self, for_segmentation: bo... class TFSegformerModelTest (line 153) | class TFSegformerModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 165) | def setUp(self): method test_model (line 169) | def test_model(self): method test_inputs_embeds (line 174) | def test_inputs_embeds(self): method test_model_common_attributes (line 178) | def test_model_common_attributes(self): method test_compile_tf_model (line 182) | def test_compile_tf_model(self): method test_forward_signature (line 185) | def test_forward_signature(self): method test_attention_outputs (line 197) | def test_attention_outputs(self): method test_hidden_states_output (line 257) | def test_hidden_states_output(self): method test_model_outputs_equivalence (line 290) | def test_model_outputs_equivalence(self): method test_dataset_conversion (line 337) | def test_dataset_conversion(self): method check_keras_fit_results (line 340) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=2e-1, rto... method test_keras_fit (line 347) | def test_keras_fit(self): method test_loss_computation (line 357) | def test_loss_computation(self): method check_pt_tf_outputs (line 433) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method test_model_from_pretrained (line 438) | def test_model_from_pretrained(self): function prepare_img (line 445) | def prepare_img(): class TFSegformerModelIntegrationTest (line 451) | class TFSegformerModelIntegrationTest(unittest.TestCase): method test_inference_image_segmentation_ade (line 453) | def test_inference_image_segmentation_ade(self): method test_inference_image_segmentation_city (line 479) | def test_inference_image_segmentation_city(self): FILE: benchmark/third_party/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, unittest.TestCase): method setUp (line 307) | def setUp(self): method test_config (line 311) | def test_config(self): method test_model (line 314) | def test_model(self): method test_ctc_loss_inference (line 318) | def test_ctc_loss_inference(self): method test_ctc_train (line 322) | def test_ctc_train(self): method test_labels_out_of_vocab (line 326) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 331) | def test_inputs_embeds(self): method test_forward_signature (line 335) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 340) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 346) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 349) | def test_retain_grad_hidden_states_attentions(self): method test_seq_classifier_loss_inference (line 389) | def test_seq_classifier_loss_inference(self): method test_seq_classifier_train (line 393) | def test_seq_classifier_train(self): method test_initialization (line 397) | def test_initialization(self): method _mock_init_weights (line 423) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 436) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 440) | def test_model_from_pretrained(self): class SEWUtilsTest (line 446) | class SEWUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 447) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 458) | def test_compute_mask_indices_overlap(self): class SEWModelIntegrationTest (line 475) | class SEWModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 476) | def _load_datasamples(self, num_samples): method test_inference_pretrained_batched (line 487) | def test_inference_pretrained_batched(self): method test_inference_ctc_batched (line 541) | def test_inference_ctc_batched(self): FILE: benchmark/third_party/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, 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_ctc_loss_inference (line 340) | def test_ctc_loss_inference(self): method test_ctc_train (line 344) | def test_ctc_train(self): method test_labels_out_of_vocab (line 348) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 353) | def test_inputs_embeds(self): method test_forward_signature (line 357) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 362) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 368) | def test_model_common_attributes(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 _mock_init_weights (line 437) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 450) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 454) | def test_model_from_pretrained(self): class SEWDUtilsTest (line 460) | class SEWDUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 461) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 472) | def test_compute_mask_indices_overlap(self): class SEWDModelIntegrationTest (line 489) | class SEWDModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 490) | def _load_datasamples(self, num_samples): method test_inference_pretrained_batched (line 501) | def test_inference_pretrained_batched(self): method test_inference_ctc_batched (line 555) | def test_inference_ctc_batched(self): FILE: benchmark/third_party/transformers/tests/models/speech_encoder_decoder/test_modeling_flax_speech_encoder_decoder.py class FlaxEncoderDecoderMixin (line 57) | class FlaxEncoderDecoderMixin: method get_encoder_decoder_model (line 58) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 61) | def prepare_config_and_inputs(self): method get_pretrained_model (line 64) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 67) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 97) | 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 163) | def check_save_and_load( method check_encoder_decoder_model_from_encoder_decoder_pretrained (line 202) | def check_encoder_decoder_model_from_encoder_decoder_pretrained( method check_encoder_decoder_model_output_attentions (line 247) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 301) | def check_encoder_decoder_model_generate(self, inputs, config, decoder... method check_freeze_feature_encoder (line 330) | def check_freeze_feature_encoder( method check_pt_flax_equivalence (line 408) | 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 462) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 473) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 477) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 481) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 485) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_from_encoder_decoder_pretrained (line 489) | def test_encoder_decoder_model_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 493) | def test_encoder_decoder_model_output_attentions(self): method test_freeze_feature_encoder (line 497) | def test_freeze_feature_encoder(self): method test_encoder_decoder_model_generate (line 501) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 505) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 510) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 551) | def test_real_model_save_load_from_pretrained(self): class FlaxWav2Vec2GPT2ModelTest (line 581) | class FlaxWav2Vec2GPT2ModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 582) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 600) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 605) | def prepare_config_and_inputs(self): method test_flaxwav2vec2gpt2_pt_flax_equivalence (line 632) | def test_flaxwav2vec2gpt2_pt_flax_equivalence(self): class FlaxWav2Vec2BartModelTest (line 698) | class FlaxWav2Vec2BartModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 699) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 717) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 722) | def prepare_config_and_inputs(self): method test_flaxwav2vec2bart_pt_flax_equivalence (line 749) | def test_flaxwav2vec2bart_pt_flax_equivalence(self): class FlaxWav2Vec2BertModelTest (line 815) | class FlaxWav2Vec2BertModelTest(FlaxEncoderDecoderMixin, unittest.TestCa... method get_pretrained_model_and_inputs (line 816) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 834) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 839) | def prepare_config_and_inputs(self): method test_flaxwav2vec2bert_pt_flax_equivalence (line 866) | def test_flaxwav2vec2bert_pt_flax_equivalence(self): FILE: benchmark/third_party/transformers/tests/models/speech_encoder_decoder/test_modeling_speech_encoder_decoder.py class EncoderDecoderMixin (line 46) | class EncoderDecoderMixin: method get_encoder_decoder_model (line 47) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 50) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 53) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_from_pretrained_configs (line 56) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 89) | def check_encoder_decoder_model( method check_encoder_decoder_model_with_inputs (line 129) | def check_encoder_decoder_model_with_inputs( method check_encoder_decoder_model_from_pretrained (line 166) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 196) | def check_save_and_load( method check_save_and_load_encoder_decoder_model (line 239) | def check_save_and_load_encoder_decoder_model( method check_encoder_decoder_model_output_attentions (line 285) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 342) | 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 423) | def test_real_model_save_load_from_pretrained(self): class Wav2Vec2BertModelTest (line 445) | class Wav2Vec2BertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 446) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 464) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 469) | def prepare_config_and_inputs(self): class Speech2TextBertModelTest (line 509) | class Speech2TextBertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 510) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 528) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 533) | def prepare_config_and_inputs(self): method test_encoder_decoder_model_from_pretrained_configs (line 572) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_save_and_load_from_pretrained (line 576) | def test_save_and_load_from_pretrained(self): method test_real_model_save_load_from_pretrained (line 580) | def test_real_model_save_load_from_pretrained(self): class Wav2Vec2Speech2Text2 (line 585) | class Wav2Vec2Speech2Text2(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 586) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 591) | def prepare_config_and_inputs(self): method test_real_model_save_load_from_pretrained (line 620) | def test_real_model_save_load_from_pretrained(self): FILE: benchmark/third_party/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 110) | def setUp(self): method _check_zero_mean_unit_variance (line 113) | def _check_zero_mean_unit_variance(self, input_vector): method test_call (line 117) | def test_call(self): method test_cepstral_mean_and_variance_normalization (line 140) | def test_cepstral_mean_and_variance_normalization(self): method test_cepstral_mean_and_variance_normalization_np (line 158) | def test_cepstral_mean_and_variance_normalization_np(self): method test_cepstral_mean_and_variance_normalization_trunc_max_length (line 178) | def test_cepstral_mean_and_variance_normalization_trunc_max_length(self): method test_cepstral_mean_and_variance_normalization_trunc_longest (line 197) | def test_cepstral_mean_and_variance_normalization_trunc_longest(self): method test_double_precision_pad (line 239) | def test_double_precision_pad(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text/test_modeling_speech_to_text.py function prepare_speech_to_text_inputs_dict (line 47) | def prepare_speech_to_text_inputs_dict( class Speech2TextModelTester (line 80) | class Speech2TextModelTester: method __init__ (line 81) | def __init__( method prepare_config_and_inputs (line 133) | def prepare_config_and_inputs(self): method get_config (line 149) | def get_config(self): method prepare_config_and_inputs_for_common (line 174) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 178) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_model_forward (line 188) | def create_and_check_model_forward(self, config, inputs_dict): method create_and_check_decoder_model_past_large_inputs (line 199) | 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 Speech2TextModelTest (line 270) | class Speech2TextModelTest(ModelTesterMixin, GenerationTesterMixin, unit... 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 298) | def test_model_forward(self): method test_decoder_model_past_with_large_inputs (line 302) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 306) | def test_encoder_decoder_model_standalone(self): method test_inputs_embeds (line 311) | def test_inputs_embeds(self): method test_training (line 315) | def test_training(self): method test_training_gradient_checkpointing (line 318) | def test_training_gradient_checkpointing(self): method test_generate_fp16 (line 321) | def test_generate_fp16(self): method test_forward_signature (line 332) | def test_forward_signature(self): method test_hidden_states_output (line 354) | def test_hidden_states_output(self): method test_attention_outputs (line 407) | def test_attention_outputs(self): method test_resize_tokens_embeddings (line 502) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 550) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 599) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 603) | def _get_encoder_outputs( method _check_outputs (line 621) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method _create_and_check_torchscript (line 663) | def _create_and_check_torchscript(self, config, inputs_dict): class Speech2TextModelIntegrationTests (line 725) | class Speech2TextModelIntegrationTests(unittest.TestCase): method default_processor (line 727) | def default_processor(self): method _load_datasamples (line 730) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 739) | def test_generation_librispeech(self): method test_generation_librispeech_batched (line 756) | def test_generation_librispeech_batched(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text/test_modeling_tf_speech_to_text.py function prepare_speech_to_text_inputs_dict (line 34) | def prepare_speech_to_text_inputs_dict( class TFSpeech2TextModelTester (line 66) | class TFSpeech2TextModelTester: method __init__ (line 67) | def __init__( method prepare_config_and_inputs (line 121) | def prepare_config_and_inputs(self): method get_config (line 137) | def get_config(self): method prepare_config_and_inputs_for_common (line 163) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 167) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_decoder_model_past_large_inputs (line 177) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... class TFSpeech2TextModelTest (line 212) | class TFSpeech2TextModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 222) | def setUp(self): method test_config (line 227) | def test_config(self): method test_decoder_model_past_with_large_inputs (line 230) | def test_decoder_model_past_with_large_inputs(self): method test_inputs_embeds (line 235) | def test_inputs_embeds(self): method test_training (line 239) | def test_training(self): method test_training_gradient_checkpointing (line 242) | def test_training_gradient_checkpointing(self): method test_generate_fp16 (line 245) | def test_generate_fp16(self): method test_hidden_states_output (line 248) | def test_hidden_states_output(self): method test_attention_outputs (line 297) | def test_attention_outputs(self): method test_resize_token_embeddings (line 385) | def test_resize_token_embeddings(self): method test_resize_tokens_embeddings (line 389) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 393) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 400) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 404) | def _get_encoder_outputs( method _check_outputs (line 421) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method test_lm_head_model_random_no_beam_search_generate (line 465) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_random_beam_search_generate (line 500) | def test_lm_head_model_random_beam_search_generate(self): method test_forward_signature (line 540) | def test_forward_signature(self): class TFSpeech2TextModelIntegrationTests (line 562) | class TFSpeech2TextModelIntegrationTests(unittest.TestCase): method default_processor (line 564) | def default_processor(self): method _load_datasamples (line 567) | def _load_datasamples(self, num_samples): method test_generation_librispeech (line 576) | def test_generation_librispeech(self): method test_generation_librispeech_batched (line 592) | def test_generation_librispeech_batched(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text/test_processor_speech_to_text.py class Speech2TextProcessorTest (line 39) | class Speech2TextProcessorTest(unittest.TestCase): method setUp (line 40) | def setUp(self): method get_tokenizer (line 63) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 66) | def get_feature_extractor(self, **kwargs): method tearDown (line 69) | def tearDown(self): method test_save_load_pretrained_default (line 72) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 87) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 106) | def test_feature_extractor(self): method test_tokenizer (line 120) | def test_tokenizer(self): method test_tokenizer_decode (line 135) | def test_tokenizer_decode(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text/test_tokenization_speech_to_text.py class SpeechToTextTokenizerTest (line 39) | class SpeechToTextTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 44) | def setUp(self): method test_convert_token_and_id (line 62) | def test_convert_token_and_id(self): method test_get_vocab (line 70) | def test_get_vocab(self): method test_vocab_size (line 78) | def test_vocab_size(self): method test_full_tokenizer (line 81) | def test_full_tokenizer(self): method test_tokenizer_integration (line 111) | def test_tokenizer_integration(self): class SpeechToTextTokenizerMultilinguialTest (line 124) | class SpeechToTextTokenizerMultilinguialTest(unittest.TestCase): method setUpClass (line 131) | def setUpClass(cls): method check_language_codes (line 135) | def check_language_codes(self): method test_vocab_size (line 141) | def test_vocab_size(self): method test_tokenizer_decode_ignores_language_codes (line 144) | def test_tokenizer_decode_ignores_language_codes(self): method test_tokenizer_adds_special_tokens (line 152) | def test_tokenizer_adds_special_tokens(self): method test_tgt_lang_setter (line 158) | def test_tgt_lang_setter(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text_2/test_modeling_speech_to_text_2.py class Speech2Text2StandaloneDecoderModelTester (line 37) | class Speech2Text2StandaloneDecoderModelTester: method __init__ (line 38) | def __init__( method prepare_config_and_inputs (line 89) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 121) | def create_and_check_decoder_model_past( method prepare_config_and_inputs_for_common (line 162) | def prepare_config_and_inputs_for_common(self): class Speech2Text2StandaloneDecoderModelTest (line 179) | class Speech2Text2StandaloneDecoderModelTest(ModelTesterMixin, Generatio... method setUp (line 185) | def setUp( method test_inputs_embeds (line 192) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 196) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 200) | def test_save_load_fast_init_to_base(self): method test_config (line 203) | def test_config(self): method test_decoder_model_past (line 206) | def test_decoder_model_past(self): method test_retain_grad_hidden_states_attentions (line 211) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/speech_to_text_2/test_tokenization_speech_to_text_2.py class SpeechToTextTokenizerTest (line 27) | class SpeechToTextTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 31) | def setUp(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_tokenizer_decode (line 61) | def test_tokenizer_decode(self): method test_load_no_merges_file (line 70) | def test_load_no_merges_file(self): method test_tokenizer_slow_store_full_signature (line 88) | def test_tokenizer_slow_store_full_signature(self): FILE: benchmark/third_party/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, unittest.TestCase): method _prepare_for_class (line 222) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 254) | def setUp(self): method test_config (line 258) | def test_config(self): method test_model (line 261) | def test_model(self): method test_model_various_embeddings (line 265) | def test_model_various_embeddings(self): method test_for_question_answering (line 271) | def test_for_question_answering(self): method test_for_pretraining (line 275) | def test_for_pretraining(self): method test_inputs_embeds (line 279) | def test_inputs_embeds(self): method test_model_from_pretrained (line 314) | def test_model_from_pretrained(self): method test_multi_gpu_data_parallel_forward (line 324) | def test_multi_gpu_data_parallel_forward(self): class SplinterModelIntegrationTest (line 357) | class SplinterModelIntegrationTest(unittest.TestCase): method test_splinter_question_answering (line 359) | def test_splinter_question_answering(self): method test_splinter_pretraining (line 377) | def test_splinter_pretraining(self): method test_splinter_pretraining_loss_requires_question_positions (line 398) | def test_splinter_pretraining_loss_requires_question_positions(self): method test_splinter_pretraining_loss (line 416) | def test_splinter_pretraining_loss(self): method test_splinter_pretraining_loss_with_padding (line 439) | def test_splinter_pretraining_loss_with_padding(self): method test_splinter_pretraining_prepare_question_positions (line 478) | def test_splinter_pretraining_prepare_question_positions(self): FILE: benchmark/third_party/transformers/tests/models/squeezebert/test_modeling_squeezebert.py class SqueezeBertModelTester (line 40) | class SqueezeBertModelTester(object): 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, unittest.TestCase): method setUp (line 235) | def setUp(self): method test_config (line 239) | def test_config(self): method test_squeezebert_model (line 242) | def test_squeezebert_model(self): method test_for_masked_lm (line 246) | def test_for_masked_lm(self): method test_for_question_answering (line 250) | def test_for_question_answering(self): method test_for_sequence_classification (line 254) | def test_for_sequence_classification(self): method test_for_token_classification (line 258) | def test_for_token_classification(self): method test_for_multiple_choice (line 262) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 267) | def test_model_from_pretrained(self): class SqueezeBertModelIntegrationTest (line 276) | class SqueezeBertModelIntegrationTest(unittest.TestCase): method test_inference_classification_head (line 278) | def test_inference_classification_head(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/swin/test_modeling_swin.py class SwinModelTester (line 42) | class SwinModelTester: method __init__ (line 43) | 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 128) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_masked_image_modeling (line 139) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 158) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 176) | def prepare_config_and_inputs_for_common(self): class SwinModelTest (line 188) | class SwinModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 205) | def setUp(self): method test_config (line 209) | def test_config(self): method create_and_test_config_common_properties (line 218) | def create_and_test_config_common_properties(self): method test_model (line 221) | def test_model(self): method test_for_masked_image_modeling (line 225) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 229) | def test_for_image_classification(self): method test_inputs_embeds (line 233) | def test_inputs_embeds(self): method test_model_common_attributes (line 237) | def test_model_common_attributes(self): method test_forward_signature (line 246) | def test_forward_signature(self): method test_attention_outputs (line 258) | def test_attention_outputs(self): method check_hidden_states_output (line 318) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 359) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 378) | def test_hidden_states_output_with_padding(self): method test_model_from_pretrained (line 406) | def test_model_from_pretrained(self): method test_initialization (line 411) | def test_initialization(self): class SwinModelIntegrationTest (line 428) | class SwinModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 430) | def default_feature_extractor(self): method test_inference_image_classification_head (line 438) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/swin/test_modeling_tf_swin.py class TFSwinModelTester (line 48) | class TFSwinModelTester: method __init__ (line 49) | 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_masked_image_modeling (line 143) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 158) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 171) | def prepare_config_and_inputs_for_common(self): class TFSwinModelTest (line 179) | class TFSwinModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 196) | def setUp(self): method test_config (line 200) | def test_config(self): method create_and_test_config_common_properties (line 209) | def create_and_test_config_common_properties(self): method test_model (line 212) | def test_model(self): method test_for_masked_image_modeling (line 216) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 220) | def test_for_image_classification(self): method test_inputs_embeds (line 225) | def test_inputs_embeds(self): method test_saved_model_creation (line 229) | def test_saved_model_creation(self): method test_model_common_attributes (line 232) | def test_model_common_attributes(self): method test_forward_signature (line 241) | def test_forward_signature(self): method test_attention_outputs (line 253) | def test_attention_outputs(self): method check_hidden_states_output (line 304) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 337) | def test_hidden_states_output(self): method test_inputs_requiring_padding (line 353) | def test_inputs_requiring_padding(self): method test_model_from_pretrained (line 373) | def test_model_from_pretrained(self): class TFSwinModelIntegrationTest (line 381) | class TFSwinModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 383) | def default_feature_extractor(self): method test_inference_image_classification_head (line 391) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/swinv2/test_modeling_swinv2.py class Swinv2ModelTester (line 41) | class Swinv2ModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 94) | def prepare_config_and_inputs(self): method get_config (line 105) | 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_masked_image_modeling (line 138) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 157) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 165) | def prepare_config_and_inputs_for_common(self): class Swinv2ModelTest (line 173) | class Swinv2ModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 184) | def setUp(self): method test_config (line 188) | def test_config(self): method test_model (line 196) | def test_model(self): method test_inputs_embeds (line 201) | def test_inputs_embeds(self): method test_model_common_attributes (line 204) | def test_model_common_attributes(self): method test_forward_signature (line 213) | def test_forward_signature(self): method test_attention_outputs (line 225) | def test_attention_outputs(self): method check_hidden_states_output (line 285) | def check_hidden_states_output(self, inputs_dict, config, model_class,... method test_hidden_states_output (line 326) | def test_hidden_states_output(self): method test_hidden_states_output_with_padding (line 345) | def test_hidden_states_output_with_padding(self): method test_for_masked_image_modeling (line 372) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 376) | def test_for_image_classification(self): method test_model_from_pretrained (line 381) | def test_model_from_pretrained(self): method test_initialization (line 386) | def test_initialization(self): class Swinv2ModelIntegrationTest (line 403) | class Swinv2ModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 405) | def default_feature_extractor(self): method test_inference_image_classification_head (line 413) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/t5/test_modeling_flax_t5.py class FlaxT5ModelTester (line 59) | class FlaxT5ModelTester: method __init__ (line 60) | 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 236) | def setUp(self): method test_config (line 240) | def test_config(self): method test_model (line 243) | def test_model(self): method test_model_v1_1 (line 247) | def test_model_v1_1(self): method test_use_cache_forward_with_attn_mask (line 255) | def test_use_cache_forward_with_attn_mask(self): method test_encode (line 260) | def test_encode(self): method test_decode (line 283) | def test_decode(self): method test_shift_right (line 316) | def test_shift_right(self): method test_save_load_from_base (line 334) | def test_save_load_from_base(self): method test_save_load_to_base (line 357) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 381) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 411) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 440) | def test_save_load_bf16_to_base_pt(self): class FlaxT5EncoderOnlyModelTester (line 469) | class FlaxT5EncoderOnlyModelTester: method __init__ (line 470) | def __init__( method prepare_config_and_inputs (line 515) | def prepare_config_and_inputs(self): method create_and_check_model (line 546) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 562) | def prepare_config_and_inputs_for_common(self): class FlaxT5EncoderOnlyModelTest (line 578) | class FlaxT5EncoderOnlyModelTest(FlaxModelTesterMixin, unittest.TestCase): 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_model_v1_1 (line 594) | def test_model_v1_1(self): method test_encode (line 602) | def test_encode(self): method test_save_load_from_base (line 626) | def test_save_load_from_base(self): method test_save_load_to_base (line 649) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 673) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 703) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 732) | def test_save_load_bf16_to_base_pt(self): class FlaxT5ModelIntegrationTests (line 764) | class FlaxT5ModelIntegrationTests(unittest.TestCase): method test_small_integration_test (line 766) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 796) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 826) | def test_small_byt5_integration_test(self): method test_small_generation (line 854) | def test_small_generation(self): method test_summarization (line 869) | def test_summarization(self): FILE: benchmark/third_party/transformers/tests/models/t5/test_modeling_t5.py class T5ModelTester (line 37) | class T5ModelTester: method __init__ (line 38) | def __init__( method get_large_model_config (line 86) | def get_large_model_config(self): method prepare_config_and_inputs (line 89) | 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 219) | def create_and_check_with_lm_head( method create_and_check_decoder_model_past (line 239) | def create_and_check_decoder_model_past( method create_and_check_decoder_model_attention_mask_past (line 276) | def create_and_check_decoder_model_attention_mask_past( method create_and_check_decoder_model_past_large_inputs (line 327) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_generate_with_past_key_values (line 365) | def create_and_check_generate_with_past_key_values( method create_and_check_model_fp16_forward (line 383) | 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_t5_v1_1 (line 472) | def check_resize_embeddings_t5_v1_1( method prepare_config_and_inputs_for_common (line 486) | def prepare_config_and_inputs_for_common(self): class T5ModelTest (line 508) | class T5ModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Test... 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_generate_with_past_key_values (line 594) | def test_generate_with_past_key_values(self): method test_encoder_decoder_shared_weights (line 598) | def test_encoder_decoder_shared_weights(self): method test_model_fp16_forward (line 603) | def test_model_fp16_forward(self): method test_v1_1_resize_embeddings (line 607) | def test_v1_1_resize_embeddings(self): method test_model_from_pretrained (line 612) | def test_model_from_pretrained(self): method test_export_to_onnx (line 618) | def test_export_to_onnx(self): method test_generate_with_head_masking (line 631) | def test_generate_with_head_masking(self): method test_disk_offload (line 666) | def test_disk_offload(self): class T5EncoderOnlyModelTester (line 670) | class T5EncoderOnlyModelTester: method __init__ (line 671) | def __init__( method get_large_model_config (line 713) | def get_large_model_config(self): method prepare_config_and_inputs (line 716) | def prepare_config_and_inputs(self): method create_and_check_model (line 745) | def create_and_check_model( method create_and_check_model_fp16_forward (line 763) | def create_and_check_model_fp16_forward( method prepare_config_and_inputs_for_common (line 773) | def prepare_config_and_inputs_for_common(self): class T5EncoderOnlyModelTest (line 788) | class T5EncoderOnlyModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 795) | def setUp(self): method test_config (line 799) | def test_config(self): method test_model (line 802) | def test_model(self): method test_model_fp16_forward (line 807) | def test_model_fp16_forward(self): function use_task_specific_params (line 812) | def use_task_specific_params(model, task): class T5ModelIntegrationTests (line 819) | class T5ModelIntegrationTests(unittest.TestCase): method model (line 821) | def model(self): method tokenizer (line 825) | def tokenizer(self): method test_small_generation (line 829) | def test_small_generation(self): method test_small_integration_test (line 844) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 870) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 896) | def test_small_byt5_integration_test(self): method test_summarization (line 920) | def test_summarization(self): method test_translation_en_to_de (line 1156) | def test_translation_en_to_de(self): method test_translation_en_to_fr (line 1173) | def test_translation_en_to_fr(self): method test_translation_en_to_ro (line 1207) | def test_translation_en_to_ro(self): class TestAsymmetricT5 (line 1221) | class TestAsymmetricT5(unittest.TestCase): method build_model_and_check_forward_pass (line 1222) | def build_model_and_check_forward_pass(self, **kwargs): method test_small_decoder (line 1245) | def test_small_decoder(self): method test_defaulting_to_symmetry (line 1251) | def test_defaulting_to_symmetry(self): FILE: benchmark/third_party/transformers/tests/models/t5/test_modeling_tf_t5.py class TFT5ModelTester (line 32) | class TFT5ModelTester: method __init__ (line 33) | def __init__( method prepare_config_and_inputs (line 56) | def prepare_config_and_inputs(self): method create_and_check_t5_model (line 86) | def create_and_check_t5_model(self, config, input_ids, input_mask, tok... method create_and_check_t5_with_lm_head (line 106) | def create_and_check_t5_with_lm_head(self, config, input_ids, input_ma... method create_and_check_t5_decoder_model_past (line 118) | def create_and_check_t5_decoder_model_past(self, config, input_ids, de... method create_and_check_t5_decoder_model_attention_mask_past (line 150) | def create_and_check_t5_decoder_model_attention_mask_past( method create_and_check_t5_decoder_model_past_large_inputs (line 195) | def create_and_check_t5_decoder_model_past_large_inputs( method prepare_config_and_inputs_for_common (line 230) | def prepare_config_and_inputs_for_common(self): class TFT5ModelTest (line 242) | class TFT5ModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 249) | def setUp(self): method test_config (line 253) | def test_config(self): method test_t5_model (line 256) | def test_t5_model(self): method test_t5_model_v1_1 (line 260) | def test_t5_model_v1_1(self): method test_with_lm_head (line 267) | def test_with_lm_head(self): method test_t5_decoder_model_past (line 271) | def test_t5_decoder_model_past(self): method test_t5_decoder_model_past_with_attn_mask (line 275) | def test_t5_decoder_model_past_with_attn_mask(self): method test_t5_decoder_model_past_large_inputs (line 279) | def test_t5_decoder_model_past_large_inputs(self): method test_model_common_attributes (line 290) | def test_model_common_attributes(self): method test_saved_model_creation (line 309) | def test_saved_model_creation(self): method test_model_from_pretrained (line 313) | def test_model_from_pretrained(self): method test_generate_with_headmasking (line 317) | def test_generate_with_headmasking(self): method test_keras_save_load (line 323) | def test_keras_save_load(self): class TFT5EncoderOnlyModelTester (line 327) | class TFT5EncoderOnlyModelTester: method __init__ (line 328) | def __init__( method prepare_config_and_inputs (line 370) | def prepare_config_and_inputs(self): method create_and_check_model (line 399) | def create_and_check_model( method prepare_config_and_inputs_for_common (line 415) | def prepare_config_and_inputs_for_common(self): class TFT5EncoderOnlyModelTest (line 430) | class TFT5EncoderOnlyModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 435) | def setUp(self): method test_config (line 439) | def test_config(self): method test_model (line 442) | def test_model(self): method test_train_pipeline_custom_model (line 447) | def test_train_pipeline_custom_model(self): class TFT5GenerationIntegrationTests (line 454) | class TFT5GenerationIntegrationTests(unittest.TestCase): method test_greedy_xla_generate_simple (line 456) | def test_greedy_xla_generate_simple(self): method test_greedy_generate (line 484) | def test_greedy_generate(self): method test_sample_xla_generate_simple (line 507) | def test_sample_xla_generate_simple(self): method test_sample_generate (line 534) | def test_sample_generate(self): method test_beam_search_xla_generate_simple (line 563) | def test_beam_search_xla_generate_simple(self): method test_beam_search_generate (line 596) | def test_beam_search_generate(self): class TFT5ModelIntegrationTests (line 622) | class TFT5ModelIntegrationTests(unittest.TestCase): method model (line 624) | def model(self): method test_small_integration_test (line 628) | def test_small_integration_test(self): method test_small_v1_1_integration_test (line 654) | def test_small_v1_1_integration_test(self): method test_small_byt5_integration_test (line 680) | def test_small_byt5_integration_test(self): method test_summarization (line 704) | def test_summarization(self): method test_translation_en_to_de (line 950) | def test_translation_en_to_de(self): method test_translation_en_to_fr (line 979) | def test_translation_en_to_fr(self): method test_translation_en_to_ro (line 1016) | def test_translation_en_to_ro(self): FILE: benchmark/third_party/transformers/tests/models/t5/test_tokenization_t5.py class T5TokenizationTest (line 39) | class T5TokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 46) | def setUp(self): 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_full_tokenizer (line 72) | def test_full_tokenizer(self): method t5_base_tokenizer (line 139) | def t5_base_tokenizer(self): method t5_base_tokenizer_fast (line 143) | def t5_base_tokenizer_fast(self): method get_tokenizer (line 146) | def get_tokenizer(self, **kwargs) -> T5Tokenizer: method get_rust_tokenizer (line 149) | def get_rust_tokenizer(self, **kwargs) -> T5TokenizerFast: method test_rust_and_python_full_tokenizers (line 152) | def test_rust_and_python_full_tokenizers(self): method test_eos_treatment (line 174) | def test_eos_treatment(self): method test_prepare_batch (line 180) | def test_prepare_batch(self): method test_empty_target_text (line 197) | def test_empty_target_text(self): method test_max_length (line 207) | def test_max_length(self): method test_outputs_not_longer_than_maxlen (line 218) | def test_outputs_not_longer_than_maxlen(self): method test_eos_in_input (line 230) | def test_eos_in_input(self): method test_token_type_ids (line 242) | def test_token_type_ids(self): method test_fast_and_slow_same_result (line 256) | def test_fast_and_slow_same_result(self): method test_special_tokens_initialization (line 271) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 299) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_pretrained_model_lists (line 365) | def test_pretrained_model_lists(self): method test_tokenizer_integration (line 372) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/table_transformer/test_modeling_table_transformer.py class TableTransformerModelTester (line 43) | class TableTransformerModelTester: 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 122) | def prepare_config_and_inputs_for_common(self): method create_and_check_table_transformer_model (line 127) | def create_and_check_table_transformer_model(self, config, pixel_value... method create_and_check_table_transformer_object_detection_head_model (line 139) | def create_and_check_table_transformer_object_detection_head_model(sel... class TableTransformerModelTest (line 158) | class TableTransformerModelTest(ModelTesterMixin, GenerationTesterMixin,... method _prepare_for_class (line 174) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 200) | def setUp(self): method test_config (line 204) | def test_config(self): method test_table_transformer_model (line 207) | def test_table_transformer_model(self): method test_table_transformer_object_detection_head_model (line 211) | def test_table_transformer_object_detection_head_model(self): method test_inputs_embeds (line 216) | def test_inputs_embeds(self): method test_model_common_attributes (line 220) | def test_model_common_attributes(self): method test_generate_without_input_ids (line 224) | def test_generate_without_input_ids(self): method test_resize_tokens_embeddings (line 228) | def test_resize_tokens_embeddings(self): method test_model_outputs_equivalence (line 232) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 236) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 336) | def test_retain_grad_hidden_states_attentions(self): method test_forward_signature (line 372) | def test_forward_signature(self): method test_different_timm_backbone (line 393) | def test_different_timm_backbone(self): method test_greyscale_images (line 416) | def test_greyscale_images(self): method test_initialization (line 436) | def test_initialization(self): function prepare_img (line 464) | def prepare_img(): class TableTransformerModelIntegrationTests (line 472) | class TableTransformerModelIntegrationTests(unittest.TestCase): method test_table_detection (line 473) | def test_table_detection(self): FILE: benchmark/third_party/transformers/tests/models/tapas/test_modeling_tapas.py class TapasModelTester (line 70) | class TapasModelTester: method __init__ (line 73) | def __init__( method prepare_config_and_inputs (line 163) | def prepare_config_and_inputs(self): method get_config (line 207) | def get_config(self): method create_and_check_model (line 245) | def create_and_check_model( method create_and_check_for_masked_lm (line 268) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 288) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 376) | def create_and_check_for_sequence_classification( method prepare_config_and_inputs_for_common (line 397) | def prepare_config_and_inputs_for_common(self): class TapasModelTest (line 418) | class TapasModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 434) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 485) | def setUp(self): method test_config (line 489) | def test_config(self): method test_model (line 492) | def test_model(self): method test_for_masked_lm (line 496) | def test_for_masked_lm(self): method test_for_question_answering (line 500) | def test_for_question_answering(self): method test_for_sequence_classification (line 504) | def test_for_sequence_classification(self): method test_pt_tf_model_equivalence (line 509) | def test_pt_tf_model_equivalence(self): function prepare_tapas_single_inputs_for_inference (line 513) | def prepare_tapas_single_inputs_for_inference(): function prepare_tapas_batch_inputs_for_inference (line 525) | def prepare_tapas_batch_inputs_for_inference(): function prepare_tapas_batch_inputs_for_training (line 538) | def prepare_tapas_batch_inputs_for_training(): class TapasModelIntegrationTest (line 557) | class TapasModelIntegrationTest(unittest.TestCase): method default_tokenizer (line 559) | def default_tokenizer(self): method test_inference_no_head (line 563) | def test_inference_no_head(self): method test_inference_masked_lm (line 595) | def test_inference_masked_lm(self): method test_inference_question_answering_head_conversational (line 604) | def test_inference_question_answering_head_conversational(self): method test_inference_question_answering_head_conversational_absolute_embeddings (line 651) | def test_inference_question_answering_head_conversational_absolute_emb... method test_inference_question_answering_head_weak_supervision (line 701) | def test_inference_question_answering_head_weak_supervision(self): method test_training_question_answering_head_weak_supervision (line 751) | def test_training_question_answering_head_weak_supervision(self): method test_inference_question_answering_head_strong_supervision (line 827) | def test_inference_question_answering_head_strong_supervision(self): method test_inference_classification_head (line 885) | def test_inference_classification_head(self): class TapasUtilitiesTest (line 911) | class TapasUtilitiesTest(unittest.TestCase): method _prepare_tables (line 912) | def _prepare_tables(self): method test_product_index (line 953) | def test_product_index(self): method test_flatten (line 988) | def test_flatten(self): method test_range_index_map (line 1007) | def test_range_index_map(self): method test_reduce_sum (line 1022) | def test_reduce_sum(self): method test_reduce_mean (line 1037) | def test_reduce_mean(self): method test_reduce_max (line 1057) | def test_reduce_max(self): method test_reduce_sum_vectorized (line 1065) | def test_reduce_sum_vectorized(self): method test_gather (line 1077) | def test_gather(self): method test_gather_vectorized (line 1094) | def test_gather_vectorized(self): FILE: benchmark/third_party/transformers/tests/models/tapas/test_modeling_tf_tapas.py class TFTapasModelTester (line 65) | class TFTapasModelTester: method __init__ (line 66) | def __init__( method prepare_config_and_inputs (line 156) | def prepare_config_and_inputs(self): method get_config (line 200) | def get_config(self): method create_and_check_model (line 238) | def create_and_check_model( method create_and_check_for_masked_lm (line 268) | def create_and_check_for_masked_lm( method create_and_check_for_sequence_classification (line 292) | def create_and_check_for_sequence_classification( method create_and_check_for_question_answering (line 316) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 400) | def prepare_config_and_inputs_for_common(self): class TFTapasModelTest (line 421) | class TFTapasModelTest(TFModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 436) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 478) | def setUp(self): method test_config (line 482) | def test_config(self): method test_model (line 485) | def test_model(self): method test_for_masked_lm (line 489) | def test_for_masked_lm(self): method test_for_question_answering (line 493) | def test_for_question_answering(self): method test_for_sequence_classification (line 497) | def test_for_sequence_classification(self): method test_dataset_conversion (line 502) | def test_dataset_conversion(self): method test_keras_fit (line 506) | def test_keras_fit(self): method test_loss_computation (line 510) | def test_loss_computation(self): function prepare_tapas_single_inputs_for_inference (line 514) | def prepare_tapas_single_inputs_for_inference(): function prepare_tapas_batch_inputs_for_inference (line 526) | def prepare_tapas_batch_inputs_for_inference(): function prepare_tapas_batch_inputs_for_training (line 539) | def prepare_tapas_batch_inputs_for_training(): class TFTapasModelIntegrationTest (line 558) | class TFTapasModelIntegrationTest(unittest.TestCase): method default_tokenizer (line 560) | def default_tokenizer(self): method test_inference_no_head (line 564) | def test_inference_no_head(self): method test_inference_masked_lm (line 592) | def test_inference_masked_lm(self): method test_inference_question_answering_head_conversational (line 601) | def test_inference_question_answering_head_conversational(self): method test_inference_question_answering_head_conversational_absolute_embeddings (line 645) | def test_inference_question_answering_head_conversational_absolute_emb... method test_inference_question_answering_head_weak_supervision (line 690) | def test_inference_question_answering_head_weak_supervision(self): method test_training_question_answering_head_weak_supervision (line 734) | def test_training_question_answering_head_weak_supervision(self): method test_inference_question_answering_head_strong_supervision (line 792) | def test_inference_question_answering_head_strong_supervision(self): method test_inference_classification_head (line 842) | def test_inference_classification_head(self): class TFTapasUtilsTest (line 863) | class TFTapasUtilsTest(unittest.TestCase): method _prepare_tables (line 864) | def _prepare_tables(self): method test_product_index (line 901) | def test_product_index(self): method test_flatten (line 936) | def test_flatten(self): method test_range_index_map (line 955) | def test_range_index_map(self): method test_reduce_sum (line 970) | def test_reduce_sum(self): method test_reduce_mean (line 985) | def test_reduce_mean(self): method test_reduce_max (line 1005) | def test_reduce_max(self): method test_reduce_sum_vectorized (line 1013) | def test_reduce_sum_vectorized(self): method test_gather (line 1025) | def test_gather(self): method test_gather_vectorized (line 1042) | def test_gather_vectorized(self): FILE: benchmark/third_party/transformers/tests/models/tapas/test_tokenization_tapas.py class TapasTokenizationTest (line 50) | class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method get_table (line 57) | def get_table( method get_table_and_query (line 73) | def get_table_and_query( method get_clean_sequence (line 84) | def get_clean_sequence( method setUp (line 116) | def setUp(self): method get_input_output_texts (line 140) | def get_input_output_texts(self, tokenizer): method test_tf_encode_plus_sent_to_model (line 147) | def test_tf_encode_plus_sent_to_model(self): method test_rust_and_python_full_tokenizers (line 180) | def test_rust_and_python_full_tokenizers(self): method test_chinese (line 221) | def test_chinese(self): method test_basic_tokenizer_lower (line 226) | def test_basic_tokenizer_lower(self): method test_basic_tokenizer_lower_strip_accents_false (line 234) | def test_basic_tokenizer_lower_strip_accents_false(self): method test_basic_tokenizer_lower_strip_accents_true (line 242) | def test_basic_tokenizer_lower_strip_accents_true(self): method test_basic_tokenizer_lower_strip_accents_default (line 250) | def test_basic_tokenizer_lower_strip_accents_default(self): method test_basic_tokenizer_no_lower (line 258) | def test_basic_tokenizer_no_lower(self): method test_basic_tokenizer_no_lower_strip_accents_false (line 265) | def test_basic_tokenizer_no_lower_strip_accents_false(self): method test_basic_tokenizer_no_lower_strip_accents_true (line 272) | def test_basic_tokenizer_no_lower_strip_accents_true(self): method test_basic_tokenizer_respects_never_split_tokens (line 279) | def test_basic_tokenizer_respects_never_split_tokens(self): method test_wordpiece_tokenizer (line 286) | def test_wordpiece_tokenizer(self): method test_is_whitespace (line 300) | def test_is_whitespace(self): method test_is_control (line 310) | def test_is_control(self): method test_is_punctuation (line 318) | def test_is_punctuation(self): method test_clean_text (line 327) | def test_clean_text(self): method test_sequence_builders (line 336) | def test_sequence_builders(self): method test_offsets_with_special_characters (line 349) | def test_offsets_with_special_characters(self): method test_add_special_tokens (line 401) | def test_add_special_tokens(self): method test_add_tokens_tokenizer (line 416) | def test_add_tokens_tokenizer(self): method test_encode_decode_with_spaces (line 471) | def test_encode_decode_with_spaces(self): method test_encode_plus_with_padding (line 488) | def test_encode_plus_with_padding(self): method test_internal_consistency (line 594) | def test_internal_consistency(self): method test_mask_output (line 613) | def test_mask_output(self): method test_maximum_encoding_length_pair_input (line 628) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 632) | def test_maximum_encoding_length_single_input(self): method test_number_of_added_tokens (line 635) | def test_number_of_added_tokens(self): method test_padding_to_max_length (line 651) | def test_padding_to_max_length(self): method test_call (line 687) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 716) | def test_batch_encode_plus_batch_sequence_length(self): method test_batch_encode_plus_overflowing_tokens (line 775) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_padding (line 778) | def test_batch_encode_plus_padding(self): method test_padding_to_multiple_of (line 835) | def test_padding_to_multiple_of(self): method test_prepare_for_model (line 860) | def test_prepare_for_model(self): method test_tokenizer_slow_store_full_signature (line 863) | def test_tokenizer_slow_store_full_signature(self): method test_special_tokens_mask_input_pairs (line 871) | def test_special_tokens_mask_input_pairs(self): method test_special_tokens_mask (line 897) | def test_special_tokens_mask(self): method test_save_and_load_tokenizer (line 915) | def test_save_and_load_tokenizer(self): method test_right_and_left_truncation (line 944) | def test_right_and_left_truncation(self): method test_right_and_left_padding (line 947) | def test_right_and_left_padding(self): method test_token_type_ids (line 1010) | def test_token_type_ids(self): method test_torch_encode_plus_sent_to_model (line 1035) | def test_torch_encode_plus_sent_to_model(self): method test_pretokenized_inputs (line 1078) | def test_pretokenized_inputs(self): method test_tapas_truncation_integration_test (line 1082) | def test_tapas_truncation_integration_test(self): method test_min_max_question_length (line 1120) | def test_min_max_question_length(self): method test_batch_encode_plus_tensors (line 1151) | def test_batch_encode_plus_tensors(self): method test_tapas_integration_test (line 1199) | def test_tapas_integration_test(self): method test_full_tokenizer (line 1224) | def test_full_tokenizer(self): method test_pretrained_model_lists (line 1269) | def test_pretrained_model_lists(self): method test_np_encode_plus_sent_to_model (line 1273) | def test_np_encode_plus_sent_to_model(self): FILE: benchmark/third_party/transformers/tests/models/tapex/test_tokenization_tapex.py class TapexTokenizationTest (line 34) | class TapexTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 40) | def setUp(self): method get_table (line 58) | def get_table(self, tokenizer, length=5): method get_table_and_query (line 70) | def get_table_and_query(self, tokenizer, length=5): method get_clean_sequence (line 77) | def get_clean_sequence( method get_tokenizer (line 111) | def get_tokenizer(self, **kwargs): method get_input_output_texts (line 115) | def get_input_output_texts(self, tokenizer): method test_full_tokenizer_roberta (line 120) | def test_full_tokenizer_roberta(self): method roberta_dict_integration_testing (line 131) | def roberta_dict_integration_testing(self): method test_add_tokens_tokenizer (line 140) | def test_add_tokens_tokenizer(self): method test_token_type_ids (line 194) | def test_token_type_ids(self): method test_add_special_tokens (line 211) | def test_add_special_tokens(self): method test_batch_encode_plus_overflowing_tokens (line 226) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_tensors (line 240) | def test_batch_encode_plus_tensors(self): method test_call (line 287) | def test_call(self): method test_internal_consistency (line 316) | def test_internal_consistency(self): method test_save_and_load_tokenizer (line 335) | def test_save_and_load_tokenizer(self): method test_number_of_added_tokens (line 363) | def test_number_of_added_tokens(self): method test_prepare_for_model (line 376) | def test_prepare_for_model(self): method test_maximum_encoding_length_pair_input (line 380) | def test_maximum_encoding_length_pair_input(self): method test_maximum_encoding_length_single_input (line 384) | def test_maximum_encoding_length_single_input(self): method test_right_and_left_truncation (line 388) | def test_right_and_left_truncation(self): method test_encode_decode_with_spaces (line 391) | def test_encode_decode_with_spaces(self): method test_tokenize_special_tokens (line 408) | def test_tokenize_special_tokens(self): method test_special_tokens_mask (line 434) | def test_special_tokens_mask(self): method test_padding_to_max_length (line 452) | def test_padding_to_max_length(self): method test_padding_to_multiple_of (line 490) | def test_padding_to_multiple_of(self): method test_right_and_left_padding (line 514) | def test_right_and_left_padding(self): method test_encode_plus_with_padding (line 577) | def test_encode_plus_with_padding(self): method test_batch_encode_plus_padding (line 685) | def test_batch_encode_plus_padding(self): method test_batch_encode_plus_batch_sequence_length (line 742) | def test_batch_encode_plus_batch_sequence_length(self): method test_special_tokens_mask_input_pairs (line 800) | def test_special_tokens_mask_input_pairs(self): method test_full_tokenizer (line 832) | def test_full_tokenizer(self): method test_tokenizer_as_target (line 857) | def test_tokenizer_as_target(self): method test_tokenizer_lower_case (line 866) | def test_tokenizer_lower_case(self): FILE: benchmark/third_party/transformers/tests/models/time_series_transformer/test_modeling_time_series_transformer.py class TimeSeriesTransformerModelTester (line 46) | class TimeSeriesTransformerModelTester: method __init__ (line 47) | def __init__( method get_config (line 86) | def get_config(self): method prepare_time_series_transformer_inputs_dict (line 105) | def prepare_time_series_transformer_inputs_dict(self, config): method prepare_config_and_inputs (line 130) | def prepare_config_and_inputs(self): method prepare_config_and_inputs_for_common (line 135) | def prepare_config_and_inputs_for_common(self): method check_encoder_decoder_model_standalone (line 139) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class TimeSeriesTransformerModelTest (line 173) | class TimeSeriesTransformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 186) | def setUp(self): method test_config (line 190) | def test_config(self): method test_save_load_strict (line 193) | def test_save_load_strict(self): method test_encoder_decoder_model_standalone (line 203) | def test_encoder_decoder_model_standalone(self): method test_resize_tokens_embeddings (line 208) | def test_resize_tokens_embeddings(self): method test_model_main_input_name (line 212) | def test_model_main_input_name(self): method test_forward_signature (line 218) | def test_forward_signature(self): method test_attention_outputs (line 268) | def test_attention_outputs(self): method test_retain_grad_hidden_states_attentions (line 363) | def test_retain_grad_hidden_states_attentions(self): function prepare_batch (line 367) | def prepare_batch(filename="train-batch.pt"): class TimeSeriesTransformerModelIntegrationTests (line 375) | class TimeSeriesTransformerModelIntegrationTests(unittest.TestCase): method test_inference_no_head (line 376) | def test_inference_no_head(self): method test_inference_head (line 401) | def test_inference_head(self): method test_seq_to_seq_generation (line 423) | def test_seq_to_seq_generation(self): FILE: benchmark/third_party/transformers/tests/models/trajectory_transformer/test_modeling_trajectory_transformer.py class TrajectoryTransformerModelTester (line 40) | class TrajectoryTransformerModelTester: method __init__ (line 41) | def __init__(self, parent, batch_size=13, n_embd=128, action_dim=6, ob... method prepare_config_and_inputs (line 50) | def prepare_config_and_inputs(self): method get_config (line 62) | def get_config(self): method create_and_check_model (line 70) | def create_and_check_model(self, config, input_dict): method prepare_config_and_inputs_for_common (line 86) | def prepare_config_and_inputs_for_common(self): class TrajectoryTransformerModelTest (line 94) | class TrajectoryTransformerModelTest(ModelTesterMixin, GenerationTesterM... method setUp (line 111) | def setUp(self): method test_config (line 115) | def test_config(self): method test_model (line 118) | def test_model(self): method test_conditional_model (line 122) | def test_conditional_model(self): method test_forward_signature (line 126) | def test_forward_signature(self): method test_model_main_input_name (line 139) | def test_model_main_input_name(self): method test_retain_grad_hidden_states_attentions (line 145) | def test_retain_grad_hidden_states_attentions(self): method test_training (line 178) | def test_training(self): method test_training_gradient_checkpointing (line 198) | def test_training_gradient_checkpointing(self): method test_initialization (line 219) | def test_initialization(self): method test_model_from_pretrained (line 234) | def test_model_from_pretrained(self): class TrajectoryTransformerModelIntegrationTest (line 241) | class TrajectoryTransformerModelIntegrationTest(unittest.TestCase): method test_prediction (line 243) | def test_prediction(self): FILE: benchmark/third_party/transformers/tests/models/transfo_xl/test_modeling_tf_transfo_xl.py class TFTransfoXLModelTester (line 38) | class TFTransfoXLModelTester: method __init__ (line 39) | def __init__( method prepare_config_and_inputs (line 67) | def prepare_config_and_inputs(self): method set_seed (line 95) | def set_seed(self): method create_and_check_transfo_xl_model (line 99) | def create_and_check_transfo_xl_model(self, config, input_ids_1, input... method create_and_check_transfo_xl_lm_head (line 119) | def create_and_check_transfo_xl_lm_head(self, config, input_ids_1, inp... method create_and_check_transfo_xl_for_sequence_classification (line 145) | def create_and_check_transfo_xl_for_sequence_classification(self, conf... method prepare_config_and_inputs_for_common (line 150) | def prepare_config_and_inputs_for_common(self): class TFTransfoXLModelTest (line 158) | class TFTransfoXLModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 170) | def setUp(self): method test_config (line 174) | def test_config(self): method test_transfo_xl_model (line 177) | def test_transfo_xl_model(self): method test_transfo_xl_lm_head (line 182) | def test_transfo_xl_lm_head(self): method test_transfo_xl_sequence_classification_model (line 187) | def test_transfo_xl_sequence_classification_model(self): method test_model_common_attributes (line 191) | def test_model_common_attributes(self): method test_xla_mode (line 209) | def test_xla_mode(self): method test_model_from_pretrained (line 214) | def test_model_from_pretrained(self): method test_dataset_conversion (line 220) | def test_dataset_conversion(self): class TFTransfoXLModelLanguageGenerationTest (line 225) | class TFTransfoXLModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_transfo_xl_wt103 (line 228) | def test_lm_generate_transfo_xl_wt103(self): FILE: benchmark/third_party/transformers/tests/models/transfo_xl/test_modeling_transfo_xl.py class TransfoXLModelTester (line 36) | class TransfoXLModelTester: method __init__ (line 37) | def __init__( method prepare_config_and_inputs (line 64) | def prepare_config_and_inputs(self): method get_config (line 76) | def get_config(self): method set_seed (line 93) | def set_seed(self): method create_transfo_xl_model (line 97) | def create_transfo_xl_model(self, config, input_ids_1, input_ids_2, lm... method check_transfo_xl_model_output (line 112) | def check_transfo_xl_model_output(self, result): method create_transfo_xl_lm_head (line 124) | def create_transfo_xl_lm_head(self, config, input_ids_1, input_ids_2, ... method check_transfo_xl_lm_head_output (line 146) | def check_transfo_xl_lm_head_output(self, result): method create_transfo_xl_lm_head_trainer_compatible_tuple (line 163) | def create_transfo_xl_lm_head_trainer_compatible_tuple(self, config, i... method create_transfo_xl_lm_head_trainer_incompatible_tuple (line 190) | def create_transfo_xl_lm_head_trainer_incompatible_tuple(self, config,... method create_and_check_transfo_xl_for_sequence_classification (line 219) | def create_and_check_transfo_xl_for_sequence_classification(self, conf... method prepare_config_and_inputs_for_common (line 227) | def prepare_config_and_inputs_for_common(self): class TransfoXLModelTest (line 235) | class TransfoXLModelTest(ModelTesterMixin, GenerationTesterMixin, unitte... method check_cutoffs_and_n_token (line 244) | def check_cutoffs_and_n_token( method setUp (line 266) | def setUp(self): method test_config (line 270) | def test_config(self): method test_transfo_xl_model (line 273) | def test_transfo_xl_model(self): method test_transfo_xl_lm_head (line 279) | def test_transfo_xl_lm_head(self): method test_transfo_xl_sequence_classification_model (line 292) | def test_transfo_xl_sequence_classification_model(self): method test_retain_grad_hidden_states_attentions (line 296) | def test_retain_grad_hidden_states_attentions(self): method test_multi_gpu_data_parallel_forward (line 301) | def test_multi_gpu_data_parallel_forward(self): method test_model_from_pretrained (line 306) | def test_model_from_pretrained(self): method test_resize_tokens_embeddings (line 311) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 374) | def test_resize_embeddings_untied(self): method _check_attentions_for_generate (line 378) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 403) | def _check_hidden_states_for_generate( method _mock_init_weights (line 423) | def _mock_init_weights(self, module): class TransfoXLModelLanguageGenerationTest (line 449) | class TransfoXLModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_transfo_xl_wt103 (line 451) | def test_lm_generate_transfo_xl_wt103(self): FILE: benchmark/third_party/transformers/tests/models/transfo_xl/test_tokenization_transfo_xl.py class TransfoXLTokenizationTest (line 25) | class TransfoXLTokenizationTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 31) | 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_tokenizer (line 60) | def test_full_tokenizer(self): method test_full_tokenizer_lower (line 68) | def test_full_tokenizer_lower(self): method test_full_tokenizer_no_lower (line 75) | def test_full_tokenizer_no_lower(self): method test_full_tokenizer_moses_numbers (line 82) | def test_full_tokenizer_moses_numbers(self): method test_move_added_token (line 120) | def test_move_added_token(self): FILE: benchmark/third_party/transformers/tests/models/trocr/test_modeling_trocr.py class TrOCRStandaloneDecoderModelTester (line 34) | class TrOCRStandaloneDecoderModelTester: method __init__ (line 35) | def __init__( method prepare_config_and_inputs (line 86) | def prepare_config_and_inputs(self): method create_and_check_decoder_model_past (line 113) | def create_and_check_decoder_model_past( method prepare_config_and_inputs_for_common (line 152) | def prepare_config_and_inputs_for_common(self): class TrOCRStandaloneDecoderModelTest (line 161) | class TrOCRStandaloneDecoderModelTest(ModelTesterMixin, GenerationTester... method setUp (line 167) | def setUp(self): method test_inputs_embeds (line 172) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 176) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 180) | def test_save_load_fast_init_to_base(self): method test_config (line 183) | def test_config(self): method test_decoder_model_past (line 186) | def test_decoder_model_past(self): method test_retain_grad_hidden_states_attentions (line 191) | def test_retain_grad_hidden_states_attentions(self): FILE: benchmark/third_party/transformers/tests/models/unispeech/test_modeling_unispeech.py class UniSpeechModelTester (line 50) | class UniSpeechModelTester: method __init__ (line 51) | def __init__( method prepare_config_and_inputs (line 109) | def prepare_config_and_inputs(self): method get_config (line 117) | def get_config(self): method create_and_check_model (line 139) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 148) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 174) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 202) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 227) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 256) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 279) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 293) | def prepare_config_and_inputs_for_common(self): class UniSpeechRobustModelTest (line 300) | class UniSpeechRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 309) | def setUp(self): method test_config (line 315) | def test_config(self): method test_model (line 318) | def test_model(self): method test_batched_inference (line 322) | def test_batched_inference(self): method test_ctc_loss_inference (line 326) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 330) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 334) | def test_ctc_train(self): method test_seq_classifier_train (line 338) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 342) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 347) | def test_inputs_embeds(self): method test_forward_signature (line 351) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 356) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 362) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 365) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 405) | def test_initialization(self): method _mock_init_weights (line 438) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 452) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 475) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 498) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 526) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 530) | def test_model_from_pretrained(self): class UniSpeechModelIntegrationTest (line 538) | class UniSpeechModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 539) | def _load_datasamples(self, num_samples): method _load_superb (line 548) | def _load_superb(self, task, num_samples): method test_inference_pretraining (line 554) | def test_inference_pretraining(self): FILE: benchmark/third_party/transformers/tests/models/unispeech_sat/test_modeling_unispeech_sat.py class UniSpeechSatModelTester (line 52) | class UniSpeechSatModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 123) | def prepare_config_and_inputs(self): method get_config (line 131) | def get_config(self): method create_and_check_model (line 159) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 168) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 194) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 222) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 247) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 276) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 299) | def check_xvector_training(self, config, *args): method check_labels_out_of_vocab (line 323) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 337) | def prepare_config_and_inputs_for_common(self): class UniSpeechSatModelTest (line 344) | class UniSpeechSatModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 361) | def setUp(self): method test_config (line 365) | def test_config(self): method test_model (line 368) | def test_model(self): method test_ctc_loss_inference (line 372) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 376) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 380) | def test_ctc_train(self): method test_seq_classifier_train (line 384) | def test_seq_classifier_train(self): method test_xvector_train (line 388) | def test_xvector_train(self): method test_labels_out_of_vocab (line 392) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 397) | def test_inputs_embeds(self): method test_forward_signature (line 401) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 406) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 412) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 415) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 455) | def test_initialization(self): method _mock_init_weights (line 490) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 504) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 526) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 550) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 554) | def test_model_from_pretrained(self): class UniSpeechSatRobustModelTest (line 560) | class UniSpeechSatRobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 570) | def setUp(self): method test_config (line 576) | def test_config(self): method test_model (line 579) | def test_model(self): method test_batched_inference (line 583) | def test_batched_inference(self): method test_ctc_loss_inference (line 587) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 591) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 595) | def test_ctc_train(self): method test_seq_classifier_train (line 599) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 603) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 608) | def test_inputs_embeds(self): method test_forward_signature (line 612) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 617) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 623) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 626) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 666) | def test_initialization(self): method _mock_init_weights (line 701) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 715) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 738) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 761) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 789) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 793) | def test_model_from_pretrained(self): class UniSpeechSatModelIntegrationTest (line 801) | class UniSpeechSatModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 802) | def _load_datasamples(self, num_samples): method _load_superb (line 811) | def _load_superb(self, task, num_samples): method test_inference_encoder_base (line 816) | def test_inference_encoder_base(self): method test_inference_encoder_large (line 844) | def test_inference_encoder_large(self): method test_inference_diarization (line 870) | def test_inference_diarization(self): method test_inference_speaker_verification (line 900) | def test_inference_speaker_verification(self): FILE: benchmark/third_party/transformers/tests/models/van/test_modeling_van.py class VanModelTester (line 47) | class VanModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 72) | def prepare_config_and_inputs(self): method get_config (line 83) | 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 110) | def prepare_config_and_inputs_for_common(self): class VanModelTest (line 118) | class VanModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 131) | def setUp(self): method test_config (line 135) | def test_config(self): method create_and_test_config_common_properties (line 144) | def create_and_test_config_common_properties(self): method test_attention_outputs (line 148) | def test_attention_outputs(self): method test_inputs_embeds (line 152) | def test_inputs_embeds(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_initialization (line 176) | def test_initialization(self): method test_hidden_states_output (line 201) | def test_hidden_states_output(self): method test_for_image_classification (line 234) | def test_for_image_classification(self): method test_model_from_pretrained (line 239) | def test_model_from_pretrained(self): function prepare_img (line 246) | def prepare_img(): class VanModelIntegrationTest (line 253) | class VanModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 255) | def default_feature_extractor(self): method test_inference_image_classification_head (line 259) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/videomae/test_feature_extraction_videomae.py class VideoMAEFeatureExtractionTester (line 36) | class VideoMAEFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): class VideoMAEFeatureExtractionTest (line 77) | class VideoMAEFeatureExtractionTest(FeatureExtractionSavingTestMixin, un... method setUp (line 81) | def setUp(self): method feat_extract_dict (line 85) | def feat_extract_dict(self): method test_feat_extract_properties (line 88) | def test_feat_extract_properties(self): method test_batch_feature (line 96) | def test_batch_feature(self): method test_call_pil (line 99) | def test_call_pil(self): method test_call_numpy (line 134) | def test_call_numpy(self): method test_call_pytorch (line 169) | def test_call_pytorch(self): FILE: benchmark/third_party/transformers/tests/models/videomae/test_modeling_videomae.py class VideoMAEModelTester (line 51) | class VideoMAEModelTester: method __init__ (line 52) | 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 134) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 141) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 157) | def prepare_config_and_inputs_for_common(self): class VideoMAEModelTest (line 165) | class VideoMAEModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 180) | def setUp(self): method _prepare_for_class (line 184) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_config (line 205) | def test_config(self): method test_inputs_embeds (line 209) | 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_pretraining (line 237) | def test_for_pretraining(self): method test_model_from_pretrained (line 242) | def test_model_from_pretrained(self): method test_attention_outputs (line 247) | def test_attention_outputs(self): method test_hidden_states_output (line 308) | def test_hidden_states_output(self): function prepare_video (line 344) | def prepare_video(): class VideoMAEModelIntegrationTest (line 354) | class VideoMAEModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 356) | def default_feature_extractor(self): method test_inference_for_video_classification (line 365) | def test_inference_for_video_classification(self): method test_inference_for_pretraining (line 387) | def test_inference_for_pretraining(self): FILE: benchmark/third_party/transformers/tests/models/vilt/test_feature_extraction_vilt.py class ViltFeatureExtractionTester (line 36) | class ViltFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): method get_expected_values (line 75) | def get_expected_values(self, image_inputs, batched=False): class ViltFeatureExtractionTest (line 117) | class ViltFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitte... method setUp (line 121) | def setUp(self): method feat_extract_dict (line 125) | def feat_extract_dict(self): method test_feat_extract_properties (line 128) | def test_feat_extract_properties(self): method test_batch_feature (line 137) | def test_batch_feature(self): method test_call_pil (line 140) | def test_call_pil(self): method test_call_numpy (line 171) | def test_call_numpy(self): method test_call_pytorch (line 202) | def test_call_pytorch(self): method test_equivalence_pad_and_create_pixel_mask (line 233) | def test_equivalence_pad_and_create_pixel_mask(self): FILE: benchmark/third_party/transformers/tests/models/vilt/test_modeling_vilt.py class ViltModelTester (line 55) | class ViltModelTester: method __init__ (line 56) | def __init__( method prepare_config_and_inputs (line 117) | def prepare_config_and_inputs(self): method get_config (line 139) | def get_config(self): method create_and_check_model (line 161) | def create_and_check_model( method create_and_check_for_token_classification (line 180) | def create_and_check_for_token_classification( method prepare_config_and_inputs_for_common (line 197) | def prepare_config_and_inputs_for_common(self): method prepare_pixel_values (line 215) | def prepare_pixel_values(self): class ViltModelTest (line 221) | class ViltModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 238) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 257) | def setUp(self): method test_config (line 261) | def test_config(self): method test_model (line 264) | def test_model(self): method test_for_token_classification (line 268) | def test_for_token_classification(self): method test_training (line 272) | def test_training(self): method test_training_gradient_checkpointing (line 296) | def test_training_gradient_checkpointing(self): method test_save_load (line 324) | def test_save_load(self): method test_determinism (line 331) | def test_determinism(self): method test_model_outputs_equivalence (line 338) | def test_model_outputs_equivalence(self): method test_attention_outputs (line 341) | def test_attention_outputs(self): method test_hidden_states_output (line 421) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 469) | def test_retain_grad_hidden_states_attentions(self): method test_model_from_pretrained (line 510) | def test_model_from_pretrained(self): class ViltForImagesAndTextClassificationModelTest (line 518) | class ViltForImagesAndTextClassificationModelTest(ViltModelTest, unittes... method setUp (line 521) | def setUp(self): method test_model (line 526) | def test_model(self): method test_for_token_classification (line 530) | def test_for_token_classification(self): function prepare_img (line 535) | def prepare_img(): class ViltModelIntegrationTest (line 543) | class ViltModelIntegrationTest(unittest.TestCase): method default_processor (line 545) | def default_processor(self): method test_inference_masked_lm (line 549) | def test_inference_masked_lm(self): method test_inference_visual_question_answering (line 573) | def test_inference_visual_question_answering(self): method test_inference_natural_language_visual_reasoning (line 609) | def test_inference_natural_language_visual_reasoning(self): FILE: benchmark/third_party/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 280) | def check_equivalence_pt_to_flax(self, config, decoder_config, inputs_... method check_equivalence_flax_to_pt (line 292) | def check_equivalence_flax_to_pt(self, config, decoder_config, inputs_... method test_encoder_decoder_model_from_pretrained_configs (line 303) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 307) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 311) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 315) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_output_attentions (line 319) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 323) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 327) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_flax_equivalence (line 332) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 366) | def test_real_model_save_load_from_pretrained(self): class FlaxViT2GPT2EncoderDecoderModelTest (line 400) | class FlaxViT2GPT2EncoderDecoderModelTest(FlaxEncoderDecoderMixin, unitt... method get_encoder_decoder_model (line 401) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 406) | def prepare_config_and_inputs(self): method get_pretrained_model (line 431) | def get_pretrained_model(self): class FlaxVisionEncoderDecoderModelTest (line 438) | class FlaxVisionEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 439) | def get_from_encoderdecoder_pretrained_model(self): method _check_configuration_tie (line 444) | def _check_configuration_tie(self, model): method test_configuration_tie (line 452) | def test_configuration_tie(self): function prepare_img (line 458) | def prepare_img(): class FlaxViT2GPT2ModelIntegrationTest (line 465) | class FlaxViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 467) | def test_inference_coco_en(self): FILE: benchmark/third_party/transformers/tests/models/vision_encoder_decoder/test_modeling_tf_vision_encoder_decoder.py class TFVisionEncoderDecoderMixin (line 69) | class TFVisionEncoderDecoderMixin: method get_encoder_decoder_model (line 70) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method get_pretrained_model (line 76) | def get_pretrained_model(self): method check_encoder_decoder_model_from_pretrained_configs (line 79) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 109) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 152) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 180) | def check_save_and_load( method check_encoder_decoder_model_labels (line 217) | def check_encoder_decoder_model_labels( method check_encoder_decoder_model_output_attentions (line 248) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 300) | def check_encoder_decoder_model_generate(self, pixel_values, config, d... method check_pt_tf_outputs (line 318) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 405) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 425) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method check_pt_tf_equivalence (line 453) | def check_pt_tf_equivalence(self, tf_model, pt_model, tf_inputs_dict): method check_pt_to_tf_equivalence (line 465) | 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 499) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 503) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 507) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 511) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 515) | def test_save_and_load_from_pretrained(self): method test_encoder_decoder_model_labels (line 519) | def test_encoder_decoder_model_labels(self): method test_encoder_decoder_model_output_attentions (line 523) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 527) | def test_encoder_decoder_model_generate(self): method assert_almost_equals (line 531) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_pt_tf_model_equivalence (line 536) | 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 635) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 640) | def prepare_config_and_inputs(self): class TFVisionEncoderDecoderModelTest (line 676) | class TFVisionEncoderDecoderModelTest(unittest.TestCase): method get_from_encoderdecoder_pretrained_model (line 677) | def get_from_encoderdecoder_pretrained_model(self): method get_decoder_config (line 680) | def get_decoder_config(self): method get_encoderdecoder_model (line 686) | def get_encoderdecoder_model(self): method get_encoder_decoder_models (line 689) | def get_encoder_decoder_models(self): method _check_configuration_tie (line 694) | def _check_configuration_tie(self, model): method test_configuration_tie (line 699) | def test_configuration_tie(self): function prepare_img (line 711) | def prepare_img(): class TFVisionEncoderDecoderModelSaveLoadTests (line 717) | class TFVisionEncoderDecoderModelSaveLoadTests(unittest.TestCase): method get_encoder_decoder_config (line 718) | def get_encoder_decoder_config(self): method get_encoder_decoder_config_small (line 723) | def get_encoder_decoder_config_small(self): method test_encoder_decoder_save_load_from_encoder_decoder (line 730) | def test_encoder_decoder_save_load_from_encoder_decoder(self): method test_encoder_decoder_save_load_from_encoder_decoder_from_pt (line 780) | def test_encoder_decoder_save_load_from_encoder_decoder_from_pt(self): method test_encoder_decoder_from_pretrained (line 830) | def test_encoder_decoder_from_pretrained(self): class TFViT2GPT2ModelIntegrationTest (line 895) | class TFViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 897) | def test_inference_coco_en(self): FILE: benchmark/third_party/transformers/tests/models/vision_encoder_decoder/test_modeling_vision_encoder_decoder.py class EncoderDecoderMixin (line 69) | class EncoderDecoderMixin: method get_encoder_decoder_model (line 70) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 76) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_from_pretrained_configs (line 79) | def check_encoder_decoder_model_from_pretrained_configs( method check_encoder_decoder_model (line 101) | def check_encoder_decoder_model( method check_encoder_decoder_model_from_pretrained (line 130) | def check_encoder_decoder_model_from_pretrained( method check_save_and_load (line 156) | def check_save_and_load( method check_save_and_load_encoder_decoder_model (line 187) | def check_save_and_load_encoder_decoder_model( method check_encoder_decoder_model_output_attentions (line 221) | def check_encoder_decoder_model_output_attentions( method check_encoder_decoder_model_generate (line 276) | def check_encoder_decoder_model_generate(self, config, decoder_config,... method test_encoder_decoder_model (line 295) | def test_encoder_decoder_model(self): method test_encoder_decoder_model_from_pretrained_configs (line 299) | def test_encoder_decoder_model_from_pretrained_configs(self): method test_encoder_decoder_model_from_pretrained (line 303) | def test_encoder_decoder_model_from_pretrained(self): method test_encoder_decoder_model_from_pretrained_return_dict (line 307) | def test_encoder_decoder_model_from_pretrained_return_dict(self): method test_save_and_load_from_pretrained (line 311) | def test_save_and_load_from_pretrained(self): method test_save_and_load_from_encoder_decoder_pretrained (line 315) | def test_save_and_load_from_encoder_decoder_pretrained(self): method test_encoder_decoder_model_output_attentions (line 319) | def test_encoder_decoder_model_output_attentions(self): method test_encoder_decoder_model_generate (line 323) | def test_encoder_decoder_model_generate(self): method test_training_gradient_checkpointing (line 327) | def test_training_gradient_checkpointing(self): method test_real_model_save_load_from_pretrained (line 350) | def test_real_model_save_load_from_pretrained(self): class DeiT2RobertaModelTest (line 372) | class DeiT2RobertaModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 373) | def get_pretrained_model_and_inputs(self): method check_encoder_decoder_model_output_attentions (line 397) | def check_encoder_decoder_model_output_attentions( method get_encoder_decoder_model (line 452) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 457) | def prepare_config_and_inputs(self): class ViT2BertModelTest (line 492) | class ViT2BertModelTest(EncoderDecoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 493) | def get_pretrained_model_and_inputs(self): method get_encoder_decoder_model (line 517) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 522) | def prepare_config_and_inputs(self): class Swin2BartModelTest (line 559) | class Swin2BartModelTest(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 560) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 565) | def prepare_config_and_inputs(self): method check_encoder_decoder_model_output_attentions (line 585) | def check_encoder_decoder_model_output_attentions( method test_real_model_save_load_from_pretrained (line 639) | def test_real_model_save_load_from_pretrained(self): class ViT2TrOCR (line 644) | class ViT2TrOCR(EncoderDecoderMixin, unittest.TestCase): method get_encoder_decoder_model (line 645) | def get_encoder_decoder_model(self, config, decoder_config): method prepare_config_and_inputs (line 650) | def prepare_config_and_inputs(self): method test_real_model_save_load_from_pretrained (line 674) | def test_real_model_save_load_from_pretrained(self): class TrOCRModelIntegrationTest (line 680) | class TrOCRModelIntegrationTest(unittest.TestCase): method default_processor (line 682) | def default_processor(self): method test_inference_handwritten (line 686) | def test_inference_handwritten(self): method test_inference_printed (line 711) | def test_inference_printed(self): class ViT2GPT2ModelIntegrationTest (line 747) | class ViT2GPT2ModelIntegrationTest(unittest.TestCase): method test_inference_coco_en (line 749) | def test_inference_coco_en(self): class DonutModelIntegrationTest (line 814) | class DonutModelIntegrationTest(unittest.TestCase): method test_inference_docvqa (line 816) | def test_inference_docvqa(self): method test_inference_cordv2 (line 880) | def test_inference_cordv2(self): method test_inference_rvlcdip (line 944) | def test_inference_rvlcdip(self): FILE: benchmark/third_party/transformers/tests/models/vision_text_dual_encoder/test_modeling_flax_vision_text_dual_encoder.py function to_2tuple (line 67) | def to_2tuple(x): class VisionTextDualEncoderMixin (line 74) | class VisionTextDualEncoderMixin: method get_vision_text_model (line 75) | def get_vision_text_model(self, config, text_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 assert_almost_equals (line 84) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_model_from_pretrained_configs (line 88) | def check_model_from_pretrained_configs( method check_vision_text_dual_encoder_from_pretrained (line 100) | def check_vision_text_dual_encoder_from_pretrained( method check_save_load (line 113) | def check_save_load(self, text_config, input_ids, attention_mask, visi... method check_vision_text_output_attention (line 130) | def check_vision_text_output_attention( method check_pt_flax_equivalence (line 159) | def check_pt_flax_equivalence(self, pt_model, fx_model, inputs_dict): method check_equivalence_pt_to_flax (line 201) | def check_equivalence_pt_to_flax(self, vision_config, text_config, inp... method check_equivalence_flax_to_pt (line 213) | def check_equivalence_flax_to_pt(self, vision_config, text_config, inp... method test_model_from_pretrained_configs (line 224) | def test_model_from_pretrained_configs(self): method test_vision_text_dual_encoder_from_pretrained (line 228) | def test_vision_text_dual_encoder_from_pretrained(self): method test_save_load (line 232) | def test_save_load(self): method test_vision_text_output_attention (line 236) | def test_vision_text_output_attention(self): method test_pt_flax_equivalence (line 241) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 253) | def test_real_model_save_load_from_pretrained(self): class FlaxViTBertModelTest (line 270) | class FlaxViTBertModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 271) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 293) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 298) | def prepare_config_and_inputs(self): class FlaxCLIPVisionBertModelTest (line 321) | class FlaxCLIPVisionBertModelTest(VisionTextDualEncoderMixin, unittest.T... method get_pretrained_model_and_inputs (line 322) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 344) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 349) | def prepare_config_and_inputs(self): class FlaxVisionTextDualEncoderIntegrationTest (line 373) | class FlaxVisionTextDualEncoderIntegrationTest(unittest.TestCase): method test_inference (line 375) | def test_inference(self): FILE: benchmark/third_party/transformers/tests/models/vision_text_dual_encoder/test_modeling_vision_text_dual_encoder.py function to_2tuple (line 64) | def to_2tuple(x): class VisionTextDualEncoderMixin (line 71) | class VisionTextDualEncoderMixin: method get_vision_text_model (line 72) | def get_vision_text_model(self, config, text_config): method prepare_config_and_inputs (line 75) | def prepare_config_and_inputs(self): method get_pretrained_model_and_inputs (line 78) | def get_pretrained_model_and_inputs(self): method check_model_from_pretrained_configs (line 81) | def check_model_from_pretrained_configs( method check_vision_text_dual_encoder_model (line 95) | def check_vision_text_dual_encoder_model( method check_vision_text_dual_encoder_from_pretrained (line 108) | def check_vision_text_dual_encoder_from_pretrained( method check_save_load (line 123) | def check_save_load(self, text_config, input_ids, attention_mask, visi... method check_vision_text_output_attention (line 143) | def check_vision_text_output_attention( method assert_almost_equals (line 173) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_pt_flax_equivalence (line 177) | def check_pt_flax_equivalence(self, pt_model, fx_model, input_ids, att... method check_equivalence_pt_to_flax (line 220) | def check_equivalence_pt_to_flax(self, vision_config, text_config, inp... method check_equivalence_flax_to_pt (line 232) | def check_equivalence_flax_to_pt(self, vision_config, text_config, inp... method test_vision_text_dual_encoder_model (line 243) | def test_vision_text_dual_encoder_model(self): method test_model_from_pretrained_configs (line 247) | def test_model_from_pretrained_configs(self): method test_vision_text_dual_encoder_from_pretrained (line 251) | def test_vision_text_dual_encoder_from_pretrained(self): method test_save_load (line 255) | def test_save_load(self): method test_vision_text_output_attention (line 259) | def test_vision_text_output_attention(self): method test_pt_flax_equivalence (line 264) | def test_pt_flax_equivalence(self): method test_real_model_save_load_from_pretrained (line 276) | def test_real_model_save_load_from_pretrained(self): class ViTBertModelTest (line 296) | class ViTBertModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 297) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 316) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 321) | def prepare_config_and_inputs(self): class DeiTRobertaModelTest (line 354) | class DeiTRobertaModelTest(VisionTextDualEncoderMixin, unittest.TestCase): method get_pretrained_model_and_inputs (line 355) | def get_pretrained_model_and_inputs(self): method check_vision_text_output_attention (line 374) | def check_vision_text_output_attention( method get_vision_text_model (line 404) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 409) | def prepare_config_and_inputs(self): method test_pt_flax_equivalence (line 441) | def test_pt_flax_equivalence(self): class CLIPVisionBertModelTest (line 446) | class CLIPVisionBertModelTest(VisionTextDualEncoderMixin, unittest.TestC... method get_pretrained_model_and_inputs (line 447) | def get_pretrained_model_and_inputs(self): method get_vision_text_model (line 466) | def get_vision_text_model(self, vision_config, text_config): method prepare_config_and_inputs (line 471) | def prepare_config_and_inputs(self): class VisionTextDualEncoderIntegrationTest (line 505) | class VisionTextDualEncoderIntegrationTest(unittest.TestCase): method test_inference (line 507) | def test_inference(self): FILE: benchmark/third_party/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 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 prepare_image_inputs (line 68) | def prepare_image_inputs(self): method test_save_load_pretrained_default (line 79) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 94) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 113) | def test_feature_extractor(self): method test_tokenizer (line 127) | def test_tokenizer(self): method test_processor (line 142) | def test_processor(self): method test_tokenizer_decode (line 159) | def test_tokenizer_decode(self): FILE: benchmark/third_party/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, unittest.TestCase): 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): class VisualBertModelIntegrationTest (line 559) | class VisualBertModelIntegrationTest(unittest.TestCase): method test_inference_vqa_coco_pre (line 561) | def test_inference_vqa_coco_pre(self): method test_inference_vqa (line 600) | def test_inference_vqa(self): method test_inference_nlvr (line 632) | def test_inference_nlvr(self): method test_inference_vcr (line 662) | def test_inference_vcr(self): FILE: benchmark/third_party/transformers/tests/models/vit/test_feature_extraction_vit.py class ViTFeatureExtractionTester (line 36) | class ViTFeatureExtractionTester(unittest.TestCase): method __init__ (line 37) | def __init__( method prepare_feat_extract_dict (line 63) | def prepare_feat_extract_dict(self): class ViTFeatureExtractionTest (line 75) | class ViTFeatureExtractionTest(FeatureExtractionSavingTestMixin, unittes... method setUp (line 79) | def setUp(self): method feat_extract_dict (line 83) | def feat_extract_dict(self): method test_feat_extract_properties (line 86) | def test_feat_extract_properties(self): method test_batch_feature (line 94) | def test_batch_feature(self): method test_call_pil (line 97) | def test_call_pil(self): method test_call_numpy (line 129) | def test_call_numpy(self): method test_call_pytorch (line 161) | def test_call_pytorch(self): FILE: benchmark/third_party/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 74) | def prepare_config_and_inputs(self): method create_and_check_model (line 94) | def create_and_check_model(self, config, pixel_values): 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 116) | def prepare_config_and_inputs_for_common(self): class FlaxViTModelTest (line 127) | class FlaxViTModelTest(FlaxModelTesterMixin, unittest.TestCase): method setUp (line 131) | def setUp(self) -> None: method test_config (line 135) | def test_config(self): method test_model (line 138) | def test_model(self): method test_for_image_classification (line 142) | def test_for_image_classification(self): method test_forward_signature (line 147) | def test_forward_signature(self): method test_jit_compilation (line 160) | def test_jit_compilation(self): method test_model_from_pretrained (line 184) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/vit/test_modeling_tf_vit.py class TFViTModelTester (line 41) | class TFViTModelTester: method __init__ (line 42) | 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 create_and_check_model (line 112) | 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 143) | def prepare_config_and_inputs_for_common(self): class TFViTModelTest (line 151) | class TFViTModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 163) | 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_graph_mode_with_inputs_embeds (line 175) | def test_graph_mode_with_inputs_embeds(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_for_image_classification (line 203) | def test_for_image_classification(self): method test_model_from_pretrained (line 208) | def test_model_from_pretrained(self): function prepare_img (line 215) | def prepare_img(): class TFViTModelIntegrationTest (line 222) | class TFViTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 224) | def default_feature_extractor(self): method test_inference_image_classification_head (line 228) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/vit/test_modeling_vit.py class ViTModelTester (line 43) | class ViTModelTester: method __init__ (line 44) | def __init__( method prepare_config_and_inputs (line 88) | 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_masked_image_modeling (line 123) | def create_and_check_for_masked_image_modeling(self, config, pixel_val... method create_and_check_for_image_classification (line 142) | def create_and_check_for_image_classification(self, config, pixel_valu... method prepare_config_and_inputs_for_common (line 160) | def prepare_config_and_inputs_for_common(self): class ViTModelTest (line 172) | class ViTModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 193) | 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_common_attributes (line 204) | def test_model_common_attributes(self): method test_forward_signature (line 213) | def test_forward_signature(self): method test_model (line 225) | def test_model(self): method test_for_masked_image_modeling (line 229) | def test_for_masked_image_modeling(self): method test_for_image_classification (line 233) | def test_for_image_classification(self): method test_model_from_pretrained (line 238) | def test_model_from_pretrained(self): function prepare_img (line 245) | def prepare_img(): class ViTModelIntegrationTest (line 252) | class ViTModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 254) | def default_feature_extractor(self): method test_inference_image_classification_head (line 258) | def test_inference_image_classification_head(self): method test_inference_interpolate_pos_encoding (line 278) | def test_inference_interpolate_pos_encoding(self): FILE: benchmark/third_party/transformers/tests/models/vit_mae/test_modeling_tf_vit_mae.py class TFViTMAEModelTester (line 49) | class TFViTMAEModelTester: method __init__ (line 50) | 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 128) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_pretraining (line 133) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 150) | def prepare_config_and_inputs_for_common(self): class TFViTMAEModelTest (line 158) | class TFViTMAEModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 171) | def setUp(self): method test_config (line 175) | def test_config(self): method test_inputs_embeds (line 179) | def test_inputs_embeds(self): method test_model_common_attributes (line 182) | def test_model_common_attributes(self): method test_forward_signature (line 191) | def test_forward_signature(self): method test_model (line 203) | def test_model(self): method test_for_pretraining (line 207) | def test_for_pretraining(self): method test_keyword_and_dict_args (line 213) | def test_keyword_and_dict_args(self): method test_numpy_arrays_inputs (line 237) | def test_numpy_arrays_inputs(self): method check_pt_tf_models (line 268) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method test_compile_tf_model (line 286) | def test_compile_tf_model(self): method test_keras_save_load (line 331) | def test_keras_save_load(self): method test_save_load (line 379) | def test_save_load(self): method test_save_load_config (line 417) | def test_save_load_config(self): method test_determinism (line 447) | def test_determinism(self): method test_model_outputs_equivalence (line 451) | def test_model_outputs_equivalence(self): method test_model_from_pretrained (line 455) | def test_model_from_pretrained(self): function prepare_img (line 462) | def prepare_img(): class TFViTMAEModelIntegrationTest (line 469) | class TFViTMAEModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 471) | def default_feature_extractor(self): method test_inference_for_pretraining (line 475) | def test_inference_for_pretraining(self): FILE: benchmark/third_party/transformers/tests/models/vit_mae/test_modeling_vit_mae.py class ViTMAEModelTester (line 47) | class ViTMAEModelTester: method __init__ (line 48) | def __init__( method prepare_config_and_inputs (line 94) | 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): method create_and_check_for_pretraining (line 129) | def create_and_check_for_pretraining(self, config, pixel_values, labels): method prepare_config_and_inputs_for_common (line 148) | def prepare_config_and_inputs_for_common(self): class ViTMAEModelTest (line 156) | class ViTMAEModelTest(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_common_attributes (line 180) | def test_model_common_attributes(self): method test_forward_signature (line 189) | def test_forward_signature(self): method test_model (line 201) | def test_model(self): method test_for_pretraining (line 205) | def test_for_pretraining(self): method check_pt_tf_models (line 211) | def check_pt_tf_models(self, tf_model, pt_model, pt_inputs_dict): method test_save_load (line 226) | def test_save_load(self): method test_determinism (line 261) | def test_determinism(self): method test_save_load_fast_init_from_base (line 268) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 275) | def test_save_load_fast_init_to_base(self): method test_model_outputs_equivalence (line 279) | def test_model_outputs_equivalence(self): method test_model_from_pretrained (line 283) | def test_model_from_pretrained(self): function prepare_img (line 290) | def prepare_img(): class ViTMAEModelIntegrationTest (line 297) | class ViTMAEModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 299) | def default_feature_extractor(self): method test_inference_for_pretraining (line 303) | def test_inference_for_pretraining(self): FILE: benchmark/third_party/transformers/tests/models/vit_msn/test_modeling_vit_msn.py class ViTMSNModelTester (line 43) | class ViTMSNModelTester: method __init__ (line 44) | 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 112) | 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 139) | def prepare_config_and_inputs_for_common(self): class ViTMSNModelTest (line 147) | class ViTMSNModelTest(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_common_attributes (line 171) | def test_model_common_attributes(self): method test_forward_signature (line 180) | def test_forward_signature(self): method test_model (line 192) | def test_model(self): method test_for_image_classification (line 196) | def test_for_image_classification(self): method test_model_from_pretrained (line 201) | def test_model_from_pretrained(self): function prepare_img (line 208) | def prepare_img(): class ViTMSNModelIntegrationTest (line 215) | class ViTMSNModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 217) | def default_feature_extractor(self): method test_inference_image_classification_head (line 221) | def test_inference_image_classification_head(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2/test_feature_extraction_wav2vec2.py function floats_list (line 32) | def floats_list(shape, scale=1.0, rng=None, name=None): class Wav2Vec2FeatureExtractionTester (line 46) | class Wav2Vec2FeatureExtractionTester(unittest.TestCase): method __init__ (line 47) | def __init__( method prepare_feat_extract_dict (line 70) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 79) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class Wav2Vec2FeatureExtractionTest (line 98) | 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 127) | def test_zero_mean_unit_variance_normalization_np(self): method test_zero_mean_unit_variance_normalization (line 143) | def test_zero_mean_unit_variance_normalization(self): method test_zero_mean_unit_variance_normalization_trunc_np_max_length (line 159) | def test_zero_mean_unit_variance_normalization_trunc_np_max_length(self): method test_zero_mean_unit_variance_normalization_trunc_np_longest (line 171) | def test_zero_mean_unit_variance_normalization_trunc_np_longest(self): method test_double_precision_pad (line 200) | def test_double_precision_pad(self): method test_pretrained_checkpoints_are_set_correctly (line 215) | def test_pretrained_checkpoints_are_set_correctly(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2/test_modeling_flax_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 69) | 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 282) | def test_freeze_feature_encoder(self): method test_model_from_pretrained (line 348) | def test_model_from_pretrained(self): method test_equivalence_pt_to_flax (line 356) | def test_equivalence_pt_to_flax(self): class FlaxWav2Vec2UtilsTest (line 361) | class FlaxWav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 362) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 372) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 384) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_perplexity (line 402) | def test_compute_perplexity(self): method test_sample_negatives (line 415) | def test_sample_negatives(self): method test_sample_negatives_with_attn_mask (line 445) | def test_sample_negatives_with_attn_mask(self): class FlaxWav2Vec2ModelIntegrationTest (line 491) | class FlaxWav2Vec2ModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 492) | def _load_datasamples(self, num_samples): method test_inference_ctc_robust_batched (line 501) | def test_inference_ctc_robust_batched(self): method test_inference_pretrained (line 526) | def test_inference_pretrained(self): method test_wav2vec2_with_lm (line 588) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 607) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 639) | def test_wav2vec2_with_lm_invalid_pool(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2/test_modeling_tf_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 64) | def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout): class TFWav2Vec2ModelTester (line 104) | class TFWav2Vec2ModelTester: method __init__ (line 105) | def __init__( method prepare_config_and_inputs (line 163) | def prepare_config_and_inputs(self): method create_and_check_model (line 191) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 198) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 223) | def check_ctc_loss(self, config, input_values, *args): method check_training (line 247) | def check_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 270) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 278) | def prepare_config_and_inputs_for_common(self): class TFWav2Vec2ModelTest (line 285) | class TFWav2Vec2ModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 292) | def setUp(self): method test_config (line 296) | def test_config(self): method test_forward_signature (line 300) | def test_forward_signature(self): method test_keyword_and_dict_args (line 313) | def test_keyword_and_dict_args(self): method test_model (line 330) | def test_model(self): method test_hidden_states_output (line 334) | def test_hidden_states_output(self): method test_ctc_loss_inference (line 360) | def test_ctc_loss_inference(self): method test_labels_out_of_vocab (line 365) | def test_labels_out_of_vocab(self): method test_train (line 369) | def test_train(self): method test_inputs_embeds (line 374) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 379) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 385) | def test_model_common_attributes(self): method test_model_from_pretrained (line 389) | def test_model_from_pretrained(self): method test_dataset_conversion (line 394) | def test_dataset_conversion(self): method test_keras_fit (line 398) | def test_keras_fit(self): class TFWav2Vec2RobustModelTest (line 403) | class TFWav2Vec2RobustModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 409) | def setUp(self): method test_forward_signature (line 420) | def test_forward_signature(self): method test_keyword_and_dict_args (line 433) | def test_keyword_and_dict_args(self): method test_config (line 450) | def test_config(self): method test_model (line 453) | def test_model(self): method test_hidden_states_output (line 457) | def test_hidden_states_output(self): method test_batched_inference (line 483) | def test_batched_inference(self): method test_ctc_loss_inference (line 487) | def test_ctc_loss_inference(self): method test_labels_out_of_vocab (line 493) | def test_labels_out_of_vocab(self): method test_train (line 497) | def test_train(self): method test_inputs_embeds (line 502) | def test_inputs_embeds(self): method test_resize_tokens_embeddings (line 507) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 513) | def test_model_common_attributes(self): method test_model_from_pretrained (line 517) | def test_model_from_pretrained(self): method test_dataset_conversion (line 522) | def test_dataset_conversion(self): method test_keras_fit (line 526) | def test_keras_fit(self): class TFWav2Vec2UtilsTest (line 531) | class TFWav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 532) | def test_compute_mask_indices(self): method test_compute_mask_indices_overlap (line 544) | def test_compute_mask_indices_overlap(self): class TFWav2Vec2ModelIntegrationTest (line 559) | class TFWav2Vec2ModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 560) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal (line 569) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 584) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 603) | def test_inference_ctc_robust_batched(self): method test_wav2vec2_with_lm (line 630) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 648) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 679) | def test_wav2vec2_with_lm_invalid_pool(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2/test_modeling_wav2vec2.py function _test_wav2vec2_with_lm_invalid_pool (line 89) | def _test_wav2vec2_with_lm_invalid_pool(in_queue, out_queue, timeout): class Wav2Vec2ModelTester (line 134) | class Wav2Vec2ModelTester: method __init__ (line 135) | def __init__( method prepare_config_and_inputs (line 211) | def prepare_config_and_inputs(self): method get_config (line 219) | def get_config(self): method create_and_check_model (line 250) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 259) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_for_ctc (line 269) | def create_and_check_model_with_adapter_for_ctc(self, config, input_va... method create_and_check_model_with_adapter_proj_dim (line 280) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_batch_inference (line 292) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 318) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 346) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 371) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 400) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 423) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 446) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 460) | def prepare_config_and_inputs_for_common(self): class Wav2Vec2ModelTest (line 467) | class Wav2Vec2ModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 477) | def setUp(self): method test_config (line 481) | def test_config(self): method test_model (line 484) | def test_model(self): method test_model_with_adapter (line 488) | def test_model_with_adapter(self): method test_model_with_adapter_for_ctc (line 492) | def test_model_with_adapter_for_ctc(self): method test_model_with_adapter_proj_dim (line 496) | def test_model_with_adapter_proj_dim(self): method test_ctc_loss_inference (line 500) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 504) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 508) | def test_ctc_train(self): method test_seq_classifier_train (line 512) | def test_seq_classifier_train(self): method test_xvector_train (line 516) | def test_xvector_train(self): method test_labels_out_of_vocab (line 520) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 525) | def test_inputs_embeds(self): method test_forward_signature (line 529) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 534) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 540) | def test_model_common_attributes(self): method test_equivalence_flax_to_pt (line 545) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 550) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 553) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 593) | def test_initialization(self): method _mock_init_weights (line 627) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 641) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 664) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 688) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 692) | def test_model_from_pretrained(self): method _create_and_check_torch_fx_tracing (line 697) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... class Wav2Vec2RobustModelTest (line 798) | class Wav2Vec2RobustModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 815) | def setUp(self): method test_config (line 821) | def test_config(self): method test_model (line 824) | def test_model(self): method test_model_with_adapter (line 828) | def test_model_with_adapter(self): method test_model_with_adapter_proj_dim (line 832) | def test_model_with_adapter_proj_dim(self): method test_batched_inference (line 836) | def test_batched_inference(self): method test_ctc_loss_inference (line 840) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 844) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 848) | def test_ctc_train(self): method test_seq_classifier_train (line 852) | def test_seq_classifier_train(self): method test_xvector_train (line 856) | def test_xvector_train(self): method test_labels_out_of_vocab (line 860) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 865) | def test_inputs_embeds(self): method test_forward_signature (line 869) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 874) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 880) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 883) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 923) | def test_initialization(self): method _mock_init_weights (line 957) | def _mock_init_weights(self, module): method test_model_for_pretraining (line 971) | def test_model_for_pretraining(self): method test_mask_feature_prob_ctc (line 1013) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 1036) | def test_mask_time_prob_ctc(self): method test_mask_time_feature_prob_ctc_single_batch (line 1059) | def test_mask_time_feature_prob_ctc_single_batch(self): method test_feed_forward_chunking (line 1087) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 1091) | def test_model_from_pretrained(self): class Wav2Vec2UtilsTest (line 1097) | class Wav2Vec2UtilsTest(unittest.TestCase): method test_compute_mask_indices (line 1098) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 1109) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 1139) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 1152) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 1171) | def test_compute_mask_indices_short_audio(self): method test_compute_perplexity (line 1188) | def test_compute_perplexity(self): method test_sample_negatives (line 1201) | def test_sample_negatives(self): method test_sample_negatives_with_mask (line 1226) | def test_sample_negatives_with_mask(self): class Wav2Vec2ModelIntegrationTest (line 1267) | class Wav2Vec2ModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 1268) | def _load_datasamples(self, num_samples): method _load_superb (line 1277) | def _load_superb(self, task, num_samples): method test_inference_ctc_normal (line 1282) | def test_inference_ctc_normal(self): method test_inference_ctc_normal_batched (line 1299) | def test_inference_ctc_normal_batched(self): method test_inference_ctc_robust_batched (line 1322) | def test_inference_ctc_robust_batched(self): method test_inference_integration (line 1349) | def test_inference_integration(self): method test_inference_pretrained (line 1397) | def test_inference_pretrained(self): method test_loss_pretraining (line 1461) | def test_loss_pretraining(self): method test_inference_keyword_spotting (line 1517) | def test_inference_keyword_spotting(self): method test_inference_intent_classification (line 1536) | def test_inference_intent_classification(self): method test_inference_speaker_identification (line 1566) | def test_inference_speaker_identification(self): method test_inference_emotion_recognition (line 1587) | def test_inference_emotion_recognition(self): method test_phoneme_recognition (line 1606) | def test_phoneme_recognition(self): method test_wav2vec2_with_lm (line 1643) | def test_wav2vec2_with_lm(self): method test_wav2vec2_with_lm_pool (line 1667) | def test_wav2vec2_with_lm_pool(self): method test_wav2vec2_with_lm_invalid_pool (line 1704) | def test_wav2vec2_with_lm_invalid_pool(self): method test_inference_diarization (line 1710) | def test_inference_diarization(self): method test_inference_speaker_verification (line 1738) | def test_inference_speaker_verification(self): FILE: benchmark/third_party/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): FILE: benchmark/third_party/transformers/tests/models/wav2vec2/test_tokenization_wav2vec2.py function floats_list (line 41) | def floats_list(shape, scale=1.0, rng=None, name=None): class Wav2Vec2TokenizerTest (line 55) | class Wav2Vec2TokenizerTest(unittest.TestCase): method setUp (line 58) | def setUp(self): method get_tokenizer (line 71) | def get_tokenizer(self, **kwargs): method test_tokenizer_decode (line 75) | def test_tokenizer_decode(self): method test_tokenizer_decode_special (line 88) | def test_tokenizer_decode_special(self): method test_tokenizer_decode_added_tokens (line 119) | def test_tokenizer_decode_added_tokens(self): method test_call (line 149) | def test_call(self): method test_padding (line 167) | def test_padding(self, max_length=50): method test_save_pretrained (line 226) | def test_save_pretrained(self): method test_get_vocab (line 246) | def test_get_vocab(self): method test_save_and_load_tokenizer (line 259) | def test_save_and_load_tokenizer(self): method test_tokenizer_slow_store_full_signature (line 304) | def test_tokenizer_slow_store_full_signature(self): method test_zero_mean_unit_variance_normalization (line 312) | def test_zero_mean_unit_variance_normalization(self): method test_return_attention_mask (line 326) | def test_return_attention_mask(self): method test_pretrained_checkpoints_are_set_correctly (line 344) | def test_pretrained_checkpoints_are_set_correctly(self): class Wav2Vec2CTCTokenizerTest (line 357) | class Wav2Vec2CTCTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 361) | def setUp(self): method get_tokenizer (line 374) | def get_tokenizer(self, **kwargs): method test_tokenizer_add_token_chars (line 378) | def test_tokenizer_add_token_chars(self): method test_tokenizer_add_token_words (line 394) | def test_tokenizer_add_token_words(self): method test_tokenizer_decode (line 410) | def test_tokenizer_decode(self): method test_tokenizer_decode_special (line 422) | def test_tokenizer_decode_special(self): method test_tokenizer_decode_added_tokens (line 441) | def test_tokenizer_decode_added_tokens(self): method test_special_characters_in_vocab (line 456) | def test_special_characters_in_vocab(self): method get_from_offsets (line 477) | def get_from_offsets(offsets, key): method test_offsets (line 481) | def test_offsets(self): method test_word_offsets_from_char_offsets (line 543) | def test_word_offsets_from_char_offsets(self): method test_offsets_batch (line 579) | def test_offsets_batch(self): method test_offsets_integration (line 627) | def test_offsets_integration(self): method test_pretrained_model_lists (line 693) | def test_pretrained_model_lists(self): method test_add_tokens_tokenizer (line 698) | def test_add_tokens_tokenizer(self): method test_tf_encode_plus_sent_to_model (line 750) | def test_tf_encode_plus_sent_to_model(self): method test_torch_encode_plus_sent_to_model (line 754) | def test_torch_encode_plus_sent_to_model(self): method test_convert_tokens_to_string_format (line 757) | def test_convert_tokens_to_string_format(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2_conformer/test_modeling_wav2vec2_conformer.py class Wav2Vec2ConformerModelTester (line 56) | class Wav2Vec2ConformerModelTester: method __init__ (line 57) | def __init__( method prepare_config_and_inputs (line 135) | def prepare_config_and_inputs(self, position_embeddings_type="relative"): method get_config (line 143) | def get_config(self, position_embeddings_type="relative"): method create_and_check_model (line 175) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_model_with_adapter (line 184) | def create_and_check_model_with_adapter(self, config, input_values, at... method create_and_check_model_with_adapter_for_ctc (line 194) | def create_and_check_model_with_adapter_for_ctc(self, config, input_va... method create_and_check_model_with_adapter_proj_dim (line 205) | def create_and_check_model_with_adapter_proj_dim(self, config, input_v... method create_and_check_batch_inference (line 217) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 243) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 271) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 296) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 325) | def check_seq_classifier_training(self, config, input_values, *args): method check_xvector_training (line 348) | def check_xvector_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 371) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 385) | def prepare_config_and_inputs_for_common(self): class Wav2Vec2ConformerModelTest (line 392) | class Wav2Vec2ConformerModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 409) | def setUp(self): method test_config (line 413) | def test_config(self): method test_model (line 416) | def test_model(self): method test_model_with_relative (line 420) | def test_model_with_relative(self): method test_model_with_rotary (line 424) | def test_model_with_rotary(self): method test_model_with_no_rel_pos (line 428) | def test_model_with_no_rel_pos(self): method test_model_with_adapter (line 432) | def test_model_with_adapter(self): method test_model_with_adapter_for_ctc (line 436) | def test_model_with_adapter_for_ctc(self): method test_model_with_adapter_proj_dim (line 440) | def test_model_with_adapter_proj_dim(self): method test_ctc_loss_inference (line 444) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 448) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 452) | def test_ctc_train(self): method test_seq_classifier_train (line 456) | def test_seq_classifier_train(self): method test_xvector_train (line 460) | def test_xvector_train(self): method test_labels_out_of_vocab (line 464) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 469) | def test_inputs_embeds(self): method test_forward_signature (line 473) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 478) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 484) | def test_model_common_attributes(self): method test_equivalence_flax_to_pt (line 489) | def test_equivalence_flax_to_pt(self): method test_equivalence_pt_to_flax (line 494) | def test_equivalence_pt_to_flax(self): method test_retain_grad_hidden_states_attentions (line 497) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 537) | def test_initialization(self): method _mock_init_weights (line 575) | def _mock_init_weights(self, module): method test_mask_feature_prob_ctc (line 593) | def test_mask_feature_prob_ctc(self): method test_mask_time_prob_ctc (line 616) | def test_mask_time_prob_ctc(self): method test_feed_forward_chunking (line 640) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 644) | def test_model_from_pretrained(self): class Wav2Vec2ConformerUtilsTest (line 650) | class Wav2Vec2ConformerUtilsTest(unittest.TestCase): method test_compute_mask_indices (line 651) | def test_compute_mask_indices(self): method test_compute_mask_indices_low_prob (line 662) | def test_compute_mask_indices_low_prob(self): method test_compute_mask_indices_overlap (line 692) | def test_compute_mask_indices_overlap(self): method test_compute_mask_indices_attn_mask_overlap (line 705) | def test_compute_mask_indices_attn_mask_overlap(self): method test_compute_mask_indices_short_audio (line 724) | def test_compute_mask_indices_short_audio(self): method test_compute_perplexity (line 741) | def test_compute_perplexity(self): method test_sample_negatives (line 754) | def test_sample_negatives(self): method test_sample_negatives_with_mask (line 779) | def test_sample_negatives_with_mask(self): class Wav2Vec2ConformerModelIntegrationTest (line 819) | class Wav2Vec2ConformerModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 820) | def _load_datasamples(self, num_samples): method test_inference_ctc_normal_batched_rel_pos (line 828) | def test_inference_ctc_normal_batched_rel_pos(self): method test_inference_ctc_normal_batched_rope (line 853) | def test_inference_ctc_normal_batched_rope(self): method test_inference_pretrained (line 878) | def test_inference_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/wav2vec2_phoneme/test_tokenization_wav2vec2_phoneme.py class Wav2Vec2PhonemeCTCTokenizerTest (line 30) | class Wav2Vec2PhonemeCTCTokenizerTest(TokenizerTesterMixin, unittest.Tes... method setUp (line 34) | def setUp(self): method get_clean_sequence (line 61) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method get_tokenizer (line 85) | def get_tokenizer(self, **kwargs): method test_tokenizer_add_new_tokens (line 89) | def test_tokenizer_add_new_tokens(self): method test_phonemize (line 104) | def test_phonemize(self): method test_encode (line 111) | def test_encode(self): method test_encode_decode (line 118) | def test_encode_decode(self): method test_decode (line 127) | def test_decode(self): method test_phonemize_with_word_del (line 139) | def test_phonemize_with_word_del(self): method test_encode_with_del (line 149) | def test_encode_with_del(self): method test_decode_with_del (line 159) | def test_decode_with_del(self): method test_encode_decode_with_del (line 184) | def test_encode_decode_with_del(self): method test_encode_decode_with_del_filter (line 197) | def test_encode_decode_with_del_filter(self): method test_change_phonemizer_lang (line 210) | def test_change_phonemizer_lang(self): method test_case_insensitive (line 227) | def test_case_insensitive(self): method test_tokenizer_decode_added_tokens (line 237) | def test_tokenizer_decode_added_tokens(self): method get_from_offsets (line 253) | def get_from_offsets(offsets, key): method test_offsets (line 257) | def test_offsets(self): method test_offsets_batch (line 289) | def test_offsets_batch(self): method test_added_tokens_do_lower_case (line 327) | def test_added_tokens_do_lower_case(self): method test_encode_decode_with_spaces (line 331) | def test_encode_decode_with_spaces(self): method test_internal_consistency (line 335) | def test_internal_consistency(self): method test_pretrained_model_lists (line 339) | def test_pretrained_model_lists(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: benchmark/third_party/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_tokenizer (line 160) | def test_tokenizer(self): method _get_dummy_logits (line 176) | def _get_dummy_logits(self, shape=(2, 10, 16), seed=77): method test_decoder (line 180) | def test_decoder(self): method test_decoder_batch (line 199) | def test_decoder_batch(self, pool_context): method test_decoder_with_params (line 233) | def test_decoder_with_params(self): method test_decoder_with_params_of_lm (line 270) | def test_decoder_with_params_of_lm(self): method test_decoder_download_ignores_files (line 317) | def test_decoder_download_ignores_files(self): method test_decoder_local_files (line 334) | def test_decoder_local_files(self): method test_processor_from_auto_processor (line 351) | def test_processor_from_auto_processor(self): method get_from_offsets (line 371) | def get_from_offsets(offsets, key): method test_offsets_integration_fast (line 375) | def test_offsets_integration_fast(self): method test_offsets_integration_fast_batch (line 391) | def test_offsets_integration_fast_batch(self): method test_word_time_stamp_integration (line 413) | def test_word_time_stamp_integration(self): FILE: benchmark/third_party/transformers/tests/models/wavlm/test_modeling_wavlm.py class WavLMModelTester (line 49) | class WavLMModelTester: method __init__ (line 50) | def __init__( method prepare_config_and_inputs (line 116) | def prepare_config_and_inputs(self): method get_config (line 124) | def get_config(self): method create_and_check_model (line 150) | def create_and_check_model(self, config, input_values, attention_mask): method create_and_check_batch_inference (line 159) | def create_and_check_batch_inference(self, config, input_values, *args): method check_ctc_loss (line 185) | def check_ctc_loss(self, config, input_values, *args): method check_seq_classifier_loss (line 213) | def check_seq_classifier_loss(self, config, input_values, *args): method check_ctc_training (line 238) | def check_ctc_training(self, config, input_values, *args): method check_seq_classifier_training (line 267) | def check_seq_classifier_training(self, config, input_values, *args): method check_labels_out_of_vocab (line 290) | def check_labels_out_of_vocab(self, config, input_values, *args): method prepare_config_and_inputs_for_common (line 304) | def prepare_config_and_inputs_for_common(self): class WavLMModelTest (line 311) | class WavLMModelTest(ModelTesterMixin, unittest.TestCase): 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_ctc_loss_inference (line 331) | def test_ctc_loss_inference(self): method test_seq_classifier_loss_inference (line 335) | def test_seq_classifier_loss_inference(self): method test_ctc_train (line 339) | def test_ctc_train(self): method test_seq_classifier_train (line 343) | def test_seq_classifier_train(self): method test_labels_out_of_vocab (line 347) | def test_labels_out_of_vocab(self): method test_inputs_embeds (line 352) | def test_inputs_embeds(self): method test_forward_signature (line 356) | def test_forward_signature(self): method test_resize_tokens_embeddings (line 361) | def test_resize_tokens_embeddings(self): method test_model_common_attributes (line 367) | def test_model_common_attributes(self): method test_retain_grad_hidden_states_attentions (line 372) | def test_retain_grad_hidden_states_attentions(self): method test_initialization (line 408) | def test_initialization(self): method _mock_init_weights (line 444) | def _mock_init_weights(self, module): method test_feed_forward_chunking (line 459) | def test_feed_forward_chunking(self): method test_model_from_pretrained (line 463) | def test_model_from_pretrained(self): class WavLMModelIntegrationTest (line 471) | class WavLMModelIntegrationTest(unittest.TestCase): method _load_datasamples (line 472) | def _load_datasamples(self, num_samples): method _load_superb (line 481) | def _load_superb(self, task, num_samples): method test_inference_base (line 486) | def test_inference_base(self): method test_inference_large (line 510) | def test_inference_large(self): method test_inference_diarization (line 534) | def test_inference_diarization(self): method test_inference_speaker_verification (line 562) | def test_inference_speaker_verification(self): FILE: benchmark/third_party/transformers/tests/models/whisper/test_feature_extraction_whisper.py function floats_list (line 41) | def floats_list(shape, scale=1.0, rng=None, name=None): class WhisperFeatureExtractionTester (line 57) | class WhisperFeatureExtractionTester(unittest.TestCase): method __init__ (line 58) | def __init__( method prepare_feat_extract_dict (line 85) | def prepare_feat_extract_dict(self): method prepare_inputs_for_common (line 96) | def prepare_inputs_for_common(self, equal_length=False, numpify=False): class WhisperFeatureExtractionTest (line 115) | class WhisperFeatureExtractionTest(SequenceFeatureExtractionTestMixin, u... method setUp (line 119) | def setUp(self): method test_feat_extract_from_and_save_pretrained (line 122) | def test_feat_extract_from_and_save_pretrained(self): method test_feat_extract_to_json_file (line 137) | def test_feat_extract_to_json_file(self): method test_call (line 152) | def test_call(self): method test_double_precision_pad (line 188) | def test_double_precision_pad(self): method _load_datasamples (line 201) | def _load_datasamples(self, num_samples): method test_integration (line 210) | def test_integration(self): FILE: benchmark/third_party/transformers/tests/models/whisper/test_modeling_tf_whisper.py function prepare_whisper_inputs_dict (line 46) | def prepare_whisper_inputs_dict( class TFWhisperModelTester (line 75) | class TFWhisperModelTester: method __init__ (line 76) | def __init__( method prepare_config_and_inputs (line 128) | def prepare_config_and_inputs(self): method get_config (line 142) | 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_model_forward (line 180) | def create_and_check_model_forward(self, config, inputs_dict): method create_and_check_decoder_model_past_large_inputs (line 191) | def create_and_check_decoder_model_past_large_inputs(self, config, inp... method check_encoder_decoder_model_standalone (line 226) | def check_encoder_decoder_model_standalone(self, config, inputs_dict): class TFWhisperModelTest (line 257) | class TFWhisperModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 268) | def setUp(self): method test_config (line 273) | def test_config(self): method test_save_load_strict (line 276) | def test_save_load_strict(self): method test_model_forward (line 288) | def test_model_forward(self): method test_decoder_model_past_with_large_inputs (line 292) | def test_decoder_model_past_with_large_inputs(self): method _get_input_ids_and_config (line 296) | def _get_input_ids_and_config(self): method test_inputs_embeds (line 313) | def test_inputs_embeds(self): method test_training (line 317) | def test_training(self): method test_generate_with_head_masking (line 320) | def test_generate_with_head_masking(self): method test_generate_fp16 (line 324) | def test_generate_fp16(self): method test_forward_signature (line 332) | def test_forward_signature(self): method test_hidden_states_output (line 353) | def test_hidden_states_output(self): method test_attention_outputs (line 402) | def test_attention_outputs(self): method test_generate_without_input_ids (line 489) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 493) | def _get_encoder_outputs( method _check_outputs (line 512) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method test_lm_head_model_random_no_beam_search_generate (line 556) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_random_beam_search_generate (line 591) | def test_lm_head_model_random_beam_search_generate(self): function _load_datasamples (line 631) | def _load_datasamples(num_samples): function _test_large_logits_librispeech (line 640) | def _test_large_logits_librispeech(in_queue, out_queue, timeout): function _test_large_generation (line 687) | def _test_large_generation(in_queue, out_queue, timeout): function _test_large_generation_multilingual (line 714) | def _test_large_generation_multilingual(in_queue, out_queue, timeout): function _test_large_batched_generation (line 761) | def _test_large_batched_generation(in_queue, out_queue, timeout): class TFWhisperModelIntegrationTests (line 811) | class TFWhisperModelIntegrationTests(unittest.TestCase): method default_processor (line 813) | def default_processor(self): method _load_datasamples (line 816) | def _load_datasamples(self, num_samples): method test_tiny_logits_librispeech (line 820) | def test_tiny_logits_librispeech(self): method test_small_en_logits_librispeech (line 863) | def test_small_en_logits_librispeech(self): method test_large_logits_librispeech (line 896) | def test_large_logits_librispeech(self): method test_tiny_en_generation (line 903) | def test_tiny_en_generation(self): method test_tiny_generation (line 922) | def test_tiny_generation(self): method test_tiny_xla_generation (line 940) | def test_tiny_xla_generation(self): method test_large_generation (line 964) | def test_large_generation(self): method test_large_generation_multilingual (line 969) | def test_large_generation_multilingual(self): method test_large_batched_generation (line 976) | def test_large_batched_generation(self): method test_tiny_en_batched_generation (line 983) | def test_tiny_en_batched_generation(self): method test_tiny_en_batched_xla_generation (line 1019) | def test_tiny_en_batched_xla_generation(self): FILE: benchmark/third_party/transformers/tests/models/whisper/test_modeling_whisper.py function prepare_whisper_inputs_dict (line 50) | def prepare_whisper_inputs_dict( class WhisperModelTester (line 80) | class WhisperModelTester: method __init__ (line 81) | def __init__( method prepare_config_and_inputs (line 133) | def prepare_config_and_inputs(self): method get_config (line 147) | def get_config(self): method prepare_config_and_inputs_for_common (line 171) | def prepare_config_and_inputs_for_common(self): method get_subsampled_output_lengths (line 175) | def get_subsampled_output_lengths(self, input_lengths): method create_and_check_model_forward (line 185) | def create_and_check_model_forward(self, config, inputs_dict, freeze_e... method create_and_check_decoder_model_past_large_inputs (line 199) | 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 WhisperModelTest (line 263) | class WhisperModelTest(ModelTesterMixin, GenerationTesterMixin, unittest... method setUp (line 273) | 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_model_forward (line 291) | def test_model_forward(self): method test_model_forward_with_frozen_encoder (line 295) | def test_model_forward_with_frozen_encoder(self): method test_requires_grad_with_frozen_encoder (line 299) | def test_requires_grad_with_frozen_encoder(self): method test_decoder_model_past_with_large_inputs (line 315) | def test_decoder_model_past_with_large_inputs(self): method test_encoder_decoder_model_standalone (line 319) | def test_encoder_decoder_model_standalone(self): method _get_input_ids_and_config (line 323) | def _get_input_ids_and_config(self): method test_inputs_embeds (line 340) | def test_inputs_embeds(self): method test_training (line 344) | def test_training(self): method test_training_gradient_checkpointing (line 347) | def test_training_gradient_checkpointing(self): method test_generate_with_head_masking (line 350) | def test_generate_with_head_masking(self): method test_generate_fp16 (line 353) | def test_generate_fp16(self): method test_forward_signature (line 364) | def test_forward_signature(self): method test_hidden_states_output (line 385) | def test_hidden_states_output(self): method test_attention_outputs (line 438) | def test_attention_outputs(self): method test_resize_tokens_embeddings (line 533) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 581) | def test_resize_embeddings_untied(self): method test_generate_without_input_ids (line 630) | def test_generate_without_input_ids(self): method _get_encoder_outputs (line 634) | def _get_encoder_outputs( method _check_outputs (line 653) | def _check_outputs(self, output, input_ids, config, use_cache=False, n... method _create_and_check_torchscript (line 695) | def _create_and_check_torchscript(self, config, inputs_dict): class WhisperModelIntegrationTests (line 751) | class WhisperModelIntegrationTests(unittest.TestCase): method default_processor (line 753) | def default_processor(self): method _load_datasamples (line 756) | def _load_datasamples(self, num_samples): method test_tiny_logits_librispeech (line 765) | def test_tiny_logits_librispeech(self): method test_small_en_logits_librispeech (line 811) | def test_small_en_logits_librispeech(self): method test_large_logits_librispeech (line 846) | def test_large_logits_librispeech(self): method test_tiny_en_generation (line 884) | def test_tiny_en_generation(self): method test_tiny_generation (line 908) | def test_tiny_generation(self): method test_large_generation (line 931) | def test_large_generation(self): method test_large_generation_multilingual (line 955) | def test_large_generation_multilingual(self): method test_large_batched_generation (line 995) | def test_large_batched_generation(self): method test_tiny_en_batched_generation (line 1030) | def test_tiny_en_batched_generation(self): FILE: benchmark/third_party/transformers/tests/models/whisper/test_processor_whisper.py class WhisperProcessorTest (line 32) | class WhisperProcessorTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method get_tokenizer (line 37) | def get_tokenizer(self, **kwargs): method get_feature_extractor (line 40) | def get_feature_extractor(self, **kwargs): method tearDown (line 43) | def tearDown(self): method test_save_load_pretrained_default (line 46) | def test_save_load_pretrained_default(self): method test_save_load_pretrained_additional_features (line 61) | def test_save_load_pretrained_additional_features(self): method test_feature_extractor (line 78) | def test_feature_extractor(self): method test_tokenizer (line 92) | def test_tokenizer(self): method test_tokenizer_decode (line 107) | def test_tokenizer_decode(self): FILE: benchmark/third_party/transformers/tests/models/whisper/test_tokenization_whisper.py class WhisperTokenizerTest (line 27) | class WhisperTokenizerTest(TokenizerTesterMixin, unittest.TestCase): method setUp (line 32) | def setUp(self): method test_convert_token_and_id (line 39) | def test_convert_token_and_id(self): method test_get_vocab (line 47) | def test_get_vocab(self): method test_vocab_size (line 55) | def test_vocab_size(self): method test_full_tokenizer (line 58) | def test_full_tokenizer(self): method test_tokenizer_slow_store_full_signature (line 87) | def test_tokenizer_slow_store_full_signature(self): method test_tokenizer_integration (line 91) | def test_tokenizer_integration(self): class SpeechToTextTokenizerMultilinguialTest (line 101) | class SpeechToTextTokenizerMultilinguialTest(unittest.TestCase): method setUpClass (line 112) | def setUpClass(cls): method test_tokenizer_equivalence (line 116) | def test_tokenizer_equivalence(self): method test_tokenizer_special (line 144) | def test_tokenizer_special(self): method test_vocab_size (line 167) | def test_vocab_size(self): method test_tokenizer_decode_ignores_language_codes (line 170) | def test_tokenizer_decode_ignores_language_codes(self): method test_batch_encoding (line 178) | def test_batch_encoding(self): FILE: benchmark/third_party/transformers/tests/models/x_clip/test_modeling_x_clip.py class XCLIPVisionModelTester (line 52) | class XCLIPVisionModelTester: method __init__ (line 53) | def __init__( method prepare_config_and_inputs (line 93) | def prepare_config_and_inputs(self): method get_config (line 101) | 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 132) | def prepare_config_and_inputs_for_common(self): class XCLIPVisionModelTest (line 140) | class XCLIPVisionModelTest(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_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_training (line 190) | def test_training(self): method test_training_gradient_checkpointing (line 193) | def test_training_gradient_checkpointing(self): method test_save_load_fast_init_from_base (line 197) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 201) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 205) | def test_model_from_pretrained(self): method test_gradient_checkpointing_backward_compatibility (line 210) | def test_gradient_checkpointing_backward_compatibility(self): method test_attention_outputs (line 223) | def test_attention_outputs(self): method test_multi_gpu_data_parallel_forward (line 278) | def test_multi_gpu_data_parallel_forward(self): class XCLIPTextModelTester (line 309) | class XCLIPTextModelTester: method __init__ (line 310) | def __init__( method prepare_config_and_inputs (line 346) | def prepare_config_and_inputs(self): method get_config (line 364) | def get_config(self): method create_and_check_model (line 377) | def create_and_check_model(self, config, input_ids, input_mask): method prepare_config_and_inputs_for_common (line 387) | def prepare_config_and_inputs_for_common(self): class XCLIPTextModelTest (line 395) | class XCLIPTextModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 402) | def setUp(self): method test_config (line 406) | def test_config(self): method test_model (line 409) | def test_model(self): method test_training (line 413) | def test_training(self): method test_training_gradient_checkpointing (line 416) | def test_training_gradient_checkpointing(self): method test_inputs_embeds (line 420) | def test_inputs_embeds(self): method test_save_load_fast_init_from_base (line 424) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 428) | def test_save_load_fast_init_to_base(self): method test_model_from_pretrained (line 432) | def test_model_from_pretrained(self): class XCLIPModelTester (line 438) | class XCLIPModelTester: method __init__ (line 439) | def __init__(self, parent, projection_dim=64, mit_hidden_size=64, is_t... method prepare_config_and_inputs (line 447) | def prepare_config_and_inputs(self): method get_config (line 464) | def get_config(self): method create_and_check_model (line 471) | def create_and_check_model(self, config, input_ids, attention_mask, pi... method prepare_config_and_inputs_for_common (line 484) | def prepare_config_and_inputs_for_common(self): class XCLIPModelTest (line 497) | class XCLIPModelTest(ModelTesterMixin, unittest.TestCase): method setUp (line 507) | def setUp(self): method test_model (line 510) | def test_model(self): method test_hidden_states_output (line 515) | def test_hidden_states_output(self): method test_inputs_embeds (line 519) | def test_inputs_embeds(self): method test_retain_grad_hidden_states_attentions (line 523) | def test_retain_grad_hidden_states_attentions(self): method test_model_common_attributes (line 527) | def test_model_common_attributes(self): method test_feed_forward_chunking (line 531) | def test_feed_forward_chunking(self): method test_initialization (line 535) | def test_initialization(self): method _create_and_check_torchscript (line 560) | def _create_and_check_torchscript(self, config, inputs_dict): method test_load_vision_text_config (line 611) | def test_load_vision_text_config(self): method test_model_from_pretrained (line 627) | def test_model_from_pretrained(self): function prepare_video (line 634) | def prepare_video(): class XCLIPModelIntegrationTest (line 644) | class XCLIPModelIntegrationTest(unittest.TestCase): method test_inference (line 646) | def test_inference(self): FILE: benchmark/third_party/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 203) | def setUp(self): method test_use_cache_forward (line 206) | def test_use_cache_forward(self): method test_use_cache_forward_with_attn_mask (line 211) | def test_use_cache_forward_with_attn_mask(self): method test_batch_generation (line 219) | def test_batch_generation(self): method test_equivalence_pt_to_flax (line 243) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 293) | def test_equivalence_flax_to_pt(self): method test_model_from_pretrained (line 343) | def test_model_from_pretrained(self): FILE: benchmark/third_party/transformers/tests/models/xglm/test_modeling_tf_xglm.py class TFXGLMModelTester (line 36) | class TFXGLMModelTester: method __init__ (line 41) | def __init__( method get_large_model_config (line 81) | def get_large_model_config(self): method prepare_config_and_inputs (line 84) | def prepare_config_and_inputs(self): method get_config (line 104) | def get_config(self): method prepare_config_and_inputs_for_common (line 123) | def prepare_config_and_inputs_for_common(self): class TFXGLMModelTest (line 142) | class TFXGLMModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 150) | def setUp(self): method test_config (line 154) | def test_config(self): method test_model_common_attributes (line 157) | def test_model_common_attributes(self): method test_batch_generation (line 176) | def test_batch_generation(self): method test_model_from_pretrained (line 214) | def test_model_from_pretrained(self): method test_resize_token_embeddings (line 220) | def test_resize_token_embeddings(self): class TFXGLMModelLanguageGenerationTest (line 225) | class TFXGLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xglm (line 227) | def test_lm_generate_xglm(self, verify_outputs=True): method test_xglm_sample (line 239) | def test_xglm_sample(self): method test_lm_generate_xglm_left_padding (line 255) | def test_lm_generate_xglm_left_padding(self): FILE: benchmark/third_party/transformers/tests/models/xglm/test_modeling_xglm.py class XGLMModelTester (line 34) | class XGLMModelTester: method __init__ (line 35) | def __init__( method get_large_model_config (line 76) | def get_large_model_config(self): method prepare_config_and_inputs (line 79) | def prepare_config_and_inputs( method get_config (line 99) | def get_config( method prepare_config_and_inputs_for_decoder (line 120) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_xglm_model (line 140) | def create_and_check_xglm_model(self, config, input_ids, input_mask, h... method create_and_check_xglm_model_past (line 151) | def create_and_check_xglm_model_past(self, config, input_ids, input_ma... method create_and_check_xglm_model_attention_mask_past (line 181) | def create_and_check_xglm_model_attention_mask_past(self, config, inpu... method create_and_check_xglm_model_past_large_inputs (line 216) | def create_and_check_xglm_model_past_large_inputs(self, config, input_... method create_and_check_lm_head_model (line 248) | def create_and_check_lm_head_model(self, config, input_ids, input_mask... method create_and_check_forward_and_backwards (line 257) | def create_and_check_forward_and_backwards( method create_and_check_xglm_weight_initialization (line 270) | def create_and_check_xglm_weight_initialization(self, config, *args): method prepare_config_and_inputs_for_common (line 278) | def prepare_config_and_inputs_for_common(self): class XGLMModelTest (line 297) | class XGLMModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Te... method setUp (line 305) | def setUp(self): method test_config (line 309) | def test_config(self): method test_xglm_model (line 312) | def test_xglm_model(self): method test_xglm_model_past (line 316) | def test_xglm_model_past(self): method test_xglm_model_att_mask_past (line 320) | def test_xglm_model_att_mask_past(self): method test_xglm_model_past_large_inputs (line 324) | def test_xglm_model_past_large_inputs(self): method test_xglm_lm_head_model (line 328) | def test_xglm_lm_head_model(self): method test_xglm_gradient_checkpointing (line 332) | def test_xglm_gradient_checkpointing(self): method test_xglm_weight_initialization (line 336) | def test_xglm_weight_initialization(self): method test_batch_generation (line 341) | def test_batch_generation(self): method test_model_from_pretrained (line 381) | def test_model_from_pretrained(self): class XGLMModelLanguageGenerationTest (line 388) | class XGLMModelLanguageGenerationTest(unittest.TestCase): method _test_lm_generate_xglm_helper (line 389) | def _test_lm_generate_xglm_helper( method test_lm_generate_xglm (line 410) | def test_lm_generate_xglm(self): method test_lm_generate_xglm_with_gradient_checkpointing (line 414) | def test_lm_generate_xglm_with_gradient_checkpointing(self): method test_xglm_sample (line 418) | def test_xglm_sample(self): method test_xglm_sample_max_time (line 432) | def test_xglm_sample_max_time(self): method test_batched_nan_fp16 (line 473) | def test_batched_nan_fp16(self): FILE: benchmark/third_party/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 193) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/xlm/test_modeling_tf_xlm.py class TFXLMModelTester (line 41) | class TFXLMModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 76) | def prepare_config_and_inputs(self): method create_and_check_xlm_model (line 131) | def create_and_check_xlm_model( method create_and_check_xlm_lm_head (line 151) | def create_and_check_xlm_lm_head( method create_and_check_xlm_qa (line 172) | def create_and_check_xlm_qa( method create_and_check_xlm_sequence_classif (line 193) | def create_and_check_xlm_sequence_classif( method create_and_check_xlm_for_token_classification (line 213) | def create_and_check_xlm_for_token_classification( method create_and_check_xlm_for_multiple_choice (line 231) | def create_and_check_xlm_for_multiple_choice( method prepare_config_and_inputs_for_common (line 256) | def prepare_config_and_inputs_for_common(self): class TFXLMModelTest (line 279) | class TFXLMModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 299) | def setUp(self): method test_config (line 303) | def test_config(self): method test_xlm_model (line 306) | def test_xlm_model(self): method test_xlm_lm_head (line 310) | def test_xlm_lm_head(self): method test_xlm_qa (line 314) | def test_xlm_qa(self): method test_xlm_sequence_classif (line 318) | def test_xlm_sequence_classif(self): method test_for_token_classification (line 322) | def test_for_token_classification(self): method test_for_multiple_choice (line 326) | def test_for_multiple_choice(self): method test_model_from_pretrained (line 331) | def test_model_from_pretrained(self): class TFXLMModelLanguageGenerationTest (line 338) | class TFXLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlm_mlm_en_2048 (line 340) | def test_lm_generate_xlm_mlm_en_2048(self): FILE: benchmark/third_party/transformers/tests/models/xlm/test_modeling_xlm.py class XLMModelTester (line 41) | class XLMModelTester: method __init__ (line 42) | def __init__( method prepare_config_and_inputs (line 75) | def prepare_config_and_inputs(self): method get_config (line 112) | def get_config(self): method create_and_check_xlm_model (line 134) | def create_and_check_xlm_model( method create_and_check_xlm_lm_head (line 154) | def create_and_check_xlm_lm_head( method create_and_check_xlm_simple_qa (line 174) | def create_and_check_xlm_simple_qa( method create_and_check_xlm_qa (line 197) | def create_and_check_xlm_qa( method create_and_check_xlm_sequence_classif (line 249) | def create_and_check_xlm_sequence_classif( method create_and_check_xlm_token_classif (line 270) | def create_and_check_xlm_token_classif( method create_and_check_xlm_for_multiple_choice (line 290) | def create_and_check_xlm_for_multiple_choice( method prepare_config_and_inputs_for_common (line 317) | def prepare_config_and_inputs_for_common(self): class XLMModelTest (line 335) | class XLMModelTest(ModelTesterMixin, GenerationTesterMixin, unittest.Tes... method _prepare_for_class (line 355) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 369) | def setUp(self): method test_config (line 373) | def test_config(self): method test_xlm_model (line 376) | def test_xlm_model(self): method test_xlm_lm_head (line 380) | def test_xlm_lm_head(self): method test_xlm_simple_qa (line 384) | def test_xlm_simple_qa(self): method test_xlm_qa (line 388) | def test_xlm_qa(self): method test_xlm_sequence_classif (line 392) | def test_xlm_sequence_classif(self): method test_xlm_token_classif (line 396) | def test_xlm_token_classif(self): method test_xlm_for_multiple_choice (line 400) | def test_xlm_for_multiple_choice(self): method _check_attentions_for_generate (line 404) | def _check_attentions_for_generate( method _check_hidden_states_for_generate (line 429) | def _check_hidden_states_for_generate( method test_model_from_pretrained (line 451) | def test_model_from_pretrained(self): class XLMModelLanguageGenerationTest (line 458) | class XLMModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlm_mlm_en_2048 (line 460) | def test_lm_generate_xlm_mlm_en_2048(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/xlm_prophetnet/test_modeling_xlm_prophetnet.py class XLMProphetNetModelIntegrationTest (line 30) | class XLMProphetNetModelIntegrationTest(unittest.TestCase): method test_pretrained_checkpoint_hidden_states (line 32) | def test_pretrained_checkpoint_hidden_states(self): method test_ntg_hidden_states (line 72) | def test_ntg_hidden_states(self): method test_xprophetnet_ntg_inference (line 96) | def test_xprophetnet_ntg_inference(self): FILE: benchmark/third_party/transformers/tests/models/xlm_prophetnet/test_tokenization_xlm_prophetnet.py class XLMProphetNetTokenizationTest (line 29) | class XLMProphetNetTokenizationTest(TokenizerTesterMixin, unittest.TestC... method setUp (line 35) | 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_full_tokenizer (line 61) | def test_full_tokenizer(self): method big_tokenizer (line 137) | def big_tokenizer(self): method test_tokenization_base_easy_symbols (line 141) | def test_tokenization_base_easy_symbols(self): method test_tokenizer_integration (line 147) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/xlm_roberta/test_modeling_flax_xlm_roberta.py class FlaxXLMRobertaModelIntegrationTest (line 31) | class FlaxXLMRobertaModelIntegrationTest(unittest.TestCase): method test_flax_xlm_roberta_base (line 33) | def test_flax_xlm_roberta_base(self): FILE: benchmark/third_party/transformers/tests/models/xlm_roberta/test_modeling_tf_xlm_roberta.py class TFFlaubertModelIntegrationTest (line 32) | class TFFlaubertModelIntegrationTest(unittest.TestCase): method test_output_embeds_base_model (line 34) | def test_output_embeds_base_model(self): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/tests/models/xlm_roberta_xl/test_modeling_xlm_roberta_xl.py class XLMRobertaXLModelTester (line 45) | class XLMRobertaXLModelTester: method __init__ (line 46) | def __init__( method prepare_config_and_inputs (line 73) | def prepare_config_and_inputs(self): method get_config (line 96) | def get_config(self): method prepare_config_and_inputs_for_decoder (line 111) | def prepare_config_and_inputs_for_decoder(self): method create_and_check_model (line 138) | def create_and_check_model( method create_and_check_model_as_decoder (line 151) | def create_and_check_model_as_decoder( method create_and_check_for_causal_lm (line 184) | def create_and_check_for_causal_lm( method create_and_check_decoder_model_past_large_inputs (line 202) | def create_and_check_decoder_model_past_large_inputs( method create_and_check_for_masked_lm (line 270) | def create_and_check_for_masked_lm( method create_and_check_for_token_classification (line 279) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 289) | def create_and_check_for_multiple_choice( method create_and_check_for_question_answering (line 307) | def create_and_check_for_question_answering( method prepare_config_and_inputs_for_common (line 323) | def prepare_config_and_inputs_for_common(self): class XLMRobertaXLModelTest (line 339) | class XLMRobertaXLModelTest(ModelTesterMixin, GenerationTesterMixin, uni... method setUp (line 356) | def setUp(self): method test_config (line 360) | def test_config(self): method test_model (line 363) | def test_model(self): method test_model_various_embeddings (line 367) | def test_model_various_embeddings(self): method test_model_as_decoder (line 373) | def test_model_as_decoder(self): method test_model_as_decoder_with_default_input_mask (line 377) | def test_model_as_decoder_with_default_input_mask(self): method test_for_causal_lm (line 405) | def test_for_causal_lm(self): method test_decoder_model_past_with_large_inputs (line 409) | def test_decoder_model_past_with_large_inputs(self): method test_for_masked_lm (line 413) | def test_for_masked_lm(self): method test_for_token_classification (line 417) | def test_for_token_classification(self): method test_for_multiple_choice (line 421) | def test_for_multiple_choice(self): method test_for_question_answering (line 425) | def test_for_question_answering(self): method test_create_position_ids_respects_padding_index (line 429) | def test_create_position_ids_respects_padding_index(self): method test_create_position_ids_from_inputs_embeds (line 448) | def test_create_position_ids_from_inputs_embeds(self): class XLMRobertaModelXLIntegrationTest (line 472) | class XLMRobertaModelXLIntegrationTest(unittest.TestCase): method test_xlm_roberta_xl (line 474) | def test_xlm_roberta_xl(self): method test_xlm_roberta_xxl (line 493) | def test_xlm_roberta_xxl(self): FILE: benchmark/third_party/transformers/tests/models/xlnet/test_modeling_tf_xlnet.py class TFXLNetModelTester (line 42) | class TFXLNetModelTester: method __init__ (line 43) | def __init__( method prepare_config_and_inputs (line 74) | def prepare_config_and_inputs(self): method set_seed (line 131) | def set_seed(self): method create_and_check_xlnet_base_model (line 135) | def create_and_check_xlnet_base_model( method create_and_check_xlnet_lm_head (line 168) | def create_and_check_xlnet_lm_head( method create_and_check_xlnet_qa (line 204) | def create_and_check_xlnet_qa( method create_and_check_xlnet_sequence_classif (line 230) | def create_and_check_xlnet_sequence_classif( method create_and_check_xlnet_for_token_classification (line 254) | def create_and_check_xlnet_for_token_classification( method create_and_check_xlnet_for_multiple_choice (line 282) | def create_and_check_xlnet_for_multiple_choice( method prepare_config_and_inputs_for_common (line 314) | def prepare_config_and_inputs_for_common(self): class TFXLNetModelTest (line 334) | class TFXLNetModelTest(TFModelTesterMixin, unittest.TestCase): method setUp (line 354) | def setUp(self): method test_config (line 358) | def test_config(self): method test_xlnet_base_model (line 361) | def test_xlnet_base_model(self): method test_xlnet_lm_head (line 366) | def test_xlnet_lm_head(self): method test_xlnet_sequence_classif (line 371) | def test_xlnet_sequence_classif(self): method test_xlnet_token_classification (line 376) | def test_xlnet_token_classification(self): method test_xlnet_qa (line 380) | def test_xlnet_qa(self): method test_xlnet_for_multiple_choice (line 385) | def test_xlnet_for_multiple_choice(self): method test_model_from_pretrained (line 390) | def test_model_from_pretrained(self): method test_loss_computation (line 396) | def test_loss_computation(self): class TFXLNetModelLanguageGenerationTest (line 460) | class TFXLNetModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlnet_base_cased (line 462) | def test_lm_generate_xlnet_base_cased(self): FILE: benchmark/third_party/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, unittest.T... method _prepare_for_class (line 533) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 547) | def setUp(self): method test_config (line 551) | def test_config(self): method test_xlnet_base_model (line 554) | def test_xlnet_base_model(self): method test_xlnet_base_model_use_mems (line 559) | def test_xlnet_base_model_use_mems(self): method test_seq_classification_use_mems_train (line 565) | def test_seq_classification_use_mems_train(self): method test_xlnet_base_model_with_att_output (line 569) | def test_xlnet_base_model_with_att_output(self): method test_xlnet_lm_head (line 574) | def test_xlnet_lm_head(self): method test_xlnet_sequence_classif (line 579) | def test_xlnet_sequence_classif(self): method test_xlnet_token_classif (line 584) | def test_xlnet_token_classif(self): method test_xlnet_qa (line 589) | def test_xlnet_qa(self): method test_retain_grad_hidden_states_attentions (line 594) | def test_retain_grad_hidden_states_attentions(self): method _mock_init_weights (line 599) | def _mock_init_weights(self, module): method _check_hidden_states_for_generate (line 610) | def _check_hidden_states_for_generate( method _check_attentions_for_generate (line 633) | def _check_attentions_for_generate( method test_model_from_pretrained (line 665) | def test_model_from_pretrained(self): class XLNetModelLanguageGenerationTest (line 672) | class XLNetModelLanguageGenerationTest(unittest.TestCase): method test_lm_generate_xlnet_base_cased (line 674) | def test_lm_generate_xlnet_base_cased(self): FILE: benchmark/third_party/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 44) | def test_convert_token_and_id(self): method test_get_vocab (line 52) | def test_get_vocab(self): method test_vocab_size (line 60) | def test_vocab_size(self): method test_full_tokenizer (line 63) | def test_full_tokenizer(self): method test_tokenizer_lower (line 129) | def test_tokenizer_lower(self): method test_tokenizer_no_lower (line 160) | def test_tokenizer_no_lower(self): method test_sequence_builders (line 190) | def test_sequence_builders(self): method test_tokenizer_integration (line 203) | def test_tokenizer_integration(self): FILE: benchmark/third_party/transformers/tests/models/yolos/test_feature_extraction_yolos.py class YolosFeatureExtractionTester (line 38) | class YolosFeatureExtractionTester(unittest.TestCase): method __init__ (line 39) | def __init__( method prepare_feat_extract_dict (line 65) | def prepare_feat_extract_dict(self): method get_expected_values (line 75) | def get_expected_values(self, image_inputs, batched=False): class YolosFeatureExtractionTest (line 109) | class YolosFeatureExtractionTest(FeatureExtractionSavingTestMixin, unitt... method setUp (line 113) | def setUp(self): method feat_extract_dict (line 117) | def feat_extract_dict(self): method test_feat_extract_properties (line 120) | def test_feat_extract_properties(self): method test_batch_feature (line 129) | def test_batch_feature(self): method test_call_pil (line 132) | def test_call_pil(self): method test_call_numpy (line 164) | def test_call_numpy(self): method test_call_pytorch (line 197) | def test_call_pytorch(self): method test_equivalence_padding (line 230) | def test_equivalence_padding(self): method test_call_pytorch_with_coco_detection_annotations (line 248) | def test_call_pytorch_with_coco_detection_annotations(self): method test_call_pytorch_with_coco_panoptic_annotations (line 292) | def test_call_pytorch_with_coco_panoptic_annotations(self): FILE: benchmark/third_party/transformers/tests/models/yolos/test_modeling_yolos.py class YolosModelTester (line 43) | class YolosModelTester: 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_model (line 129) | def create_and_check_model(self, config, pixel_values, labels): method create_and_check_for_object_detection (line 138) | def create_and_check_for_object_detection(self, config, pixel_values, ... method prepare_config_and_inputs_for_common (line 155) | def prepare_config_and_inputs_for_common(self): class YolosModelTest (line 163) | class YolosModelTest(ModelTesterMixin, unittest.TestCase): method _prepare_for_class (line 177) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method setUp (line 196) | def setUp(self): method test_config (line 200) | def test_config(self): method test_inputs_embeds (line 203) | def test_inputs_embeds(self): method test_model_common_attributes (line 207) | def test_model_common_attributes(self): method test_forward_signature (line 216) | def test_forward_signature(self): method test_model (line 228) | def test_model(self): method test_attention_outputs (line 232) | def test_attention_outputs(self): method test_hidden_states_output (line 287) | def test_hidden_states_output(self): method test_for_object_detection (line 323) | def test_for_object_detection(self): method test_model_from_pretrained (line 328) | def test_model_from_pretrained(self): function prepare_img (line 335) | def prepare_img(): class YolosModelIntegrationTest (line 342) | class YolosModelIntegrationTest(unittest.TestCase): method default_feature_extractor (line 344) | def default_feature_extractor(self): method test_inference_object_detection_head (line 348) | def test_inference_object_detection_head(self): FILE: benchmark/third_party/transformers/tests/models/yoso/test_modeling_yoso.py class YosoModelTester (line 41) | class YosoModelTester: 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 get_pipeline_config (line 129) | def get_pipeline_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 172) | def create_and_check_model_as_decoder( method create_and_check_for_masked_lm (line 204) | def create_and_check_for_masked_lm( method create_and_check_for_question_answering (line 213) | def create_and_check_for_question_answering( method create_and_check_for_sequence_classification (line 229) | def create_and_check_for_sequence_classification( method create_and_check_for_token_classification (line 239) | def create_and_check_for_token_classification( method create_and_check_for_multiple_choice (line 249) | def create_and_check_for_multiple_choice( method prepare_config_and_inputs_for_common (line 267) | def prepare_config_and_inputs_for_common(self): class YosoModelTest (line 283) | class YosoModelTest(ModelTesterMixin, unittest.TestCase): 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_model_various_embeddings (line 314) | def test_model_various_embeddings(self): method test_for_masked_lm (line 320) | def test_for_masked_lm(self): method test_for_multiple_choice (line 324) | def test_for_multiple_choice(self): method test_for_question_answering (line 328) | def test_for_question_answering(self): method test_for_sequence_classification (line 332) | def test_for_sequence_classification(self): method test_for_token_classification (line 336) | def test_for_token_classification(self): method test_model_from_pretrained (line 341) | def test_model_from_pretrained(self): method test_attention_outputs (line 346) | def test_attention_outputs(self): class YosoModelIntegrationTest (line 351) | class YosoModelIntegrationTest(unittest.TestCase): method test_inference_no_head (line 353) | def test_inference_no_head(self): method test_inference_masked_lm (line 370) | def test_inference_masked_lm(self): method test_inference_masked_lm_long_input (line 389) | def test_inference_masked_lm_long_input(self): FILE: benchmark/third_party/transformers/tests/onnx/test_features.py class DetermineFrameworkTest (line 12) | class DetermineFrameworkTest(TestCase): method setUp (line 17) | def setUp(self): method _setup_pt_ckpt (line 22) | def _setup_pt_ckpt(self, save_dir): method _setup_tf_ckpt (line 26) | def _setup_tf_ckpt(self, save_dir): method test_framework_provided (line 30) | def test_framework_provided(self): method test_checkpoint_provided (line 53) | def test_checkpoint_provided(self): method test_from_environment (line 76) | def test_from_environment(self): FILE: benchmark/third_party/transformers/tests/onnx/test_onnx.py class FuncContiguousArgs (line 30) | class FuncContiguousArgs: method forward (line 31) | def forward(self, input_ids, token_type_ids, attention_mask): class FuncNonContiguousArgs (line 35) | class FuncNonContiguousArgs: method forward (line 36) | def forward(self, input_ids, some_other_args, token_type_ids, attentio... class OnnxExportTestCase (line 40) | class OnnxExportTestCase(unittest.TestCase): method test_export_tensorflow (line 49) | def test_export_tensorflow(self): method test_export_pytorch (line 55) | def test_export_pytorch(self): method test_export_custom_bert_model (line 61) | def test_export_custom_bert_model(self): method test_quantize_tf (line 77) | def test_quantize_tf(self): method test_quantize_pytorch (line 88) | def test_quantize_pytorch(self): method _test_export (line 97) | def _test_export(self, model, framework, opset, tokenizer=None, **mode... method test_infer_dynamic_axis_pytorch (line 117) | def test_infer_dynamic_axis_pytorch(self): method test_infer_dynamic_axis_tf (line 130) | def test_infer_dynamic_axis_tf(self): method _test_infer_dynamic_axis (line 140) | def _test_infer_dynamic_axis(self, model, tokenizer, framework): method test_ensure_valid_input (line 160) | def test_ensure_valid_input(self): method test_generate_identified_name (line 193) | def test_generate_identified_name(self): FILE: benchmark/third_party/transformers/tests/onnx/test_onnx_v2.py class OnnxUtilsTestCaseV2 (line 37) | class OnnxUtilsTestCaseV2(TestCase): method test_ensure_pytorch_version_ge_1_8_0 (line 44) | def test_ensure_pytorch_version_ge_1_8_0(self, mock_is_torch_onnx_dict... method test_compute_effective_axis_dimension (line 51) | def test_compute_effective_axis_dimension(self): method test_compute_parameters_serialized_size (line 74) | def test_compute_parameters_serialized_size(self): method test_flatten_output_collection_property (line 81) | def test_flatten_output_collection_property(self): class OnnxConfigTestCaseV2 (line 98) | class OnnxConfigTestCaseV2(TestCase): method test_use_external_data_format (line 106) | def test_use_external_data_format(self): class OnnxConfigWithPastTestCaseV2 (line 128) | class OnnxConfigWithPastTestCaseV2(TestCase): method test_use_past (line 141) | def test_use_past(self): method test_values_override (line 158) | def test_values_override(self): function _get_models_to_test (line 266) | def _get_models_to_test(export_models_list): class OnnxExportTestCaseV2 (line 287) | class OnnxExportTestCaseV2(TestCase): method _onnx_export (line 292) | def _onnx_export( method _onnx_export_encoder_decoder_models (line 355) | def _onnx_export_encoder_decoder_models( method test_pytorch_export (line 424) | def test_pytorch_export(self, test_name, name, model_name, feature, on... method test_pytorch_export_on_cuda (line 432) | def test_pytorch_export_on_cuda(self, test_name, name, model_name, fea... method test_pytorch_export_encoder_decoder_models (line 440) | def test_pytorch_export_encoder_decoder_models( method test_pytorch_export_encoder_decoder_models_on_cuda (line 450) | def test_pytorch_export_encoder_decoder_models_on_cuda( method test_pytorch_export_with_past (line 460) | def test_pytorch_export_with_past(self, test_name, name, model_name, f... method test_pytorch_export_seq2seq_with_past (line 466) | def test_pytorch_export_seq2seq_with_past( method test_tensorflow_export (line 475) | def test_tensorflow_export(self, test_name, name, model_name, feature,... method test_tensorflow_export_with_past (line 481) | def test_tensorflow_export_with_past(self, test_name, name, model_name... method test_tensorflow_export_seq2seq_with_past (line 487) | def test_tensorflow_export_seq2seq_with_past( class StableDropoutTestCase (line 493) | class StableDropoutTestCase(TestCase): method test_training (line 498) | def test_training(self): FILE: benchmark/third_party/transformers/tests/optimization/test_optimization.py function unwrap_schedule (line 41) | def unwrap_schedule(scheduler, num_steps=10): function unwrap_and_save_reload_schedule (line 49) | def unwrap_and_save_reload_schedule(scheduler, num_steps=10): class OptimizationTest (line 65) | class OptimizationTest(unittest.TestCase): method assertListAlmostEqual (line 66) | def assertListAlmostEqual(self, list1, list2, tol): method test_adam_w (line 71) | def test_adam_w(self): method test_adafactor (line 85) | def test_adafactor(self): class ScheduleInitTest (line 112) | class ScheduleInitTest(unittest.TestCase): method assertListAlmostEqual (line 117) | def assertListAlmostEqual(self, list1, list2, tol, msg=None): method test_schedulers (line 122) | def test_schedulers(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/pipelines/test_pipelines_audio_classification.py class AudioClassificationPipelineTests (line 27) | class AudioClassificationPipelineTests(unittest.TestCase, metaclass=Pipe... method get_test_pipeline (line 30) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 38) | def run_pipeline_test(self, audio_classifier, examples): method run_torchaudio (line 60) | def run_torchaudio(self, audio_classifier): method test_small_model_pt (line 76) | def test_small_model_pt(self): method test_large_model_pt (line 95) | def test_large_model_pt(self): method test_small_model_tf (line 117) | def test_small_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_automatic_speech_recognition.py class AutomaticSpeechRecognitionPipelineTests (line 56) | class AutomaticSpeechRecognitionPipelineTests(unittest.TestCase, metacla... method get_test_pipeline (line 63) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 80) | def run_pipeline_test(self, speech_recognizer, examples): method test_pt_defaults (line 133) | def test_pt_defaults(self): method test_small_model_pt (line 137) | def test_small_model_pt(self): method test_small_model_pt_seq2seq (line 160) | def test_small_model_pt_seq2seq(self): method test_large_model_pt_with_lm (line 173) | def test_large_model_pt_with_lm(self): method test_small_model_tf (line 232) | def test_small_model_tf(self): method test_torch_small_no_tokenizer_files (line 236) | def test_torch_small_no_tokenizer_files(self): method test_torch_large (line 247) | def test_torch_large(self): method test_torch_speech_encoder_decoder (line 266) | def test_torch_speech_encoder_decoder(self): method test_simple_wav2vec2 (line 281) | def test_simple_wav2vec2(self): method test_simple_s2t (line 306) | def test_simple_s2t(self): method test_simple_whisper_asr (line 333) | def test_simple_whisper_asr(self): method test_simple_whisper_translation (line 350) | def test_simple_whisper_translation(self): method test_xls_r_to_en (line 382) | def test_xls_r_to_en(self): method test_xls_r_from_en (line 398) | def test_xls_r_from_en(self): method test_speech_to_text_leveraged (line 414) | def test_speech_to_text_leveraged(self): method test_chunking_fast (line 430) | def test_chunking_fast(self): method test_return_timestamps_ctc_fast (line 447) | def test_return_timestamps_ctc_fast(self): method test_chunking_fast_with_lm (line 491) | def test_chunking_fast_with_lm(self): method test_with_lm_fast (line 519) | def test_with_lm_fast(self): method test_with_local_lm_fast (line 545) | def test_with_local_lm_fast(self): method test_chunking_and_timestamps (line 566) | def test_chunking_and_timestamps(self): method test_chunking_with_lm (line 678) | def test_chunking_with_lm(self): method test_chunk_iterator (line 695) | def test_chunk_iterator(self): method test_chunk_iterator_stride (line 731) | def test_chunk_iterator_stride(self): method test_stride (line 776) | def test_stride(self): function require_ffmpeg (line 798) | def require_ffmpeg(test_case): function bytes_iter (line 814) | def bytes_iter(chunk_size, chunks): class AudioUtilsTest (line 820) | class AudioUtilsTest(unittest.TestCase): method test_chunk_bytes_iter_too_big (line 821) | def test_chunk_bytes_iter_too_big(self): method test_chunk_bytes_iter (line 827) | def test_chunk_bytes_iter(self): method test_chunk_bytes_iter_stride (line 834) | def test_chunk_bytes_iter_stride(self): method test_chunk_bytes_iter_stride_stream (line 845) | def test_chunk_bytes_iter_stride_stream(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_common.py function get_checkpoint_from_architecture (line 82) | def get_checkpoint_from_architecture(architecture): function get_tiny_config_from_class (line 95) | def get_tiny_config_from_class(configuration_class): function get_tiny_tokenizer_from_checkpoint (line 130) | def get_tiny_tokenizer_from_checkpoint(checkpoint): function get_tiny_feature_extractor_from_checkpoint (line 145) | def get_tiny_feature_extractor_from_checkpoint(checkpoint, tiny_config, ... class ANY (line 167) | class ANY: method __init__ (line 168) | def __init__(self, *_types): method __eq__ (line 171) | def __eq__(self, other): method __repr__ (line 174) | def __repr__(self): class PipelineTestCaseMeta (line 178) | class PipelineTestCaseMeta(type): method __new__ (line 179) | def __new__(mcs, name, bases, dct): class CommonPipelineTest (line 318) | class CommonPipelineTest(unittest.TestCase): method test_pipeline_iteration (line 320) | def test_pipeline_iteration(self): method test_check_task_auto_inference (line 344) | def test_check_task_auto_inference(self): method test_pipeline_batch_size_global (line 350) | def test_pipeline_batch_size_global(self): method test_pipeline_override (line 360) | def test_pipeline_override(self): method test_check_task (line 368) | def test_check_task(self): method test_iterator_data (line 377) | def test_iterator_data(self): method test_iterator_data_tf (line 399) | def test_iterator_data_tf(self): method test_unbatch_attentions_hidden_states (line 413) | def test_unbatch_attentions_hidden_states(self): class PipelineScikitCompatTest (line 426) | class PipelineScikitCompatTest(unittest.TestCase): method test_pipeline_predict_pt (line 428) | def test_pipeline_predict_pt(self): method test_pipeline_predict_tf (line 440) | def test_pipeline_predict_tf(self): method test_pipeline_transform_pt (line 452) | def test_pipeline_transform_pt(self): method test_pipeline_transform_tf (line 464) | def test_pipeline_transform_tf(self): class PipelinePadTest (line 476) | class PipelinePadTest(unittest.TestCase): method test_pipeline_padding (line 478) | def test_pipeline_padding(self): method test_pipeline_image_padding (line 514) | def test_pipeline_image_padding(self): method test_pipeline_offset_mapping (line 537) | def test_pipeline_offset_mapping(self): class PipelineUtilsTest (line 557) | class PipelineUtilsTest(unittest.TestCase): method test_pipeline_dataset (line 559) | def test_pipeline_dataset(self): method test_pipeline_iterator (line 573) | def test_pipeline_iterator(self): method test_pipeline_iterator_no_len (line 588) | def test_pipeline_iterator_no_len(self): method test_pipeline_batch_unbatch_iterator (line 606) | def test_pipeline_batch_unbatch_iterator(self): method test_pipeline_batch_unbatch_iterator_tensors (line 620) | def test_pipeline_batch_unbatch_iterator_tensors(self): method test_pipeline_chunk_iterator (line 638) | def test_pipeline_chunk_iterator(self): method test_pipeline_pack_iterator (line 654) | def test_pipeline_pack_iterator(self): method test_pipeline_pack_unbatch_iterator (line 687) | def test_pipeline_pack_unbatch_iterator(self): method test_load_default_pipelines_pt (line 713) | def test_load_default_pipelines_pt(self): method test_load_default_pipelines_tf (line 728) | def test_load_default_pipelines_tf(self): method test_load_default_pipelines_pt_table_qa (line 744) | def test_load_default_pipelines_pt_table_qa(self): method test_load_default_pipelines_tf_table_qa (line 753) | def test_load_default_pipelines_tf_table_qa(self): method check_default_pipeline (line 759) | def check_default_pipeline(self, task, framework, set_seed_fn, check_m... method check_models_equal_pt (line 817) | def check_models_equal_pt(self, model1, model2): method check_models_equal_tf (line 825) | def check_models_equal_tf(self, model1, model2): class CustomPipeline (line 834) | class CustomPipeline(Pipeline): method _sanitize_parameters (line 835) | def _sanitize_parameters(self, **kwargs): method preprocess (line 841) | def preprocess(self, text, maybe_arg=2): method _forward (line 845) | def _forward(self, model_inputs): method postprocess (line 849) | def postprocess(self, model_outputs): class CustomPipelineTest (line 853) | class CustomPipelineTest(unittest.TestCase): method test_warning_logs (line 854) | def test_warning_logs(self): method test_register_pipeline (line 871) | def test_register_pipeline(self): method test_dynamic_pipeline (line 893) | def test_dynamic_pipeline(self): method test_cached_pipeline_has_minimum_calls_to_head (line 945) | def test_cached_pipeline_has_minimum_calls_to_head(self): class DynamicPipelineTester (line 957) | class DynamicPipelineTester(unittest.TestCase): method setUpClass (line 961) | def setUpClass(cls): method tearDownClass (line 967) | def tearDownClass(cls): method test_push_to_hub_dynamic_pipeline (line 973) | def test_push_to_hub_dynamic_pipeline(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_conversational.py class ConversationalPipelineTests (line 40) | class ConversationalPipelineTests(unittest.TestCase, metaclass=PipelineT... method get_test_pipeline (line 56) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 60) | def run_pipeline_test(self, conversation_agent, _): method test_integration_torch_conversation (line 110) | def test_integration_torch_conversation(self): method test_integration_torch_conversation_truncated_history (line 142) | def test_integration_torch_conversation_truncated_history(self): method test_small_model_pt (line 167) | def test_small_model_pt(self): method test_small_model_tf (line 176) | def test_small_model_tf(self): method test_integration_torch_conversation_dialogpt_input_ids (line 186) | def test_integration_torch_conversation_dialogpt_input_ids(self): method test_integration_torch_conversation_blenderbot_400M_input_ids (line 203) | def test_integration_torch_conversation_blenderbot_400M_input_ids(self): method test_integration_torch_conversation_blenderbot_400M (line 273) | def test_integration_torch_conversation_blenderbot_400M(self): method test_integration_torch_conversation_encoder_decoder (line 311) | def test_integration_torch_conversation_encoder_decoder(self): method test_from_pipeline_conversation (line 358) | def test_from_pipeline_conversation(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_depth_estimation.py class Image (line 32) | class Image: method open (line 34) | def open(*args, **kwargs): function hashimage (line 38) | def hashimage(image: Image) -> str: class DepthEstimationPipelineTests (line 46) | class DepthEstimationPipelineTests(unittest.TestCase, metaclass=Pipeline... method get_test_pipeline (line 50) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 57) | def run_pipeline_test(self, depth_estimator, examples): method test_small_model_tf (line 88) | def test_small_model_tf(self): method test_large_model_pt (line 93) | def test_large_model_pt(self): method test_small_model_pt (line 105) | def test_small_model_pt(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_document_question_answering.py class Image (line 39) | class Image: method open (line 41) | def open(*args, **kwargs): function load_image (line 44) | def load_image(_): class DocumentQuestionAnsweringPipelineTests (line 57) | class DocumentQuestionAnsweringPipelineTests(unittest.TestCase, metaclas... method get_test_pipeline (line 62) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 92) | def run_pipeline_test(self, dqa_pipeline, examples): method test_small_model_pt (line 108) | def test_small_model_pt(self): method test_large_model_pt (line 153) | def test_large_model_pt(self): method test_large_model_pt_chunk (line 198) | def test_large_model_pt_chunk(self): method test_large_model_pt_layoutlm (line 244) | def test_large_model_pt_layoutlm(self): method test_large_model_pt_layoutlm_chunk (line 305) | def test_large_model_pt_layoutlm_chunk(self): method test_large_model_pt_donut (line 356) | def test_large_model_pt_donut(self): method test_small_model_tf (line 371) | def test_small_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_feature_extraction.py class FeatureExtractionPipelineTests (line 41) | class FeatureExtractionPipelineTests(unittest.TestCase, metaclass=Pipeli... 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, feature_extractor): method run_pipeline_test (line 199) | def run_pipeline_test(self, feature_extractor, examples): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_fill_mask.py class FillMaskPipelineTests (line 24) | class FillMaskPipelineTests(unittest.TestCase, metaclass=PipelineTestCas... method test_small_model_tf (line 29) | def test_small_model_tf(self): method test_small_model_pt (line 70) | def test_small_model_pt(self): method test_fp16_casting (line 133) | def test_fp16_casting(self): method test_large_model_pt (line 147) | def test_large_model_pt(self): method test_large_model_tf (line 153) | def test_large_model_tf(self): method run_large_test (line 157) | def run_large_test(self, unmasker): method test_model_no_pad_pt (line 196) | def test_model_no_pad_pt(self): method test_model_no_pad_tf (line 203) | def test_model_no_pad_tf(self): method get_test_pipeline (line 209) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 219) | def run_pipeline_test(self, fill_masker, examples): method run_test_targets (line 282) | def run_test_targets(self, model, tokenizer): method run_test_top_k (line 330) | def run_test_top_k(self, model, tokenizer): method run_test_top_k_targets (line 352) | def run_test_top_k_targets(self, model, tokenizer): method fill_mask_with_duplicate_targets_and_top_k (line 368) | def fill_mask_with_duplicate_targets_and_top_k(self, model, tokenizer): method fill_mask_with_multiple_masks (line 380) | def fill_mask_with_multiple_masks(self, model, tokenizer): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_image_classification.py class Image (line 40) | class Image: method open (line 42) | def open(*args, **kwargs): class ImageClassificationPipelineTests (line 48) | class ImageClassificationPipelineTests(unittest.TestCase, metaclass=Pipe... method get_test_pipeline (line 52) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 60) | def run_pipeline_test(self, image_classifier, examples): method test_small_model_pt (line 115) | def test_small_model_pt(self): method test_small_model_tf (line 141) | def test_small_model_tf(self): method test_custom_tokenizer (line 166) | def test_custom_tokenizer(self): method test_perceiver (line 178) | def test_perceiver(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_image_segmentation.py class Image (line 45) | class Image: method open (line 47) | def open(*args, **kwargs): function hashimage (line 51) | def hashimage(image: Image) -> str: function mask_to_test_readable (line 56) | def mask_to_test_readable(mask: Image) -> Dict: class ImageSegmentationPipelineTests (line 66) | class ImageSegmentationPipelineTests(unittest.TestCase, metaclass=Pipeli... method get_test_pipeline (line 76) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 83) | def run_pipeline_test(self, image_segmenter, examples): method test_small_model_tf (line 153) | def test_small_model_tf(self): method test_small_model_pt_no_panoptic (line 157) | def test_small_model_pt_no_panoptic(self): method test_small_model_pt (line 180) | def test_small_model_pt(self): method test_small_model_pt_semantic (line 287) | def test_small_model_pt_semantic(self): method test_integration_torch_image_segmentation (line 313) | def test_integration_torch_image_segmentation(self): method test_threshold (line 450) | def test_threshold(self): method test_maskformer (line 513) | def test_maskformer(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_image_to_text.py class Image (line 28) | class Image: method open (line 30) | def open(*args, **kwargs): class ImageToTextPipelineTests (line 35) | class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTest... method get_test_pipeline (line 39) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 47) | def run_pipeline_test(self, pipe, examples): method test_small_model_tf (line 58) | def test_small_model_tf(self): method test_small_model_pt (line 96) | def test_small_model_pt(self): method test_large_model_pt (line 129) | def test_large_model_pt(self): method test_large_model_tf (line 147) | def test_large_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_object_detection.py class Image (line 34) | class Image: method open (line 36) | def open(*args, **kwargs): class ObjectDetectionPipelineTests (line 43) | class ObjectDetectionPipelineTests(unittest.TestCase, metaclass=Pipeline... method get_test_pipeline (line 46) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 50) | def run_pipeline_test(self, object_detector, examples): method test_small_model_tf (line 95) | def test_small_model_tf(self): method test_small_model_pt (line 99) | def test_small_model_pt(self): method test_large_model_pt (line 140) | def test_large_model_pt(self): method test_integration_torch_object_detection (line 187) | def test_integration_torch_object_detection(self): method test_threshold (line 232) | def test_threshold(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_question_answering.py class QAPipelineTests (line 30) | class QAPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta): method get_test_pipeline (line 34) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 47) | def run_pipeline_test(self, question_answerer, _): method test_small_model_pt (line 116) | def test_small_model_pt(self): method test_small_model_pt_iterator (line 128) | def test_small_model_pt_iterator(self): method test_small_model_pt_softmax_trick (line 140) | def test_small_model_pt_softmax_trick(self): method test_small_model_japanese (line 175) | def test_small_model_japanese(self): method test_small_model_long_context_cls_slow (line 198) | def test_small_model_long_context_cls_slow(self): method test_small_model_tf (line 212) | def test_small_model_tf(self): method test_large_model_pt (line 224) | def test_large_model_pt(self): method test_large_model_issue (line 236) | def test_large_model_issue(self): method test_large_model_course (line 289) | def test_large_model_course(self): method test_large_model_tf (line 338) | def test_large_model_tf(self): class QuestionAnsweringArgumentHandlerTests (line 348) | class QuestionAnsweringArgumentHandlerTests(unittest.TestCase): method test_argument_handler (line 349) | def test_argument_handler(self): method test_argument_handler_error_handling (line 405) | def test_argument_handler_error_handling(self): method test_argument_handler_old_format (line 463) | def test_argument_handler_old_format(self): method test_argument_handler_error_handling_odd (line 474) | def test_argument_handler_error_handling_odd(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_summarization.py class SummarizationPipelineTests (line 35) | class SummarizationPipelineTests(unittest.TestCase, metaclass=PipelineTe... method get_test_pipeline (line 39) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 43) | def run_pipeline_test(self, summarizer, _): method test_small_model_pt (line 65) | def test_small_model_pt(self): method test_small_model_tf (line 78) | def test_small_model_tf(self): method test_integration_torch_summarization (line 92) | def test_integration_torch_summarization(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_table_question_answering.py class TQAPipelineTests (line 37) | class TQAPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta): method test_small_model_tf (line 46) | def test_small_model_tf(self): method test_small_model_pt (line 149) | def test_small_model_pt(self): method test_slow_tokenizer_sqa_pt (line 252) | def test_slow_tokenizer_sqa_pt(self): method test_slow_tokenizer_sqa_tf (line 374) | def test_slow_tokenizer_sqa_tf(self): method test_integration_wtq_pt (line 494) | def test_integration_wtq_pt(self): method test_integration_wtq_tf (line 540) | def test_integration_wtq_tf(self): method test_integration_sqa_pt (line 588) | def test_integration_sqa_pt(self): method test_integration_sqa_tf (line 613) | def test_integration_sqa_tf(self): method test_large_model_pt_tapex (line 640) | def test_large_model_pt_tapex(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_text2text_generation.py class Text2TextGenerationPipelineTests (line 33) | class Text2TextGenerationPipelineTests(unittest.TestCase, metaclass=Pipe... method get_test_pipeline (line 37) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 41) | def run_pipeline_test(self, generator, _): method test_small_model_pt (line 71) | def test_small_model_pt(self): method test_small_model_tf (line 122) | def test_small_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_text_classification.py class TextClassificationPipelineTests (line 28) | class TextClassificationPipelineTests(unittest.TestCase, metaclass=Pipel... method test_small_model_pt (line 33) | def test_small_model_pt(self): method test_accepts_torch_device (line 86) | def test_accepts_torch_device(self): method test_small_model_tf (line 100) | def test_small_model_tf(self): method test_pt_bert (line 110) | def test_pt_bert(self): method test_tf_bert (line 122) | def test_tf_bert(self): method get_test_pipeline (line 132) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 136) | def run_pipeline_test(self, text_classifier, _): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_text_generation.py class TextGenerationPipelineTests (line 30) | class TextGenerationPipelineTests(unittest.TestCase, metaclass=PipelineT... method test_small_model_pt (line 35) | def test_small_model_pt(self): method test_small_model_tf (line 106) | def test_small_model_tf(self): method get_test_pipeline (line 146) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method test_stop_sequence_stopping_criteria (line 150) | def test_stop_sequence_stopping_criteria(self): method run_pipeline_test (line 162) | def run_pipeline_test(self, text_generator, _): method test_small_model_pt_bloom_accelerate (line 240) | def test_small_model_pt_bloom_accelerate(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_token_classification.py class TokenClassificationPipelineTests (line 36) | class TokenClassificationPipelineTests(unittest.TestCase, metaclass=Pipe... method get_test_pipeline (line 40) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 44) | def run_pipeline_test(self, token_classifier, _): method run_aggregation_strategy (line 103) | def run_aggregation_strategy(self, model, tokenizer): method test_spanish_bert (line 193) | def test_spanish_bert(self): method test_gpu (line 257) | def test_gpu(self): method test_dbmdz_english (line 270) | def test_dbmdz_english(self): method test_aggregation_strategy_byte_level_tokenizer (line 329) | def test_aggregation_strategy_byte_level_tokenizer(self): method test_aggregation_strategy_no_b_i_prefix (line 341) | def test_aggregation_strategy_no_b_i_prefix(self): method test_aggregation_strategy (line 394) | def test_aggregation_strategy(self): method test_aggregation_strategy_example2 (line 471) | def test_aggregation_strategy_example2(self): method test_aggregation_strategy_offsets_with_leading_space (line 534) | def test_aggregation_strategy_offsets_with_leading_space(self): method test_gather_pre_entities (line 547) | def test_gather_pre_entities(self): method test_word_heuristic_leading_space (line 592) | def test_word_heuristic_leading_space(self): method test_tf_only (line 627) | def test_tf_only(self): method test_small_model_tf (line 634) | def test_small_model_tf(self): method test_no_offset_tokenizer (line 647) | def test_no_offset_tokenizer(self): method test_small_model_pt (line 661) | def test_small_model_pt(self): method test_pt_ignore_subwords_slow_tokenizer_raises (line 713) | def test_pt_ignore_subwords_slow_tokenizer_raises(self): method test_simple (line 728) | def test_simple(self): class TokenClassificationArgumentHandlerTestCase (line 767) | class TokenClassificationArgumentHandlerTestCase(unittest.TestCase): method setUp (line 768) | def setUp(self): method test_simple (line 771) | def test_simple(self): method test_errors (line 792) | def test_errors(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_translation.py class TranslationPipelineTests (line 33) | class TranslationPipelineTests(unittest.TestCase, metaclass=PipelineTest... method get_test_pipeline (line 37) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 45) | def run_pipeline_test(self, translator, _): method test_small_model_pt (line 56) | def test_small_model_pt(self): method test_small_model_tf (line 72) | def test_small_model_tf(self): method test_en_to_de_pt (line 88) | def test_en_to_de_pt(self): method test_en_to_de_tf (line 104) | def test_en_to_de_tf(self): class TranslationNewFormatPipelineTests (line 120) | class TranslationNewFormatPipelineTests(unittest.TestCase): method test_default_translations (line 123) | def test_default_translations(self): method test_multilingual_translation (line 135) | def test_multilingual_translation(self): method test_translation_on_odd_language (line 156) | def test_translation_on_odd_language(self): method test_translation_default_language_selection (line 163) | def test_translation_default_language_selection(self): method test_translation_with_no_language_no_model_fails (line 172) | def test_translation_with_no_language_no_model_fails(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_visual_question_answering.py class Image (line 28) | class Image: method open (line 30) | def open(*args, **kwargs): class VisualQuestionAnsweringPipelineTests (line 36) | class VisualQuestionAnsweringPipelineTests(unittest.TestCase, metaclass=... method get_test_pipeline (line 39) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 53) | def run_pipeline_test(self, vqa_pipeline, examples): method test_small_model_pt (line 64) | def test_small_model_pt(self): method test_large_model_pt (line 81) | def test_large_model_pt(self): method test_small_model_tf (line 106) | def test_small_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_zero_shot.py class ZeroShotClassificationPipelineTests (line 29) | class ZeroShotClassificationPipelineTests(unittest.TestCase, metaclass=P... method get_test_pipeline (line 33) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 39) | def run_pipeline_test(self, classifier, _): method run_entailment_id (line 113) | def run_entailment_id(self, zero_shot_classifier: Pipeline): method test_truncation (line 134) | def test_truncation(self): method test_small_model_pt (line 148) | def test_small_model_pt(self): method test_small_model_tf (line 168) | def test_small_model_tf(self): method test_large_model_pt (line 189) | def test_large_model_pt(self): method test_large_model_tf (line 244) | def test_large_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_zero_shot_image_classification.py class Image (line 28) | class Image: method open (line 30) | def open(*args, **kwargs): class ZeroShotImageClassificationPipelineTests (line 35) | class ZeroShotImageClassificationPipelineTests(unittest.TestCase, metacl... method test_small_model_pt (line 66) | def test_small_model_pt(self): method test_small_model_tf (line 117) | def test_small_model_tf(self): method test_large_model_pt (line 169) | def test_large_model_pt(self): method test_large_model_tf (line 202) | def test_large_model_tf(self): FILE: benchmark/third_party/transformers/tests/pipelines/test_pipelines_zero_shot_object_detection.py class Image (line 27) | class Image: method open (line 29) | def open(*args, **kwargs): class ZeroShotObjectDetectionPipelineTests (line 35) | class ZeroShotObjectDetectionPipelineTests(unittest.TestCase, metaclass=... method get_test_pipeline (line 39) | def get_test_pipeline(self, model, tokenizer, feature_extractor): method run_pipeline_test (line 52) | def run_pipeline_test(self, object_detector, examples): method test_small_model_tf (line 71) | def test_small_model_tf(self): method test_small_model_pt (line 75) | def test_small_model_pt(self): method test_large_model_pt (line 163) | def test_large_model_pt(self): method test_large_model_tf (line 211) | def test_large_model_tf(self): method test_threshold (line 216) | def test_threshold(self): method test_top_k (line 238) | def test_top_k(self): FILE: benchmark/third_party/transformers/tests/repo_utils/test_check_copies.py class CopyCheckTester (line 53) | class CopyCheckTester(unittest.TestCase): method setUp (line 54) | def setUp(self): method tearDown (line 63) | def tearDown(self): method check_copy_consistency (line 67) | def check_copy_consistency(self, comment, class_name, class_code, over... method test_find_code_in_transformers (line 83) | def test_find_code_in_transformers(self): method test_is_copy_consistent (line 87) | def test_is_copy_consistent(self): method test_convert_to_localized_md (line 125) | def test_convert_to_localized_md(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/repo_utils/test_tests_fetcher.py class CheckDummiesTester (line 33) | class CheckDummiesTester(unittest.TestCase): method test_clean_code (line 34) | def test_clean_code(self): method test_checkout_commit (line 43) | def test_checkout_commit(self): method test_get_module_dependencies (line 50) | def test_get_module_dependencies(self): FILE: benchmark/third_party/transformers/tests/sagemaker/__init__.py function is_sagemaker_available (line 4) | def is_sagemaker_available(): FILE: benchmark/third_party/transformers/tests/sagemaker/conftest.py class SageMakerTestEnvironment (line 15) | class SageMakerTestEnvironment: method metric_definitions (line 33) | def metric_definitions(self) -> str: method base_job_name (line 48) | def base_job_name(self) -> str: method test_path (line 52) | def test_path(self) -> str: method image_uri (line 56) | def image_uri(self) -> str: function sm_env (line 64) | def sm_env(request): FILE: benchmark/third_party/transformers/tests/sagemaker/scripts/pytorch/run_ddp.py function parse_args (line 11) | def parse_args(): function main (line 21) | def main(): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/sagemaker/scripts/tensorflow/run_tf_dist.py function fit (line 23) | def fit(model, loss, opt, train_dataset, epochs, train_batch_size, max_s... function get_datasets (line 50) | def get_datasets(tokenizer, train_batch_size, eval_batch_size): FILE: benchmark/third_party/transformers/tests/sagemaker/test_multi_node_data_parallel.py class MultiNodeTest (line 49) | class MultiNodeTest(unittest.TestCase): method setUp (line 50) | def setUp(self): method create_estimator (line 59) | def create_estimator(self, instance_count): method save_results_as_csv (line 80) | def save_results_as_csv(self, job_name): method test_script (line 85) | def test_script(self, instance_count): FILE: benchmark/third_party/transformers/tests/sagemaker/test_multi_node_model_parallel.py class MultiNodeTest (line 42) | class MultiNodeTest(unittest.TestCase): method setUp (line 43) | def setUp(self): method create_estimator (line 52) | def create_estimator(self, instance_count): method save_results_as_csv (line 94) | def save_results_as_csv(self, job_name): method test_scripz (line 99) | def test_scripz(self, instance_count): FILE: benchmark/third_party/transformers/tests/sagemaker/test_single_node_gpu.py class SingleNodeTest (line 42) | class SingleNodeTest(unittest.TestCase): method setUp (line 43) | def setUp(self): method create_estimator (line 52) | def create_estimator(self, instance_count=1): method save_results_as_csv (line 68) | def save_results_as_csv(self, job_name): method test_glue (line 71) | def test_glue(self): FILE: benchmark/third_party/transformers/tests/test_configuration_common.py class ConfigTester (line 94) | class ConfigTester(object): method __init__ (line 95) | def __init__(self, parent, config_class=None, has_text_modality=True, ... method create_and_test_config_common_properties (line 101) | def create_and_test_config_common_properties(self): method create_and_test_config_to_json_string (line 137) | def create_and_test_config_to_json_string(self): method create_and_test_config_to_json_file (line 143) | def create_and_test_config_to_json_file(self): method create_and_test_config_from_and_save_pretrained (line 153) | def create_and_test_config_from_and_save_pretrained(self): method create_and_test_config_from_and_save_pretrained_subfolder (line 162) | def create_and_test_config_from_and_save_pretrained_subfolder(self): method create_and_test_config_with_num_labels (line 173) | def create_and_test_config_with_num_labels(self): method check_config_can_be_init_without_params (line 182) | def check_config_can_be_init_without_params(self): method check_config_arguments_init (line 188) | def check_config_arguments_init(self): method run_common_tests (line 208) | def run_common_tests(self): class ConfigPushToHubTester (line 220) | class ConfigPushToHubTester(unittest.TestCase): method setUpClass (line 222) | def setUpClass(cls): method tearDownClass (line 228) | def tearDownClass(cls): method test_push_to_hub (line 244) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 267) | def test_push_to_hub_in_organization(self): method test_push_to_hub_dynamic_config (line 292) | def test_push_to_hub_dynamic_config(self): class ConfigTestUtils (line 307) | class ConfigTestUtils(unittest.TestCase): method test_config_from_string (line 308) | def test_config_from_string(self): method test_config_common_kwargs_is_complete (line 324) | def test_config_common_kwargs_is_complete(self): method test_from_pretrained_subfolder (line 339) | def test_from_pretrained_subfolder(self): method test_cached_files_are_used_when_internet_is_down (line 348) | def test_cached_files_are_used_when_internet_is_down(self): method test_legacy_load_from_url (line 365) | def test_legacy_load_from_url(self): class ConfigurationVersioningTest (line 372) | class ConfigurationVersioningTest(unittest.TestCase): method test_local_versioning (line 373) | def test_local_versioning(self): method test_repo_versioning_before (line 395) | def test_repo_versioning_before(self): FILE: benchmark/third_party/transformers/tests/test_feature_extraction_common.py function prepare_image_inputs (line 48) | def prepare_image_inputs(feature_extract_tester, equal_resolution=False,... function prepare_video (line 90) | def prepare_video(feature_extract_tester, width=10, height=10, numpify=F... function prepare_video_inputs (line 107) | def prepare_video_inputs(feature_extract_tester, equal_resolution=False,... class FeatureExtractionSavingTestMixin (line 136) | class FeatureExtractionSavingTestMixin: method test_feat_extract_to_json_string (line 137) | def test_feat_extract_to_json_string(self): method test_feat_extract_to_json_file (line 143) | def test_feat_extract_to_json_file(self): method test_feat_extract_from_and_save_pretrained (line 153) | def test_feat_extract_from_and_save_pretrained(self): method test_init_without_params (line 163) | def test_init_without_params(self): class FeatureExtractorUtilTester (line 168) | class FeatureExtractorUtilTester(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 169) | def test_cached_files_are_used_when_internet_is_down(self): method test_legacy_load_from_url (line 185) | def test_legacy_load_from_url(self): class FeatureExtractorPushToHubTester (line 193) | class FeatureExtractorPushToHubTester(unittest.TestCase): method setUpClass (line 195) | def setUpClass(cls): method tearDownClass (line 201) | def tearDownClass(cls): method test_push_to_hub (line 217) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 238) | def test_push_to_hub_in_organization(self): method test_push_to_hub_dynamic_feature_extractor (line 259) | def test_push_to_hub_dynamic_feature_extractor(self): FILE: benchmark/third_party/transformers/tests/test_image_transforms.py function get_random_image (line 47) | def get_random_image(height, width, num_channels=3, channels_first=True): class ImageTransformsTester (line 54) | class ImageTransformsTester(unittest.TestCase): method test_to_pil_image (line 64) | def test_to_pil_image(self, name, image_shape, dtype): method test_to_pil_image_from_tensorflow (line 71) | def test_to_pil_image_from_tensorflow(self): method test_to_pil_image_from_torch (line 85) | def test_to_pil_image_from_torch(self): method test_to_pil_image_from_jax (line 99) | def test_to_pil_image_from_jax(self): method test_to_channel_dimension_format (line 113) | def test_to_channel_dimension_format(self): method test_get_resize_output_image_size (line 132) | def test_get_resize_output_image_size(self): method test_resize (line 159) | def test_resize(self): method test_normalize (line 178) | def test_normalize(self): method test_center_crop (line 200) | def test_center_crop(self): FILE: benchmark/third_party/transformers/tests/test_modeling_common.py function _config_zero_init (line 134) | def _config_zero_init(config): class ModelTesterMixin (line 147) | class ModelTesterMixin: method _prepare_for_class (line 165) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_save_load (line 222) | def test_save_load(self): method test_save_load_keys_to_ignore_on_save (line 248) | def test_save_load_keys_to_ignore_on_save(self): method test_gradient_checkpointing_backward_compatibility (line 277) | def test_gradient_checkpointing_backward_compatibility(self): method test_gradient_checkpointing_enable_disable (line 288) | def test_gradient_checkpointing_enable_disable(self): method _mock_init_weights (line 307) | def _mock_init_weights(self, module): method test_save_load_fast_init_from_base (line 313) | def test_save_load_fast_init_from_base(self): method test_save_load_fast_init_to_base (line 358) | def test_save_load_fast_init_to_base(self): method test_initialization (line 406) | def test_initialization(self): method test_determinism (line 420) | def test_determinism(self): method test_forward_signature (line 437) | def test_forward_signature(self): method test_training (line 463) | def test_training(self): method test_training_gradient_checkpointing (line 481) | def test_training_gradient_checkpointing(self): method test_attention_outputs (line 500) | def test_attention_outputs(self): method test_torchscript_simple (line 619) | def test_torchscript_simple(self): method test_torchscript_output_attentions (line 624) | def test_torchscript_output_attentions(self): method test_torchscript_output_hidden_state (line 630) | def test_torchscript_output_hidden_state(self): method clear_torch_jit_class_registry (line 636) | def clear_torch_jit_class_registry(self): method _create_and_check_torchscript (line 642) | def _create_and_check_torchscript(self, config, inputs_dict): method test_torch_fx (line 739) | def test_torch_fx(self): method test_torch_fx_output_loss (line 743) | def test_torch_fx_output_loss(self): method _create_and_check_torch_fx_tracing (line 747) | def _create_and_check_torch_fx_tracing(self, config, inputs_dict, outp... method test_headmasking (line 882) | def test_headmasking(self): method test_head_pruning (line 952) | def test_head_pruning(self): method test_head_pruning_save_load_from_pretrained (line 984) | def test_head_pruning_save_load_from_pretrained(self): method test_head_pruning_save_load_from_config_init (line 1020) | def test_head_pruning_save_load_from_config_init(self): method test_head_pruning_integration (line 1054) | def test_head_pruning_integration(self): method test_hidden_states_output (line 1114) | def test_hidden_states_output(self): method test_retain_grad_hidden_states_attentions (line 1167) | def test_retain_grad_hidden_states_attentions(self): method test_feed_forward_chunking (line 1226) | def test_feed_forward_chunking(self): method test_resize_position_vector_embeddings (line 1249) | def test_resize_position_vector_embeddings(self): method test_resize_tokens_embeddings (line 1328) | def test_resize_tokens_embeddings(self): method test_resize_embeddings_untied (line 1380) | def test_resize_embeddings_untied(self): method test_model_common_attributes (line 1431) | def test_model_common_attributes(self): method test_model_main_input_name (line 1441) | def test_model_main_input_name(self): method test_correct_missing_keys (line 1448) | def test_correct_missing_keys(self): method test_tie_model_weights (line 1464) | def test_tie_model_weights(self): method test_model_outputs_equivalence (line 1512) | def test_model_outputs_equivalence(self): method _make_attention_mask_non_null (line 1588) | def _make_attention_mask_non_null(self, inputs_dict): method _postprocessing_to_ignore_test_cases (line 1616) | def _postprocessing_to_ignore_test_cases(self, tf_outputs, pt_outputs,... method check_pt_tf_outputs (line 1647) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_tf_inputs_from_pt_inputs (line 1738) | def prepare_tf_inputs_from_pt_inputs(self, pt_inputs_dict): method check_pt_tf_models (line 1759) | def check_pt_tf_models(self, tf_model, pt_model, pt_inputs_dict): method test_pt_tf_model_equivalence (line 1788) | def test_pt_tf_model_equivalence(self): method assert_almost_equals (line 1866) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method check_pt_flax_outputs (line 1870) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_equivalence_pt_to_flax (line 1964) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 2036) | def test_equivalence_flax_to_pt(self): method test_inputs_embeds (line 2114) | def test_inputs_embeds(self): method test_multi_gpu_data_parallel_forward (line 2144) | def test_multi_gpu_data_parallel_forward(self): method test_model_parallelization (line 2169) | def test_model_parallelization(self): method test_model_parallel_equal_results (line 2231) | def test_model_parallel_equal_results(self): method test_model_parallel_beam_search (line 2265) | def test_model_parallel_beam_search(self): method check_device_map_is_respected (line 2292) | def check_device_map_is_respected(self, model, device_map): method test_disk_offload (line 2308) | def test_disk_offload(self): method test_cpu_offload (line 2343) | def test_cpu_offload(self): method test_model_parallelism (line 2378) | def test_model_parallelism(self): method test_problem_types (line 2411) | def test_problem_types(self): method test_load_with_mismatched_shapes (line 2458) | def test_load_with_mismatched_shapes(self): function ids_tensor (line 2506) | def ids_tensor(shape, vocab_size, rng=None, name=None): function random_attention_mask (line 2522) | def random_attention_mask(shape, rng=None, name=None): function floats_tensor (line 2529) | def floats_tensor(shape, scale=1.0, rng=None, name=None): function check_models_equal (line 2545) | def check_models_equal(model1, model2): class ModelUtilsTest (line 2555) | class ModelUtilsTest(TestCasePlus): method test_model_from_pretrained (line 2557) | def test_model_from_pretrained(self): method test_model_from_pretrained_subfolder (line 2582) | def test_model_from_pretrained_subfolder(self): method test_model_from_pretrained_subfolder_sharded (line 2597) | def test_model_from_pretrained_subfolder_sharded(self): method test_model_from_pretrained_hub_subfolder (line 2612) | def test_model_from_pretrained_hub_subfolder(self): method test_model_from_pretrained_hub_subfolder_sharded (line 2622) | def test_model_from_pretrained_hub_subfolder_sharded(self): method test_model_from_pretrained_with_different_pretrained_model_name (line 2632) | def test_model_from_pretrained_with_different_pretrained_model_name(se... method test_model_from_config_torch_dtype (line 2642) | def test_model_from_config_torch_dtype(self): method test_model_from_pretrained_torch_dtype (line 2661) | def test_model_from_pretrained_torch_dtype(self): method test_no_super_init_config_and_model (line 2714) | def test_no_super_init_config_and_model(self): method test_shard_checkpoint (line 2726) | def test_shard_checkpoint(self): method test_checkpoint_sharding_local (line 2791) | def test_checkpoint_sharding_local(self): method test_checkpoint_sharding_from_hub (line 2836) | def test_checkpoint_sharding_from_hub(self): method test_from_pretrained_low_cpu_mem_usage_functional (line 2844) | def test_from_pretrained_low_cpu_mem_usage_functional(self): method test_from_pretrained_low_cpu_mem_usage_measured (line 2857) | def test_from_pretrained_low_cpu_mem_usage_measured(self): method test_model_parallelism_gpt2 (line 2898) | def test_model_parallelism_gpt2(self): method test_from_pretrained_disk_offload_task_model (line 2914) | def test_from_pretrained_disk_offload_task_model(self): method test_cached_files_are_used_when_internet_is_down (line 2954) | def test_cached_files_are_used_when_internet_is_down(self): method test_load_from_one_file (line 2971) | def test_load_from_one_file(self): method test_legacy_load_from_url (line 2984) | def test_legacy_load_from_url(self): method test_safetensors_save_and_load (line 2992) | def test_safetensors_save_and_load(self): method test_safetensors_load_from_hub (line 3007) | def test_safetensors_load_from_hub(self): method test_safetensors_save_and_load_sharded (line 3016) | def test_safetensors_save_and_load_sharded(self): method test_safetensors_load_from_hub_sharded (line 3034) | def test_safetensors_load_from_hub_sharded(self): class ModelPushToHubTester (line 3045) | class ModelPushToHubTester(unittest.TestCase): method setUpClass (line 3047) | def setUpClass(cls): method tearDownClass (line 3053) | def tearDownClass(cls): method test_push_to_hub (line 3069) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 3091) | def test_push_to_hub_in_organization(self): method test_push_to_hub_dynamic_model (line 3115) | def test_push_to_hub_dynamic_model(self): FILE: benchmark/third_party/transformers/tests/test_modeling_flax_common.py function _config_zero_init (line 71) | def _config_zero_init(config): function ids_tensor (line 79) | def ids_tensor(shape, vocab_size, rng=None): function floats_tensor (line 97) | def floats_tensor(shape, scale=1.0, rng=None, name=None): function random_attention_mask (line 113) | def random_attention_mask(shape, rng=None): class FlaxModelTesterMixin (line 121) | class FlaxModelTesterMixin: method _prepare_for_class (line 129) | def _prepare_for_class(self, inputs_dict, model_class): method assert_almost_equals (line 143) | def assert_almost_equals(self, a: np.ndarray, b: np.ndarray, tol: float): method test_model_outputs_equivalence (line 147) | def test_model_outputs_equivalence(self): method check_pt_flax_outputs (line 177) | def check_pt_flax_outputs(self, fx_outputs, pt_outputs, model_class, t... method test_equivalence_pt_to_flax (line 271) | def test_equivalence_pt_to_flax(self): method test_equivalence_flax_to_pt (line 326) | def test_equivalence_flax_to_pt(self): method test_from_pretrained_save_pretrained (line 385) | def test_from_pretrained_save_pretrained(self): method test_save_load_from_base (line 414) | def test_save_load_from_base(self): method test_save_load_to_base (line 436) | def test_save_load_to_base(self): method test_save_load_from_base_pt (line 459) | def test_save_load_from_base_pt(self): method test_save_load_to_base_pt (line 488) | def test_save_load_to_base_pt(self): method test_save_load_bf16_to_base_pt (line 516) | def test_save_load_bf16_to_base_pt(self): method test_jit_compilation (line 544) | def test_jit_compilation(self): method test_forward_signature (line 568) | def test_forward_signature(self): method test_naming_convention (line 589) | def test_naming_convention(self): method test_hidden_states_output (line 600) | def test_hidden_states_output(self): method test_attention_outputs (line 647) | def test_attention_outputs(self): method test_load_with_mismatched_shapes (line 732) | def test_load_with_mismatched_shapes(self): method test_default_params_dtype (line 773) | def test_default_params_dtype(self): method test_to_bf16 (line 785) | def test_to_bf16(self): method test_to_fp16 (line 813) | def test_to_fp16(self): method test_to_fp32 (line 841) | def test_to_fp32(self): method test_save_load_in_fp16 (line 874) | def test_save_load_in_fp16(self): method test_save_load_in_bf16 (line 891) | def test_save_load_in_bf16(self): method test_model_main_input_name (line 908) | def test_model_main_input_name(self): method test_headmasking (line 915) | def test_headmasking(self): method test_no_automatic_init (line 962) | def test_no_automatic_init(self): method test_from_pretrained_with_no_automatic_init (line 997) | def test_from_pretrained_with_no_automatic_init(self): method test_checkpoint_sharding_from_hub (line 1049) | def test_checkpoint_sharding_from_hub(self): method test_checkpoint_sharding_local (line 1056) | def test_checkpoint_sharding_local(self): method test_from_sharded_pt (line 1103) | def test_from_sharded_pt(self): method test_gradient_checkpointing (line 1110) | def test_gradient_checkpointing(self): class FlaxModelPushToHubTester (line 1140) | class FlaxModelPushToHubTester(unittest.TestCase): method setUpClass (line 1142) | def setUpClass(cls): method tearDownClass (line 1148) | def tearDownClass(cls): method test_push_to_hub (line 1159) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 1191) | def test_push_to_hub_in_organization(self): function check_models_equal (line 1226) | def check_models_equal(model1, model2): class FlaxModelUtilsTest (line 1238) | class FlaxModelUtilsTest(unittest.TestCase): method test_model_from_pretrained_subfolder (line 1239) | def test_model_from_pretrained_subfolder(self): method test_model_from_pretrained_subfolder_sharded (line 1254) | def test_model_from_pretrained_subfolder_sharded(self): method test_model_from_pretrained_hub_subfolder (line 1269) | def test_model_from_pretrained_hub_subfolder(self): method test_model_from_pretrained_hub_subfolder_sharded (line 1280) | def test_model_from_pretrained_hub_subfolder_sharded(self): FILE: benchmark/third_party/transformers/tests/test_modeling_tf_common.py function _config_zero_init (line 121) | def _config_zero_init(config): function _return_type_has_loss (line 129) | def _return_type_has_loss(model): class TFModelTesterMixin (line 150) | class TFModelTesterMixin: method _prepare_for_class (line 161) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_initialization (line 215) | def test_initialization(self): method test_save_load (line 218) | def test_save_load(self): method test_save_load_config (line 232) | def test_save_load_config(self): method test_saved_model_creation (line 251) | def test_saved_model_creation(self): method test_prepare_serving_output (line 271) | def test_prepare_serving_output(self): method test_forward_signature (line 291) | def test_forward_signature(self): method test_onnx_compliancy (line 322) | def test_onnx_compliancy(self): method test_onnx_runtime_optimize (line 366) | def test_onnx_runtime_optimize(self): method test_keras_save_load (line 383) | def test_keras_save_load(self): method assert_outputs_same (line 435) | def assert_outputs_same(self, after_outputs, outputs): method _make_attention_mask_non_null (line 452) | def _make_attention_mask_non_null(self, inputs_dict): method _postprocessing_to_ignore_test_cases (line 483) | def _postprocessing_to_ignore_test_cases(self, tf_outputs, pt_outputs,... method check_pt_tf_outputs (line 513) | def check_pt_tf_outputs(self, tf_outputs, pt_outputs, model_class, tol... method prepare_pt_inputs_from_tf_inputs (line 604) | def prepare_pt_inputs_from_tf_inputs(self, tf_inputs_dict): method check_pt_tf_models (line 624) | def check_pt_tf_models(self, tf_model, pt_model, tf_inputs_dict): method test_pt_tf_model_equivalence (line 653) | def test_pt_tf_model_equivalence(self): method test_compile_tf_model (line 714) | def test_compile_tf_model(self): method test_keyword_and_dict_args (line 814) | def test_keyword_and_dict_args(self): method test_attention_outputs (line 830) | def test_attention_outputs(self): method test_headmasking (line 891) | def test_headmasking(self): method test_hidden_states_output (line 964) | def test_hidden_states_output(self): method test_model_common_attributes (line 1006) | def test_model_common_attributes(self): method test_determinism (line 1036) | def test_determinism(self): method test_model_outputs_equivalence (line 1052) | def test_model_outputs_equivalence(self): method test_inputs_embeds (line 1114) | def test_inputs_embeds(self): method test_numpy_arrays_inputs (line 1141) | def test_numpy_arrays_inputs(self): method test_resize_token_embeddings (line 1164) | def test_resize_token_embeddings(self): method test_save_load_after_resize_token_embeddings (line 1227) | def test_save_load_after_resize_token_embeddings(self): method test_embeddings_out_of_bounds_raise_exception (line 1274) | def test_embeddings_out_of_bounds_raise_exception(self): method test_lm_head_model_random_no_beam_search_generate (line 1292) | def test_lm_head_model_random_no_beam_search_generate(self): method test_lm_head_model_no_beam_search_generate_dict_outputs (line 1328) | def test_lm_head_model_no_beam_search_generate_dict_outputs(self): method test_lm_head_model_random_beam_search_generate (line 1361) | def test_lm_head_model_random_beam_search_generate(self): method test_lm_head_model_beam_search_generate_dict_outputs (line 1401) | def test_lm_head_model_beam_search_generate_dict_outputs(self): method test_loss_computation (line 1436) | def test_loss_computation(self): method check_keras_fit_results (line 1509) | def check_keras_fit_results(self, val_loss1, val_loss2, atol=1e-2, rto... method test_keras_fit (line 1512) | def test_keras_fit(self): method test_int64_inputs (line 1629) | def test_int64_inputs(self): method test_generate_with_headmasking (line 1649) | def test_generate_with_headmasking(self): method test_load_with_mismatched_shapes (line 1683) | def test_load_with_mismatched_shapes(self): method test_model_main_input_name (line 1729) | def test_model_main_input_name(self): method test_dataset_conversion (line 1736) | def test_dataset_conversion(self): method _test_xla_generate (line 1786) | def _test_xla_generate(self, num_beams, num_return_sequences, max_leng... method test_xla_generate_fast (line 1835) | def test_xla_generate_fast(self): method test_xla_generate_slow (line 1848) | def test_xla_generate_slow(self): method _generate_random_bad_tokens (line 1861) | def _generate_random_bad_tokens(self, num_bad_tokens, model): method _check_generated_ids (line 1879) | def _check_generated_ids(self, output_ids): method _check_match_tokens (line 1884) | def _check_match_tokens(self, generated_ids, bad_words_ids): function ids_tensor (line 1897) | def ids_tensor(shape, vocab_size, rng=None, name=None, dtype=None): function random_attention_mask (line 1915) | def random_attention_mask(shape, rng=None, name=None, dtype=None): function floats_tensor (line 1922) | def floats_tensor(shape, scale=1.0, rng=None, name=None, dtype=None): class UtilsFunctionsTest (line 1939) | class UtilsFunctionsTest(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 1940) | def test_cached_files_are_used_when_internet_is_down(self): method test_load_from_one_file (line 1957) | def test_load_from_one_file(self): method test_legacy_load_from_url (line 1968) | def test_legacy_load_from_url(self): method test_unpack_inputs (line 1976) | def test_unpack_inputs(self): method test_xla_stable_softmax (line 2050) | def test_xla_stable_softmax(self): method test_checkpoint_sharding_from_hub (line 2084) | def test_checkpoint_sharding_from_hub(self): method test_checkpoint_sharding_local_from_pt (line 2092) | def test_checkpoint_sharding_local_from_pt(self): method test_shard_checkpoint (line 2101) | def test_shard_checkpoint(self): method test_special_layer_name_sharding (line 2169) | def test_special_layer_name_sharding(self): method test_checkpoint_sharding_local (line 2180) | def test_checkpoint_sharding_local(self): method test_save_pretrained_signatures (line 2229) | def test_save_pretrained_signatures(self): method test_safetensors_save_and_load (line 2270) | def test_safetensors_save_and_load(self): method test_safetensors_save_and_load_pt_to_tf (line 2285) | def test_safetensors_save_and_load_pt_to_tf(self): method test_safetensors_load_from_hub (line 2300) | def test_safetensors_load_from_hub(self): class TFModelPushToHubTester (line 2320) | class TFModelPushToHubTester(unittest.TestCase): method setUpClass (line 2322) | def setUpClass(cls): method tearDownClass (line 2328) | def tearDownClass(cls): method test_push_to_hub (line 2339) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 2376) | def test_push_to_hub_in_organization(self): FILE: benchmark/third_party/transformers/tests/test_sequence_feature_extraction_common.py class SequenceFeatureExtractionTestMixin (line 25) | class SequenceFeatureExtractionTestMixin(FeatureExtractionSavingTestMixin): method feat_extract_dict (line 32) | def feat_extract_dict(self): method test_feat_extract_common_properties (line 35) | def test_feat_extract_common_properties(self): method test_batch_feature (line 41) | def test_batch_feature(self): method test_batch_feature_pt (line 64) | def test_batch_feature_pt(self): method test_batch_feature_tf (line 82) | def test_batch_feature_tf(self): method _check_padding (line 99) | def _check_padding(self, numpify=False): method _check_truncation (line 221) | def _check_truncation(self, numpify=False): method test_padding_from_list (line 352) | def test_padding_from_list(self): method test_padding_from_array (line 355) | def test_padding_from_array(self): method test_truncation_from_list (line 358) | def test_truncation_from_list(self): method test_truncation_from_array (line 361) | def test_truncation_from_array(self): method test_padding_accepts_tensors_pt (line 365) | def test_padding_accepts_tensors_pt(self): method test_padding_accepts_tensors_tf (line 378) | def test_padding_accepts_tensors_tf(self): method test_attention_mask (line 390) | def test_attention_mask(self): method test_attention_mask_with_truncation (line 405) | def test_attention_mask_with_truncation(self): FILE: benchmark/third_party/transformers/tests/test_tokenization_common.py function filter_non_english (line 98) | def filter_non_english(_, pretrained_name: str): function filter_roberta_detectors (line 103) | def filter_roberta_detectors(_, pretrained_name: str): function merge_model_tokenizer_mappings (line 107) | def merge_model_tokenizer_mappings( class TokenizerTesterMixin (line 133) | class TokenizerTesterMixin: method setUp (line 152) | def setUp(self) -> None: method tearDown (line 176) | def tearDown(self): method get_input_output_texts (line 179) | def get_input_output_texts(self, tokenizer): method get_clean_sequence (line 183) | def get_clean_sequence(self, tokenizer, with_prefix_space=False, max_l... method get_tokenizers (line 208) | def get_tokenizers(self, fast=True, **kwargs) -> List[PreTrainedTokeni... method get_tokenizer (line 218) | def get_tokenizer(self, **kwargs) -> PreTrainedTokenizer: method get_rust_tokenizer (line 221) | def get_rust_tokenizer(self, **kwargs) -> PreTrainedTokenizerFast: method tokenizer_integration_test_util (line 224) | def tokenizer_integration_test_util( method assert_padded_input_match (line 296) | def assert_padded_input_match(self, input_r: list, input_p: list, max_... method assert_batch_padded_input_match (line 306) | def assert_batch_padded_input_match( method convert_batch_encode_plus_format_to_encode_plus (line 329) | def convert_batch_encode_plus_format_to_encode_plus(batch_encode_plus_... method test_tokenize_special_tokens (line 338) | def test_tokenize_special_tokens(self): method test_sentencepiece_tokenize_and_convert_tokens_to_string (line 365) | def test_sentencepiece_tokenize_and_convert_tokens_to_string(self): method test_subword_regularization_tokenizer (line 388) | def test_subword_regularization_tokenizer(self) -> None: method test_pickle_subword_regularization_tokenizer (line 402) | def test_pickle_subword_regularization_tokenizer(self) -> None: method test_save_sentencepiece_tokenizer (line 420) | def test_save_sentencepiece_tokenizer(self) -> None: method test_model_input_names_signature (line 447) | def test_model_input_names_signature(self): method test_rust_tokenizer_signature (line 459) | def test_rust_tokenizer_signature(self): method test_tokenizer_slow_store_full_signature (line 468) | def test_tokenizer_slow_store_full_signature(self): method test_tokenizer_fast_store_full_signature (line 479) | def test_tokenizer_fast_store_full_signature(self): method test_rust_and_python_full_tokenizers (line 494) | def test_rust_and_python_full_tokenizers(self): method test_tokenizers_common_properties (line 521) | def test_tokenizers_common_properties(self): method test_tokenizers_common_ids_setters (line 554) | def test_tokenizers_common_ids_setters(self): method test_tokenizers_special_tokens_properties_unset (line 592) | def test_tokenizers_special_tokens_properties_unset(self, verbose): method test_save_and_load_tokenizer (line 610) | def test_save_and_load_tokenizer(self): method test_pickle_tokenizer (line 700) | def test_pickle_tokenizer(self): method test_pickle_added_tokens (line 722) | def test_pickle_added_tokens(self): method test_added_tokens_do_lower_case (line 728) | def test_added_tokens_do_lower_case(self): method test_add_tokens_tokenizer (line 795) | def test_add_tokens_tokenizer(self): method test_add_special_tokens (line 846) | def test_add_special_tokens(self): method test_internal_consistency (line 868) | def test_internal_consistency(self): method test_encode_decode_with_spaces (line 887) | def test_encode_decode_with_spaces(self): method test_pretrained_model_lists (line 907) | def test_pretrained_model_lists(self): method test_mask_output (line 925) | def test_mask_output(self): method test_token_type_ids (line 940) | def test_token_type_ids(self): method test_sequence_ids (line 953) | def test_sequence_ids(self): method test_number_of_added_tokens (line 976) | def test_number_of_added_tokens(self): method test_maximum_encoding_length_single_input (line 993) | def test_maximum_encoding_length_single_input(self): method test_maximum_encoding_length_pair_input (line 1092) | def test_maximum_encoding_length_pair_input(self): method test_special_tokens_mask (line 1415) | def test_special_tokens_mask(self): method test_special_tokens_mask_input_pairs (line 1432) | def test_special_tokens_mask_input_pairs(self): method test_padding_side_in_kwargs (line 1457) | def test_padding_side_in_kwargs(self): method test_truncation_side_in_kwargs (line 1494) | def test_truncation_side_in_kwargs(self): method test_right_and_left_padding (line 1535) | def test_right_and_left_padding(self): method test_right_and_left_truncation (line 1597) | def test_right_and_left_truncation(self): method test_padding_to_max_length (line 1655) | def test_padding_to_max_length(self): method test_padding_to_multiple_of (line 1690) | def test_padding_to_multiple_of(self): method test_padding_with_attention_mask (line 1724) | def test_padding_with_attention_mask(self): method test_encode_plus_with_padding (line 1743) | def test_encode_plus_with_padding(self): method test_padding_warning_message_fast_tokenizer (line 1846) | def test_padding_warning_message_fast_tokenizer(self): method test_separate_tokenizers (line 1887) | def test_separate_tokenizers(self): method test_get_vocab (line 1900) | def test_get_vocab(self): method test_conversion_reversible (line 1915) | def test_conversion_reversible(self): method test_call (line 1926) | def test_call(self): method test_batch_encode_plus_batch_sequence_length (line 1957) | def test_batch_encode_plus_batch_sequence_length(self): method test_added_token_are_matched_longest_first (line 2015) | def test_added_token_are_matched_longest_first(self): method test_added_token_serializable (line 2043) | def test_added_token_serializable(self): method test_batch_encode_plus_padding (line 2054) | def test_batch_encode_plus_padding(self): method test_pretokenized_inputs (line 2110) | def test_pretokenized_inputs(self): method test_prepare_for_model (line 2219) | def test_prepare_for_model(self): method test_batch_encode_plus_overflowing_tokens (line 2231) | def test_batch_encode_plus_overflowing_tokens(self): method test_batch_encode_plus_tensors (line 2244) | def test_batch_encode_plus_tensors(self): method _check_no_pad_token_padding (line 2285) | def _check_no_pad_token_padding(self, tokenizer, sequences): method check_subword_sampling (line 2297) | def check_subword_sampling( method test_torch_encode_plus_sent_to_model (line 2339) | def test_torch_encode_plus_sent_to_model(self): method test_tf_encode_plus_sent_to_model (line 2391) | def test_tf_encode_plus_sent_to_model(self): method test_np_encode_plus_sent_to_model (line 2426) | def test_np_encode_plus_sent_to_model(self): method test_prepare_seq2seq_batch (line 2473) | def test_prepare_seq2seq_batch(self): method test_is_fast (line 2520) | def test_is_fast(self): method test_fast_only_inputs (line 2531) | def test_fast_only_inputs(self): method test_alignement_methods (line 2542) | def test_alignement_methods(self): method test_tokenization_python_rust_equals (line 2768) | def test_tokenization_python_rust_equals(self): method test_num_special_tokens_to_add_equal (line 2809) | def test_num_special_tokens_to_add_equal(self): method test_max_length_equal (line 2827) | def test_max_length_equal(self): method test_special_tokens_map_equal (line 2841) | def test_special_tokens_map_equal(self): method test_add_tokens (line 2857) | def test_add_tokens(self): method test_offsets_mapping (line 2883) | def test_offsets_mapping(self): method test_batch_encode_dynamic_overflowing (line 2917) | def test_batch_encode_dynamic_overflowing(self): method test_compare_pretokenized_inputs (line 2985) | def test_compare_pretokenized_inputs(self): method test_create_token_type_ids (line 3067) | def test_create_token_type_ids(self): method test_build_inputs_with_special_tokens (line 3089) | def test_build_inputs_with_special_tokens(self): method test_padding (line 3126) | def test_padding(self, max_length=50): method test_padding_different_model_input_name (line 3352) | def test_padding_different_model_input_name(self): method test_save_pretrained (line 3390) | def test_save_pretrained(self): method test_embeded_special_tokens (line 3465) | def test_embeded_special_tokens(self): method test_compare_add_special_tokens (line 3494) | def test_compare_add_special_tokens(self): method test_compare_prepare_for_model (line 3533) | def test_compare_prepare_for_model(self): method test_special_tokens_initialization (line 3552) | def test_special_tokens_initialization(self): method test_special_tokens_initialization_with_non_empty_additional_special_tokens (line 3584) | def test_special_tokens_initialization_with_non_empty_additional_speci... method test_training_new_tokenizer (line 3642) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 3677) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_tokenizer_mismatch_warning (line 3774) | def test_tokenizer_mismatch_warning(self): method test_saving_tokenizer_trainer (line 3820) | def test_saving_tokenizer_trainer(self): method test_convert_tokens_to_string_format (line 3840) | def test_convert_tokens_to_string_format(self): method test_save_slow_from_fast_and_reload_fast (line 3849) | def test_save_slow_from_fast_and_reload_fast(self): class TokenizerUtilTester (line 3879) | class TokenizerUtilTester(unittest.TestCase): method test_cached_files_are_used_when_internet_is_down (line 3880) | def test_cached_files_are_used_when_internet_is_down(self): method test_cached_files_are_used_when_internet_is_down_missing_files (line 3898) | def test_cached_files_are_used_when_internet_is_down_missing_files(self): method test_legacy_load_from_one_file (line 3915) | def test_legacy_load_from_one_file(self): method test_legacy_load_from_url (line 3942) | def test_legacy_load_from_url(self): class TokenizerPushToHubTester (line 3948) | class TokenizerPushToHubTester(unittest.TestCase): method setUpClass (line 3952) | def setUpClass(cls): method tearDownClass (line 3958) | def tearDownClass(cls): method test_push_to_hub (line 3974) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 3995) | def test_push_to_hub_in_organization(self): method test_push_to_hub_dynamic_tokenizer (line 4019) | def test_push_to_hub_dynamic_tokenizer(self): class TrieTest (line 4057) | class TrieTest(unittest.TestCase): method test_trie (line 4058) | def test_trie(self): method test_trie_split (line 4066) | def test_trie_split(self): method test_trie_single (line 4074) | def test_trie_single(self): method test_trie_final (line 4080) | def test_trie_final(self): method test_trie_subtokens (line 4086) | def test_trie_subtokens(self): method test_trie_suffix_tokens (line 4093) | def test_trie_suffix_tokens(self): method test_trie_skip (line 4100) | def test_trie_skip(self): method test_cut_text_hardening (line 4107) | def test_cut_text_hardening(self): FILE: benchmark/third_party/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 50) | def test_tokenizer_mismatch_warning(self): method test_pretrained_model_lists (line 55) | def test_pretrained_model_lists(self): method test_prepare_for_model (line 60) | def test_prepare_for_model(self): method test_rust_tokenizer_signature (line 65) | def test_rust_tokenizer_signature(self): method test_training_new_tokenizer (line 69) | def test_training_new_tokenizer(self): method test_training_new_tokenizer_with_special_tokens_change (line 86) | def test_training_new_tokenizer_with_special_tokens_change(self): method test_training_new_tokenizer_with_bytelevel (line 103) | def test_training_new_tokenizer_with_bytelevel(self): class TokenizerVersioningTest (line 114) | class TokenizerVersioningTest(unittest.TestCase): method test_local_versioning (line 115) | def test_local_versioning(self): method test_repo_versioning (line 142) | def test_repo_versioning(self): class ReduceMutableBorrowTests (line 163) | class ReduceMutableBorrowTests(unittest.TestCase): method test_async_share_tokenizer (line 164) | def test_async_share_tokenizer(self): method fetch (line 175) | def fetch(self, tokenizer, text): FILE: benchmark/third_party/transformers/tests/tokenization/test_tokenization_utils.py class TokenizerUtilsTest (line 47) | class TokenizerUtilsTest(unittest.TestCase): method check_tokenizer_from_pretrained (line 48) | def check_tokenizer_from_pretrained(self, tokenizer_class): method assert_dump_and_restore (line 61) | def assert_dump_and_restore(self, be_original: BatchEncoding, equal_op... method test_pretrained_tokenizers (line 84) | def test_pretrained_tokenizers(self): method test_tensor_type_from_str (line 87) | def test_tensor_type_from_str(self): method test_batch_encoding_pickle (line 93) | def test_batch_encoding_pickle(self): method test_batch_encoding_pickle_tf (line 118) | def test_batch_encoding_pickle_tf(self): method test_batch_encoding_pickle_pt (line 139) | def test_batch_encoding_pickle_pt(self): method test_batch_encoding_is_fast (line 156) | def test_batch_encoding_is_fast(self): method test_batch_encoding_word_to_tokens (line 167) | def test_batch_encoding_word_to_tokens(self): method test_batch_encoding_with_labels (line 175) | def test_batch_encoding_with_labels(self): method test_batch_encoding_with_labels_pt (line 191) | def test_batch_encoding_with_labels_pt(self): method test_batch_encoding_with_labels_tf (line 207) | def test_batch_encoding_with_labels_tf(self): method test_batch_encoding_with_labels_jax (line 223) | def test_batch_encoding_with_labels_jax(self): method test_padding_accepts_tensors (line 238) | def test_padding_accepts_tensors(self): method test_padding_accepts_tensors_pt (line 250) | def test_padding_accepts_tensors_pt(self): method test_padding_accepts_tensors_tf (line 264) | def test_padding_accepts_tensors_tf(self): method test_instantiation_from_tokenizers (line 278) | def test_instantiation_from_tokenizers(self): method test_instantiation_from_tokenizers_json_file (line 283) | def test_instantiation_from_tokenizers_json_file(self): FILE: benchmark/third_party/transformers/tests/trainer/test_data_collator.py class DataCollatorIntegrationTest (line 45) | class DataCollatorIntegrationTest(unittest.TestCase): method setUp (line 46) | def setUp(self): method tearDown (line 54) | def tearDown(self): method test_default_with_dict (line 57) | def test_default_with_dict(self): method test_default_classification_and_regression (line 86) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 97) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 109) | def test_data_collator_with_padding(self): method test_data_collator_for_token_classification (line 126) | def test_data_collator_for_token_classification(self): method _test_no_pad_and_pad (line 157) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 219) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 228) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 238) | def test_plm(self): method test_nsp (line 264) | def test_nsp(self): method test_sop (line 286) | def test_sop(self): class TFDataCollatorIntegrationTest (line 314) | class TFDataCollatorIntegrationTest(unittest.TestCase): method setUp (line 315) | def setUp(self): method tearDown (line 324) | def tearDown(self): method test_default_with_dict (line 327) | def test_default_with_dict(self): method test_numpy_dtype_preservation (line 356) | def test_numpy_dtype_preservation(self): method test_default_classification_and_regression (line 364) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 375) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 387) | def test_data_collator_with_padding(self): method test_data_collator_for_token_classification (line 404) | def test_data_collator_for_token_classification(self): method _test_no_pad_and_pad (line 437) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 501) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 510) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 520) | def test_plm(self): method test_nsp (line 546) | def test_nsp(self): method test_sop (line 568) | def test_sop(self): class NumpyDataCollatorIntegrationTest (line 595) | class NumpyDataCollatorIntegrationTest(unittest.TestCase): method setUp (line 596) | def setUp(self): method tearDown (line 604) | def tearDown(self): method test_default_with_dict (line 607) | def test_default_with_dict(self): method test_default_classification_and_regression (line 636) | def test_default_classification_and_regression(self): method test_default_with_no_labels (line 647) | def test_default_with_no_labels(self): method test_data_collator_with_padding (line 659) | def test_data_collator_with_padding(self): method test_data_collator_for_token_classification (line 676) | def test_data_collator_for_token_classification(self): method _test_no_pad_and_pad (line 709) | def _test_no_pad_and_pad(self, no_pad_features, pad_features): method test_data_collator_for_language_modeling (line 773) | def test_data_collator_for_language_modeling(self): method test_data_collator_for_whole_word_mask (line 782) | def test_data_collator_for_whole_word_mask(self): method test_plm (line 792) | def test_plm(self): method test_nsp (line 818) | def test_nsp(self): method test_sop (line 840) | def test_sop(self): FILE: benchmark/third_party/transformers/tests/trainer/test_trainer.py 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 RegressionTrainingArguments (line 121) | class RegressionTrainingArguments(TrainingArguments): method __post_init__ (line 125) | def __post_init__(self): class RepeatDataset (line 131) | class RepeatDataset: method __init__ (line 132) | def __init__(self, x, length=64): method __len__ (line 136) | def __len__(self): method __getitem__ (line 139) | def __getitem__(self, i): class DynamicShapesDataset (line 143) | class DynamicShapesDataset: method __init__ (line 144) | def __init__(self, length=64, seed=42, batch_size=8): method __len__ (line 152) | def __len__(self): method __getitem__ (line 155) | def __getitem__(self, i): class AlmostAccuracy (line 159) | class AlmostAccuracy: method __init__ (line 160) | def __init__(self, thresh=0.25): method __call__ (line 163) | def __call__(self, eval_pred): class RegressionModelConfig (line 169) | class RegressionModelConfig(PretrainedConfig): method __init__ (line 170) | def __init__(self, a=0, b=0, double_output=False, random_torch=True, *... class SampleIterableDataset (line 181) | class SampleIterableDataset(IterableDataset): method __init__ (line 182) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 185) | def __iter__(self): class FiniteIterableDataset (line 189) | class FiniteIterableDataset(SampleIterableDataset): method __init__ (line 190) | def __init__(self, a=2, b=3, length=64, seed=42, label_names=None): method __iter__ (line 194) | def __iter__(self): class MultiLoader (line 199) | class MultiLoader: method __init__ (line 200) | def __init__(self, loaders): method __len__ (line 203) | def __len__(self): method __iter__ (line 206) | def __iter__(self): class CustomDataloaderTrainer (line 210) | class CustomDataloaderTrainer(Trainer): method get_train_dataloader (line 211) | def get_train_dataloader(self): method get_eval_dataloader (line 215) | def get_eval_dataloader(self, eval_dataset): class RegressionModel (line 219) | class RegressionModel(nn.Module): method __init__ (line 220) | def __init__(self, a=0, b=0, double_output=False): method forward (line 227) | def forward(self, input_x, labels=None, **kwargs): class RegressionDictModel (line 234) | class RegressionDictModel(nn.Module): method __init__ (line 235) | def __init__(self, a=0, b=0): method forward (line 241) | def forward(self, input_x, labels=None, **kwargs): class RegressionPreTrainedModel (line 248) | class RegressionPreTrainedModel(PreTrainedModel): method __init__ (line 252) | def __init__(self, config): method forward (line 258) | def forward(self, input_x, labels=None, **kwargs): class RegressionRandomPreTrainedModel (line 265) | class RegressionRandomPreTrainedModel(PreTrainedModel): method __init__ (line 269) | def __init__(self, config): method forward (line 275) | def forward(self, input_x, labels=None, **kwargs): class TstLayer (line 291) | class TstLayer(nn.Module): method __init__ (line 292) | def __init__(self, hidden_size): method forward (line 300) | def forward(self, x): function get_regression_trainer (line 305) | def get_regression_trainer(a=0, b=0, double_output=False, train_len=64, ... class TrainerIntegrationCommon (line 340) | class TrainerIntegrationCommon: method check_saved_checkpoints (line 341) | def check_saved_checkpoints(self, output_dir, freq, total, is_pretrain... method check_best_model_has_been_loaded (line 351) | def check_best_model_has_been_loaded( method check_trainer_state_are_the_same (line 375) | def check_trainer_state_are_the_same(self, trainer_state, trainer_stat... method convert_to_sharded_checkpoint (line 390) | def convert_to_sharded_checkpoint(self, folder): class TrainerIntegrationPrerunTest (line 413) | class TrainerIntegrationPrerunTest(TestCasePlus, TrainerIntegrationCommon): method setUp (line 421) | def setUp(self): method check_trained_model (line 434) | def check_trained_model(self, model, alternate_seed=False): method test_reproducible_training (line 440) | def test_reproducible_training(self): method test_trainer_with_datasets (line 451) | def test_trainer_with_datasets(self): method test_model_init (line 481) | def test_model_init(self): method test_gradient_accumulation (line 497) | def test_gradient_accumulation(self): method test_training_loss (line 505) | def test_training_loss(self): method test_custom_optimizer (line 526) | def test_custom_optimizer(self): method test_adafactor_lr_none (line 540) | def test_adafactor_lr_none(self): method test_mixed_bf16 (line 560) | def test_mixed_bf16(self): method test_tf32 (line 575) | def test_tf32(self): class TrainerIntegrationTest (line 586) | class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): method setUp (line 587) | def setUp(self): method test_trainer_works_with_dict (line 593) | def test_trainer_works_with_dict(self): method test_evaluation_with_keys_to_drop (line 605) | def test_evaluation_with_keys_to_drop(self): method test_training_arguments_are_left_untouched (line 620) | def test_training_arguments_are_left_untouched(self): method test_number_of_steps_in_training (line 630) | def test_number_of_steps_in_training(self): method test_number_of_steps_in_training_with_ipex (line 648) | def test_number_of_steps_in_training_with_ipex(self): method test_logging_inf_nan_filter (line 669) | def test_logging_inf_nan_filter(self): method test_train_and_eval_dataloaders (line 694) | def test_train_and_eval_dataloaders(self): method test_dataloader_without_dataset (line 724) | def test_dataloader_without_dataset(self): method test_sampler_seed (line 732) | def test_sampler_seed(self): method test_data_is_not_parallelized_when_model_is_parallel (line 794) | def test_data_is_not_parallelized_when_model_is_parallel(self): method test_evaluate (line 811) | def test_evaluate(self): method test_evaluate_with_jit (line 849) | def test_evaluate_with_jit(self): method test_evaluate_with_ipex (line 892) | def test_evaluate_with_ipex(self): method test_predict (line 944) | def test_predict(self): method test_predict_with_jit (line 976) | def test_predict_with_jit(self): method test_predict_with_ipex (line 1012) | def test_predict_with_ipex(self): method test_dynamic_shapes (line 1055) | def test_dynamic_shapes(self): method test_log_level (line 1091) | def test_log_level(self): method test_save_checkpoints (line 1114) | def test_save_checkpoints(self): method test_run_seq2seq_double_train_wrap_once (line 1127) | def test_run_seq2seq_double_train_wrap_once(self): method test_can_resume_training (line 1140) | def test_can_resume_training(self): method test_resume_training_with_randomness (line 1226) | def test_resume_training_with_randomness(self): method test_auto_batch_size_finder (line 1283) | def test_auto_batch_size_finder(self): method test_training_with_resume_from_checkpoint_false (line 1317) | def test_training_with_resume_from_checkpoint_false(self): method test_resume_training_with_shard_checkpoint (line 1331) | def test_resume_training_with_shard_checkpoint(self): method test_resume_training_with_gradient_accumulation (line 1356) | def test_resume_training_with_gradient_accumulation(self): method test_resume_training_with_frozen_params (line 1394) | def test_resume_training_with_frozen_params(self): method test_load_best_model_at_end (line 1433) | def test_load_best_model_at_end(self): method test_trainer_eval_mrpc (line 1505) | def test_trainer_eval_mrpc(self): method test_trainer_eval_lm (line 1520) | def test_trainer_eval_lm(self): method test_training_iterable_dataset (line 1530) | def test_training_iterable_dataset(self): method test_training_finite_iterable_dataset (line 1545) | def test_training_finite_iterable_dataset(self): method test_evaluation_iterable_dataset (line 1565) | def test_evaluation_iterable_dataset(self): method test_predict_iterable_dataset (line 1593) | def test_predict_iterable_dataset(self): method test_num_train_epochs_in_training (line 1612) | def test_num_train_epochs_in_training(self): method test_early_stopping_callback (line 1627) | def test_early_stopping_callback(self): method test_flos_extraction (line 1663) | def test_flos_extraction(self): method check_checkpoint_deletion (line 1679) | def check_checkpoint_deletion(self, trainer, output_dir, expected): method test_checkpoint_rotation (line 1688) | def test_checkpoint_rotation(self): method check_mem_metrics (line 1712) | def check_mem_metrics(self, trainer, check_func): method test_mem_metrics (line 1730) | def test_mem_metrics(self): method test_fp16_full_eval (line 1741) | def test_fp16_full_eval(self): method test_torchdynamo_full_eval (line 1801) | def test_torchdynamo_full_eval(self): method test_torchdynamo_memory (line 1852) | def test_torchdynamo_memory(self): method test_bf16_full_eval (line 1923) | def test_bf16_full_eval(self): method test_no_wd_param_group (line 1981) | def test_no_wd_param_group(self): class TrainerIntegrationWithHubTester (line 1996) | class TrainerIntegrationWithHubTester(unittest.TestCase): method setUpClass (line 1998) | def setUpClass(cls): method tearDownClass (line 2004) | def tearDownClass(cls): method test_push_to_hub (line 2016) | def test_push_to_hub(self): method test_push_to_hub_in_organization (line 2036) | def test_push_to_hub_in_organization(self): method get_commit_history (line 2058) | def get_commit_history(self, repo): method test_push_to_hub_with_saves_each_epoch (line 2070) | def test_push_to_hub_with_saves_each_epoch(self): method test_push_to_hub_with_saves_each_n_steps (line 2092) | def test_push_to_hub_with_saves_each_n_steps(self): class TrainerHyperParameterOptunaIntegrationTest (line 2122) | class TrainerHyperParameterOptunaIntegrationTest(unittest.TestCase): method setUp (line 2123) | def setUp(self): method test_hyperparameter_search (line 2128) | def test_hyperparameter_search(self): class TrainerHyperParameterRayIntegrationTest (line 2168) | class TrainerHyperParameterRayIntegrationTest(unittest.TestCase): method setUp (line 2169) | def setUp(self): method ray_hyperparameter_search (line 2174) | def ray_hyperparameter_search(self): method test_hyperparameter_search (line 2218) | def test_hyperparameter_search(self): method test_hyperparameter_search_ray_client (line 2221) | def test_hyperparameter_search_ray_client(self): class TrainerHyperParameterSigOptIntegrationTest (line 2233) | class TrainerHyperParameterSigOptIntegrationTest(unittest.TestCase): method setUp (line 2234) | def setUp(self): method test_hyperparameter_search (line 2239) | def test_hyperparameter_search(self): class TrainerOptimizerChoiceTest (line 2341) | class TrainerOptimizerChoiceTest(unittest.TestCase): method check_optim_and_kwargs (line 2342) | def check_optim_and_kwargs(self, optim: OptimizerNames, mandatory_kwar... method test_optim_supported (line 2354) | def test_optim_supported(self, name: str, expected_cls, mandatory_kwar... method test_fused_adam (line 2361) | def test_fused_adam(self): method test_fused_adam_no_apex (line 2379) | def test_fused_adam_no_apex(self): method test_bnb_adam8bit (line 2388) | def test_bnb_adam8bit(self): method test_bnb_adam8bit_no_bnb (line 2406) | def test_bnb_adam8bit_no_bnb(self): class TrainerHyperParameterWandbIntegrationTest (line 2418) | class TrainerHyperParameterWandbIntegrationTest(unittest.TestCase): method setUp (line 2419) | def setUp(self): method test_hyperparameter_search (line 2424) | def test_hyperparameter_search(self): FILE: benchmark/third_party/transformers/tests/trainer/test_trainer_callback.py class MyTestTrainerCallback (line 39) | class MyTestTrainerCallback(TrainerCallback): method __init__ (line 42) | def __init__(self): method on_init_end (line 45) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 48) | def on_train_begin(self, args, state, control, **kwargs): method on_train_end (line 51) | def on_train_end(self, args, state, control, **kwargs): method on_epoch_begin (line 54) | def on_epoch_begin(self, args, state, control, **kwargs): method on_epoch_end (line 57) | def on_epoch_end(self, args, state, control, **kwargs): method on_step_begin (line 60) | def on_step_begin(self, args, state, control, **kwargs): method on_step_end (line 63) | def on_step_end(self, args, state, control, **kwargs): method on_evaluate (line 66) | def on_evaluate(self, args, state, control, **kwargs): method on_predict (line 69) | def on_predict(self, args, state, control, **kwargs): method on_save (line 72) | def on_save(self, args, state, control, **kwargs): method on_log (line 75) | def on_log(self, args, state, control, **kwargs): method on_prediction_step (line 78) | def on_prediction_step(self, args, state, control, **kwargs): class TrainerCallbackTest (line 83) | class TrainerCallbackTest(unittest.TestCase): method setUp (line 84) | def setUp(self): method tearDown (line 87) | def tearDown(self): method get_trainer (line 90) | def get_trainer(self, a=0, b=0, train_len=64, eval_len=64, callbacks=N... method check_callbacks_equality (line 107) | def check_callbacks_equality(self, cbs1, cbs2): method get_expected_events (line 124) | def get_expected_events(self, trainer): method test_init_callback (line 146) | def test_init_callback(self): method test_add_remove_callback (line 161) | def test_add_remove_callback(self): method test_event_flow (line 196) | def test_event_flow(self): FILE: benchmark/third_party/transformers/tests/trainer/test_trainer_distributed.py class DummyDataset (line 38) | class DummyDataset(Dataset): method __init__ (line 39) | def __init__(self, length: int = 101): method __len__ (line 42) | def __len__(self): method __getitem__ (line 45) | def __getitem__(self, i) -> int: class DummyDataCollator (line 48) | class DummyDataCollator: method __call__ (line 49) | def __call__(self, features): class DummyModel (line 52) | class DummyModel(nn.Module): method __init__ (line 53) | def __init__(self): method forward (line 58) | def forward(self, input_ids, labels=None): class TestTrainerDistributed (line 65) | class TestTrainerDistributed(TestCasePlus): method test_trainer (line 67) | def test_trainer(self): function compute_metrics (line 100) | def compute_metrics(p: EvalPrediction) -> Dict: FILE: benchmark/third_party/transformers/tests/trainer/test_trainer_seq2seq.py class Seq2seqTrainerTester (line 25) | class Seq2seqTrainerTester(TestCasePlus): method test_finetune_bert2bert (line 28) | def test_finetune_bert2bert(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/trainer/test_trainer_utils.py class TstLayer (line 48) | class TstLayer(nn.Module): method __init__ (line 49) | def __init__(self, hidden_size): method forward (line 57) | def forward(self, x): class RandomIterableDataset (line 62) | class RandomIterableDataset(IterableDataset): method __init__ (line 64) | def __init__(self, p_stop=0.01, max_length=1000): method __iter__ (line 69) | def __iter__(self): class TrainerUtilsTest (line 80) | class TrainerUtilsTest(unittest.TestCase): method test_distributed_tensor_gatherer (line 81) | def test_distributed_tensor_gatherer(self): method test_distributed_tensor_gatherer_different_shapes (line 111) | def test_distributed_tensor_gatherer_different_shapes(self): method test_label_smoothing (line 154) | def test_label_smoothing(self): method test_group_by_length (line 182) | def test_group_by_length(self): method test_group_by_length_with_dict (line 194) | def test_group_by_length_with_dict(self): method test_group_by_length_with_batch_encoding (line 209) | def test_group_by_length_with_batch_encoding(self): method test_distributed_length_grouped (line 224) | def test_distributed_length_grouped(self): method test_get_parameter_names (line 237) | def test_get_parameter_names(self): method test_distributed_sampler_with_loop (line 246) | def test_distributed_sampler_with_loop(self): method test_sequential_distributed_sampler (line 271) | def test_sequential_distributed_sampler(self): method check_iterable_dataset_shard (line 303) | def check_iterable_dataset_shard(self, dataset, batch_size, drop_last,... method test_iterable_dataset_shard (line 353) | def test_iterable_dataset_shard(self): method test_iterable_dataset_shard_with_length (line 362) | def test_iterable_dataset_shard_with_length(self): method check_shard_sampler (line 390) | def check_shard_sampler(self, dataset, batch_size, drop_last, num_proc... method test_shard_sampler (line 418) | def test_shard_sampler(self): method test_executable_batch_size (line 429) | def test_executable_batch_size(self): method test_executable_batch_size_no_search (line 443) | def test_executable_batch_size_no_search(self): method test_executable_batch_size_with_error (line 455) | def test_executable_batch_size_with_error(self): method test_pad_and_concatenate_with_1d (line 464) | def test_pad_and_concatenate_with_1d(self): method test_remove_columns_collator (line 476) | def test_remove_columns_collator(self): FILE: benchmark/third_party/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 67) | def test_activations_are_distinct_objects(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/utils/test_add_new_model_like.py class TestAddNewModelLike (line 85) | class TestAddNewModelLike(unittest.TestCase): method init_file (line 86) | def init_file(self, file_name, content): method check_result (line 90) | def check_result(self, file_name, expected_result): method test_re_class_func (line 94) | def test_re_class_func(self): method test_model_patterns_defaults (line 99) | def test_model_patterns_defaults(self): method test_parse_module_content (line 111) | def test_parse_module_content(self): method test_add_content_to_text (line 136) | def test_add_content_to_text(self): method test_add_content_to_file (line 165) | def test_add_content_to_file(self): method test_simplify_replacements (line 215) | def test_simplify_replacements(self): method test_replace_model_patterns (line 226) | def test_replace_model_patterns(self): method test_get_module_from_file (line 332) | def test_get_module_from_file(self): method test_duplicate_module (line 344) | def test_duplicate_module(self): method test_duplicate_module_with_copied_from (line 393) | def test_duplicate_module_with_copied_from(self): method test_filter_framework_files (line 441) | def test_filter_framework_files(self): method test_get_model_files (line 465) | def test_get_model_files(self): method test_get_model_files_only_pt (line 526) | def test_get_model_files_only_pt(self): method test_get_model_files_tf_and_flax (line 593) | def test_get_model_files_tf_and_flax(self): method test_find_base_model_checkpoint (line 654) | def test_find_base_model_checkpoint(self): method test_retrieve_model_classes (line 658) | def test_retrieve_model_classes(self): method test_retrieve_info_for_model_with_bert (line 675) | def test_retrieve_info_for_model_with_bert(self): method test_retrieve_info_for_model_pt_tf_with_bert (line 728) | def test_retrieve_info_for_model_pt_tf_with_bert(self): method test_retrieve_info_for_model_with_vit (line 777) | def test_retrieve_info_for_model_with_vit(self): method test_retrieve_info_for_model_with_wav2vec2 (line 820) | def test_retrieve_info_for_model_with_wav2vec2(self): method test_clean_frameworks_in_init_with_gpt (line 873) | def test_clean_frameworks_in_init_with_gpt(self): method test_clean_frameworks_in_init_with_vit (line 1025) | def test_clean_frameworks_in_init_with_vit(self): method test_duplicate_doc_file (line 1173) | def test_duplicate_doc_file(self): FILE: benchmark/third_party/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): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/utils/test_doc_samples.py class TestCodeExamples (line 34) | class TestCodeExamples(unittest.TestCase): method analyze_directory (line 35) | def analyze_directory( method test_modeling_examples (line 87) | def test_modeling_examples(self): method test_tokenization_examples (line 96) | def test_tokenization_examples(self): method test_configuration_examples (line 101) | def test_configuration_examples(self): method test_remaining_examples (line 106) | def test_remaining_examples(self): method test_doc_sources (line 111) | def test_doc_sources(self): FILE: benchmark/third_party/transformers/tests/utils/test_file_utils.py function context_en (line 46) | def context_en(): function context_fr (line 53) | def context_fr(): class TestImportMechanisms (line 59) | class TestImportMechanisms(unittest.TestCase): method test_module_spec_available (line 60) | def test_module_spec_available(self): class GenericUtilTests (line 66) | class GenericUtilTests(unittest.TestCase): method test_context_managers_no_context (line 68) | def test_context_managers_no_context(self, mock_stdout): method test_context_managers_one_context (line 75) | def test_context_managers_one_context(self, mock_stdout): method test_context_managers_two_context (line 82) | def test_context_managers_two_context(self, mock_stdout): method test_find_labels (line 88) | def test_find_labels(self): FILE: benchmark/third_party/transformers/tests/utils/test_generic.py class GenericTester (line 43) | class GenericTester(unittest.TestCase): method test_flatten_dict (line 44) | def test_flatten_dict(self): method test_transpose_numpy (line 69) | def test_transpose_numpy(self): method test_transpose_torch (line 77) | def test_transpose_torch(self): method test_transpose_tf (line 87) | def test_transpose_tf(self): method test_transpose_flax (line 97) | def test_transpose_flax(self): method test_reshape_numpy (line 106) | def test_reshape_numpy(self): method test_reshape_torch (line 114) | def test_reshape_torch(self): method test_reshape_tf (line 124) | def test_reshape_tf(self): method test_reshape_flax (line 134) | def test_reshape_flax(self): method test_squeeze_numpy (line 143) | def test_squeeze_numpy(self): method test_squeeze_torch (line 151) | def test_squeeze_torch(self): method test_squeeze_tf (line 161) | def test_squeeze_tf(self): method test_squeeze_flax (line 171) | def test_squeeze_flax(self): method test_expand_dims_numpy (line 180) | def test_expand_dims_numpy(self): method test_expand_dims_torch (line 185) | def test_expand_dims_torch(self): method test_expand_dims_tf (line 191) | def test_expand_dims_tf(self): method test_expand_dims_flax (line 197) | def test_expand_dims_flax(self): FILE: benchmark/third_party/transformers/tests/utils/test_hf_argparser.py function list_field (line 31) | def list_field(default=None, metadata=None): class BasicExample (line 36) | class BasicExample: class WithDefaultExample (line 44) | class WithDefaultExample: class WithDefaultBoolExample (line 50) | class WithDefaultBoolExample: class BasicEnum (line 56) | class BasicEnum(Enum): class EnumExample (line 62) | class EnumExample: method __post_init__ (line 65) | def __post_init__(self): class OptionalExample (line 70) | class OptionalExample: class ListExample (line 79) | class ListExample: class RequiredExample (line 87) | class RequiredExample: method __post_init__ (line 92) | def __post_init__(self): class StringLiteralAnnotationExample (line 97) | class StringLiteralAnnotationExample: class HfArgumentParserTest (line 105) | class HfArgumentParserTest(unittest.TestCase): method argparsersEqual (line 106) | def argparsersEqual(self, a: argparse.ArgumentParser, b: argparse.Argu... method test_basic (line 116) | def test_basic(self): method test_with_default (line 130) | def test_with_default(self): method test_with_default_bool (line 138) | def test_with_default_bool(self): method test_with_enum (line 165) | def test_with_enum(self): method test_with_list (line 182) | def test_with_list(self): method test_with_optional (line 202) | def test_with_optional(self): method test_with_required (line 219) | def test_with_required(self): method test_with_string_literal_annotation (line 228) | def test_with_string_literal_annotation(self): method test_parse_dict (line 239) | def test_parse_dict(self): method test_parse_dict_extra_key (line 253) | def test_parse_dict_extra_key(self): method test_parse_json (line 266) | def test_parse_json(self): method test_parse_yaml (line 285) | def test_parse_yaml(self): method test_integration_training_args (line 303) | def test_integration_training_args(self): FILE: benchmark/third_party/transformers/tests/utils/test_hub_utils.py class GetFromCacheTests (line 39) | class GetFromCacheTests(unittest.TestCase): method test_cached_file (line 40) | def test_cached_file(self): method test_cached_file_errors (line 60) | def test_cached_file_errors(self): method test_non_existence_is_cached (line 70) | def test_non_existence_is_cached(self): method test_has_file (line 97) | def test_has_file(self): method test_get_file_from_repo_distant (line 102) | def test_get_file_from_repo_distant(self): method test_get_file_from_repo_local (line 119) | def test_get_file_from_repo_local(self): FILE: benchmark/third_party/transformers/tests/utils/test_image_utils.py function get_random_image (line 37) | def get_random_image(height, width): class ImageFeatureExtractionTester (line 43) | class ImageFeatureExtractionTester(unittest.TestCase): method test_conversion_image_to_array (line 44) | def test_conversion_image_to_array(self): method test_conversion_array_to_array (line 71) | def test_conversion_array_to_array(self): method test_conversion_torch_to_array (line 106) | def test_conversion_torch_to_array(self): method test_conversion_image_to_image (line 141) | def test_conversion_image_to_image(self): method test_conversion_array_to_image (line 150) | def test_conversion_array_to_image(self): method test_conversion_tensor_to_image (line 180) | def test_conversion_tensor_to_image(self): method test_resize_image_and_array (line 210) | def test_resize_image_and_array(self): method test_resize_image_and_array_non_default_to_square (line 235) | def test_resize_image_and_array_non_default_to_square(self): method test_resize_tensor (line 287) | def test_resize_tensor(self): method test_normalize_image (line 308) | def test_normalize_image(self): method test_normalize_array (line 327) | def test_normalize_array(self): method test_normalize_tensor (line 351) | def test_normalize_tensor(self): method test_center_crop_image (line 374) | def test_center_crop_image(self): method test_center_crop_array (line 388) | def test_center_crop_array(self): method test_center_crop_tensor (line 407) | def test_center_crop_tensor(self): class LoadImageTester (line 428) | class LoadImageTester(unittest.TestCase): method test_load_img_local (line 429) | def test_load_img_local(self): method test_load_img_rgba (line 438) | def test_load_img_rgba(self): method test_load_img_la (line 449) | def test_load_img_la(self): method test_load_img_l (line 460) | def test_load_img_l(self): method test_load_img_exif_transpose (line 471) | def test_load_img_exif_transpose(self): class UtilFunctionTester (line 492) | class UtilFunctionTester(unittest.TestCase): method test_get_image_size (line 493) | def test_get_image_size(self): method test_infer_channel_dimension (line 505) | def test_infer_channel_dimension(self): method test_get_channel_dimension_axis (line 539) | def test_get_channel_dimension_axis(self): FILE: benchmark/third_party/transformers/tests/utils/test_logging.py class HfArgumentParserTest (line 25) | class HfArgumentParserTest(unittest.TestCase): method test_set_level (line 26) | def test_set_level(self): method test_integration (line 47) | def test_integration(self): method test_env_override (line 77) | def test_env_override(self): method test_env_invalid_override (line 98) | def test_env_invalid_override(self): method test_advisory_warnings (line 109) | def test_advisory_warnings(self): function test_set_progress_bar_enabled (line 128) | def test_set_progress_bar_enabled(): FILE: benchmark/third_party/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): FILE: benchmark/third_party/transformers/tests/utils/test_model_output.py class ModelOutputTest (line 24) | class ModelOutputTest(ModelOutput): class ModelOutputTester (line 30) | class ModelOutputTester(unittest.TestCase): method test_get_attributes (line 31) | def test_get_attributes(self): method test_index_with_ints_and_slices (line 39) | def test_index_with_ints_and_slices(self): method test_index_with_strings (line 52) | def test_index_with_strings(self): method test_dict_like_properties (line 65) | def test_dict_like_properties(self): method test_set_attributes (line 93) | def test_set_attributes(self): method test_set_keys (line 99) | def test_set_keys(self): method test_instantiate_from_dict (line 105) | def test_instantiate_from_dict(self): FILE: benchmark/third_party/transformers/tests/utils/test_modeling_tf_core.py class TFCoreModelTesterMixin (line 64) | class TFCoreModelTesterMixin: method _prepare_for_class (line 74) | def _prepare_for_class(self, inputs_dict, model_class, return_labels=F... method test_graph_mode (line 111) | def test_graph_mode(self): method test_xla_mode (line 125) | def test_xla_mode(self): method test_xla_fit (line 139) | def test_xla_fit(self): method test_saved_model_creation_extended (line 205) | def test_saved_model_creation_extended(self): method test_mixed_precision (line 253) | def test_mixed_precision(self): method test_train_pipeline_custom_model (line 269) | def test_train_pipeline_custom_model(self): method test_graph_mode_with_inputs_embeds (line 339) | def test_graph_mode_with_inputs_embeds(self): method _generate_random_bad_tokens (line 371) | def _generate_random_bad_tokens(self, num_bad_tokens, model): method _check_generated_ids (line 389) | def _check_generated_ids(self, output_ids): method _check_match_tokens (line 394) | def _check_match_tokens(self, generated_ids, bad_words_ids): FILE: benchmark/third_party/transformers/tests/utils/test_offline.py class OfflineTests (line 21) | class OfflineTests(TestCasePlus): method test_offline_mode (line 23) | def test_offline_mode(self): method test_offline_mode_sharded_checkpoint (line 74) | def test_offline_mode_sharded_checkpoint(self): FILE: benchmark/third_party/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: benchmark/third_party/transformers/tests/utils/test_versions_utils.py class DependencyVersionCheckTest (line 25) | class DependencyVersionCheckTest(TestCasePlus): method test_core (line 26) | def test_core(self): method test_python (line 86) | def test_python(self): FILE: benchmark/third_party/transformers/utils/check_config_docstrings.py function get_checkpoint_from_config_class (line 52) | def get_checkpoint_from_config_class(config_class): function check_config_docstrings_have_checkpoints (line 73) | def check_config_docstrings_have_checkpoints(): FILE: benchmark/third_party/transformers/utils/check_copies.py function _should_continue (line 93) | def _should_continue(line, indent): function find_code_in_transformers (line 97) | def find_code_in_transformers(object_name): function get_indent (line 147) | def get_indent(code): function blackify (line 157) | def blackify(code): function is_copy_consistent (line 170) | def is_copy_consistent(filename, overwrite=False): function check_copies (line 249) | def check_copies(overwrite: bool = False): function check_full_copies (line 265) | def check_full_copies(overwrite: bool = False): function get_model_list (line 289) | def get_model_list(filename, start_prompt, end_prompt): function convert_to_localized_md (line 317) | def convert_to_localized_md(model_list, localized_model_list, format_str): function convert_readme_to_index (line 379) | def convert_readme_to_index(model_list): function _find_text_in_file (line 384) | def _find_text_in_file(filename, start_prompt, end_prompt): function check_model_list_copy (line 410) | def check_model_list_copy(overwrite=False, max_per_line=119): function check_readme (line 517) | def check_readme(overwrite=False): FILE: benchmark/third_party/transformers/utils/check_doc_toc.py function clean_model_doc_toc (line 25) | def clean_model_doc_toc(model_doc): function check_model_doc (line 53) | def check_model_doc(overwrite=False): FILE: benchmark/third_party/transformers/utils/check_dummies.py function find_backend (line 51) | def find_backend(line): function read_init (line 60) | def read_init(): function create_dummy_object (line 98) | def create_dummy_object(name, backend_name): function create_dummy_files (line 108) | def create_dummy_files(backend_specific_objects=None): function check_dummies (line 126) | def check_dummies(overwrite=False): FILE: benchmark/third_party/transformers/utils/check_inits.py function find_backend (line 50) | def find_backend(line): function parse_init (line 59) | def parse_init(init_file): function analyze_results (line 190) | def analyze_results(import_dict_objects, type_hint_objects): function check_all_inits (line 222) | def check_all_inits(): function get_transformers_submodules (line 241) | def get_transformers_submodules(): function check_submodules (line 275) | def check_submodules(): FILE: benchmark/third_party/transformers/utils/check_repo.py function check_model_list (line 252) | def check_model_list(): function get_model_modules (line 274) | def get_model_modules(): function get_models (line 313) | def get_models(module, include_pretrained=False): function is_a_private_model (line 326) | def is_a_private_model(model): function check_models_are_in_init (line 341) | def check_models_are_in_init(): function get_model_test_files (line 358) | def get_model_test_files(): function find_tested_models (line 397) | def find_tested_models(test_file): function check_models_are_tested (line 415) | def check_models_are_tested(module, test_file): function check_all_models_are_tested (line 440) | def check_all_models_are_tested(): function get_all_auto_configured_models (line 460) | def get_all_auto_configured_models(): function ignore_unautoclassed (line 478) | def ignore_unautoclassed(model_name): function check_models_are_auto_configured (line 489) | def check_models_are_auto_configured(module, all_auto_models): function check_all_models_are_auto_configured (line 503) | def check_all_models_are_auto_configured(): function check_decorator_order (line 540) | def check_decorator_order(filename): function check_all_decorator_order (line 558) | def check_all_decorator_order(): function find_all_documented_objects (line 574) | def find_all_documented_objects(): function ignore_undocumented (line 663) | def ignore_undocumented(name): function check_all_objects_are_documented (line 701) | def check_all_objects_are_documented(): function check_model_type_doc_match (line 716) | def check_model_type_doc_match(): function is_rst_docstring (line 751) | def is_rst_docstring(docstring): function check_docstrings_are_in_md (line 764) | def check_docstrings_are_in_md(): function check_repo_quality (line 787) | def check_repo_quality(): FILE: benchmark/third_party/transformers/utils/check_self_hosted_runner.py function get_runner_status (line 6) | def get_runner_status(target_runners, token): function list_str (line 35) | def list_str(values): FILE: benchmark/third_party/transformers/utils/check_table.py function _find_text_in_file (line 30) | def _find_text_in_file(filename, start_prompt, end_prompt): function camel_case_split (line 75) | def camel_case_split(identifier): function _center_text (line 81) | def _center_text(text, width): function get_model_table_from_auto_modules (line 88) | def get_model_table_from_auto_modules(): function check_model_table (line 161) | def check_model_table(overwrite=False): function has_onnx (line 180) | def has_onnx(model_type): function get_onnx_model_list (line 197) | def get_onnx_model_list(): function check_onnx_model_list (line 209) | def check_onnx_model_list(overwrite=False): FILE: benchmark/third_party/transformers/utils/check_tf_ops.py function onnx_compliancy (line 44) | def onnx_compliancy(saved_model_path, strict, opset): FILE: benchmark/third_party/transformers/utils/create_dummy_models.py function get_processor_types_from_config_class (line 63) | def get_processor_types_from_config_class(config_class, allowed_mappings... function get_architectures_from_config_class (line 98) | def get_architectures_from_config_class(config_class, arch_mappings): function get_config_class_from_processor_class (line 124) | def get_config_class_from_processor_class(processor_class): function build_processor (line 148) | def build_processor(config_class, processor_class): function get_tiny_config (line 256) | def get_tiny_config(config_class): function convert_tokenizer (line 308) | def convert_tokenizer(tokenizer_fast: PreTrainedTokenizerFast): function convert_feature_extractor (line 319) | def convert_feature_extractor(feature_extractor, tiny_config): function convert_processors (line 348) | def convert_processors(processors, tiny_config, output_folder, result): function get_checkpoint_dir (line 440) | def get_checkpoint_dir(output_dir, model_arch): function build_model (line 452) | def build_model(model_arch, tiny_config, output_dir): function fill_result_with_error (line 472) | def fill_result_with_error(result, error, models_to_create): function build_composite_models (line 483) | def build_composite_models(config_class, output_dir): function build (line 623) | def build(config_class, models_to_create, output_dir): function build_failed_report (line 778) | def build_failed_report(results, include_warning=True): function build_simple_report (line 809) | def build_simple_report(results): function list_str (line 854) | def list_str(values): FILE: benchmark/third_party/transformers/utils/custom_init_isort.py function get_indent (line 35) | def get_indent(line): function split_code_in_indented_blocks (line 41) | def split_code_in_indented_blocks(code, indent_level="", start_prompt=No... function ignore_underscore (line 88) | def ignore_underscore(key): function sort_objects (line 97) | def sort_objects(objects, key=None): function sort_objects_in_import (line 116) | def sort_objects_in_import(import_statement): function sort_imports (line 166) | def sort_imports(file, check_only=True): function sort_imports_in_all_inits (line 234) | def sort_imports_in_all_inits(check_only=True): FILE: benchmark/third_party/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: benchmark/third_party/transformers/utils/get_ci_error_statistics.py function get_job_links (line 13) | def get_job_links(workflow_run_id): function get_artifacts_links (line 35) | def get_artifacts_links(worflow_run_id): function download_artifact (line 57) | def download_artifact(artifact_name, artifact_url, output_dir, token): function get_errors_from_single_artifact (line 79) | def get_errors_from_single_artifact(artifact_zip_path, job_links=None): function get_all_errors (line 126) | def get_all_errors(artifact_dir, job_links=None): function reduce_by_error (line 138) | def reduce_by_error(logs, error_filter=None): function get_model (line 153) | def get_model(test): function reduce_by_model (line 164) | def reduce_by_model(logs, error_filter=None): function make_github_table (line 186) | def make_github_table(reduced_by_error): function make_github_table_per_model (line 198) | def make_github_table_per_model(reduced_by_model): FILE: benchmark/third_party/transformers/utils/get_github_job_time.py function extract_time_from_single_job (line 8) | def extract_time_from_single_job(job): function get_job_time (line 28) | def get_job_time(workflow_run_id): FILE: benchmark/third_party/transformers/utils/notification_service.py function handle_test_results (line 48) | def handle_test_results(test_results): function handle_stacktraces (line 67) | def handle_stacktraces(test_results): function dicts_to_sum (line 88) | def dicts_to_sum(objects: Union[Dict[str, Dict], List[dict]]): class Message (line 100) | class Message: method __init__ (line 101) | def __init__(self, title: str, ci_title: str, model_results: Dict, add... method time (line 140) | def time(self) -> str: method header (line 159) | def header(self) -> Dict: method ci_title_section (line 163) | def ci_title_section(self) -> Dict: method no_failures (line 167) | def no_failures(self) -> Dict: method failures (line 183) | def failures(self) -> Dict: method get_device_report (line 202) | def get_device_report(report, rjust=6): method category_failures (line 211) | def category_failures(self) -> Dict: method model_failures (line 243) | def model_failures(self) -> Dict: method additional_failures (line 341) | def additional_failures(self) -> Dict: method payload (line 366) | def payload(self) -> str: method error_out (line 390) | def error_out(title, ci_title="", runner_not_available=False, runner_f... method post (line 452) | def post(self): method get_reply_blocks (line 464) | def get_reply_blocks(self, job_name, job_result, failures, device, text): method post_reply (line 506) | def post_reply(self): function get_job_links (line 556) | def get_job_links(): function retrieve_artifact (line 577) | def retrieve_artifact(name: str, gpu: Optional[str]): function retrieve_available_artifacts (line 598) | def retrieve_available_artifacts(): function prepare_reports (line 645) | def prepare_reports(title, header, reports, to_truncate=True): FILE: benchmark/third_party/transformers/utils/notification_service_doc_tests.py function handle_test_results (line 31) | def handle_test_results(test_results): function extract_first_line_failure (line 50) | def extract_first_line_failure(failures_short_lines): class Message (line 65) | class Message: method __init__ (line 66) | def __init__(self, title: str, doc_test_results: Dict): method time (line 78) | def time(self) -> str: method header (line 96) | def header(self) -> Dict: method no_failures (line 100) | def no_failures(self) -> Dict: method failures (line 116) | def failures(self) -> Dict: method category_failures (line 135) | def category_failures(self) -> Dict: method payload (line 161) | def payload(self) -> str: method error_out (line 176) | def error_out(): method post (line 201) | def post(self): method get_reply_blocks (line 213) | def get_reply_blocks(self, job_name, job_link, failures, text): method post_reply (line 235) | def post_reply(self): function get_job_links (line 264) | def get_job_links(): function retrieve_artifact (line 285) | def retrieve_artifact(name: str): function retrieve_available_artifacts (line 300) | def retrieve_available_artifacts(): FILE: benchmark/third_party/transformers/utils/prepare_for_doc_test.py function process_code_block (line 46) | def process_code_block(code, add_new_line=True): function maybe_append_new_line (line 53) | def maybe_append_new_line(code): function maybe_remove_new_line (line 69) | def maybe_remove_new_line(code): function process_doc_file (line 83) | def process_doc_file(code_file, add_new_line=True): function process_doc_files (line 109) | def process_doc_files(*files, add_new_line=True): function main (line 134) | def main(*files, add_new_line=True): FILE: benchmark/third_party/transformers/utils/release.py function update_version_in_file (line 37) | def update_version_in_file(fname, version, pattern): function update_version_in_examples (line 48) | def update_version_in_examples(version): function global_version_update (line 61) | def global_version_update(version, patch=False): function clean_main_ref_in_model_list (line 69) | def clean_main_ref_in_model_list(): function get_version (line 97) | def get_version(): function pre_release_work (line 105) | def pre_release_work(patch=False): function post_release_work (line 130) | def post_release_work(): FILE: benchmark/third_party/transformers/utils/sort_auto_mappings.py function sort_auto_mapping (line 31) | def sort_auto_mapping(fname, overwrite: bool = False): function sort_all_auto_mappings (line 72) | def sort_all_auto_mappings(overwrite: bool = False): FILE: benchmark/third_party/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: benchmark/third_party/transformers/utils/test_module/custom_feature_extraction.py class CustomFeatureExtractor (line 4) | class CustomFeatureExtractor(Wav2Vec2FeatureExtractor): FILE: benchmark/third_party/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: benchmark/third_party/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: benchmark/third_party/transformers/utils/test_module/custom_processing.py class CustomProcessor (line 4) | class CustomProcessor(ProcessorMixin): FILE: benchmark/third_party/transformers/utils/test_module/custom_tokenization.py class CustomTokenizer (line 4) | class CustomTokenizer(BertTokenizer): FILE: benchmark/third_party/transformers/utils/test_module/custom_tokenization_fast.py class CustomTokenizerFast (line 6) | class CustomTokenizerFast(BertTokenizerFast): FILE: benchmark/third_party/transformers/utils/tests_fetcher.py function checkout_commit (line 32) | def checkout_commit(repo, commit_id): function clean_code (line 46) | def clean_code(content): function get_all_tests (line 69) | def get_all_tests(): function diff_is_docstring_only (line 95) | def diff_is_docstring_only(repo, branching_point, filename): function get_modified_python_files (line 112) | def get_modified_python_files(diff_with_last_commit=False): function get_diff (line 137) | def get_diff(repo, base_commit, commits): function get_module_dependencies (line 166) | def get_module_dependencies(module_fname): function get_test_dependencies (line 217) | def get_test_dependencies(test_fname): function create_reverse_dependency_tree (line 242) | def create_reverse_dependency_tree(): function get_tree_starting_at (line 258) | def get_tree_starting_at(module, edges): function print_tree_deps_of (line 275) | def print_tree_deps_of(module, all_edges=None): function create_reverse_dependency_map (line 303) | def create_reverse_dependency_map(): function module_to_test_file (line 408) | def module_to_test_file(module_fname): function _print_list (line 473) | def _print_list(l): function sanity_check (line 477) | def sanity_check(): function infer_tests_to_run (line 532) | def infer_tests_to_run(output_file, diff_with_last_commit=False, filters... function filter_tests (line 630) | def filter_tests(output_file, filters): FILE: benchmark/third_party/transformers/utils/update_metadata.py function camel_case_split (line 109) | def camel_case_split(identifier): function get_frameworks_table (line 115) | def get_frameworks_table(): function update_pipeline_and_auto_class_table (line 179) | def update_pipeline_and_auto_class_table(table): function update_metadata (line 211) | def update_metadata(token, commit_sha): function check_pipeline_tags (line 256) | def check_pipeline_tags(): FILE: experimental/cost_model.py class CostModelConfig (line 49) | class CostModelConfig: function solve_lp (line 84) | def solve_lp(config, bls, gbs, compress_w=False, verbose=1, debug=False,... function get_nb_ub (line 439) | def get_nb_ub(config, gbs, solve_lp, compress_w=False, debug=None, perce... function best (line 461) | def best(policy1, throughput1, policy2, throughput2): function solve (line 468) | def solve(config, solve_lp, args): FILE: experimental/fit_cost_model.py class CostModel (line 22) | class CostModel(nn.Module): method __init__ (line 23) | def __init__(self): method forward (line 48) | def forward(self, xs): function compute_loss (line 148) | def compute_loss(xs, ys): function set_update_cpu_delta (line 154) | def set_update_cpu_delta(flag): function freeze_all_params (line 160) | def freeze_all_params(): FILE: flexllmgen/apps/completion.py function main (line 9) | def main(args): FILE: flexllmgen/apps/data_wrangle/data_wrangle_run.py function add_flexllmgen_args (line 25) | def add_flexllmgen_args(parser): function parse_args (line 55) | def parse_args() -> argparse.Namespace: function get_tokenizer (line 180) | def get_tokenizer(name): function single_query_test (line 193) | def single_query_test(args, task_instruction, test_data, task, pd_data_f... function batch_query_test (line 324) | def batch_query_test(args, task_instruction, test_data, task, pd_data_fi... function main (line 492) | def main(): FILE: flexllmgen/apps/data_wrangle/utils/data_utils.py function sample_train_data (line 18) | def sample_train_data(train: pd.DataFrame, n_rows: int): function serialize_row (line 28) | def serialize_row( function serialize_match_pair (line 47) | def serialize_match_pair( function serialize_imputation (line 69) | def serialize_imputation( function serialize_error_detection_spelling (line 91) | def serialize_error_detection_spelling( function serialize_error_detection (line 107) | def serialize_error_detection( function serialize_schema_match (line 129) | def serialize_schema_match( function read_blocked_pairs (line 144) | def read_blocked_pairs( function read_imputation_single (line 199) | def read_imputation_single( function read_error_detection_single (line 235) | def read_error_detection_single( function read_schema_match_single (line 288) | def read_schema_match_single( function read_raw_data (line 325) | def read_raw_data( function read_data (line 456) | def read_data( FILE: flexllmgen/apps/data_wrangle/utils/prompt_utils.py function get_manual_prompt (line 19) | def get_manual_prompt(data_dir: str, example: pd.Series) -> str: function get_random_prompt (line 36) | def get_random_prompt(train_data: pd.DataFrame, num_examples: int = 10) ... function get_validation_prompt (line 47) | def get_validation_prompt( function setup_st_pipeline (line 59) | def setup_st_pipeline(model_name: str) -> SentenceTransformer: function extract_st_features (line 66) | def extract_st_features( function get_hard_samples (line 75) | def get_hard_samples( function get_validation_embs_prompts (line 111) | def get_validation_embs_prompts( FILE: flexllmgen/apps/data_wrangle/utils/utils.py function setup_logger (line 13) | def setup_logger(log_dir: str): function compute_metrics (line 25) | def compute_metrics(preds: List, golds: List, task: str): FILE: flexllmgen/apps/helm_fast_test.py function run_cmd (line 3) | def run_cmd(cmd): FILE: flexllmgen/apps/helm_run.py class OptTokenizer (line 34) | class OptTokenizer: method __init__ (line 37) | def __init__(self, name): method tokenize (line 45) | def tokenize(self, request: TokenizationRequest) -> TokenizationReques... method decode (line 73) | def decode(self, request: DecodeRequest) -> DecodeRequestResult: function get_hf_generation_args (line 91) | def get_hf_generation_args(request, tokenizer): function get_batches (line 131) | def get_batches(scenario_state, tokenizer, batch_size, pad_to_seq_len): function execute (line 166) | def execute(scenario_state, tokenizer, effective_bs, pad_to_seq_len): function run_entry (line 292) | def run_entry(description, pad_to_seq_len, args): function main (line 384) | def main(args): FILE: flexllmgen/compression.py class CompressionConfig (line 12) | class CompressionConfig: class TorchCompressedDevice (line 21) | class TorchCompressedDevice: method __init__ (line 24) | def __init__(self, base_device): method allocate (line 32) | def allocate(self, shape, dtype, comp_config, pin_memory=None, name=No... method init_cache_one_gpu_batch (line 51) | def init_cache_one_gpu_batch(self, config, task, policy): method init_attention_compute_workspace (line 64) | def init_attention_compute_workspace(self, config, task, policy): method compress (line 87) | def compress(self, tensor, comp_config): method decompress (line 146) | def decompress(self, tensor): function general_copy_compressed (line 204) | def general_copy_compressed(dst, dst_indices, src, src_indices): function get_compressed_indices (line 218) | def get_compressed_indices(tensor, indices, shape): function set_cache_compression_config (line 246) | def set_cache_compression_config(config): function get_cache_compression_config (line 251) | def get_cache_compression_config(): function compress (line 255) | def compress(tensor, config): function decompress (line 299) | def decompress(packed_data, config): function compress_and_decompress (line 330) | def compress_and_decompress(tensor, config): function test_simulated_compression (line 335) | def test_simulated_compression(): function test_real_compression (line 347) | def test_real_compression(): FILE: flexllmgen/dist_flex_opt.py class DistOptLM (line 30) | class DistOptLM(OptLM): method __init__ (line 31) | def __init__(self, config, env, path, policy, pipeline_rank, method load_weight (line 87) | def load_weight(self, b, t, i, j, k): method init_cache (line 105) | def init_cache(self, t, j, k): method load_cache (line 108) | def load_cache(self, t, i, j, k): method store_cache (line 126) | def store_cache(self, t, i, j, k): method delete_cache (line 145) | def delete_cache(self, t, j, k): method load_hidden (line 151) | def load_hidden(self, b, t, i, j, k): method store_hidden (line 192) | def store_hidden(self, b, t, i, j, k): method send_hidden (line 232) | def send_hidden(self, t, i, j, k, tag=0, async_=False): method recv_hidden (line 243) | def recv_hidden(self, t, i, j, k, tag=0, async_=False): method compute_layer (line 262) | def compute_layer(self, t, i, j, k): method update_attention_mask (line 271) | def update_attention_mask(self, b, t, i, k): method generate (line 292) | def generate(self, method send_recv_hidden (line 376) | def send_recv_hidden(self, sending_job, receiving_job): method generation_loop_normal (line 418) | def generation_loop_normal(self): method generation_loop_overlap_one_batch (line 457) | def generation_loop_overlap_one_batch(self): method generation_loop_overlap_multi_batch (line 494) | def generation_loop_overlap_multi_batch(self): function comm_test (line 532) | def comm_test(comm_device): function run_flexllmgen_dist (line 539) | def run_flexllmgen_dist(args): function add_distributed_parser_arguments (line 650) | def add_distributed_parser_arguments(parser): FILE: flexllmgen/dist_utils.py function initialize_distributed (line 8) | def initialize_distributed(head_ip, port, world_size, rank, local_rank, function get_pipeline_parallel_pred_group (line 43) | def get_pipeline_parallel_pred_group(): function get_pipeline_parallel_succ_group (line 46) | def get_pipeline_parallel_succ_group(): function get_comm_device (line 49) | def get_comm_device(): function suppress_output (line 52) | def suppress_output(rank): FILE: flexllmgen/flex_opt.py class Policy (line 34) | class Policy: method w_disk_percent (line 70) | def w_disk_percent(self): method cache_disk_percent (line 74) | def cache_disk_percent(self): method act_disk_percent (line 78) | def act_disk_percent(self): function get_choice (line 82) | def get_choice(cur_percent, percents, choices): function init_weight_list (line 92) | def init_weight_list(weight_specs, policy, env): class InputEmbed (line 134) | class InputEmbed: method __init__ (line 135) | def __init__(self, config, env, policy): method set_task (line 145) | def set_task(self, task): method init_weight (line 148) | def init_weight(self, weight_home, path): method load_weight (line 162) | def load_weight(self, weight_home, weight_read_buf, k): method init_cache_one_gpu_batch (line 168) | def init_cache_one_gpu_batch(self, cache_home): method load_cache (line 171) | def load_cache(self, cache_home, cache_read_buf, i): method store_cache (line 174) | def store_cache(self, cache_home, cache_write_buf, i): method input_act_shape_and_dtype (line 177) | def input_act_shape_and_dtype(self, batch_size, seq_len): method forward (line 180) | def forward(self, hidden, cache_read_buf, weight_read_buf, attention_m... class OutputEmbed (line 198) | class OutputEmbed: method __init__ (line 199) | def __init__(self, config, env, policy): method set_task (line 209) | def set_task(self, task): method init_weight (line 212) | def init_weight(self, weight_home, path): method load_weight (line 228) | def load_weight(self, weight_home, weight_read_buf, k): method init_cache_one_gpu_batch (line 236) | def init_cache_one_gpu_batch(self, cache_home): method load_cache (line 239) | def load_cache(self, cache_home, cache_read_buf, i): method store_cache (line 242) | def store_cache(self, cache_home, cache_write_buf, i): method input_act_shape_and_dtype (line 245) | def input_act_shape_and_dtype(self, batch_size, seq_len): method forward (line 248) | def forward(self, hidden, cache_read_buf, weight_read_buf, attention_m... class SelfAttention (line 264) | class SelfAttention: method __init__ (line 265) | def __init__(self, config, env, policy, layer_id): method set_task (line 278) | def set_task(self, task): method init_weight (line 281) | def init_weight(self, weight_home, path): method load_weight (line 309) | def load_weight(self, weight_home, weight_read_buf, k): method init_cache_one_gpu_batch (line 321) | def init_cache_one_gpu_batch(self, cache_home): method load_cache (line 338) | def load_cache(self, cache_home, cache_read_buf, i): method store_cache (line 405) | def store_cache(self, cache_home, cache_write_buf, i): method input_act_shape_and_dtype (line 424) | def input_act_shape_and_dtype(self, batch_size, seq_len): method forward (line 427) | def forward(self, hidden, cache_read_buf, weight_read_buf, attention_m... class MLP (line 462) | class MLP: method __init__ (line 463) | def __init__(self, config, env, policy, layer_id): method set_task (line 474) | def set_task(self, task): method init_weight (line 477) | def init_weight(self, weight_home, path): method load_weight (line 497) | def load_weight(self, weight_home, weight_read_buf, k): method init_cache_one_gpu_batch (line 507) | def init_cache_one_gpu_batch(self, cache_home): method load_cache (line 510) | def load_cache(self, cache_home, cache_read_buf, i): method store_cache (line 513) | def store_cache(self, cache_home, cache_write_buf, i): method input_act_shape_and_dtype (line 516) | def input_act_shape_and_dtype(self, batch_size, seq_len): method forward (line 519) | def forward(self, hidden, cache_read_buf, weight_read_buf, attention_m... class TransformerLayer (line 536) | class TransformerLayer: method __init__ (line 537) | def __init__(self, config, env, policy, i): method set_task (line 543) | def set_task(self, task): method init_weight (line 547) | def init_weight(self, weight_home, path): method load_weight (line 553) | def load_weight(self, weight_home, weight_read_buf, k): method init_cache_one_gpu_batch (line 561) | def init_cache_one_gpu_batch(self, cache_home): method load_cache (line 564) | def load_cache(self, cache_home, cache_read_buf, i): method store_cache (line 567) | def store_cache(self, cache_home, cache_write_buf, i): method forward (line 570) | def forward(self, hidden, cache_read_buf, weight_read_buf, attention_m... class OptLM (line 582) | class OptLM: method __init__ (line 583) | def __init__(self, method set_task (line 639) | def set_task(self, task): method init_weight (line 644) | def init_weight(self, j): method load_weight (line 653) | def load_weight(self, i, j, k, overlap=True): method delete_weight (line 668) | def delete_weight(self, j, k): method init_cache (line 677) | def init_cache(self, j, k): method load_cache (line 680) | def load_cache(self, i, j, k, overlap=True): method store_cache (line 700) | def store_cache(self, i, j, k, overlap=True): method delete_cache (line 722) | def delete_cache(self, j, k): method load_hidden (line 728) | def load_hidden(self, i, j, k): method store_hidden (line 755) | def store_hidden(self, i, j, k): method compute_layer (line 784) | def compute_layer(self, i, j, k): method sync (line 793) | def sync(self): method init_all_weights (line 797) | def init_all_weights(self): method delete_all_weights (line 802) | def delete_all_weights(self): method update_attention_mask (line 806) | def update_attention_mask(self, i, k): method generate (line 825) | def generate(self, method generation_loop_normal (line 912) | def generation_loop_normal(self): method generation_loop_debug_normal (line 929) | def generation_loop_debug_normal(self): method generation_loop_overlap_single_batch (line 1011) | def generation_loop_overlap_single_batch(self): method generation_loop_overlap_multi_batch (line 1034) | def generation_loop_overlap_multi_batch(self): method generation_loop_debug_single_batch (line 1061) | def generation_loop_debug_single_batch(self): method generation_loop_debug_multi_batch (line 1103) | def generation_loop_debug_multi_batch(self): method __del__ (line 1148) | def __del__(self): function get_filename (line 1152) | def get_filename(args): function get_test_inputs (line 1172) | def get_test_inputs(prompt_len, num_prompts, tokenizer): function run_flexllmgen (line 1179) | def run_flexllmgen(args): function add_parser_arguments (line 1275) | def add_parser_arguments(parser): FILE: flexllmgen/opt_config.py class OptConfig (line 18) | class OptConfig: method model_bytes (line 33) | def model_bytes(self): method cache_bytes (line 45) | def cache_bytes(self, batch_size, seq_len): method hidden_bytes (line 48) | def hidden_bytes(self, batch_size, seq_len): function get_opt_config (line 52) | def get_opt_config(name, **kwargs): function download_opt_weights_old (line 128) | def download_opt_weights_old(model_name, path): function disable_torch_init (line 187) | def disable_torch_init(): function restore_torch_init (line 202) | def restore_torch_init(): function disable_hf_opt_init (line 209) | def disable_hf_opt_init(): function download_opt_weights (line 219) | def download_opt_weights(model_name, path): FILE: flexllmgen/profile_bandwidth.py function benchmark_func (line 15) | def benchmark_func(func, number, repeat, warmup=3): function profile_bandwidth (line 32) | def profile_bandwidth(path): FILE: flexllmgen/profile_matmul.py function benchmark_func (line 18) | def benchmark_func(func, number, repeat, warmup=3): function bench_matmul (line 35) | def bench_matmul(): FILE: flexllmgen/pytorch_backend.py function fix_recursive_import (line 25) | def fix_recursive_import(): class DeviceType (line 32) | class DeviceType(Enum): method convert (line 40) | def convert(name): class TorchTensor (line 55) | class TorchTensor: method __init__ (line 77) | def __init__(self, shape, dtype, data, device, name=None): method bytes (line 92) | def bytes(self): method next_name (line 96) | def next_name(cls): method create_from_torch (line 100) | def create_from_torch(cls, data, device, name=None): method delete (line 103) | def delete(self): method load_from_np (line 109) | def load_from_np(self, np_array): method load_from_np_file (line 121) | def load_from_np_file(self, filename): method copy (line 127) | def copy(self, dst, src_indices=None): method smart_copy (line 142) | def smart_copy(self, dst, src_indices=None): method move (line 147) | def move(self, dst): method __str__ (line 154) | def __str__(self): class TorchDevice (line 159) | class TorchDevice: method __init__ (line 162) | def __init__(self, name, mem_capacity=None, flops=None): method add_link (line 180) | def add_link(self, link): method allocate (line 184) | def allocate(self, shape, dtype, pin_memory=None, name=None): method delete (line 193) | def delete(self, tensor): method init_attention_compute_workspace (line 196) | def init_attention_compute_workspace(self, config, task, policy): method next_attention_compute_workspace (line 219) | def next_attention_compute_workspace(self): method del_attention_compute_workspace (line 224) | def del_attention_compute_workspace(self): method gen_attention_mask (line 227) | def gen_attention_mask(self, token_ids, pad_token_id, donate): method extend_attention_mask (line 232) | def extend_attention_mask(self, attention_mask, donate): method opt_input_embed (line 239) | def opt_input_embed(self, inputs, attention_mask, w_token, w_pos, pad_... method opt_output_embed (line 265) | def opt_output_embed(self, inputs, w_ln, b_ln, w_token, donate, method init_cache_one_gpu_batch (line 287) | def init_cache_one_gpu_batch(self, config, task, policy): method mha (line 298) | def mha(self, inputs, attention_mask, w_q, b_q, w_k, b_k, w_v, b_v, method mha_gen (line 367) | def mha_gen(self, inputs, attention_mask, w_q, b_q, w_k, b_k, w_v, b_v, method _attention_weights (line 471) | def _attention_weights(self, q, k, mask, b, src_s, n_head): method _attention_value (line 483) | def _attention_value(self, q, k, v, mask, b, src_s, tgt_s, n_head, hea... method _sparse_attention_value (line 489) | def _sparse_attention_value(self, q, k, v_new, v_cache, mask, b, method _mixed_device_attention (line 523) | def _mixed_device_attention(self, q, k_cache, v_cache, k_new, v_new, method mlp (line 569) | def mlp(self, inputs, wi, bi, wo, bo, w_ln, b_ln, donate): method synchronize (line 586) | def synchronize(self): method mem_stats (line 589) | def mem_stats(self): method print_stats (line 601) | def print_stats(self, output_file=None): method __str__ (line 617) | def __str__(self): class TorchDisk (line 621) | class TorchDisk: method __init__ (line 624) | def __init__(self, path, mem_capacity=None, cuda_id=0, num_copy_thread... method add_link (line 652) | def add_link(self, link): method allocate (line 656) | def allocate(self, shape, dtype, pin_memory=None, name=None): method delete (line 663) | def delete(self, tensor): method init_cache_one_gpu_batch (line 667) | def init_cache_one_gpu_batch(self, config, task, policy): method submit_copy (line 676) | def submit_copy(self, *args): method synchronize (line 679) | def synchronize(self): method close_copy_threads (line 682) | def close_copy_threads(self): method mem_stats (line 690) | def mem_stats(self): method print_stats (line 693) | def print_stats(self): method __del__ (line 696) | def __del__(self): class TorchMixedDevice (line 704) | class TorchMixedDevice: method __init__ (line 707) | def __init__(self, base_devices): method allocate (line 712) | def allocate(self, shape, dtype, seg_lengths, pin_memory=None, name=No... method delete (line 733) | def delete(self, tensor): method init_cache_one_gpu_batch (line 738) | def init_cache_one_gpu_batch(self, config, task, policy): class TorchLink (line 763) | class TorchLink: method __init__ (line 766) | def __init__(self, a, b, a_to_b_bandwidth, b_to_a_bandwidth): method io_time (line 775) | def io_time(self, src, dst, size): function general_copy (line 791) | def general_copy(dst: TorchTensor, dst_indices: Tuple[slice], function cut_indices (line 858) | def cut_indices(indices, start, stop, base=0): function map_to_torch_tensor (line 866) | def map_to_torch_tensor(tensor, indices): function copy_worker_func (line 878) | def copy_worker_func(queue, cuda_id): FILE: flexllmgen/timer.py class _Timer (line 7) | class _Timer: method __init__ (line 10) | def __init__(self, name: str): method start (line 20) | def start(self, sync_func: Callable = None): method stop (line 30) | def stop(self, sync_func: Callable = None): method reset (line 41) | def reset(self): method elapsed (line 49) | def elapsed(self, mode: str = "average"): class Timers (line 61) | class Timers: method __init__ (line 64) | def __init__(self): method __call__ (line 67) | def __call__(self, name: str): method __contains__ (line 72) | def __contains__(self, name: str): class Tracer (line 81) | class Tracer: method __init__ (line 84) | def __init__(self): method log (line 87) | def log(self, name: str, info: Any, sync_func: Callable = None): FILE: flexllmgen/utils.py class Task (line 22) | class Task: class ExecutionEnv (line 35) | class ExecutionEnv: method create (line 43) | def create(cls, offload_dir): method close_copy_threads (line 51) | def close_copy_threads(self): class BenchmarkResult (line 56) | class BenchmarkResult: function piecewise_linear_func (line 85) | def piecewise_linear_func(xs, ys): function piecewise_linear_func_ret_func (line 104) | def piecewise_linear_func_ret_func(xs, ys, x): function sample_from_range (line 109) | def sample_from_range(n, k): function cpu_mem_stats (line 123) | def cpu_mem_stats(): function torch_mem_stats (line 146) | def torch_mem_stats(): class ValueHolder (line 171) | class ValueHolder: method __init__ (line 172) | def __init__(self): method store (line 175) | def store(self, val): method pop (line 179) | def pop(self): method clear (line 184) | def clear(self): function array_1d (line 188) | def array_1d(a, cls): function array_2d (line 192) | def array_2d(a, b, cls): function array_3d (line 196) | def array_3d(a, b, c, cls): function array_4d (line 200) | def array_4d(a, b, c, d, cls): function vector_gather (line 204) | def vector_gather(vectors, indices): function run_cmd (line 221) | def run_cmd(cmd): function str2bool (line 226) | def str2bool(v): function project_decode_latency (line 237) | def project_decode_latency(costs, prompt_len, gen_len): function write_benchmark_log (line 263) | def write_benchmark_log(filename, model_size, cache_size, hidden_size, function read_benchmark_log (line 284) | def read_benchmark_log(filename): FILE: scripts/step_2_consolidate_992_shards_to_singleton.py function _unpad (line 23) | def _unpad(shard: torch.Tensor, pad: int) -> torch.Tensor: function consolidate_shard_weights (line 29) | def consolidate_shard_weights( function _get_shard_number (line 108) | def _get_shard_number(x) -> int: function consolidate_fsdp_shards (line 116) | def consolidate_fsdp_shards( function consolidate_model_parallel (line 267) | def consolidate_model_parallel( function consolidate_model_parallel_part1 (line 290) | def consolidate_model_parallel_part1( function consolidate_model_parallel_part2 (line 310) | def consolidate_model_parallel_part2(all_parts_consolidated): function handle_qkv_proj (line 314) | def handle_qkv_proj(model_parts, key): function _handle_one (line 325) | def _handle_one(parts, is_weight): function handle_legacy_ln_ (line 342) | def handle_legacy_ln_(glued_model, n_parts): function get_n_layers (line 364) | def get_n_layers(glued_model): function glue_megatron_parts (line 376) | def glue_megatron_parts(model_parts): function find_num_parts (line 470) | def find_num_parts(names) -> int: FILE: scripts/step_3_convert_to_numpy_weights.py function save_numpy (line 14) | def save_numpy(weight_dict, to_folder): FILE: scripts/utils.py function recursively_cast_dictconfigs (line 5) | def recursively_cast_dictconfigs(cfg): function torch_load_cpu (line 12) | def torch_load_cpu(path): function load_and_pop_last_optimizer_state (line 28) | def load_and_pop_last_optimizer_state(pth):