MCPcopy Create free account

hub / github.com/Pints-AI/1.5-Pints / functions

Functions589 in github.com/Pints-AI/1.5-Pints

↓ 2 callersFunctionpermute_part_lazy
(lazy_tensor: LazyTensor, n_part: int, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:744
↓ 2 callersMethodprepare_data
(self)
lit_gpt/datamodules/deita.py:77
↓ 2 callersMethodread_file_contents
This defines how to get the main contents. Is an abstraction over read_file, which is used to access anything in the file. NO
prepare_dataset/preparer.py:264
↓ 2 callersFunctionrename
(pt_filename: str)
convert/bin_to_safetensors.py:97
↓ 2 callersMethodreset_cache
(self)
lit_gpt/model.py:120
↓ 2 callersMethodreset_parameters
(self)
lit_gpt/adapter.py:266
↓ 2 callersFunctionsave_hyperparameters
Captures the CLI parameters passed to `function` without running `function` and saves them to the checkpoint.
lit_gpt/utils.py:467
↓ 2 callersFunctionsave_prompt_style
(style: Union[str, PromptStyle], checkpoint_dir: Path)
lit_gpt/prompts.py:373
↓ 2 callersFunctionvalidate
( fabric: lightning.Fabric, model: GPT, val_dataloader: DataLoader, tokenizer: Tokenizer,
finetune/full.py:507
↓ 2 callersFunctionvalidate
Run validation and calculate loss.
pretrain/main.py:642
↓ 2 callersMethodvocab_size
(self)
lit_gpt/tokenizer.py:84
↓ 2 callersMethodwrite_meta
(self)
tokenizer/convert/convert.py:1073
↓ 2 callersMethodwrite_remainder
(self)
lit_gpt/packed_dataset.py:175
↓ 2 callersMethodzero_pad
Properly pad weight updates with zeros. If, based on `self.enable_lora`, we want to fine-tune queries and values, but not keys, then
lit_gpt/lora.py:276
↓ 1 callersMethod__init__
(self, iterable: Iterable)
lit_gpt/utils.py:425
↓ 1 callersMethod__init__
DatasetPreparer is a pluggable/hackable class to abstract data handling strategies. Example: class MyOwnPreparer(DatasetPre
prepare_dataset/preparer.py:69
↓ 1 callersMethod__init__
(self, fname_tokenizer: Path, fname_added_tokens: Path | None = None)
tokenizer/convert/convert.py:459
↓ 1 callersMethod__reduce_ex__
(self, protocol_version)
lit_gpt/utils_old.py:303
↓ 1 callersMethod__reduce_ex__
(self, protocol_version)
lit_gpt/utils.py:164
↓ 1 callersMethod__repr__
(self)
tokenizer/convert/convert.py:555
↓ 1 callersMethod_build_data
( self, filepath: Path, tokenizer: Tokenizer, training_dataset_builder: Packed
prepare_dataset/preparer.py:449
↓ 1 callersMethod_check_tokenizer_for_pad
(self, tokenizer_path: Path)
prepare_dataset/preparer.py:517
↓ 1 callersMethod_create_special_vocab
(self, vocab: Vocab, vocabtype: str, model_parent_path: Path)
tokenizer/convert/convert.py:1315
↓ 1 callersMethod_detect_files
(self)
tokenizer/convert/convert.py:1295
↓ 1 callersMethod_distribute
Distribute the files amongst available processes.
prepare_dataset/preparer.py:302
↓ 1 callersFunction_dropout_add_layer_norm_backward
Assume that arguments are contiguous and aligned to 16 bytes dx == None means that it was a post-norm architecture (x = drop(x0) + residual wa
lit_gpt/rmsnorm.py:55
↓ 1 callersFunction_dropout_add_layer_norm_forward
Assume that arguments are contiguous and aligned to 16 bytes
lit_gpt/rmsnorm.py:16
↓ 1 callersFunction_dropout_add_layer_norm_parallel_residual_backward
Assume that arguments are contiguous and aligned to 16 bytes dx == None means that it was a post-norm architecture (x = drop(x0) + residual wa
lit_gpt/rmsnorm.py:257
↓ 1 callersFunction_dropout_add_layer_norm_parallel_residual_forward
Assume that arguments are contiguous and aligned to 16 bytes
lit_gpt/rmsnorm.py:212
↓ 1 callersFunction_dropout_add_layer_norm_subset_backward
Assume that arguments are contiguous and aligned to 16 bytes dx == None means that it was a post-norm architecture (x = drop(x0) + residual wa
lit_gpt/rmsnorm.py:153
↓ 1 callersFunction_dropout_add_layer_norm_subset_forward
Assume that arguments are contiguous and aligned to 16 bytes
lit_gpt/rmsnorm.py:110
↓ 1 callersMethod_get_num_processes
(self, no_of_files: int)
prepare_dataset/preparer.py:495
↓ 1 callersMethod_read_header
(self, path)
lit_gpt/packed_dataset.py:208
↓ 1 callersMethod_select_file
(self, vocab_types: list[str])
tokenizer/convert/convert.py:1305
↓ 1 callersFunctionadapter_filter
(key: str, value: Any)
lit_gpt/adapter.py:282
↓ 1 callersFunctionadapter_filter
(key: str, value: Any)
lit_gpt/adapter_v2.py:33
↓ 1 callersFunctionadd_model_prefix
Adds the 'model.' prefix in-place, if it does not already exist.
lit_gpt/utils.py:552
↓ 1 callersMethodadd_tensor_info
(self, name: str, tensor: LazyTensor)
tokenizer/convert/convert.py:1066
↓ 1 callersMethodadded_tokens
(self)
tokenizer/convert/convert.py:382
↓ 1 callersMethodadded_tokens
(self)
tokenizer/convert/convert.py:445
↓ 1 callersMethodadded_tokens
(self)
tokenizer/convert/convert.py:537
↓ 1 callersMethodall_tokens
(self)
tokenizer/convert/convert.py:551
↓ 1 callersMethodbatch_size
Number of samples between optimizer steps per data-parallel rank
lit_gpt/args.py:51
↓ 1 callersFunctionbf16_to_fp32
(bf16_arr: np.ndarray[Any, np.dtype[np.uint16]])
tokenizer/convert/convert.py:592
↓ 1 callersMethodbpe_tokens
(self)
tokenizer/convert/convert.py:376
↓ 1 callersFunctioncheck_conversion_supported
(lit_weights: Dict[str, torch.Tensor])
convert/convert_lit_to_hf.py:329
↓ 1 callersMethodcheck_data
Check the data once.
prepare_dataset/preparer.py:228
↓ 1 callersFunctioncheck_file_size
(sf_filename: str, pt_filename: str)
convert/bin_to_safetensors.py:57
↓ 1 callersFunctionchoose_logger
( logger_name: Literal['csv', 'tensorboard', 'wandb'], out_dir: Path, project_name: str, log_i
lit_gpt/utils.py:505
↓ 1 callersFunctionchunked_cross_entropy
( logits: Union[torch.Tensor, List[torch.Tensor]], targets: torch.Tensor, chunk_size: int = 128 )
lit_gpt/utils_old.py:440
↓ 1 callersFunctioncode
(dtype)
lit_gpt/packed_dataset.py:26
↓ 1 callersMethodcollect_files
This defines how the file will be collected.
prepare_dataset/preparer.py:221
↓ 1 callersMethodconnect
( self, tokenizer: Optional[Tokenizer] = None, batch_size: int = 1, max_seq_le
lit_gpt/datamodules/deita.py:67
↓ 1 callersFunctionconvert_config_lit_to_hf
(lit_config_dict: dict)
convert/convert_lit_to_hf.py:366
↓ 1 callersFunctionconvert_model_names
(model: LazyModel, params: Params, skip_unknown: bool)
tokenizer/convert/convert.py:1179
↓ 1 callersFunctionconvert_multi
(folder: str, delprv: bool)
convert/bin_to_safetensors.py:104
↓ 1 callersFunctionconvert_single
(folder: str, delprv: bool)
convert/bin_to_safetensors.py:132
↓ 1 callersFunctionconvert_to_output_type
(model: LazyModel, output_type: GGMLFileType)
tokenizer/convert/convert.py:1174
↓ 1 callersFunctioncreate_dataloaders
This calls `create_dataloader` twice, one for train, another for validation.
pretrain/main.py:741
↓ 1 callersFunctiondefault_outfile
(model_paths: list[Path], file_type: GGMLFileType)
tokenizer/convert/convert.py:1354
↓ 1 callersFunctiondropout_add_layer_norm
residual_in_fp32 only has an effect if residual is None. Otherwise residual dtype is residual.dtype.
lit_gpt/rmsnorm.py:661
↓ 1 callersMethodelements_to_bytes
(self, n_elements: int)
tokenizer/convert/convert.py:60
↓ 1 callersFunctionestimate_flops
Measures estimated FLOPs for MFU. Refs: * https://ar5iv.labs.arxiv.org/html/2205.05198#A1 * https://ar5iv.labs.arxiv.org/html/220
lit_gpt/speed_monitor.py:437
↓ 1 callersFunctionextend_checkpoint_dir
(checkpoint_dir: Path)
convert/convert_hf_to_lit.py:192
↓ 1 callersMethodextract_vocabulary_from_model
(self, vocab: Vocab)
tokenizer/convert/convert.py:1033
↓ 1 callersFunctionfilter_dataset
(dataset: Dataset, score_distance: float)
dpo/adapters/ultrafeedback_binarized.py:130
↓ 1 callersFunctionfilter_rows
(score_distance: float)
dpo/adapters/ultrafeedback_binarized.py:131
↓ 1 callersFunctionfind_multifile_paths
Given any path belonging to a multi-file model (e.g. foo.bin.1), return the whole list of paths in the model.
tokenizer/convert/convert.py:1242
↓ 1 callersFunctionfind_multiple
(n: int, k: int)
lit_gpt/utils_old.py:20
↓ 1 callersFunctionfit
( fabric: lightning.Fabric, state: Dict, train_dataloader: DataLoader, val_dataloader: DataLoa
finetune/full.py:323
↓ 1 callersFunctionformat_dataset
(dataset: Dataset, prompt_template: str)
dpo/adapters/distilabel_capybara_dpo.py:50
↓ 1 callersFunctionformat_dataset
(dataset: Dataset, prompt_template: str)
dpo/adapters/open_hermes_preferences.py:50
↓ 1 callersFunctionformat_prompt
(prompt: str, promptFormat: str = 'chatml')
dpo/adapters/nectar.py:113
↓ 1 callersMethodfrom_file
(cls, path: Union[str, Path], **kwargs: Any)
lit_gpt/config_base.py:87
↓ 1 callersMethodfrom_name
(cls, name: str)
lit_gpt/prompts.py:28
↓ 1 callersFunctiongenerate
Takes a conditioning sequence (prompt) as input and continues to generate as many tokens as requested. The implementation of this function is mod
inference/generate.py:76
↓ 1 callersFunctionget_dataloaders
( fabric: lightning.Fabric, data: List[DataModule], tokenizer: Tokenizer, train: TrainArgs,
finetune/full.py:575
↓ 1 callersFunctionget_default_supported_precision
Return default precision that is supported by the hardware. Args: training: `-mixed` or `-true` version of the precision to use t
lit_gpt/utils_old.py:491
↓ 1 callersFunctionget_default_supported_precision
Return default precision that is supported by the hardware: either `bf16` or `16`. Args: training: `-mixed` or `-true` version of the pre
lit_gpt/utils.py:342
↓ 1 callersFunctionget_dpo_triplets
(row: UltraFeedbackRow)
dpo/adapters/ultrafeedback_binarized.py:116
↓ 1 callersFunctionget_longest_seq_length
(data: List[Dict])
finetune/full.py:645
↓ 1 callersFunctionget_lr
Get learning rate
pretrain/main.py:779
↓ 1 callersFunctionget_lr_scheduler
(optimizer, warmup_steps: int, max_steps: int)
finetune/full.py:562
↓ 1 callersFunctionget_pints_init_hf_config
()
convert/convert_lit_to_hf.py:348
↓ 1 callersMethodguessed
(model: LazyModel)
tokenizer/convert/convert.py:181
↓ 1 callersMethodhandle_tokenizer_model
(self, vocab: Vocab)
tokenizer/convert/convert.py:1019
↓ 1 callersMethodhf_tokens
(self)
tokenizer/convert/convert.py:506
↓ 1 callersFunctionhumanize_seconds
(seconds: Union[float, int])
lit_gpt/utils.py:531
↓ 1 callersFunctionkstart
returns start index of keys in batch
convert/convert_lit_to_hf.py:279
↓ 1 callersFunctionlayer_template
(layer_name: str, idx: int)
convert/convert_hf_to_lit.py:21
↓ 1 callersFunctionlazy_load_safetensors_file
(fp: IO[bytes], path: Path)
tokenizer/convert/convert.py:852
↓ 1 callersFunctionlazy_load_torch_file
(outer_fp: IO[bytes], path: Path)
tokenizer/convert/convert.py:838
↓ 1 callersMethodload
(offset: int, elm_count: int)
tokenizer/convert/convert.py:794
↓ 1 callersMethodloadHFTransformerJson
(model: LazyModel, config_path: Path)
tokenizer/convert/convert.py:216
↓ 1 callersMethodloadOriginalParamsJson
(model: LazyModel, config_path: Path)
tokenizer/convert/convert.py:270
↓ 1 callersFunctionload_checkpoint
( fabric: L.Fabric, model: nn.Module, checkpoint_path: Path, strict: bool = True )
lit_gpt/utils.py:360
↓ 1 callersFunctionload_some_model
Load a model of any supported format.
tokenizer/convert/convert.py:1260
↓ 1 callersFunctionload_unquantized
(lazy_tensor: LazyTensor, expected_dtype: Any = None, convert: bool = False)
tokenizer/convert/convert.py:625
↓ 1 callersMethodload_vocab
(self, vocab_types: list[str], model_parent_path: Path)
tokenizer/convert/convert.py:1325
↓ 1 callersFunctionload_weights
Loads the model weights from the specified path.
lit_gpt/utils.py:563
← previousnext →101–200 of 589, ranked by callers