MCPcopy Create free account

hub / github.com/ByteDance-Seed/AHN / functions

Functions289 in github.com/ByteDance-Seed/AHN

↓ 1 callersFunctionprocess_args
(args)
eval/lveval/pred.py:222
↓ 1 callersFunctionprocess_pt_shard
(src: Path, dst: Path, old: str, new: str, dry: bool)
examples/scripts/utils/rename_sd.py:50
↓ 1 callersFunctionprocess_pt_shard
(src: Path, dst: Path, old: str, new: str, dry: bool)
examples/scripts/deprecated/rename_sd.py:50
↓ 1 callersFunctionprocess_safetensors_shard
(src: Path, dst: Path, old: str, new: str, dry: bool)
examples/scripts/utils/rename_sd.py:25
↓ 1 callersFunctionprocess_safetensors_shard
(src: Path, dst: Path, old: str, new: str, dry: bool)
examples/scripts/deprecated/rename_sd.py:25
↓ 1 callersFunctionread_index_json
If an index file exists (for sharded checkpoints), return {param_key: shard_file}.
examples/scripts/utils/split_weights.py:33
↓ 1 callersFunctionremove_articles
(text)
eval/longbench/metrics.py:25
↓ 1 callersFunctionremove_articles
(text)
eval/lveval/metrics.py:33
↓ 1 callersMethodreset_parameters
(self)
src/ahn/utils.py:62
↓ 1 callersFunctionrouge_score
(prediction, ground_truth, **kwargs)
eval/longbench/metrics.py:120
↓ 1 callersFunctionscorer
(dataset, predictions, answers, all_classes)
eval/longbench/eval.py:89
↓ 1 callersFunctionscorer
(dataset, predictions, answers, gold_anss)
eval/lveval/eval.py:22
↓ 1 callersFunctionscorer_e
(dataset, predictions, answers, lengths, all_classes)
eval/longbench/eval.py:65
↓ 1 callersFunctionseed_everything
(seed)
eval/longbench/pred.py:217
↓ 1 callersFunctionseed_everything
(seed)
eval/lveval/utils.py:28
↓ 1 callersFunctionsingle_processing
(datasets, args)
eval/lveval/pred.py:190
↓ 1 callersFunctionstr_to_dtype
(name: str)
examples/scripts/inference.py:60
↓ 1 callersMethodtrim_cache
Evict key-value tokens from the cache after compression into memory.
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:1086
↓ 1 callersMethodtrim_cache
Evict key-value tokens from the cache after compression into memory.
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:1075
↓ 1 callersFunctiontruncate_prompt
(tokenizer, prompt, max_length)
eval/lveval/utils.py:133
Method__init__
( self, in_features: int, out_features: int, num_groups: int, use_bias
src/ahn/utils.py:30
Method__init__
(self, num_heads: int, head_dim: int, use_dimwise_pos: bool = False)
src/ahn/utils.py:184
Method__init__
Qwen3RMSNorm is equivalent to T5LayerNorm
src/ahn/transformer/qwen3/modeling_qwen3.py:64
Method__init__
(self, config: Qwen3Config, layer_idx: int)
src/ahn/transformer/qwen3/modeling_qwen3.py:174
Method__init__
(self, config: Qwen3Config, layer_idx: int)
src/ahn/transformer/qwen3/modeling_qwen3.py:258
Method__init__
(self, config: Qwen3Config, device=None)
src/ahn/transformer/qwen3/modeling_qwen3.py:317
Method__init__
(self, config: Qwen3Config)
src/ahn/transformer/qwen3/modeling_qwen3.py:476
Method__init__
(self, config)
src/ahn/transformer/qwen3/modeling_qwen3.py:834
Method__init__
(self, config)
src/ahn/transformer/qwen3/modeling_qwen3.py:964
Method__init__
(self, config)
src/ahn/transformer/qwen3/modeling_qwen3.py:1057
Method__init__
(self, config)
src/ahn/transformer/qwen3/modeling_qwen3.py:1141
Method__init__
( self, vocab_size=151936, hidden_size=4096, intermediate_size=22016,
src/ahn/transformer/qwen3/configuration_qwen3.py:152
Method__init__
(self, config: Qwen2Config, layer_idx: int)
src/ahn/transformer/qwen2/modeling_qwen2.py:138
Method__init__
Qwen2RMSNorm is equivalent to T5LayerNorm
src/ahn/transformer/qwen2/modeling_qwen2.py:212
Method__init__
(self, config: Qwen2Config, layer_idx: int)
src/ahn/transformer/qwen2/modeling_qwen2.py:232
Method__init__
(self, config: Qwen2Config, device=None)
src/ahn/transformer/qwen2/modeling_qwen2.py:289
Method__init__
(self, config: Qwen2Config)
src/ahn/transformer/qwen2/modeling_qwen2.py:448
Method__init__
(self, config)
src/ahn/transformer/qwen2/modeling_qwen2.py:740
Method__init__
(self, config)
src/ahn/transformer/qwen2/modeling_qwen2.py:870
Method__init__
(self, config)
src/ahn/transformer/qwen2/modeling_qwen2.py:963
Method__init__
(self, config)
src/ahn/transformer/qwen2/modeling_qwen2.py:1047
Method__init__
( self, vocab_file=None, merges_file=None, tokenizer_file=None, unk_to
src/ahn/transformer/qwen2/tokenization_qwen2_fast.py:83
Method__init__
( self, vocab_size=151936, hidden_size=4096, intermediate_size=22016,
src/ahn/transformer/qwen2/configuration_qwen2.py:132
Method__init__
( self, vocab_file, merges_file, errors="replace", unk_token="<|endoft
src/ahn/transformer/qwen2/tokenization_qwen2.py:137
Method__init__
( self, loss_type: Optional[str] = "ce", _layer_implementation: Optional[str] = "Qwen2
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:74
Method__init__
(self, *args, **kwargs)
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:113
Method__init__
(self, config, do_train: bool = False)
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:720
Method__init__
( self, config: Qwen2Config, layer_idx: int, ahn_cls_name: str = "GatedDeltaNet" )
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:1049
Method__init__
( self, loss_type: Optional[str] = "ce", _layer_implementation: Optional[str] = "Qwen3
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:76
Method__init__
(self, *args, **kwargs)
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:115
Method__init__
(self, config, do_train: bool = False)
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:713
Method__init__
( self, config: Qwen3Config, layer_idx: int, ahn_cls_name: str = "GatedDeltaNe
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:1034
Method__init__
( self, mode: str = 'chunk', d_model: int = None, hidden_size: int = 1024,
src/ahn/rnn/delta_net.py:82
Method__init__
( self, num_heads: int = 8, head_dim: int = 128, hidden_size: int = 1024,
src/ahn/rnn/mamba2.py:120
Method__init__
( self, hidden_size: int = 2048, expand_v: float = 1, head_dim: int = 256,
src/ahn/rnn/gated_deltanet.py:93
Method_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
src/ahn/transformer/qwen2/tokenization_qwen2.py:278
Method_convert_token_to_id
Converts a token (str) in an id using the vocab.
src/ahn/transformer/qwen2/tokenization_qwen2.py:273
Method_init_weights
(self, module)
src/ahn/transformer/qwen3/modeling_qwen3.py:385
Method_init_weights
(self, module)
src/ahn/transformer/qwen2/modeling_qwen2.py:357
Method_init_weights
(model: nn.Module)
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:755
Method_init_weights
(model: nn.Module)
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:748
Function_init_worker
(args)
eval/lveval/pred.py:41
Function_mp_fn
(index)
src/train.py:26
Method_tokenize
Tokenize a string.
src/ahn/transformer/qwen2/tokenization_qwen2.py:262
Method_update_model_kwargs_for_generation
( self, outputs: ModelOutput, model_kwargs: Dict[str, Any], is_encoder_decoder
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:988
Method_update_model_kwargs_for_generation
( self, outputs: ModelOutput, model_kwargs: Dict[str, Any], is_encoder_decoder
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:973
Functionapply_mask_to_padding_states
Tunes out the hidden states for padding tokens, see https://github.com/state-spaces/mamba/issues/66
src/ahn/rnn/mamba2.py:49
Functionclassification_score
(prediction, ground_truth, **kwargs)
eval/longbench/metrics.py:104
Functioncode_sim_score
(prediction, ground_truth, **kwargs)
eval/longbench/metrics.py:94
Functioncompare_models
(new_model, model, atol=1e-6, rtol=1e-5)
examples/scripts/utils/model_compare.py:3
Methodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
src/ahn/transformer/qwen2/tokenization_qwen2.py:283
Functioncount_score
(prediction, ground_truth, **kwargs)
eval/longbench/metrics.py:58
Methodctx_sliding_window_mask
(b, h, q_idx, kv_idx)
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:428
Methodctx_sliding_window_mask
(b, h, q_idx, kv_idx)
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:431
Functioncustom_sort
(s)
eval/lveval/eval.py:17
Methoddefault_forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:1167
Methoddefault_forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:1157
Functiondump_preds_results_once
(pred, save_path)
eval/lveval/utils.py:45
Functioneager_attention_forward
( module: nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, attentio
src/ahn/transformer/qwen3/modeling_qwen3.py:145
Functioneager_attention_forward
( module: nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, attentio
src/ahn/transformer/qwen2/modeling_qwen2.py:109
Functionelu_p1
(x)
src/ahn/rnn/delta_net.py:33
Functionelu_p1
(x)
src/ahn/rnn/gated_deltanet.py:37
Functionevaluate
(mix)
eval/lveval/pred.py:88
Methodextra_repr
(self)
src/ahn/transformer/qwen3/modeling_qwen3.py:79
Methodextra_repr
(self)
src/ahn/transformer/qwen2/modeling_qwen2.py:227
Methodforward
(self, x)
src/ahn/utils.py:65
Methodforward
( self, hidden_states: torch.Tensor, q_states: torch.Tensor, k_states: torch.T
src/ahn/utils.py:158
Methodforward
( self, pos_ratio: torch.FloatTensor, h_mem: torch.Tensor, h_local: torch.Tensor )
src/ahn/utils.py:198
Methodforward
(self, hidden_states)
src/ahn/transformer/qwen3/modeling_qwen3.py:72
Methodforward
(self, x)
src/ahn/transformer/qwen3/modeling_qwen3.py:94
Methodforward
( self, hidden_states: torch.Tensor, position_embeddings: Tuple[torch.Tensor, torch.Te
src/ahn/transformer/qwen3/modeling_qwen3.py:206
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
src/ahn/transformer/qwen3/modeling_qwen3.py:273
Methodforward
(self, x, position_ids)
src/ahn/transformer/qwen3/modeling_qwen3.py:336
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, attention_mask: Optional[torch.T
src/ahn/transformer/qwen3/modeling_qwen3.py:500
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked lan
src/ahn/transformer/qwen3/modeling_qwen3.py:865
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
src/ahn/transformer/qwen3/modeling_qwen3.py:981
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
src/ahn/transformer/qwen3/modeling_qwen3.py:1086
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
src/ahn/transformer/qwen3/modeling_qwen3.py:1157
Methodforward
(self, x)
src/ahn/transformer/qwen2/modeling_qwen2.py:58
Methodforward
( self, hidden_states: torch.Tensor, position_embeddings: Tuple[torch.Tensor, torch.Te
src/ahn/transformer/qwen2/modeling_qwen2.py:152
← previousnext →101–200 of 289, ranked by callers