MCPcopy Create free account

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

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

↓ 25 callersFunctionmaybe_align
Assume that x already has last dim divisible by alignment_in_bytes
lit_gpt/rmsnorm.py:9
↓ 24 callersMethodload
(model_plus: ModelPlus)
tokenizer/convert/convert.py:315
↓ 22 callersMethodtoken_to_id
(self, token: str)
lit_gpt/tokenizer.py:91
↓ 20 callersMethodencode
( self, string: str, device: Optional[torch.device] = None, bos: bool = False,
conftest.py:30
↓ 15 callersMethodfrom_name
(cls, name: str, **kwargs: Any)
lit_gpt/lora.py:582
↓ 12 callersFunctionCLI
(*args: Any, **kwargs: Any)
lit_gpt/utils.py:456
↓ 12 callersMethodnorm_class
(self)
lit_gpt/config_base.py:96
↓ 11 callersMethoddecode
( self, tensor: Union[torch.Tensor, list], skip_special_tokens: Optional[bool] = None,
lit_gpt/tokenizer.py:148
↓ 10 callersFunctionsave_checkpoint
WARNING: This function CANNOT NOT be called only on a single GPU device, it MUST BE called on ALL gpus. This is because fabric.save() calls `
pretrain/main.py:801
↓ 9 callersMethodstore_early
(self, tensor)
lit_gpt/utils.py:238
↓ 8 callersMethodapply
(self, prompt: str, **kwargs: str)
lit_gpt/prompts.py:86
↓ 8 callersFunctionmap_old_state_dict_weights
(state_dict: Dict, mapping: Mapping, prefix: str)
lit_gpt/utils_old.py:482
↓ 8 callersMethodsave
(self, obj)
lit_gpt/utils.py:243
↓ 7 callersMethod__init__
(self, fn)
lit_gpt/utils_old.py:219
↓ 7 callersMethod__init__
(self, config: Config)
lit_gpt/lora.py:486
↓ 7 callersMethoddtype
(self)
lit_gpt/packed_dataset.py:157
↓ 7 callersFunctionget_sft_collate_fn
Returns the collate function for supervised finetuning (needed in the DataLoader). The collate function gets a list of dicts with keys `input_ids
lit_gpt/datamodules/base.py:53
↓ 7 callersFunctionlayer_template
(layer_name: str, idx: int)
convert/convert_lit_to_hf.py:24
↓ 7 callersFunctionload_param
( param: Union[torch.Tensor, NotYetLoadedTensor], name: str, dtype: Optional[torch.dtype], )
convert/convert_lit_to_hf.py:32
↓ 7 callersMethodpermute
(self, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:583
↓ 7 callersFunctionprocess_dataset
Process the dataset using the provided encoding function and return the total token count. Args: name (str): The name of the dat
tokenizer/llama_vs_mistral/dataset_compression_cmp.py:62
↓ 6 callersMethodastype
(self, data_type: DataType)
tokenizer/convert/convert.py:581
↓ 6 callersMethodencode
( self, string: str, device: Optional[torch.device] = None, bos: bool = False,
lit_gpt/tokenizer.py:102
↓ 6 callersMethodsetup
(self, stage: str = '')
lit_gpt/datamodules/deita.py:85
↓ 5 callersMethod__init__
(self, config: Config)
lit_gpt/adapter_v2.py:70
↓ 5 callersMethodadd_array
(self, arr: np.ndarray)
lit_gpt/packed_dataset.py:164
↓ 5 callersFunctionload
()
tokenizer/convert/convert.py:706
↓ 5 callersMethodscaled_dot_product_attention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, mask: Optio
lit_gpt/model.py:373
↓ 4 callersMethod__init__
(self, config: Config)
lit_gpt/model.py:44
↓ 4 callersMethod_load_tensor
()
lit_gpt/utils_old.py:107
↓ 4 callersFunctionapply_rope
(x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor)
lit_gpt/model.py:469
↓ 4 callersFunctionformat_dataset
( dataset: List[DeitaRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/deita.py:114
↓ 4 callersMethodgradient_accumulation_iters
Number of iterations between gradient synchronizations
lit_gpt/args.py:45
↓ 4 callersFunctionload_param
( param: Union[torch.Tensor, NotYetLoadedTensor], name: str, dtype: Optional[torch.dtype], ver
convert/convert_hf_to_lit.py:28
↓ 3 callersMethod_load_from_state_dict
For compatibility with base checkpoints.
lit_gpt/lora.py:591
↓ 3 callersMethod_load_from_state_dict
For compatibility with base checkpoints.
lit_gpt/adapter_v2.py:104
↓ 3 callersMethodbackward
(ctx, dz, *args)
lit_gpt/rmsnorm.py:374
↓ 3 callersMethodbuild_kv_caches
( self, idx: torch.Tensor, max_seq_length: int, rope_cache_length: int )
lit_gpt/model.py:220
↓ 3 callersMethodbuild_mask_cache
(self, idx: torch.Tensor)
lit_gpt/model.py:212
↓ 3 callersMethodbuild_rope_cache
(self, idx: torch.Tensor)
lit_gpt/model.py:203
↓ 3 callersMethodclose
(self)
tokenizer/convert/convert.py:1080
↓ 3 callersFunctionconvert_file
( pt_filename: str, sf_filename: str, )
convert/bin_to_safetensors.py:70
↓ 3 callersFunctioncopy_config_files
Copies the specified configuration and tokenizer files into the output directory.
lit_gpt/utils.py:444
↓ 3 callersMethoddecode
(self, tokens: torch.Tensor)
conftest.py:68
↓ 3 callersFunctionformat_dataset
( dataset: List[UltraChatRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/ultrachat_200k.py:113
↓ 3 callersFunctionformat_dataset
( dataset: List[CapybaraRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/capybara.py:114
↓ 3 callersMethodget_rope_cache
(self, device: Optional[torch.device] = None)
lit_gpt/model.py:193
↓ 3 callersMethodmlp_class
(self)
lit_gpt/lora.py:481
↓ 3 callersFunctionnum_parameters
(module: nn.Module, requires_grad: Optional[bool] = None)
lit_gpt/utils_old.py:27
↓ 3 callersFunctionnum_parameters
(module: nn.Module, requires_grad: Optional[bool] = None)
lit_gpt/utils.py:48
↓ 3 callersMethodon_train_batch_end
( self, samples: int, # total samples seen (per device) train_elapsed: float, # tota
lit_gpt/speed_monitor.py:250
↓ 3 callersMethodreset_parameters
Reset all the weights, even including pretrained ones.
lit_gpt/lora.py:128
↓ 3 callersMethodreset_parameters
(self)
lit_gpt/adapter_v2.py:64
↓ 2 callersMethod__init__
( self, flops_available: float, log_dict: Callable[[Dict, int], None], window_
lit_gpt/speed_monitor.py:214
↓ 2 callersMethod__init__
(self, config: Config)
lit_gpt/adapter.py:31
↓ 2 callersMethod__init__
(self, size: int, dim: int = -1, eps: float = 1e-5)
lit_gpt/rmsnorm.py:828
↓ 2 callersMethod_close_mmaps
(self)
lit_gpt/packed_dataset.py:219
↓ 2 callersMethod_load_n_chunks
(self)
lit_gpt/packed_dataset.py:223
↓ 2 callersMethod_write_chunk
(self)
lit_gpt/packed_dataset.py:136
↓ 2 callersMethod_write_storage_and_return_key
(self, storage)
lit_gpt/utils_old.py:391
↓ 2 callersMethod_write_storage_and_return_key
(self, storage)
lit_gpt/utils.py:254
↓ 2 callersMethodadd_meta_arch
(self, params: Params)
tokenizer/convert/convert.py:973
↓ 2 callersMethodadd_meta_special_vocab
(self, svocab: gguf.SpecialVocab)
tokenizer/convert/convert.py:1063
↓ 2 callersMethodadd_meta_vocab
(self, vocab: Vocab)
tokenizer/convert/convert.py:1048
↓ 2 callersMethodapply
(self, prompt: str, system='', **kwargs: str)
lit_gpt/prompts.py:58
↓ 2 callersMethodapply
(self, prompt, **kwargs)
lit_gpt/datamodules/base_test.py:16
↓ 2 callersFunctionbounded_parallel_map
Parallel map, but with backpressure. If the caller doesn't call `next` fast enough, this will stop calling `func` at some point rather than l
tokenizer/convert/convert.py:902
↓ 2 callersFunctionbuild_rope_cache
Enhanced Transformer with Rotary Position Embedding. Derived from: https://github.com/labmlai/annotated_deep_learning_paper_implementations/blob/
lit_gpt/model.py:435
↓ 2 callersFunctioncheck_vocab_size
(params: Params, vocab: Vocab, pad_vocab: bool = False)
tokenizer/convert/convert.py:937
↓ 2 callersFunctionchunked_cross_entropy
( logits: Union[torch.Tensor, List[torch.Tensor]], targets: torch.Tensor, chunk_size: int = 128,
lit_gpt/utils.py:273
↓ 2 callersMethodcompute
(self, value: float)
finetune/full.py:61
↓ 2 callersMethodconv1d
An extension of the `torch.nn.functional.conv1d` function with a logic specific to grouped queries. If the number of heads is equal to the nu
lit_gpt/lora.py:322
↓ 2 callersFunctionconvert
(name: str)
tokenizer/convert/convert.py:686
↓ 2 callersFunctioncreate_dataloader
Create a dataloader
pretrain/main.py:672
↓ 2 callersFunctiondo_dump_model
(model_plus: ModelPlus)
tokenizer/convert/convert.py:1369
↓ 2 callersMethodeval_end
(self, eval_elapsed: float)
lit_gpt/speed_monitor.py:340
↓ 2 callersMethodfind_subsequence
Check if sequence exist.
finetune/datacollators.py:219
↓ 2 callersFunctionflops_per_param
(config: Config, n_params: int)
lit_gpt/speed_monitor.py:424
↓ 2 callersFunctionflops_per_param
( max_seq_length: int, n_layer: int, n_embd: int, n_params: int )
lit_gpt/utils.py:371
↓ 2 callersFunctionformat_dataset
( dataset: List[LlamaInstructRow], include_multi_turn_conversations=bool, )
lit_gpt/datamodules/llama_instruct.py:98
↓ 2 callersFunctionformat_dataset
( dataset: List[WizardLMEvolInstructV2Row], # `include_multi_turn_conversations` kept for backward com
lit_gpt/datamodules/wizardlm_evol_instruct_v2.py:113
↓ 2 callersFunctionformat_dataset
( dataset: List[SlimOrcaIDKRow], # `include_multi_turn_conversations` kept for backward compatibility
lit_gpt/datamodules/slim_orca_idontknow.py:113
↓ 2 callersFunctionformat_dataset
( dataset: List[SlimOrcaDedupRow], # `include_multi_turn_conversations` kept for backward compatibilit
lit_gpt/datamodules/slim_orca_dedup.py:102
↓ 2 callersFunctionformat_dataset
( dataset: List[MetaMathQARow], # `include_multi_turn_conversations` kept for backward compatibility w
lit_gpt/datamodules/meta_math_qa.py:107
↓ 2 callersFunctionformat_dataset
(dataset: Dataset, prompt_template: str, score_distance: float)
dpo/adapters/ultrafeedback_binarized.py:73
↓ 2 callersFunctionformat_rows
(prompt_template='chatml')
dpo/adapters/distilabel_capybara_dpo.py:67
↓ 2 callersFunctionformat_rows
(prompt_template='chatml')
dpo/adapters/open_hermes_preferences.py:67
↓ 2 callersFunctionformat_rows
(prompt_template='chatml')
dpo/adapters/nectar.py:66
↓ 2 callersFunctionformat_rows
(prompt_template='chatml')
dpo/adapters/ultrafeedback_binarized.py:92
↓ 2 callersMethodforward
(self, input, target)
lit_gpt/fused_cross_entropy.py:158
↓ 2 callersFunctiongenerate
Takes a conditioning sequence (prompt) as input and continues to generate as many tokens as requested. The implementation of this function is
lit_gpt/generate/base.py:68
↓ 2 callersFunctionget_flops_available
(device: torch.device, precision: str)
lit_gpt/speed_monitor.py:103
↓ 2 callersMethodget_token_score
(self, token_id: int)
tokenizer/convert/convert.py:532
↓ 2 callersMethodget_token_type
(self, token_id: int, token_text: bytes, special_ids: set[int])
tokenizer/convert/convert.py:524
↓ 2 callersFunctionlazy_load_file
(path: Path)
tokenizer/convert/convert.py:884
↓ 2 callersMethodload_dataset
(self, split: Split, prompt_template='chatml')
dpo/adapters/nectar.py:31
↓ 2 callersFunctionmocked_data_labels
(ignore_index=-100)
lit_gpt/datamodules/sft_multiturn_dataset_base_test.py:38
↓ 2 callersFunctionnext_token
( model: GPT, input_pos: torch.Tensor, x: torch.Tensor, **kwargs: Any )
lit_gpt/generate/base.py:59
↓ 2 callersFunctionpermute
(weights: NDArray, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:568
↓ 2 callersFunctionpermute_lazy
(lazy_tensor: LazyTensor, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:738
next →1–100 of 589, ranked by callers