Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cwxndl/LLM
/ functions
Functions
215 in github.com/cwxndl/LLM
⨍
Functions
215
◇
Types & classes
43
↳
Endpoints
3
Method
__init__
(self, query, top_k, chunk_size, chunk
chatbot3.0/doc_retrieve.py:26
Method
__init__
( self, vocab_size=60930, hidden_size=1600, intermediate_size=14336,
model/moe_config.py:6
Method
__init__
( self, vocab_size=60930, hidden_size=1600, intermediate_size=6*1300,
model/model_config.py:6
Method
__init__
(self, dim:int, eps:float)
model/modeling_ndl.py:60
Method
__init__
(self, dim:int, eps:float)
model/modeling_ndl.py:78
Method
__init__
(self, dim, max_position_embeddings: int, base=10000.0, device='cuda',scaling_factor=1.0)
model/modeling_ndl.py:91
Method
__init__
(self, config:ndlconfig,layer_idx)
model/modeling_ndl.py:198
Method
__init__
(self, config:ndlconfig, layer_idx: int,select_rmsnorm:'NDLRMSNorm')
model/modeling_ndl.py:393
Method
__init__
(self, config: ndlconfig)
model/modeling_ndl.py:480
Method
__init__
(self, config)
model/modeling_ndl.py:629
Method
__init__
(self, dim:int, eps:float)
model/modeling_moe.py:57
Method
__init__
(self, dim:int, eps:float)
model/modeling_moe.py:75
Method
__init__
(self, dim, max_position_embeddings: int, base=10000.0, device='cuda',scaling_factor=1.0)
model/modeling_moe.py:88
Method
__init__
(self, config)
model/modeling_moe.py:184
Method
__init__
(self, config)
model/modeling_moe.py:264
Method
__init__
(self, config:ndlconfig,layer_idx)
model/modeling_moe.py:338
Method
__init__
(self, config:ndlconfig, layer_idx: int,select_rmsnorm:'NDLMOERMSNorm')
model/modeling_moe.py:535
Method
__init__
(self, config: ndlconfig)
model/modeling_moe.py:626
Method
__init__
(self, config)
model/modeling_moe.py:778
Method
__init__
(self, raw_data, tokenizer, max_len)
my_lora/finetune.py:129
Method
__len__
(self)
finetune.py:154
Method
__len__
(self)
finetune_qwen.py:154
Method
__len__
(self)
my_lora/finetune.py:140
Method
_get_elements
(self)
chatbot3.0/file_preprocess.py:129
Function
_get_unpad_data
(attention_mask)
model/modeling_ndl.py:43
Function
_get_unpad_data
(attention_mask)
model/modeling_moe.py:40
Method
_init_weights
(self, module)
model/modeling_ndl.py:458
Method
_init_weights
(self, module)
model/modeling_moe.py:604
Function
agent
(file, question, top_k, chunk_size, chunk_overlap, llm_api)
chat-bot/app_multi_conversation.py:129
Function
agent
(file, question, top_k, chunk_size, chunk_overlap, llm_api)
chatbot3.0/webui.py:164
Method
backward
(ctx, grad_output)
model/modeling_moe.py:254
Function
build_prompt
(history: list[list[str]])
cli_qwen_demo.py:12
Function
build_prompt
(history: list[list[str]])
cli_demo.py:25
Function
call_llm
(prompt, url)
chat-bot/app_multi_conversation.py:101
Function
call_llm
(prompt, url)
chatbot3.0/webui.py:136
Function
circle_print
(total_time: int=60)
cli_qwen_demo.py:20
Function
circle_print
(total_time: int=60)
cli_demo.py:33
Function
clear_history_
()
chat-bot/app_multi_conversation.py:249
Function
clear_history_
()
chatbot3.0/webui.py:334
Function
clear_iamge_inputs
()
chat-bot/app_multi_conversation.py:254
Function
clear_iamge_inputs
()
chatbot3.0/webui.py:339
Function
clear_inputs
()
chat-bot/app_ndl.py:65
Function
clear_inputs
()
chat-bot/app_multi_conversation.py:242
Function
clear_inputs
()
chat-bot/app_qwen.py:65
Function
clear_inputs
()
chatbot3.0/webui.py:327
Function
collate_fn
(batch)
ex_pretrain.py:233
Function
collate_fn
(batch)
finetune.py:80
Function
collate_fn
(batch)
pretrain.py:232
Function
collate_fn
(batch)
finetune_qwen.py:81
Function
collate_fn
(batch)
moe_pretrain.py:150
Function
collate_fn
(batch)
my_lora/finetune.py:73
Function
create_item
(request:Request)
chat-bot/NDLmodel_api.py:18
Function
create_item
(request:Request)
chat-bot/qwen2_api.py:20
Function
create_item
(request:Request)
chatbot3.0/rerank_api.py:21
Method
forward
(self,x)
model/modeling_ndl.py:73
Method
forward
(self,x)
model/modeling_ndl.py:85
Method
forward
(self ,x, position_ids)
model/modeling_ndl.py:105
Method
forward
(self, x, position_ids)
model/modeling_ndl.py:134
Method
forward
( self, hidden_states: torch.Tensor, #输入attention_block的张量 attention_mask: None, #
model/modeling_ndl.py:233
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: None, position_ids:
model/modeling_ndl.py:321
Method
forward
( self, hidden_states: torch.Tensor, #输入:(batch, seq_len, embed_dim) attention_mask
model/modeling_ndl.py:409
Method
forward
( self, input_ids: torch.LongTensor = None, #input_ids是分词后的token_id,代表了语义信息 attenti
model/modeling_ndl.py:507
Method
forward
( self, input_ids: torch.LongTensor = None, #text2id的token_id序列 attention_mask: Opt
model/modeling_ndl.py:654
Method
forward
(self,x)
model/modeling_moe.py:70
Method
forward
(self,x)
model/modeling_moe.py:82
Method
forward
(self ,x, position_ids)
model/modeling_moe.py:102
Method
forward
(self, x, position_ids)
model/modeling_moe.py:131
Method
forward
(self, hidden_states)
model/modeling_moe.py:201
Method
forward
(ctx, x, loss)
model/modeling_moe.py:246
Method
forward
(self, hidden_states)
model/modeling_moe.py:274
Method
forward
( self, hidden_states: torch.Tensor, #输入attention_block的张量 attention_mask: None, #
model/modeling_moe.py:373
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: None, position_ids:
model/modeling_moe.py:461
Method
forward
( self, hidden_states: torch.Tensor, #输入:(batch, seq_len, embed_dim) attention_mask
model/modeling_moe.py:555
Method
forward
( self, input_ids: torch.LongTensor = None, #input_ids是分词后的token_id,代表了语义信息 attenti
model/modeling_moe.py:656
Method
forward
( self, input_ids: torch.LongTensor = None, #text2id的token_id序列 attention_mask: Opt
model/modeling_moe.py:803
Function
gen_baike
(origin_file)
utils/data_preprocess.py:49
Function
gen_code_github
(input_folder,output_folder)
utils/data_preprocess.py:208
Function
gen_wiki_en
(input_folder, output_folder)
utils/data_preprocess.py:139
Function
gen_wiki_zh
(origin_file, output_file)
utils/data_preprocess.py:168
Method
generate
( self, inputs: Optional[torch.Tensor] = None, generation_config: Optional[Generati
model/modeling_moe.py:948
Method
get_decoder
(self)
model/modeling_ndl.py:651
Method
get_decoder
(self)
model/modeling_moe.py:800
Method
get_input_embeddings
(self)
model/modeling_ndl.py:502
Method
get_input_embeddings
(self)
model/modeling_ndl.py:636
Method
get_input_embeddings
(self)
model/modeling_moe.py:651
Method
get_input_embeddings
(self)
model/modeling_moe.py:785
Method
get_output_embeddings
(self)
model/modeling_ndl.py:642
Method
get_output_embeddings
(self)
model/modeling_moe.py:791
Function
multimode_agent
(file, question)
chat-bot/app_multi_conversation.py:217
Function
multimode_agent
(file, question)
chatbot3.0/webui.py:302
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
ex_pretrain.py:219
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
finetune.py:66
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
pretrain.py:218
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
finetune_qwen.py:67
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
moe_pretrain.py:136
Method
on_epoch_end
在on_epoch_end时保存一次模型。 TrainingArguments的 save_strategy 中 epoch 和 steps 不兼容。要实现每隔 save_steps 步保存一次检查点,考虑到磁盘空间大小,最多只保存最近3个检查点。
my_lora/finetune.py:59
Method
on_log
在打印 n 次日志后清除cuda缓存,适合低显存设备,能防止OOM
ex_pretrain.py:205
Method
on_log
在打印 n 次日志后清除cuda缓存,适合低显存设备,能防止OOM
finetune.py:52
Method
on_log
在打印 n 次日志后清除cuda缓存,适合低显存设备,能防止OOM
pretrain.py:204
Method
on_log
在打印 n 次日志后清除cuda缓存,适合低显存设备,能防止OOM
finetune_qwen.py:53
← previous
next →
101–200 of 215, ranked by callers