MCPcopy Create free account

hub / github.com/OpenBMB/CPM-Bee / functions

Functions302 in github.com/OpenBMB/CPM-Bee

↓ 14 callersFunction_dataset_identity
(c: _MixedDatasetConfig)
src/cpm_live/training_tasks/bee/pretrain.py:248
↓ 12 callersMethodwrite
( self, time: float, iteration: int, loss: float, lr: float, l
src/cpm_live/utils/log.py:59
↓ 11 callersMethodread
(self, size=-1)
src/cpm_live/dataset/distributed_dataset.py:143
↓ 10 callersMethoddumps
(self)
src/cpm_live/dataset/distributed_dataset.py:76
↓ 10 callersMethodloads
(self, data: str)
src/cpm_live/dataset/distributed_dataset.py:79
↓ 9 callersMethodload
(self, fp: io.TextIOWrapper)
src/cpm_live/dataset/distributed_dataset.py:87
↓ 8 callersMethodprojection
Projection based on embedding's weight. For example, embedding map vocab_size to embed_size, than projection map embed_size back to vocab_siz
src/cpm_live/layers/embedding.py:55
↓ 7 callersFunction_read_info_list
(meta_path: str)
src/cpm_live/dataset/distributed_dataset.py:92
↓ 7 callersMethodget
(self)
src/cpm_live/training_tasks/bee/pretrain.py:1026
↓ 6 callersMethodclose
(self)
src/cpm_live/dataset/distributed_dataset.py:179
↓ 6 callersMethodinference
( self, input: torch.Tensor, # (batch, seqlen) length: torch.Tensor, # (batch)
src/cpm_live/models/ant.py:156
↓ 5 callersFunction_convert_to_abs_path
(transform_path: str)
src/cpm_live/training_tasks/bee/pretrain.py:757
↓ 5 callersMethod_update_states
(self, fast_skip: bool = True)
src/cpm_live/dataset/distributed_dataset.py:263
↓ 5 callersMethodadd
Add a new hypothesis to the list.
src/cpm_live/generation/generation_utils.py:87
↓ 5 callersFunctionadd_mem_time
(info, mem_usage, tim_usage)
src/finetune_cpm_bee.py:109
↓ 5 callersMethodload_state_dict
(self, d)
src/cpm_live/dataset/distributed_dataset.py:67
↓ 5 callersMethodtell
(self)
src/cpm_live/dataset/distributed_dataset.py:155
↓ 5 callersMethodwrite
Write a piece of data into dataset. Args: data (Any): Serialization will be done using pickle. Example: >>>
src/cpm_live/dataset/distributed_dataset.py:632
↓ 4 callersMethod_get_block_file
(self, block_id: int)
src/cpm_live/dataset/distributed_dataset.py:369
↓ 4 callersFunction_write_info_list
(meta_path: str, info: List[FileInfo])
src/cpm_live/dataset/distributed_dataset.py:108
↓ 4 callersFunctionadd_mem_time
(info, mem_usage, tim_usage)
src/pretrain_cpm_bee.py:109
↓ 4 callersMethodopen_file
(self, fname, mode, offset=None)
src/cpm_live/dataset/distributed_dataset.py:187
↓ 3 callersFunction_build_sample_weights
(config: List[_MixedDatasetConfig])
src/cpm_live/training_tasks/bee/pretrain.py:763
↓ 3 callersFunction_filtered_range
( begin: int, end: int, rank: int, world_size: int, filter_set: Optional[Set[int]] = None )
src/cpm_live/dataset/distributed_dataset.py:123
↓ 3 callersFunction_random_string
()
src/cpm_live/dataset/distributed_dataset.py:30
↓ 3 callersFunctionapply_repetition_penalty
( logits, batch_size, num_beams, prev_output_tokens, repetition_penalty, start_idx=Non
src/cpm_live/generation/generation_utils.py:34
↓ 3 callersFunctionbuild_dataset
Open the dataset in write mode and returns a writer. Args: path (str): Path to dataset. dbname (str): The name of the file to whi
src/cpm_live/dataset/distributed_dataset.py:750
↓ 3 callersFunctionconvert_data_to_id
( tokenizer: CPMBeeTokenizer, data: Any, prev_ext_states: Optional[_PrevExtTableStates] = None,
src/cpm_live/training_tasks/bee/pretrain.py:101
↓ 3 callersMethodencode
Encode a string into ids.
src/cpm_live/tokenizers/ant.py:142
↓ 3 callersMethodfrom_json_file
(cls, json_file: Union[str, os.PathLike], **args)
src/cpm_live/utils/config.py:54
↓ 3 callersFunctiongradient_shrink
(x: torch.Tensor, alpha: float = 0.1)
src/cpm_live/utils/gradient_shrink.py:15
↓ 3 callersMethodstate_dict
(self)
src/cpm_live/dataset/distributed_dataset.py:56
↓ 2 callersMethod__init__
( self, dim_model: int, dim_ff: int, dtype=torch.half, eps: float = 1e
src/cpm_live/layers/blocks.py:113
↓ 2 callersMethod__init__
( self, dim, base=10000, distance_scale: Union[int, float] = 1, dtype:
src/cpm_live/layers/position_embedding.py:220
↓ 2 callersMethod__init__
( self, dim_model: int, dim_ff: int, dtype=torch.half, eps: float = 1e
src/cpm_live/native_layers/blocks.py:112
↓ 2 callersMethod__init__
( self, dim, base=10000, distance_scale: Union[int, float] = 1, dtype:
src/cpm_live/native_layers/position_embedding.py:213
↓ 2 callersMethod_open_file
(self, fname, offset)
src/cpm_live/dataset/distributed_dataset.py:536
↓ 2 callersMethodadd_data
(self, config: _MixedDatasetConfig)
src/cpm_live/training_tasks/bee/pretrain.py:625
↓ 2 callersFunctionallgather_objects
(obj)
src/cpm_live/utils/object.py:6
↓ 2 callersMethodapply_transform
( self, data: CPMBeeInputType, transform: Union[Dict[str, Any], Callable[[CPMBeeInputT
src/cpm_live/training_tasks/bee/pretrain.py:281
↓ 2 callersMethodbackward
(ctx, grad_output)
src/cpm_live/utils/gradient_shrink.py:11
↓ 2 callersMethodchanged
(self)
src/cpm_live/training_tasks/bee/pretrain.py:706
↓ 2 callersMethodclose
(self)
src/cpm_live/training_tasks/bee/pretrain.py:971
↓ 2 callersMethoddata_to_id
( self, data: Any, prev_ext_states: Optional[_PrevExtTableStates] = None, shuf
src/cpm_live/training_tasks/bee/pretrain.py:358
↓ 2 callersMethoddecode
Decode ids into a string.
src/cpm_live/tokenizers/ant.py:146
↓ 2 callersMethodgenerate
(self, text_list, **kwargs)
src/cpm_live/generation/ant.py:41
↓ 2 callersFunctionget_args
(pretrain: bool = False, finetune: bool = False)
src/cpm_live/arguments.py:237
↓ 2 callersMethodget_config
(self)
src/cpm_live/training_tasks/bee/pretrain.py:733
↓ 2 callersMethodget_log_name
(self, now: Optional[datetime.datetime] = None)
src/cpm_live/utils/log.py:54
↓ 2 callersMethodget_log_time
(self)
src/cpm_live/utils/log.py:51
↓ 2 callersMethodis_done
If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst one in the heap, then
src/cpm_live/generation/generation_utils.py:102
↓ 2 callersMethodload_state_dict
(self, data: OrderedDict, strict: bool = False)
src/cpm_live/training_tasks/bee/pretrain.py:1017
↓ 2 callersMethodpack_batch
(self, force: bool = False)
src/cpm_live/training_tasks/bee/pretrain.py:516
↓ 2 callersFunctionpad
(orig_items, key, padding_value=0, padding_side="left")
src/cpm_live/utils/data_utils.py:4
↓ 2 callersFunctionrel_to_bucket
(n_up: int, n_down: int, max_depth: int = 8)
src/cpm_live/training_tasks/bee/pretrain.py:92
↓ 2 callersMethodseek
(self, offset, whence=0)
src/cpm_live/dataset/distributed_dataset.py:167
↓ 2 callersMethodstart
(self)
src/cpm_live/training_tasks/bee/pretrain.py:982
↓ 1 callersMethod__batch_iter
(self)
src/cpm_live/training_tasks/bee/finetune.py:39
↓ 1 callersMethod__get_item_data
(self, raw_data)
src/cpm_live/training_tasks/ant/pretrain.py:35
↓ 1 callersMethod__init__
( self, file_name: str = "", block_begin: int = 0, block_end: int = 0,
src/cpm_live/dataset/distributed_dataset.py:38
↓ 1 callersMethod__init__
( self, vocab_size: int, embedding_size: int, dtype: torch.dtype = torch.half,
src/cpm_live/layers/embedding.py:25
↓ 1 callersMethod__init__
( self, dim_model: int, dim_ff: int, dtype=torch.half, dropout_p: Opti
src/cpm_live/layers/feedforward.py:79
↓ 1 callersMethod__init__
(self, config: CPMAntConfig)
src/cpm_live/models/ant.py:66
↓ 1 callersMethod__init__
(self, config: CPMBeeConfig)
src/cpm_live/models/bee.py:73
↓ 1 callersMethod__init__
( self, vocab_size: int, embedding_size: int, dtype: torch.dtype = torch.half,
src/cpm_live/native_layers/embedding.py:24
↓ 1 callersMethod__init__
( self, dim_model: int, dim_ff: int, dtype=torch.half, dropout_p: Opti
src/cpm_live/native_layers/feedforward.py:77
↓ 1 callersMethod__str__
(self)
src/cpm_live/tokenizers/bee.py:42
↓ 1 callersFunction_build_dict_tree
(data: CPMBeeInputType, depth: int, need_predict: bool)
src/cpm_live/training_tasks/bee/pretrain.py:118
↓ 1 callersFunction_build_segment_rel
(node: _DictTree)
src/cpm_live/training_tasks/bee/pretrain.py:158
↓ 1 callersMethod_convert_to_tensors
(self, data: Any, in_context_samples: List[Any] = [])
src/cpm_live/generation/bee.py:18
↓ 1 callersMethod_decode
(self, model_inputs, **kwargs)
src/cpm_live/generation/ant.py:47
↓ 1 callersMethod_decode
(self, model_inputs, other_info, **kwargs)
src/cpm_live/generation/bee.py:250
↓ 1 callersMethod_dict_from_json_file
(cls, json_file: Union[str, os.PathLike], **args)
src/cpm_live/utils/config.py:59
↓ 1 callersMethod_ensure_transform_function
( self, module_name: str, transform_script_path: str )
src/cpm_live/training_tasks/bee/pretrain.py:368
↓ 1 callersMethod_get_file_path
(self, fname)
src/cpm_live/dataset/distributed_dataset.py:533
↓ 1 callersFunction_get_logger
()
src/cpm_live/utils/log.py:11
↓ 1 callersMethod_get_next_block
(self)
src/cpm_live/dataset/distributed_dataset.py:389
↓ 1 callersMethod_mask_file
(self, f: FileInfo)
src/cpm_live/dataset/distributed_dataset.py:362
↓ 1 callersMethod_position_bucket
( self, relative_position, bidirectional=True, num_buckets=32, max_distance=128 )
src/cpm_live/layers/position_embedding.py:104
↓ 1 callersMethod_position_bucket
(self, relative_position, num_buckets=32, max_distance=128)
src/cpm_live/layers/position_embedding.py:196
↓ 1 callersMethod_position_bucket
( self, relative_position, bidirectional=True, num_buckets=32, max_distance=128 )
src/cpm_live/native_layers/position_embedding.py:100
↓ 1 callersMethod_position_bucket
(self, relative_position, num_buckets=32, max_distance=128)
src/cpm_live/native_layers/position_embedding.py:189
↓ 1 callersMethod_prepare_new_epoch
(self)
src/cpm_live/dataset/distributed_dataset.py:374
↓ 1 callersMethod_process_list
(self, data_list: List[Any])
src/cpm_live/generation/bee.py:124
↓ 1 callersMethod_process_texts
(self, text_list)
src/cpm_live/generation/ant.py:33
↓ 1 callersMethod_segment_relative_position_bucket
(self, query_segment, key_segment)
src/cpm_live/layers/position_embedding.py:101
↓ 1 callersMethod_segment_relative_position_bucket
(self, query_segment, key_segment)
src/cpm_live/native_layers/position_embedding.py:97
↓ 1 callersMethod_state_dict
(self)
src/cpm_live/dataset/distributed_dataset.py:399
↓ 1 callersMethod_write_log
(self, iteration: int, data: Any, result: List[Dict[str, Any]])
src/pretrain_cpm_bee.py:144
↓ 1 callersFunctionadd_finetune_args
(parser: argparse.ArgumentParser)
src/cpm_live/arguments.py:197
↓ 1 callersFunctionadd_model_config_args
Model arguments
src/cpm_live/arguments.py:19
↓ 1 callersFunctionadd_pretrain_args
(parser: argparse.ArgumentParser)
src/cpm_live/arguments.py:179
↓ 1 callersFunctionadd_training_args
Training arguments.
src/cpm_live/arguments.py:32
↓ 1 callersMethodbuild_instance
(self, config: _MixedDatasetConfig)
src/cpm_live/training_tasks/bee/pretrain.py:403
↓ 1 callersMethoddeserialize
(self, data: bytes)
src/cpm_live/dataset/serializer.py:27
↓ 1 callersMethoddump
(self, fp: io.TextIOWrapper)
src/cpm_live/dataset/distributed_dataset.py:83
↓ 1 callersMethodescape
(text: str)
src/cpm_live/tokenizers/bee.py:179
↓ 1 callersFunctionevaluation
(model, args, tokenizer, loss_func)
src/finetune_cpm_bee.py:116
↓ 1 callersFunctionfinetune
( args, tokenizer: CPMBeeTokenizer, model: CPMBee, optimizer: bmt.optim.AdamOffloadOptimizer,
src/finetune_cpm_bee.py:188
↓ 1 callersFunctionget_args
()
src/preprocess_dataset.py:9
next →1–100 of 302, ranked by callers