MCPcopy Create free account

hub / github.com/SafeAILab/EAGLE / functions

Functions596 in github.com/SafeAILab/EAGLE

↓ 115 callersMethodcat
Concatenate the given tensor with the current data. Args: tensor (torch.Tensor): The tensor to be concatenated.
eagle/model/kv_cache.py:52
↓ 79 callersMethodcat
Concatenate the given tensor with the current data. Args: tensor (torch.Tensor): The tensor to be concatenated.
eagle/testbug/model/kv_cache.py:52
↓ 19 callersMethodfrom_pretrained
( cls, use_eagle3=True, base_model_path=None, ea_model_path=No
eagle/model/ea_model.py:89
↓ 17 callersFunctionprepare_logits_processor
( temperature: float = 0.0, repetition_penalty: float = 0.0, top_p: float = 0.0,
eagle/model/utils.py:38
↓ 12 callersMethodeagenerate
( self, input_ids, temperature=0.0, top_p=0.0, top
eagle/model/ea_model.py:199
↓ 12 callersMethodget_tokenizer
Get the tokenizer of the base model. Returns: Tokenizer: The tokenizer of the base model.
eagle/model/ea_model.py:80
↓ 10 callersMethod__init__
(self, config)
eagle/traineagle3/modeling_llama_kv.py:491
↓ 10 callersMethod__init__
(self, config)
eagle/model/modeling_llama_kv.py:491
↓ 9 callersMethod__init__
(self, parent=None, value=None, dict_key=None)
eagle/modeling_eagle.py:563
↓ 9 callersMethod__init__
(self)
eagle/testbug/model/cnets.py:445
↓ 9 callersMethod__init__
(self, config)
eagle/model/modeling_qwen2_kv.py:209
↓ 9 callersMethod__init__
(self, config)
eagle/model/modeling_qwen3_kv.py:137
↓ 9 callersMethodfrom_pretrained
( cls, based, draftd, )
eagle/testbug/model/ea_model.py:50
↓ 9 callersFunctioninitialize_past_key_values
Initialize past key and value states for a given transformer model. This function prepares key-value cache structures for the model, allowin
eagle/model/kv_cache.py:69
↓ 9 callersMethodreset_kv
(self)
eagle/model/cnets.py:666
↓ 9 callersFunctionreset_tree_mode
( model, )
eagle/model/utils.py:257
↓ 8 callersMethod__init__
(self, config: MixtralConfig)
eagle/model/modeling_mixtral_kv.py:720
↓ 8 callersMethod__init__
(self)
eagle/model/cnets1.py:460
↓ 7 callersMethod__init__
(self, config, ds_config, training_config, load_head=False, load_emb=True, path=None)
eagle/traineagle3/cnets.py:481
↓ 7 callersMethod__init__
(self, config, load_emb=False, path=None, bias=True, total_tokens=63, depth=5, top_k=8, threshold=1.0)
eagle/model/cnets.py:479
↓ 6 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
eagle/model/modeling_qwen2_kv.py:223
↓ 5 callersFunctiongenerate_tree_buffers
(tree_choices, device="cuda")
eagle/testbug/model/utils.py:87
↓ 5 callersFunctiongenerate_tree_buffers
(tree_choices, device="cuda")
eagle/model/utils.py:89
↓ 5 callersFunctionpadding
(tensor, left=True)
eagle/traineagle3/cnets.py:448
↓ 5 callersFunctionprepare_logits_processor
( temperature: float = 0.0, repetition_penalty: float = 0.0, top_p: float = 0.0,
eagle/testbug/model/utils.py:36
↓ 4 callersFunctionevaluate_posterior
Evaluate the posterior probabilities of the candidates based on the provided logits and choose the best candidate. Depending on the temperat
eagle/model/utils.py:337
↓ 4 callersFunctioninitialize_tree
(input_ids, model, past_key_values, logits_processor)
eagle/model/utils.py:232
↓ 4 callersMethodreset_kv
(self)
eagle/testbug/model/cnets.py:541
↓ 4 callersFunctionrotate_half
Rotates half the hidden dimensions of the input. Args: x (torch.Tensor): Input tensor. Returns: torch.Tensor: Te
eagle/traineagle3/modeling_llama_kv.py:408
↓ 4 callersFunctionrotate_half
Rotates half the hidden dimensions of the input. Args: x (torch.Tensor): Input tensor. Returns: torch.Tensor: Tensor wi
eagle/model/modeling_llama_kv.py:408
↓ 4 callersFunctiontree_decoding
( model, tree_candidates, past_key_values, tree_position_ids, input_id
eagle/model/utils.py:306
↓ 4 callersFunctionupdate_inference_inputs
( input_ids, candidates, best_candidate, accept_length, retrieve_indic
eagle/model/utils.py:419
↓ 3 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
eagle/model/modeling_qwen2_kv.py:180
↓ 3 callersFunctioninitialize_past_key_values
Initialize past key and value states for a given transformer model. This function prepares key-value cache structures for the model, allowin
eagle/testbug/model/kv_cache.py:69
↓ 3 callersMethodis_leaf
(self)
eagle/modeling_eagle.py:574
↓ 3 callersMethodis_leaf
(self)
eagle/testbug/model/utils_c.py:43
↓ 3 callersMethodis_leaf
(self)
eagle/model/utils_c.py:46
↓ 3 callersMethodpaddingtensor2D
(self, intensors, N)
eagle/traineagle3/main.py:183
↓ 3 callersFunctionreset_tree_mode
( model, )
eagle/testbug/model/utils.py:236
↓ 3 callersMethodsample
(self,logits, logits_processor,k=1, replacement=False)
eagle/testbug/model/cnets.py:552
↓ 3 callersMethodtopK_genrate
(self, hidden_states, input_ids, head, logits_processor,max_length=4, use_cache=True)
eagle/testbug/model/cnets.py:572
↓ 3 callersFunctiontruncate_list
(lst, num)
eagle/application/webui.py:16
↓ 2 callersFunction_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
eagle/modeling_eagle.py:50
↓ 2 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
eagle/modeling_eagle.py:32
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/modeling_eagle.py:109
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/testbug/model/cnets.py:126
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/traineagle3/cnets.py:116
↓ 2 callersMethod_set_cos_sin_cache
Set the cosine and sine cache for positional embeddings. Args: seq_len (int): The sequence length. devi
eagle/traineagle3/modeling_llama_kv.py:164
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/model/cnets.py:125
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/model/modeling_mixtral_kv.py:222
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
eagle/model/cnets1.py:125
↓ 2 callersMethod_set_cos_sin_cache
Set the cosine and sine cache for positional embeddings. Args: seq_len (int): The sequence length. device (s
eagle/model/modeling_llama_kv.py:164
↓ 2 callersFunctionbuild_dataset_rank
( tokenizer, datapath )
eagle/traineagle3/main.py:55
↓ 2 callersFunctioncompute_loss
(target, target_p, predict, loss_mask)
eagle/train/main.py:231
↓ 2 callersFunctionea_forward
(input_ids, model, tokenizer, tree_choices, logits_processor=None, max_steps=512)
eagle/evaluation/gen_ea_alpha_llama2chat.py:28
↓ 2 callersFunctionea_forward
(input_ids, model, tokenizer, tree_choices, logits_processor=None, max_steps=512)
eagle/evaluation/gen_baseline_answer_mix.py:27
↓ 2 callersFunctionea_forward
(input_ids, model, tokenizer, tree_choices, logits_processor=None , max_steps = 512)
eagle/evaluation/gen_ea_alpha_vicuna.py:34
↓ 2 callersFunctionea_forward
(input_ids, model, tokenizer, tree_choices, logits_processor=None, max_steps=512)
eagle/evaluation/gen_baseline_answer_llama2chat.py:27
↓ 2 callersFunctionea_forward
(input_ids, model, tokenizer, tree_choices, logits_processor=None, max_steps=2048)
eagle/evaluation/gen_baseline_answer_vicuna.py:27
↓ 2 callersMethodea_generate
( self, input_ids, temperature=0.0, top_p=0.0, top
eagle/model/ea_model.py:383
↓ 2 callersFunctionevaluate_posterior
Evaluate the posterior probabilities of the candidates based on the provided logits and choose the best candidate. Depending on the temperat
eagle/testbug/model/utils.py:317
↓ 2 callersFunctionforward_with_tree_mask
( model, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor]
eagle/modeling_eagle.py:1178
↓ 2 callersMethodfrom_pretrained
( cls, base_model_path=None, ea_model_path=None, **kwargs,
eagle/testbug/model/ea_modelbs.py:80
↓ 2 callersFunctiongenerate_candidates
(tree_logits, tree_indices, retrieve_indices, sample_token, logits_processor)
eagle/testbug/model/utils.py:262
↓ 2 callersFunctiongenerate_candidates
(tree_logits, tree_indices, retrieve_indices, sample_token, logits_processor)
eagle/model/utils.py:284
↓ 2 callersFunctionhighlight_text
(text, text_list,color="black")
eagle/application/webui.py:47
↓ 2 callersMethodinit_tree
(self)
eagle/testbug/model/cnets.py:463
↓ 2 callersFunctioninitialize_tree
(input_ids, model, tree_attn_mask, past_key_values, logits_processor)
eagle/testbug/model/utils.py:227
↓ 2 callersMethodnaivegenerate
( self, input_ids, temperature=0.0, top_p=0.0, top
eagle/model/ea_model.py:306
↓ 2 callersMethodpaddingtensor
(self, intensors, N)
eagle/train/main_deepspeed.py:171
↓ 2 callersMethodpaddingtensor
(self, intensors, N)
eagle/train/main.py:180
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen,
eagle/modeling_eagle.py:64
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen,
eagle/testbug/model/cnets.py:86
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen,
eagle/traineagle3/cnets.py:71
↓ 2 callersFunctionrepeat_kv
Repeat key and value tensors n times along the specified dimension. Args: hidden_states (torch.Tensor): Input tensor with shape
eagle/traineagle3/modeling_llama_kv.py:538
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen,
eagle/model/cnets.py:80
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
eagle/model/modeling_mixtral_kv.py:281
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen,
eagle/model/cnets1.py:80
↓ 2 callersFunctionrepeat_kv
Repeat key and value tensors n times along the specified dimension. Args: hidden_states (torch.Tensor): Input tensor with shape (bat
eagle/model/modeling_llama_kv.py:538
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
eagle/model/modeling_qwen3_kv.py:186
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/modeling_eagle.py:76
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/testbug/model/cnets.py:97
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/traineagle3/cnets.py:83
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/model/cnets.py:92
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/model/modeling_mixtral_kv.py:244
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/model/modeling_qwen2_kv.py:172
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/model/cnets1.py:92
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
eagle/model/modeling_qwen3_kv.py:152
↓ 2 callersMethodsample
(self, logits, logits_processor, k=1)
eagle/modeling_eagle.py:842
↓ 2 callersMethodtopK_genrate
(self, hidden_states, input_ids, head, logits_processor, max_length=4, use_cache=True, a
eagle/modeling_eagle.py:863
↓ 2 callersMethodtopK_genrate
(self, hidden_states, input_ids, head, logits_processor)
eagle/model/cnets.py:670
↓ 2 callersFunctiontop_accuracy
Computes the accuracy over the k top predictions for the specified values of k
eagle/train/main.py:214
↓ 2 callersFunctiontree_decoding
( model, tree_candidates, past_key_values, tree_position_ids, input_id
eagle/testbug/model/utils.py:295
↓ 2 callersFunctionupdate_inference_inputs
( input_ids, candidates, best_candidate, accept_length, retrieve_indic
eagle/testbug/model/utils.py:409
↓ 1 callersMethod__init__
(self,name)
eagle/testbug/model/ea_modelbs.py:19
↓ 1 callersMethod__init__
(self, d)
eagle/testbug/model/ea_model.py:20
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow s
eagle/traineagle3/modeling_llama_kv.py:253
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
eagle/model/modeling_qwen2_kv.py:129
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
eagle/model/modeling_llama_kv.py:253
↓ 1 callersFunction_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
eagle/testbug/model/cnets.py:73
next →1–100 of 596, ranked by callers