Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Pints-AI/1.5-Pints
/ functions
Functions
589 in github.com/Pints-AI/1.5-Pints
⨍
Functions
589
◇
Types & classes
173
↓ 25 callers
Function
maybe_align
Assume that x already has last dim divisible by alignment_in_bytes
lit_gpt/rmsnorm.py:9
↓ 24 callers
Method
load
(model_plus: ModelPlus)
tokenizer/convert/convert.py:315
↓ 22 callers
Method
token_to_id
(self, token: str)
lit_gpt/tokenizer.py:91
↓ 20 callers
Method
encode
( self, string: str, device: Optional[torch.device] = None, bos: bool = False,
conftest.py:30
↓ 15 callers
Method
from_name
(cls, name: str, **kwargs: Any)
lit_gpt/lora.py:582
↓ 12 callers
Function
CLI
(*args: Any, **kwargs: Any)
lit_gpt/utils.py:456
↓ 12 callers
Method
norm_class
(self)
lit_gpt/config_base.py:96
↓ 11 callers
Method
decode
( self, tensor: Union[torch.Tensor, list], skip_special_tokens: Optional[bool] = None,
lit_gpt/tokenizer.py:148
↓ 10 callers
Function
save_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 callers
Method
store_early
(self, tensor)
lit_gpt/utils.py:238
↓ 8 callers
Method
apply
(self, prompt: str, **kwargs: str)
lit_gpt/prompts.py:86
↓ 8 callers
Function
map_old_state_dict_weights
(state_dict: Dict, mapping: Mapping, prefix: str)
lit_gpt/utils_old.py:482
↓ 8 callers
Method
save
(self, obj)
lit_gpt/utils.py:243
↓ 7 callers
Method
__init__
(self, fn)
lit_gpt/utils_old.py:219
↓ 7 callers
Method
__init__
(self, config: Config)
lit_gpt/lora.py:486
↓ 7 callers
Method
dtype
(self)
lit_gpt/packed_dataset.py:157
↓ 7 callers
Function
get_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 callers
Function
layer_template
(layer_name: str, idx: int)
convert/convert_lit_to_hf.py:24
↓ 7 callers
Function
load_param
( param: Union[torch.Tensor, NotYetLoadedTensor], name: str, dtype: Optional[torch.dtype], )
convert/convert_lit_to_hf.py:32
↓ 7 callers
Method
permute
(self, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:583
↓ 7 callers
Function
process_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 callers
Method
astype
(self, data_type: DataType)
tokenizer/convert/convert.py:581
↓ 6 callers
Method
encode
( self, string: str, device: Optional[torch.device] = None, bos: bool = False,
lit_gpt/tokenizer.py:102
↓ 6 callers
Method
setup
(self, stage: str = '')
lit_gpt/datamodules/deita.py:85
↓ 5 callers
Method
__init__
(self, config: Config)
lit_gpt/adapter_v2.py:70
↓ 5 callers
Method
add_array
(self, arr: np.ndarray)
lit_gpt/packed_dataset.py:164
↓ 5 callers
Function
load
()
tokenizer/convert/convert.py:706
↓ 5 callers
Method
scaled_dot_product_attention
( self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, mask: Optio
lit_gpt/model.py:373
↓ 4 callers
Method
__init__
(self, config: Config)
lit_gpt/model.py:44
↓ 4 callers
Method
_load_tensor
()
lit_gpt/utils_old.py:107
↓ 4 callers
Function
apply_rope
(x: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor)
lit_gpt/model.py:469
↓ 4 callers
Function
format_dataset
( dataset: List[DeitaRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/deita.py:114
↓ 4 callers
Method
gradient_accumulation_iters
Number of iterations between gradient synchronizations
lit_gpt/args.py:45
↓ 4 callers
Function
load_param
( param: Union[torch.Tensor, NotYetLoadedTensor], name: str, dtype: Optional[torch.dtype], ver
convert/convert_hf_to_lit.py:28
↓ 3 callers
Method
_load_from_state_dict
For compatibility with base checkpoints.
lit_gpt/lora.py:591
↓ 3 callers
Method
_load_from_state_dict
For compatibility with base checkpoints.
lit_gpt/adapter_v2.py:104
↓ 3 callers
Method
backward
(ctx, dz, *args)
lit_gpt/rmsnorm.py:374
↓ 3 callers
Method
build_kv_caches
( self, idx: torch.Tensor, max_seq_length: int, rope_cache_length: int )
lit_gpt/model.py:220
↓ 3 callers
Method
build_mask_cache
(self, idx: torch.Tensor)
lit_gpt/model.py:212
↓ 3 callers
Method
build_rope_cache
(self, idx: torch.Tensor)
lit_gpt/model.py:203
↓ 3 callers
Method
close
(self)
tokenizer/convert/convert.py:1080
↓ 3 callers
Function
convert_file
( pt_filename: str, sf_filename: str, )
convert/bin_to_safetensors.py:70
↓ 3 callers
Function
copy_config_files
Copies the specified configuration and tokenizer files into the output directory.
lit_gpt/utils.py:444
↓ 3 callers
Method
decode
(self, tokens: torch.Tensor)
conftest.py:68
↓ 3 callers
Function
format_dataset
( dataset: List[UltraChatRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/ultrachat_200k.py:113
↓ 3 callers
Function
format_dataset
( dataset: List[CapybaraRow], include_multi_turn_conversations: bool )
lit_gpt/datamodules/capybara.py:114
↓ 3 callers
Method
get_rope_cache
(self, device: Optional[torch.device] = None)
lit_gpt/model.py:193
↓ 3 callers
Method
mlp_class
(self)
lit_gpt/lora.py:481
↓ 3 callers
Function
num_parameters
(module: nn.Module, requires_grad: Optional[bool] = None)
lit_gpt/utils_old.py:27
↓ 3 callers
Function
num_parameters
(module: nn.Module, requires_grad: Optional[bool] = None)
lit_gpt/utils.py:48
↓ 3 callers
Method
on_train_batch_end
( self, samples: int, # total samples seen (per device) train_elapsed: float, # tota
lit_gpt/speed_monitor.py:250
↓ 3 callers
Method
reset_parameters
Reset all the weights, even including pretrained ones.
lit_gpt/lora.py:128
↓ 3 callers
Method
reset_parameters
(self)
lit_gpt/adapter_v2.py:64
↓ 2 callers
Method
__init__
( self, flops_available: float, log_dict: Callable[[Dict, int], None], window_
lit_gpt/speed_monitor.py:214
↓ 2 callers
Method
__init__
(self, config: Config)
lit_gpt/adapter.py:31
↓ 2 callers
Method
__init__
(self, size: int, dim: int = -1, eps: float = 1e-5)
lit_gpt/rmsnorm.py:828
↓ 2 callers
Method
_close_mmaps
(self)
lit_gpt/packed_dataset.py:219
↓ 2 callers
Method
_load_n_chunks
(self)
lit_gpt/packed_dataset.py:223
↓ 2 callers
Method
_write_chunk
(self)
lit_gpt/packed_dataset.py:136
↓ 2 callers
Method
_write_storage_and_return_key
(self, storage)
lit_gpt/utils_old.py:391
↓ 2 callers
Method
_write_storage_and_return_key
(self, storage)
lit_gpt/utils.py:254
↓ 2 callers
Method
add_meta_arch
(self, params: Params)
tokenizer/convert/convert.py:973
↓ 2 callers
Method
add_meta_special_vocab
(self, svocab: gguf.SpecialVocab)
tokenizer/convert/convert.py:1063
↓ 2 callers
Method
add_meta_vocab
(self, vocab: Vocab)
tokenizer/convert/convert.py:1048
↓ 2 callers
Method
apply
(self, prompt: str, system='', **kwargs: str)
lit_gpt/prompts.py:58
↓ 2 callers
Method
apply
(self, prompt, **kwargs)
lit_gpt/datamodules/base_test.py:16
↓ 2 callers
Function
bounded_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 callers
Function
build_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 callers
Function
check_vocab_size
(params: Params, vocab: Vocab, pad_vocab: bool = False)
tokenizer/convert/convert.py:937
↓ 2 callers
Function
chunked_cross_entropy
( logits: Union[torch.Tensor, List[torch.Tensor]], targets: torch.Tensor, chunk_size: int = 128,
lit_gpt/utils.py:273
↓ 2 callers
Method
compute
(self, value: float)
finetune/full.py:61
↓ 2 callers
Method
conv1d
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 callers
Function
convert
(name: str)
tokenizer/convert/convert.py:686
↓ 2 callers
Function
create_dataloader
Create a dataloader
pretrain/main.py:672
↓ 2 callers
Function
do_dump_model
(model_plus: ModelPlus)
tokenizer/convert/convert.py:1369
↓ 2 callers
Method
eval_end
(self, eval_elapsed: float)
lit_gpt/speed_monitor.py:340
↓ 2 callers
Method
find_subsequence
Check if sequence exist.
finetune/datacollators.py:219
↓ 2 callers
Function
flops_per_param
(config: Config, n_params: int)
lit_gpt/speed_monitor.py:424
↓ 2 callers
Function
flops_per_param
( max_seq_length: int, n_layer: int, n_embd: int, n_params: int )
lit_gpt/utils.py:371
↓ 2 callers
Function
format_dataset
( dataset: List[LlamaInstructRow], include_multi_turn_conversations=bool, )
lit_gpt/datamodules/llama_instruct.py:98
↓ 2 callers
Function
format_dataset
( dataset: List[WizardLMEvolInstructV2Row], # `include_multi_turn_conversations` kept for backward com
lit_gpt/datamodules/wizardlm_evol_instruct_v2.py:113
↓ 2 callers
Function
format_dataset
( dataset: List[SlimOrcaIDKRow], # `include_multi_turn_conversations` kept for backward compatibility
lit_gpt/datamodules/slim_orca_idontknow.py:113
↓ 2 callers
Function
format_dataset
( dataset: List[SlimOrcaDedupRow], # `include_multi_turn_conversations` kept for backward compatibilit
lit_gpt/datamodules/slim_orca_dedup.py:102
↓ 2 callers
Function
format_dataset
( dataset: List[MetaMathQARow], # `include_multi_turn_conversations` kept for backward compatibility w
lit_gpt/datamodules/meta_math_qa.py:107
↓ 2 callers
Function
format_dataset
(dataset: Dataset, prompt_template: str, score_distance: float)
dpo/adapters/ultrafeedback_binarized.py:73
↓ 2 callers
Function
format_rows
(prompt_template='chatml')
dpo/adapters/distilabel_capybara_dpo.py:67
↓ 2 callers
Function
format_rows
(prompt_template='chatml')
dpo/adapters/open_hermes_preferences.py:67
↓ 2 callers
Function
format_rows
(prompt_template='chatml')
dpo/adapters/nectar.py:66
↓ 2 callers
Function
format_rows
(prompt_template='chatml')
dpo/adapters/ultrafeedback_binarized.py:92
↓ 2 callers
Method
forward
(self, input, target)
lit_gpt/fused_cross_entropy.py:158
↓ 2 callers
Function
generate
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 callers
Function
get_flops_available
(device: torch.device, precision: str)
lit_gpt/speed_monitor.py:103
↓ 2 callers
Method
get_token_score
(self, token_id: int)
tokenizer/convert/convert.py:532
↓ 2 callers
Method
get_token_type
(self, token_id: int, token_text: bytes, special_ids: set[int])
tokenizer/convert/convert.py:524
↓ 2 callers
Function
lazy_load_file
(path: Path)
tokenizer/convert/convert.py:884
↓ 2 callers
Method
load_dataset
(self, split: Split, prompt_template='chatml')
dpo/adapters/nectar.py:31
↓ 2 callers
Function
mocked_data_labels
(ignore_index=-100)
lit_gpt/datamodules/sft_multiturn_dataset_base_test.py:38
↓ 2 callers
Function
next_token
( model: GPT, input_pos: torch.Tensor, x: torch.Tensor, **kwargs: Any )
lit_gpt/generate/base.py:59
↓ 2 callers
Function
permute
(weights: NDArray, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:568
↓ 2 callers
Function
permute_lazy
(lazy_tensor: LazyTensor, n_head: int, n_head_kv: int)
tokenizer/convert/convert.py:738
next →
1–100 of 589, ranked by callers