MCPcopy Create free account

hub / github.com/deepseek-ai/DeepSpec / functions

Functions444 in github.com/deepseek-ai/DeepSpec

↓ 29 callersMethodget
(self, name)
deepspec/data/parser.py:26
↓ 24 callersFunctionadd_metric
Record one scalar metric for the next logging-window flush. Tensor inputs are detached at the API boundary to prevent metric logging from ret
deepspec/utils/metrics.py:91
↓ 14 callersFunctionis_global_main_process
()
deepspec/utils/distributed.py:33
↓ 14 callersFunctionprint_on_local_main
(*args, **kwargs)
deepspec/utils/distributed.py:47
↓ 10 callersMethodget_prev_embeddings
(self, token_ids: torch.Tensor)
deepspec/modeling/dspark/markov_head.py:20
↓ 9 callersMethodclose
(self)
deepspec/data/jsonl_dataset.py:46
↓ 9 callersFunctionsample_tokens
(logits: torch.Tensor, temperature: float = 0.0)
deepspec/utils/sampling.py:20
↓ 8 callersFunctionprint_on_global_main
(*args, **kwargs)
deepspec/utils/distributed.py:41
↓ 8 callersMethodupdate
( self, *, probs: torch.Tensor, targets: torch.Tensor, )
deepspec/eval/dspark/confidence_head.py:63
↓ 7 callersMethodall_reduce
(self)
deepspec/eval/dspark/confidence_head.py:94
↓ 7 callersMethodclose
(self)
deepspec/data/target_cache_dataset.py:641
↓ 7 callersFunctionformat_float
(value, digits=4)
deepspec/eval/dspark/confidence_head.py:215
↓ 6 callersFunctionadd_tensorboard_scalar
(writer, tag: str, value, step: int)
deepspec/eval/dspark/confidence_head.py:307
↓ 5 callersMethodstart
(self)
deepspec/eval/dspark/confidence_head.py:337
↓ 4 callersFunctionensure_dir
(path)
deepspec/utils/io.py:5
↓ 4 callersFunctionerror_sample
(sample, message)
scripts/data/generate_train_data.py:100
↓ 4 callersFunctionlogits_to_probs
(logits: torch.Tensor, temperature: float)
deepspec/utils/sampling.py:6
↓ 4 callersFunctionseed_all
(seed)
deepspec/utils/__init__.py:20
↓ 4 callersMethodstep
(self)
deepspec/utils/optim.py:108
↓ 4 callersFunctionsummarize_confidence_row
(row: dict)
deepspec/eval/dspark/confidence_head.py:175
↓ 4 callersFunctionto_config_node
(value)
deepspec/utils/config.py:25
↓ 3 callersMethod__init__
( self, model, lr, total_steps, warmup_ratio, weight_decay=0.0
deepspec/utils/optim.py:84
↓ 3 callersFunction_clone_to_reduce_device
(value: torch.Tensor)
deepspec/utils/metrics.py:20
↓ 3 callersFunction_detach_scalar
(value)
deepspec/utils/metrics.py:12
↓ 3 callersMethod_raise_if_failed
(self)
deepspec/data/target_cache_dataset.py:457
↓ 3 callersFunction_rank_training_state_path
(checkpoint_dir: str, global_rank: int)
deepspec/trainer/ckpt_manager.py:188
↓ 3 callersFunction_reduce_dp_value
(value: torch.Tensor, op_name: str)
deepspec/utils/metrics.py:27
↓ 3 callersMethod_rnn_step
Single RNN step. Args: state: [*, r] previous recurrent state prev_embeddings: [*, r] W1[x_{k-1}] hidden_
deepspec/modeling/dspark/markov_head.py:149
↓ 3 callersFunction_shift_with_zero_padding
( tensor: torch.Tensor, *, left: bool = True, )
deepspec/modeling/eagle3/loss.py:46
↓ 3 callersMethod_softcap_logits
(self, logits: torch.Tensor)
deepspec/modeling/eagle3/gemma4/modeling.py:332
↓ 3 callersFunction_tensor_to_bytes
(tensor: torch.Tensor, dtype: torch.dtype)
deepspec/data/target_cache_dataset.py:221
↓ 3 callersMethodapply_step_logits
( self, logits: torch.Tensor, *, token_ids: torch.Tensor, hidden_state
deepspec/modeling/dspark/markov_head.py:34
↓ 3 callersMethodcompute_logits
(self, hidden_states: torch.Tensor)
deepspec/modeling/eagle3/qwen3/modeling.py:268
↓ 3 callersMethodcopy
(self)
deepspec/utils/config.py:21
↓ 3 callersFunctioncount_lines
(path)
scripts/data/generate_train_data.py:147
↓ 3 callersFunctionget_git_sha
(detail_info=False)
deepspec/utils/__init__.py:26
↓ 3 callersFunctionhas_stop_token
(token_ids: torch.Tensor, stop_token_ids: list[int] | None)
deepspec/eval/base_evaluator.py:75
↓ 3 callersFunctioninit_dist
(local_rank: int, timeout_minutes: int = 60)
deepspec/utils/distributed.py:12
↓ 3 callersFunctionload_local_cache_write_summary
(rank_dir: str)
deepspec/data/target_cache_dataset.py:505
↓ 3 callersMethodload_state_dict
(self, state_dict)
deepspec/utils/optim.py:131
↓ 3 callersMethodproject_bias
(self, latent_states: torch.Tensor)
deepspec/modeling/dspark/markov_head.py:23
↓ 3 callersFunctionrun_git_text
(cmd)
deepspec/utils/__init__.py:29
↓ 3 callersFunctionsample_from_probs
(probs: torch.Tensor)
deepspec/utils/sampling.py:14
↓ 3 callersMethodstate_dict
(self)
deepspec/utils/optim.py:124
↓ 2 callersMethod__init__
(self, config)
deepspec/modeling/eagle3/qwen3/modeling.py:210
↓ 2 callersMethod__init__
(self, config)
deepspec/modeling/eagle3/gemma4/modeling.py:266
↓ 2 callersMethod__init__
( self, *, vocab_size: int, markov_rank: int, hidden_size: int, )
deepspec/modeling/dspark/markov_head.py:132
↓ 2 callersMethod__init__
(self, config)
deepspec/modeling/dspark/qwen3/modeling.py:204
↓ 2 callersMethod__init__
(self, config)
deepspec/modeling/dspark/gemma4/modeling.py:247
↓ 2 callersFunction_calculate_settings
(n: int)
deepspec/modeling/eagle3/loss.py:23
↓ 2 callersMethod_checkpoint_kwargs
(self)
deepspec/trainer/base_trainer.py:312
↓ 2 callersFunction_empty_dspark_proposal
(draft_input_ids: torch.Tensor)
deepspec/eval/dspark/draft_ops.py:48
↓ 2 callersMethod_epoch_perm
(self, epoch_idx: int)
deepspec/utils/distributed.py:112
↓ 2 callersMethod_epoch_slice_for_rank
(self, perm)
deepspec/utils/distributed.py:117
↓ 2 callersMethod_forward_backbone
( self, *, position_ids: torch.LongTensor, attention_mask: Optional[torch.Tens
deepspec/modeling/dspark/qwen3/modeling.py:361
↓ 2 callersMethod_open_new_shard
(self)
deepspec/data/target_cache_dataset.py:329
↓ 2 callersFunction_pad_1d_batch
(features: List[Dict], key: str)
deepspec/data/target_cache_dataset.py:801
↓ 2 callersFunction_print_prepare_progress
(*, global_rank: int, processed_samples: int, total_samples: int)
scripts/data/prepare_target_cache.py:202
↓ 2 callersMethod_put
(self, item)
deepspec/data/target_cache_dataset.py:461
↓ 2 callersMethod_read_bfloat16_tensor_from_shard
( self, *, shard_mmap, offset: int, shape, nbytes: int, )
deepspec/data/target_cache_dataset.py:732
↓ 2 callersMethod_read_tensor_from_shard
( self, *, shard_mmap, offset: int, shape, np_dtype, t
deepspec/data/target_cache_dataset.py:707
↓ 2 callersMethod_repeat_kv
(self, hidden_states: torch.Tensor)
deepspec/modeling/eagle3/gemma4/modeling.py:94
↓ 2 callersMethod_repeat_kv
(self, hidden_states: torch.Tensor)
deepspec/modeling/dspark/gemma4/modeling.py:83
↓ 2 callersFunction_tensor_to_bfloat16_bytes
(tensor: torch.Tensor)
deepspec/data/target_cache_dataset.py:226
↓ 2 callersMethodallreduce_response_metrics
( self, responses: list[SimpleNamespace], )
deepspec/eval/base_evaluator.py:550
↓ 2 callersMethodapply_block_logits
Apply RNN bias during training (teacher-forced, unrolled over block_size). Args: base_logits: [B, num_blocks, block_size, V]
deepspec/modeling/dspark/markov_head.py:191
↓ 2 callersFunctionassert_no_final_target_layer
(target_model, target_layer_ids)
deepspec/eval/base_evaluator.py:100
↓ 2 callersFunctionatomic_json_dump
(payload, path: str)
deepspec/data/target_cache_dataset.py:29
↓ 2 callersFunctionbuild_anchor_candidate_mask
( *, seq_len: int, loss_mask: torch.Tensor, )
deepspec/modeling/dspark/common.py:109
↓ 2 callersFunctionbuild_eval_mask
( *, seq_len: int, loss_mask: torch.Tensor, label_indices: torch.Tensor, safe_label_indice
deepspec/modeling/dspark/common.py:172
↓ 2 callersFunctionbuild_markov_head
(config)
deepspec/modeling/dspark/markov_head.py:287
↓ 2 callersFunctionbuild_results_table
( *, rows: list[dict[str, object]], model_name_or_path: str, draft_name_or_path: str, head
deepspec/eval/base_evaluator.py:115
↓ 2 callersFunctionbuild_target_cache_sample_bytes
( *, sample_id: int, input_ids: torch.Tensor, attention_mask: torch.Tensor, loss_mask: tor
deepspec/data/target_cache_dataset.py:283
↓ 2 callersFunctionbuild_target_cache_shard_path
(cache_dir: str, file_name: str)
deepspec/data/target_cache_dataset.py:38
↓ 2 callersFunctioncapture_layer
(layer_id: int)
scripts/data/prepare_target_cache.py:96
↓ 2 callersMethodclean_up
(self)
deepspec/trainer/base_trainer.py:402
↓ 2 callersMethodcompute_logits
(self, hidden_states: torch.Tensor)
deepspec/modeling/dspark/qwen3/modeling.py:289
↓ 2 callersMethodcompute_logits
(self, hidden_states: torch.Tensor)
deepspec/modeling/dspark/gemma4/modeling.py:339
↓ 2 callersMethodcompute_step_bias
( self, token_ids: torch.Tensor, hidden_states: Optional[torch.Tensor], )
deepspec/modeling/dspark/markov_head.py:26
↓ 2 callersFunctionconfigure_eagle3_flex_compile
()
deepspec/modeling/eagle3/common.py:44
↓ 2 callersFunctioncreate_dspark_attention_mask
( *, anchor_positions: torch.Tensor, block_keep_mask: torch.Tensor, seq_len: int, block_si
deepspec/modeling/dspark/common.py:78
↓ 2 callersFunctioncreate_eagle3_attention_mask
( *, attention_mask: torch.Tensor, q_len: int, kv_len: int, lck: int, device: torch.de
deepspec/modeling/eagle3/common.py:103
↓ 2 callersFunctioncreate_noise_embed
( embed_tokens: nn.Module, input_ids: torch.Tensor, anchor_positions: torch.Tensor, block_keep
deepspec/modeling/dspark/common.py:264
↓ 2 callersFunctioncreate_position_ids
( anchor_positions: torch.Tensor, block_size: int, )
deepspec/modeling/dspark/common.py:251
↓ 2 callersFunctioneagle3_prepare_position_ids
( *, input_ids: Optional[torch.Tensor] = None, input_embeds: Optional[torch.Tensor] = None, pa
deepspec/modeling/eagle3/common.py:174
↓ 2 callersMethodextend_draft_cache
( self, hidden_states: torch.Tensor, input_ids: torch.LongTensor, position_ids
deepspec/modeling/eagle3/qwen3/modeling.py:307
↓ 2 callersFunctionextract_context_feature
(hidden_states, layer_ids)
deepspec/modeling/dspark/common.py:52
↓ 2 callersFunctionextract_eagle3_context_feature
(hidden_states, layer_ids)
deepspec/modeling/eagle3/common.py:38
↓ 2 callersFunctionfinalize_config
(cfg)
deepspec/utils/config.py:101
↓ 2 callersFunctiongather_token_probs
(probs: torch.Tensor, token_ids: torch.Tensor)
deepspec/utils/sampling.py:30
↓ 2 callersFunctiongenerate_decoding_sample
Speculative-decoding loop. `init_context(initial_output, output_ids, position_ids, num_input_tokens)` builds the algorithm-specific state onc
deepspec/eval/base_evaluator.py:308
↓ 2 callersFunctionget_git_diff
(rev="HEAD")
deepspec/utils/__init__.py:53
↓ 2 callersMethodinitialize_embeddings_and_head
( self, *, embed_tokens: nn.Module, lm_head: nn.Module, freeze: bool =
deepspec/modeling/eagle3/qwen3/modeling.py:245
↓ 2 callersFunctionjsonable
(value)
deepspec/utils/config.py:49
↓ 2 callersFunctionload_config
(path)
deepspec/utils/config.py:84
↓ 2 callersFunctionlog_sampler_stats
( *, seq_len: int, loss_mask: torch.Tensor, block_keep_mask: torch.Tensor, eval_mask: torc
deepspec/modeling/dspark/common.py:192
↓ 2 callersFunctionmodel_display_name
(path: str)
deepspec/eval/dspark/confidence_head.py:25
↓ 2 callersFunctionnormalize_conversations
(row: dict)
scripts/data/download_and_split.py:117
↓ 2 callersFunctionpack_index_record
( *, sample_id: int, shard_id: int, seq_len: int, input_ids_offset: int, attention_mas
deepspec/data/target_cache_dataset.py:77
↓ 2 callersFunctionparse_opts_to_config
(opts, cfg)
deepspec/utils/config.py:113
next →1–100 of 444, ranked by callers