MCPcopy Create free account

hub / github.com/AnswerDotAI/ModernBERT / functions

Functions560 in github.com/AnswerDotAI/ModernBERT

↓ 1 callersMethodget_trainer
Returns the trainer for the job.
src/evals/finetuning_jobs.py:127
↓ 1 callersFunctionget_wandb_config
(run_name, entity_name, project_name)
generate_eval_config.py:125
↓ 1 callersFunctionindex_cos_sin
(cos, sin, seqlen_offsets, seqlen)
tests/test_rotary.py:44
↓ 1 callersFunctioninit_from_checkpoint
(cfg: DictConfig, new_model: nn.Module)
main.py:335
↓ 1 callersFunctioninit_mlm_model_from_pretrained
Initialize the new model from the pretrained model. This method uses Gopher layer scaling and Phi-style weight tiling as selected by `mode`.
src/bert_layers/model.py:1644
↓ 1 callersFunctioninit_model_from_pretrained
Initialize the new model from the pretrained model. This method uses Gopher layer scaling and Phi-style weight tiling as selected by `mode`.
src/bert_layers/model.py:1502
↓ 1 callersFunctioninit_run
(args)
wandb_log_live_eval.py:24
↓ 1 callersFunctionkill_process_tree
(pid)
run_evals.py:72
↓ 1 callersFunctionlog_config
(cfg: DictConfig)
sequence_classification.py:79
↓ 1 callersFunctionlog_config
(cfg: DictConfig)
main.py:113
↓ 1 callersFunctionlog_config
(cfg: DictConfig)
src/evals/finetuning_jobs.py:89
↓ 1 callersFunctionmain
()
wandb_log_live_eval.py:94
↓ 1 callersFunctionmain
(api, args)
download_artifacts_from_wandb.py:29
↓ 1 callersFunctionmain
Main: create C4/pile streaming dataset. Args: args (Namespace): Commandline arguments.
src/convert_dataset.py:358
↓ 1 callersFunctionmain
()
src/data/mds_conversion.py:38
↓ 1 callersFunctionmain
(out_fn, dataset_max_size)
src/data/source_stats.py:26
↓ 1 callersFunctionmain
()
examples/train_st_gooaq.py:16
↓ 1 callersFunctionmain
()
examples/train_st.py:16
↓ 1 callersFunctionmain
()
examples/train_pylate.py:11
↓ 1 callersFunctionmanage_jobs
Manage the launching of jobs for each configuration file in the directory.
run_evals.py:243
↓ 1 callersMethodmatch
(self, event: Event, state: State)
src/algorithms/rope_schedule.py:65
↓ 1 callersFunctionmaybe_decompress_shard
If shard does not have decompressed data, this function decompresses the shard
src/data/mds_conversion.py:17
↓ 1 callersFunctionordered_yaml_dump
(data, stream=None, Dumper=yaml.Dumper, **kwds)
generate_eval_config.py:110
↓ 1 callersFunctionpad_input
Add padding to sequences. Args: inputs: (total_nnz, ...) or (total_nnz,), where total_nnz = number of tokens selected in attention_m
src/bert_layers/padding.py:48
↓ 1 callersFunctionparse_args
Parse commandline arguments.
src/convert_dataset.py:27
↓ 1 callersFunctionparse_model_string
(s)
wandb_log_live_eval.py:14
↓ 1 callersMethodprint_metrics
Prints fine-tuning results.
src/evals/finetuning_jobs.py:131
↓ 1 callersFunctionprocess_data
(args)
wandb_log_live_eval.py:33
↓ 1 callersFunctionrelative_to_instance
(args)
src/data/relative_prop_to_instance_prop.py:23
↓ 1 callersFunctionreset_trainer
Cleans up memory usage left by trainer.
src/evals/finetuning_jobs.py:69
↓ 1 callersFunctionrun_inference_benchmark
(model_name, use_xformers=False, n_iters=10, gpu=0)
efficiency/multiprocess_bench.py:283
↓ 1 callersFunctionrun_job_worker
Instantiates the job object and runs it.
eval.py:336
↓ 1 callersFunctionrun_job_worker
Instantiates the job object and runs it.
glue.py:284
↓ 1 callersFunctionrun_subprocess
(cmd: List[str], verbose: bool = False, show_errors: bool = False)
run_evals.py:138
↓ 1 callersFunctionsample_dataset_from_config
(args)
src/data/sample_dataset_from_config.py:48
↓ 1 callersFunctionsample_hf
(upload_repo, repo_name, split_name, config_name)
src/data/hf_to_mds.py:63
↓ 1 callersFunctionstableadamw
Functional API to apply a StableAdamW optimization step. See `optimi.StableAdamW` for more details. Args: params: Parameters to upda
src/optimizer.py:183
↓ 1 callersFunctiontrain
(cfg: DictConfig, return_trainer: bool = False, do_train: bool = True)
sequence_classification.py:243
↓ 1 callersFunctionunpad_input
Remove padding from input sequences. Args: inputs: (batch, seqlen, ...) or (batch, seqlen) attention_mask: (batch, seqlen),
src/bert_layers/padding.py:7
↓ 1 callersMethodunpad_inputs
( self, input_ids: torch.Tensor, attention_mask: torch.Tensor, position_ids: torch.Tensor, labels: tor
src/bert_layers/model.py:1073
↓ 1 callersMethodupdate
(self, outputs, labels)
src/evals/superglue_jobs.py:109
↓ 1 callersFunctionupdate_batch_size_info
(cfg: DictConfig)
sequence_classification.py:35
↓ 1 callersFunctionupdate_batch_size_info
(cfg: DictConfig)
main.py:51
↓ 1 callersFunctionupdate_config
( source_config: dict, bos_token_id: int, eos_token_id: int, cls_token_id: int, pad_token_
convert_to_hf.py:22
Method__call__
(self, examples: List[Any])
src/text_data.py:275
Method__call__
(self, current_step: int)
src/sequence_packer.py:52
Method__call__
(self, state: State, ssr: float = 1.0)
src/scheduler.py:111
Method__call__
(self, state: State, ssr: float = 1.0)
src/scheduler.py:198
Method__call__
(self, state: State, ssr: float = 1.0)
src/scheduler.py:282
Method__enter__
(self)
tests/test_superglue.py:24
Method__enter__
(self)
tests/test_eval.py:24
Method__enter__
(self)
tests/test_utils.py:15
Method__enter__
(self)
tests/test_glue.py:24
Method__exit__
(self, exc_type: Any, exc_value: Any, traceback: Any)
tests/test_superglue.py:28
Method__exit__
(self, exc_type: Any, exc_value: Any, traceback: Any)
tests/test_eval.py:28
Method__exit__
(self, exc_type: Any, exc_value: Any, traceback: Any)
tests/test_utils.py:20
Method__exit__
(self, exc_type: Any, exc_value: Any, traceback: Any)
tests/test_glue.py:28
Method__getitem__
(self, idx: int)
src/text_data.py:244
Method__getitem__
(self, key)
src/bert_layers/activation.py:14
Method__init__
( self, tokenizer: Tokenizer, max_seq_len: int, streams: Optional[Sequence[Str
src/text_data.py:141
Method__init__
(self, base_collator: Callable, eos_token_id: Optional[int] = None, bos_token_id: Optional[int] = None)
src/text_data.py:258
Method__init__
( self, params: Iterable[Tensor] | Iterable[dict], lr: float, betas: tuple[flo
src/optimizer.py:53
Method__init__
(self, dist_sync_on_step: bool = False, ignore_index: int = -100)
src/flex_bert.py:70
Method__init__
(self, dist_sync_on_step: bool = False)
src/flex_bert.py:89
Method__init__
( self, min_batch_size: int, max_batch_size: int, warmup_tokens: Union[str, Ti
src/sequence_packer.py:21
Method__init__
Takes batches of unpacked, unpadded sequences (seqs) to batches of packed and padded sequences (pseqs). Every input batch must be a
src/sequence_packer.py:72
Method__init__
Args: - iterable: an object which generates a fresh iterator on iter() and which implements len()
src/sequence_packer.py:480
Method__init__
(self, iterable: Iterable[T], buffer_size: int)
src/sequence_packer.py:493
Method__init__
( self, t_warmup: Union[str, Time], t_decay: Union[str, Time] = "0.1dur", t_ma
src/scheduler.py:96
Method__init__
( self, t_warmup: Union[str, Time], t_cooldown: Union[str, Time], t_cosine: Un
src/scheduler.py:173
Method__init__
( self, t_decay: Union[str, Time] = "0.1dur", t_max: Union[str, Time] = "1dur",
src/scheduler.py:272
Method__init__
( self, hf_split: str = "train", folder_split: str = "train_small", raw_sample
src/convert_dataset.py:85
Method__init__
( self, hf_split: str = "validation", folder_split: str = "val_small", raw_sam
src/convert_dataset.py:96
Method__init__
( self, dataset_name: str, split: str, tokenizer: PreTrainedTokenizerBase,
src/convert_dataset.py:181
Method__init__
( self, batch_interval: int, gen_1_batch_interval: Optional[int] = None, eval_
src/callbacks/scheduled_gc.py:31
Method__init__
(self, log_interval: int = 100)
src/callbacks/packing_efficiency.py:13
Method__init__
(self, log_optimizer_metrics: bool = True, batch_log_interval: int = 10)
src/callbacks/log_grad_norm.py:27
Method__init__
(self, config)
src/bert_layers/layers.py:36
Method__init__
(self, config)
src/bert_layers/layers.py:83
Method__init__
(self, config)
src/bert_layers/layers.py:242
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:264
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:285
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:330
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:370
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:418
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:452
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:497
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/layers.py:534
Method__init__
(self, config: FlexBertConfig)
src/bert_layers/layers.py:623
Method__init__
(self, config: FlexBertConfig)
src/bert_layers/layers.py:675
Method__init__
(self, config)
src/bert_layers/attention.py:71
Method__init__
(self, config)
src/bert_layers/attention.py:207
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:250
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:286
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:445
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:595
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:724
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:944
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:1098
Method__init__
(self, config: FlexBertConfig, layer_id: Optional[int] = None)
src/bert_layers/attention.py:1275
← previousnext →201–300 of 560, ranked by callers