MCPcopy Create free account

hub / github.com/csunny/algorithm / functions

Functions223 in github.com/csunny/algorithm

↓ 12 callersMethodget
(self, key)
hashtable/ht.py:30
↓ 8 callersMethod__init__
(self, dim: int, eps: float = 1e-8)
moe/model_config.py:91
↓ 7 callersMethodadd_tail
尾部插入的方式 :param item: :return:
linklist/base.py:63
↓ 7 callersMethodpop
(self)
stack/base.py:19
↓ 6 callersMethod__init__
(self, normalized_shape, dropout, **kwargs)
nlp/transformer.py:69
↓ 4 callersMethodfind
(self, vertex)
graph/directed_graph.py:21
↓ 3 callersMethod__init__
(self, vocab_size, num_hiddens, num_inputs=768, **kwargs)
nlp/bert.py:52
↓ 3 callersMethod__init__
(self, jsonl_path, tokenizer, max_length=1024)
moe/lm_dataset.py:80
↓ 3 callersMethod_cus_hash
自定义的hash函数
hashtable/ht.py:12
↓ 3 callersFunctionbinary_search
:param values: :param target: :return:
algorithm/binary_search.py:8
↓ 3 callersFunctioncalculate_hash
(block)
algorithm/distributed_system/pos.py:46
↓ 3 callersMethodenqueue
(self, value)
mqueue/base.py:16
↓ 3 callersMethodpush
(self, value)
stack/base.py:16
↓ 3 callersFunctiontranspose_qkv
为了多注意力头的并行计算而变换形状
nlp/transformer.py:40
↓ 2 callersFunctionLogger
(content)
moe/train_pretrain.py:21
↓ 2 callersMethod__iter__
(self)
tree/binary_search_tree.py:42
↓ 2 callersMethod_generate_loss_mask
(self, input_ids)
moe/lm_dataset.py:259
↓ 2 callersMethodadd
添加node 头部插入的方式 :param item: :return:
linklist/base.py:53
↓ 2 callersFunctiondata_iter
(batch_size, features, labels)
nlp/lrg.py:23
↓ 2 callersMethodenqueue
(self, value)
graph/base.py:17
↓ 2 callersMethodfind_lowest_cost_node
(self)
graph/undirected_graph.py:20
↓ 2 callersFunctionfunc1
()
examples/randomfun.py:11
↓ 2 callersMethoditem
(self)
linklist/base.py:18
↓ 2 callersFunctionlist_reverse
This function is order to reverse a list with python. :param a: a list object :return: : doc 这是一个字符串或者列表反转的python实现。
common/reverse_list.py:9
↓ 2 callersFunctionnet
(X)
nlp/mlp.py:31
↓ 2 callersMethodper_down
(self, i)
heap/min_binary_heap.py:32
↓ 2 callersMethodper_down
(self, i)
heap/binary_heap.py:32
↓ 2 callersMethodpush
(self, value)
graph/base.py:42
↓ 2 callersMethodput
(self, key, v)
hashtable/ht.py:25
↓ 2 callersFunctionrepeat_kv
torch.repeat_interleave(x, dim=2, repeats=n_rep).
moe/model_config.py:148
↓ 2 callersFunctionrotate_half
(x)
moe/model_config.py:138
↓ 2 callersMethodsearch
(self, target)
tree/binary_search_tree.py:78
↓ 2 callersMethodsize
(self)
mqueue/base.py:25
↓ 1 callersMethod_create_chat_prompt
(self, conversations)
moe/lm_dataset.py:123
↓ 1 callersMethod_create_chat_prompt
(self, conversations)
moe/lm_dataset.py:326
↓ 1 callersMethod_generate_loss_mask
(self, input_ids)
moe/lm_dataset.py:134
↓ 1 callersMethod_insert
(self, root, val)
tree/binary_search_tree.py:65
↓ 1 callersMethod_norm
(self, x)
moe/model_config.py:96
↓ 1 callersMethod_preprogress
(self, all_premise_hypothesis_tokens)
llmodels/bert/finetune.py:53
↓ 1 callersMethod_search
(self, node, val)
tree/binary_search_tree.py:81
↓ 1 callersMethod_truncate_pair_of_tokens
(self, p_tokens, h_tokens)
llmodels/bert/finetune.py:75
↓ 1 callersFunctionapply_rotary_pos_emb
( q, k, cos, sin, position_ids=None, unsqueeze_dim: int = 1 )
moe/model_config.py:135
↓ 1 callersMethodbfs
从一个顶点出发对图进行广度优先遍历 :param n: :return:
graph/base.py:88
↓ 1 callersFunctionbubble_sort
冒泡排序 :param values: :return:
algorithm/bubble_sort.py:8
↓ 1 callersMethodbuild_heap
(self, values)
heap/min_binary_heap.py:58
↓ 1 callersMethodbuild_heap
(self, values)
heap/binary_heap.py:58
↓ 1 callersFunctionbuild_link_list
()
linklist/base.py:137
↓ 1 callersFunctionchat_command
(model_name_or_path: str)
llmodels/chat.py:12
↓ 1 callersMethoddag
(self)
graph/undirected_graph.py:33
↓ 1 callersMethoddel_min
(self)
heap/min_binary_heap.py:50
↓ 1 callersMethoddel_min
(self)
heap/binary_heap.py:50
↓ 1 callersMethoddequeue
(self)
graph/base.py:20
↓ 1 callersMethoddequeue
(self)
mqueue/base.py:19
↓ 1 callersMethoddfs
(self, start)
examples/num_set.py:30
↓ 1 callersMethodempty
(self)
mqueue/base.py:29
↓ 1 callersFunctionfab
use fab to explain recursion function :doc 斐波拉切数列的递归实现。递归函数是调用自身的函数。 :param n: :return:
common/recursion.py:8
↓ 1 callersFunctionfind_dump
(values)
examples/find_dup_in_list.py:5
↓ 1 callersFunctionfunc2
()
examples/randomfun.py:17
↓ 1 callersFunctiongenerate_block
:param oldblock: :param bpm: :param address: :return:
algorithm/distributed_system/pos.py:27
↓ 1 callersFunctiongenerate_prompt
(data_point)
llmodels/alpaca/finetune.py:73
↓ 1 callersMethodget_all_com
(self)
examples/num_set.py:46
↓ 1 callersFunctionget_all_combination
(sums, result, count)
examples/num_com.py:5
↓ 1 callersFunctionget_lr
(current_step, total_steps, lr)
moe/train_pretrain.py:26
↓ 1 callersFunctioninit_destributed_mode
()
moe/train_pretrain.py:104
↓ 1 callersFunctioninit_model
(llm_config)
moe/train_pretrain.py:96
↓ 1 callersMethodinsert
(self, val)
tree/binary_search_tree.py:62
↓ 1 callersFunctionis_block_valid
:param newblock: :param oldblock: :return:
algorithm/distributed_system/pos.py:57
↓ 1 callersMethodkruskal
(self, g)
graph/directed_graph.py:38
↓ 1 callersMethodload_data
(self, data_path)
moe/lm_dataset.py:16
↓ 1 callersMethodload_data
(self, path)
moe/lm_dataset.py:92
↓ 1 callersMethodload_data
(self, path)
moe/lm_dataset.py:295
↓ 1 callersFunctionload_pretrained_model
(pretrained_model, num_hiddens, ffn_num_hiddens, num_heads, num_layers, dropout, max
llmodels/bert/finetune.py:18
↓ 1 callersFunctionmain
()
graph/undirected_graph.py:48
↓ 1 callersFunctionmain
()
tree/binary_search_tree.py:98
↓ 1 callersMethodmake_set
(self, vertex)
graph/directed_graph.py:17
↓ 1 callersFunctionmax_min
(v)
examples/max_min.py:4
↓ 1 callersFunctionmerge
合并两个已经排好序的列表 :param left: :param right: :return:
algorithm/merge_sort.py:23
↓ 1 callersFunctionmerge_sort
(values)
algorithm/merge_sort.py:11
↓ 1 callersMethodmin
(self, i)
heap/min_binary_heap.py:41
↓ 1 callersMethodmin
(self, i)
heap/binary_heap.py:41
↓ 1 callersMethodmoe_infer
(self, x, flat_expert_indices, flat_expert_weights)
moe/model_config.py:358
↓ 1 callersFunctionmprint
(n)
algorithm/dp/fab.py:19
↓ 1 callersFunctionpartition
(lst, lo, hi)
algorithm/quick_sort.py:63
↓ 1 callersMethodperc_up
(self, i)
heap/min_binary_heap.py:17
↓ 1 callersMethodperc_up
(self, i)
heap/binary_heap.py:17
↓ 1 callersFunctionpermulation_trans
(s)
examples/str_one.py:19
↓ 1 callersFunctionpermurarion
(s, start)
examples/str_one.py:4
↓ 1 callersMethodpop
(self)
graph/base.py:45
↓ 1 callersFunctionprecomputer_freqs_cis
Precompute the cos and sin of the frequencies for RoPE.
moe/model_config.py:104
↓ 1 callersFunctionq_s
(v)
examples/q_s.py:4
↓ 1 callersFunctionquick_sort_v3
(values, lo, hi)
algorithm/quick_sort.py:55
↓ 1 callersFunctionrelu
(X)
nlp/mlp.py:26
↓ 1 callersMethodreset_parameters
(self)
moe/model_config.py:272
↓ 1 callersFunctionrev_l
(v)
examples/xuanz_min.py:5
↓ 1 callersFunctionrun
()
algorithm/distributed_system/pos.py:209
↓ 1 callersFunctionsentiment_score_to_name
(score: float)
llmodels/alpaca/finetune.py:38
↓ 1 callersFunctionsgd
(params, lr, batch_size)
nlp/lrg.py:51
↓ 1 callersFunctionshow_all
(n)
examples/num_com.py:25
↓ 1 callersFunctionsynthetic_data
(w,b, num_examples)
nlp/lrg.py:6
↓ 1 callersFunctiontest
()
linklist/base.py:150
next →1–100 of 223, ranked by callers