MCPcopy Create free account

hub / github.com/Ugness/ELF-pytorch / functions

Functions106 in github.com/Ugness/ELF-pytorch

↓ 13 callersFunctionrestore_cond
(z_updated: torch.Tensor, cond_seq: torch.Tensor, cond_seq_mask: torch.Tensor)
pytorch_lightning/utils/sampling_utils.py:60
↓ 9 callersFunction_make_linear
(in_features: int, out_features: int, *, bias: bool = True, kernel_init: Callable = nn.init.x
pytorch_lightning/modules/layers.py:21
↓ 8 callersFunctionnet_out_to_v_x
Convert x_pred network output to (v, x). Drops decoder_logits if present.
pytorch_lightning/utils/sampling_utils.py:85
↓ 7 callersFunctionlog_for_0
(msg, *args, level=logging.INFO)
pytorch_lightning/utils/logging_utils.py:8
↓ 6 callersMethod__init__
(self, hidden_size: int, eps: float = 1e-6)
pytorch_lightning/modules/layers.py:36
↓ 6 callersFunction_restore_vx
(v: torch.Tensor, x: torch.Tensor, cond_seq: Optional[torch.Tensor], cond_seq_
pytorch_lightning/utils/sampling_utils.py:69
↓ 3 callersFunction_normal_002_
(t: torch.Tensor)
pytorch_lightning/modules/layers.py:31
↓ 3 callersMethodload_state_dict
(self, state: dict, device)
pytorch_lightning/lightning_module.py:70
↓ 2 callersMethod__init__
(self, model: torch.nn.Module, decay: float = 0.9999)
pytorch_lightning/lightning_module.py:31
↓ 2 callersMethod_aligned
Return the shadow tensor for `name` on `p`'s device, migrating lazily. Shadow is built before Lightning moves the model; first call after the
pytorch_lightning/lightning_module.py:35
↓ 2 callersFunction_broadcast_attn_mask
Reshape attn_mask to (B, 1, Lq_or_1, Ls) for SDPA broadcasting. 2D (B, L) -> (B, 1, 1, L); 3D (B, L, L) -> (B, 1, L, L).
pytorch_lightning/modules/layers.py:96
↓ 2 callersFunction_forward_sample
( model, z: torch.Tensor, t_batch: torch.Tensor, x_pred_prev: Optional[torch.Tensor], config, cfg_scal
pytorch_lightning/utils/sampling_utils.py:134
↓ 2 callersFunction_forward_sample_self_cond
( model, z: torch.Tensor, t_batch: torch.Tensor, x_pred_prev: Optional[torch.Tensor], config, self_con
pytorch_lightning/utils/sampling_utils.py:95
↓ 2 callersFunction_zero_cond
Build a zero tensor with cond positions restored from `cond_seq`.
pytorch_lightning/utils/sampling_utils.py:77
↓ 2 callersFunctionapply_config_overrides
(config: Config, overrides: List[str])
pytorch_lightning/configs/config.py:162
↓ 2 callersFunctionbuild_encoder
Factory: resolve `name` to a registered encoder class and construct it.
pytorch_lightning/encoders/__init__.py:18
↓ 2 callersFunctionbuild_run_name
(sampling_method: str, num_sampling_steps: int, cfg_scale: float, self_cond_cfg_scale: floa
pytorch_lightning/utils/generation_utils.py:118
↓ 2 callersFunctiondlm_decode_batch
Decode z (at t=1) to token ids via the decoder head.
pytorch_lightning/utils/generation_utils.py:102
↓ 2 callersFunctiongenerate_samples
Run a full sampling trajectory (SDE or ODE inner steps + final ODE step at t=1).
pytorch_lightning/utils/generation_utils.py:55
↓ 2 callersFunctionget_sampling_steps
(generator: Optional[torch.Generator], n_steps: int, device, time_schedule: str = "logi
pytorch_lightning/utils/sampling_utils.py:38
↓ 2 callersFunctionload_config_from_yaml
(path: Optional[str])
pytorch_lightning/configs/config.py:136
↓ 2 callersFunctionload_dataset_split
(path: str, dataset_cache_dir=None)
pytorch_lightning/utils/data_utils.py:110
↓ 2 callersFunctionload_sampling_configs
(path: str)
pytorch_lightning/configs/config.py:179
↓ 2 callersFunctionmask_after_eos
Mask everything at/after the first EOS per row (keeping EOS itself).
pytorch_lightning/utils/generation_utils.py:12
↓ 2 callersFunctionode_step
(model, z, t, t_next, x_pred_prev, config, cfg_scale, self_cond_cfg_scale, cond_seq, cond_seq_mas
pytorch_lightning/utils/sampling_utils.py:161
↓ 2 callersMethodrecord_generative_perplexity
(self, text_samples: List[str], max_length: int, retokenize: bool = True)
pytorch_lightning/utils/metrics_utils.py:62
↓ 2 callersFunctionsample_timesteps
(generator: Optional[torch.Generator], batch_size: int, device, P_mean: float = -0.8, P_s
pytorch_lightning/utils/sampling_utils.py:27
↓ 2 callersMethodswap_in
(self, model: torch.nn.Module)
pytorch_lightning/lightning_module.py:52
↓ 2 callersMethodupdate
(self, model: torch.nn.Module)
pytorch_lightning/lightning_module.py:46
↓ 1 callersMethod__init__
( self, text_encoder_dim: int, max_length: int, hidden_size: int = 1024,
pytorch_lightning/modules/model.py:40
↓ 1 callersFunction_all_gather_ids
(local: torch.Tensor, world_size: int)
pytorch_lightning/eval_lightning.py:52
↓ 1 callersMethod_all_gather_ids
(local: torch.Tensor, world_size: int)
pytorch_lightning/callbacks/gen_eval.py:168
↓ 1 callersFunction_coerce
(value: str, target_type)
pytorch_lightning/configs/config.py:152
↓ 1 callersFunction_flash4_bf16
FlashAttention-4 path via `flash_attn.cute.flash_attn_func` (CuTeDSL, optimized for Hopper/Blackwell). Q/K/V cast to bf16 at the boundary; output
pytorch_lightning/modules/layers.py:143
↓ 1 callersFunction_flash_sdpa_bf16
PyTorch SDPA in bf16 — kept as the masked-attention fallback because FA4's `flash_attn_func` does not accept an arbitrary dense (B, L, L) mask
pytorch_lightning/modules/layers.py:116
↓ 1 callersMethod_load_model
(self)
pytorch_lightning/utils/metrics_utils.py:42
↓ 1 callersMethod_log_running
(self, lr: float)
pytorch_lightning/lightning_module.py:304
↓ 1 callersFunction_looks_like_save_to_disk_arrow
(ds)
pytorch_lightning/utils/data_utils.py:102
↓ 1 callersMethod_lr_at_step
(self, opt_step: int)
pytorch_lightning/lightning_module.py:286
↓ 1 callersFunction_manual_sdpa_fp32
(q, k, v, attn_mask=None)
pytorch_lightning/modules/layers.py:106
↓ 1 callersFunction_pad_and_truncate
(ids_list, target_len: int, pad_token_id: int)
pytorch_lightning/utils/data_utils.py:23
↓ 1 callersFunction_resolve_precision
(cfg_precision: str)
pytorch_lightning/train_lightning.py:40
↓ 1 callersMethod_retokenize
(self, text_samples: List[str], max_length: int)
pytorch_lightning/utils/metrics_utils.py:53
↓ 1 callersFunction_rotate_half
(x: torch.Tensor)
pytorch_lightning/modules/layers.py:49
↓ 1 callersFunction_zeropower_via_newtonschulz5
Newton-Schulz iteration to compute the orthogonalization of G. Iterates X_{k+1} = a*X_k + (b*X_k X_k^T + c*(X_k X_k^T)^2) X_k for tuned (a,b,c).
pytorch_lightning/utils/muon.py:10
↓ 1 callersFunctionadd_noise
(x0: torch.Tensor, noise: torch.Tensor, t: torch.Tensor, config, cond_seq_mask: Optional[torch.T
pytorch_lightning/utils/sampling_utils.py:18
↓ 1 callersMethodbuild_context
(self, t, self_cond_cfg_scale=None)
pytorch_lightning/modules/model.py:125
↓ 1 callersFunctionbuild_muon_param_groups
Split params into (Muon, AdamW) groups: 2D weights → Muon; everything else (biases, RMSNorm gains, 1D learned tokens) → AdamW.
pytorch_lightning/utils/muon.py:85
↓ 1 callersFunctionbuild_self_attn_cond_masks
Return (encoder_attention_mask, attention_mask, cond_seq_mask) as float32 arrays. encoder_attention_mask: (B, L, L) — cond rows attend only to co
pytorch_lightning/utils/encoder_utils.py:17
↓ 1 callersFunctionencode_text
Run the frozen encoder and normalize the latents.
pytorch_lightning/utils/encoder_utils.py:9
↓ 1 callersMethodforward
Return last_hidden_state of shape (B, L, d_model).
pytorch_lightning/encoders/base.py:48
↓ 1 callersFunctionget_pad_token_id
(tokenizer, pad_token: str = "pad")
pytorch_lightning/utils/data_utils.py:16
↓ 1 callersFunctionload_dataset
(config, dataset_cache_dir=None)
pytorch_lightning/utils/data_utils.py:133
↓ 1 callersFunctionmain
()
pytorch_lightning/eval_lightning.py:60
↓ 1 callersFunctionmain
()
pytorch_lightning/train_lightning.py:51
↓ 1 callersFunctionmake_collate_fn
(*, max_seq_length: int, pad_token_id: int, max_input_seq_length: Optional[int] = None)
pytorch_lightning/utils/data_utils.py:34
↓ 1 callersFunctionmake_dataloader
( dataset, *, batch_size: int, shuffle: bool = True, max_seq_length: int = 512, pad_token_id: int = 0,
pytorch_lightning/utils/data_utils.py:66
↓ 1 callersFunctionparse_args
()
pytorch_lightning/eval_lightning.py:40
↓ 1 callersFunctionparse_args
()
pytorch_lightning/train_lightning.py:33
↓ 1 callersMethodrestore
(self, model: torch.nn.Module, backup: dict)
pytorch_lightning/lightning_module.py:61
↓ 1 callersFunctionsample_cfg_scale
(generator: Optional[torch.Generator], batch_size: int, device, cfg_min: float = 0.0, cfg
pytorch_lightning/utils/sampling_utils.py:53
↓ 1 callersFunctionsde_step
(model, z, t, t_next, x_pred_prev, config, cfg_scale, self_cond_cfg_scale, cond_seq, cond_seq_mas
pytorch_lightning/utils/sampling_utils.py:172
↓ 1 callersMethodstate_dict
(self)
pytorch_lightning/lightning_module.py:66
↓ 1 callersMethodstep
(self, closure=None)
pytorch_lightning/utils/muon.py:54
↓ 1 callersMethodtimestep_embedding
(t: torch.Tensor, dim: int, max_period: int = 10000)
pytorch_lightning/modules/layers.py:233
FunctionELF_B
(**kw)
pytorch_lightning/modules/model.py:175
FunctionELF_L
(**kw)
pytorch_lightning/modules/model.py:177
FunctionELF_M
(**kw)
pytorch_lightning/modules/model.py:176
Method__init__
(self, config: Config, vocab_size: int)
pytorch_lightning/lightning_module.py:79
Method__init__
(self, config: Config, tokenizer)
pytorch_lightning/lightning_module.py:353
Method__init__
(self, **kwargs)
pytorch_lightning/configs/config.py:18
Method__init__
(self, dim: int, pt_seq_len: int = 512, ft_seq_len: Optional[int] = None, theta: float = 1000
pytorch_lightning/modules/layers.py:56
Method__init__
(self, text_encoder_dim: int, hidden_size: int, bottleneck_dim: int)
pytorch_lightning/modules/layers.py:87
Method__init__
(self, dim: int, num_heads: int = 8, qkv_bias: bool = True, qk_norm: bool = True, attn_drop:
pytorch_lightning/modules/layers.py:169
Method__init__
(self, dim: int, hidden_dim: int, drop: float = 0.0, bias: bool = True)
pytorch_lightning/modules/layers.py:210
Method__init__
(self, hidden_size: int, frequency_embedding_size: int = 256)
pytorch_lightning/modules/layers.py:223
Method__init__
(self, hidden_size: int, patch_size: int, out_channels: int)
pytorch_lightning/modules/layers.py:251
Method__init__
(self, hidden_size: int, num_heads: int, mlp_ratio: float = 4.0, attn_drop: float = 0.0, proj
pytorch_lightning/modules/model.py:21
Method__init__
(self, params, lr: float = 0.02, momentum: float = 0.95, nesterov: bool = True, ns_steps: int
pytorch_lightning/utils/muon.py:40
Method__init__
(self, gen_ppl_eval_model_name_or_path: str, eval_ppl_batch_size: int = 64, eval_context_size
pytorch_lightning/utils/metrics_utils.py:23
Method__init__
(self, *, tokenizer, output_dir: str, num_samples: int, num_sampling_steps: int,
pytorch_lightning/callbacks/gen_eval.py:29
Method__init__
(self, model_name: str)
pytorch_lightning/encoders/base.py:43
Method__init__
(self, model_name: str, dtype: torch.dtype = torch.float32)
pytorch_lightning/encoders/t5.py:37
Method__repr__
(self)
pytorch_lightning/configs/config.py:22
Functioncollate
(batch_list)
pytorch_lightning/utils/data_utils.py:36
Methodconfigure_optimizers
(self)
pytorch_lightning/lightning_module.py:121
Methodforward
(self, x: torch.Tensor)
pytorch_lightning/modules/layers.py:41
Methodforward
(self, t: torch.Tensor)
pytorch_lightning/modules/layers.py:80
Methodforward
(self, x: torch.Tensor)
pytorch_lightning/modules/layers.py:92
Methodforward
(self, x: torch.Tensor, rope_fn=None, attention_mask: Optional[torch.Tensor] = None)
pytorch_lightning/modules/layers.py:185
Methodforward
(self, x: torch.Tensor)
pytorch_lightning/modules/layers.py:217
Methodforward
(self, t: torch.Tensor)
pytorch_lightning/modules/layers.py:245
Methodforward
(self, x: torch.Tensor)
pytorch_lightning/modules/layers.py:258
Methodforward
(self, x, rope_fn=None, attention_mask=None)
pytorch_lightning/modules/model.py:33
Methodforward
(self, x, t, attention_mask=None, self_cond_cfg_scale=None, decoder_step_active: bool = False
pytorch_lightning/modules/model.py:133
Methodforward
( self, input_ids: torch.Tensor, attention_mask: torch.Tensor, )
pytorch_lightning/encoders/t5.py:48
Functionload_jsonl_dataset
(path, tokenizer, input_key="input", output_key="output")
pytorch_lightning/utils/data_utils.py:87
Methodon_load_checkpoint
(self, checkpoint: Dict[str, Any])
pytorch_lightning/lightning_module.py:333
Methodon_save_checkpoint
(self, checkpoint: Dict[str, Any])
pytorch_lightning/lightning_module.py:326
Methodon_train_epoch_end
(self, trainer: L.Trainer, pl_module: L.LightningModule)
pytorch_lightning/callbacks/gen_eval.py:47
next →1–100 of 106, ranked by callers