MCPcopy Create free account

hub / github.com/FreedomIntelligence/CMB / functions

Functions210 in github.com/FreedomIntelligence/CMB

Methodcollate_conv
(self, data)
workers/bentsao.py:59
Methodcollate_conv
(self, data)
workers/bianque_v2.py:42
Methodcollate_fn
[id: '', title: '', description: '', QA_pairs: [ {question: '', answer: ''}, {question: '', answer: ''}, ]]
workers/base.py:359
Functiondefault_init
(cls, *args, **kwargs)
workers/chatglm3_modeling.py:49
Methodfewshot_prompt
the string that starts the fewshot example. default: `""`
workers/base.py:101
Methodfewshot_separator
(self,)
workers/qizhen_cama_13b.py:62
Methodfewshot_separator
the string that separates fewshot examples. default: `""`
workers/base.py:106
Methodfewshot_separator
(self,)
workers/medicalgpt.py:45
Methodfewshot_template
(self, eos="</s>")
workers/baichuanchat.py:48
Methodfewshot_template
(self,)
workers/chatglm3_6b.py:36
Methodfewshot_template
(self,)
workers/chatglm_med.py:36
Methodfewshot_template
(self)
workers/chatmed_consult.py:50
Methodfewshot_template
(self, eos='</s>')
workers/huatuo_chat.py:36
Methodfewshot_template
(self,)
workers/qizhen_cama_13b.py:59
Methodfewshot_template
(self)
workers/base.py:112
Methodfewshot_template
(self,)
workers/doctorglm.py:52
Methodfewshot_template
(self,)
workers/medicalgpt.py:42
Methodfewshot_template
(self)
workers/mymodel.py:34
Methodfewshot_template
(self)
workers/bentsao.py:55
Methodfewshot_template
(self)
workers/bianque_v2.py:37
Methodforward
(self, prefix: torch.Tensor)
workers/chatglm3_modeling.py:84
Methodforward
(self, max_seq_len, offset=0)
workers/chatglm3_modeling.py:154
Methodforward
(self, hidden_states: torch.Tensor)
workers/chatglm3_modeling.py:187
Methodforward
(self, query_layer, key_layer, value_layer, attention_mask)
workers/chatglm3_modeling.py:221
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True )
workers/chatglm3_modeling.py:363
Methodforward
(self, hidden_states)
workers/chatglm3_modeling.py:496
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True, )
workers/chatglm3_modeling.py:536
Methodforward
( self, hidden_states, attention_mask, rotary_pos_emb, kv_caches=None, use_cache: Opti
workers/chatglm3_modeling.py:608
Methodforward
(self, input_ids)
workers/chatglm3_modeling.py:721
Methodforward
( self, input_ids, position_ids: Optional[torch.Tensor] = None,
workers/chatglm3_modeling.py:786
Methodforward
( self, input_ids: Optional[torch.Tensor] = None, position_ids: Optional[t
workers/chatglm3_modeling.py:920
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, position_ids: Option
workers/chatglm3_modeling.py:1227
Methodforward
(self, x, seq_dim=1, seq_len=None)
workers/modeling_chatglm_med.py:251
Methodforward
hidden_states: [seq_len, batch, hidden_size] attention_mask: [(1, 1), seq_len, seq_len]
workers/modeling_chatglm_med.py:470
Methodforward
(self, x)
workers/modeling_chatglm_med.py:542
Methodforward
hidden_states: [seq_len, batch, hidden_size]
workers/modeling_chatglm_med.py:576
Methodforward
hidden_states: [seq_len, batch, hidden_size] attention_mask: [(1, 1), seq_len, seq_len]
workers/modeling_chatglm_med.py:641
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, position_ids: Option
workers/modeling_chatglm_med.py:887
Methodforward
( self, input_ids: Optional[torch.Tensor] = None, position_ids: Optional[t
workers/modeling_chatglm_med.py:1105
Functiongelu
(x)
workers/modeling_chatglm_med.py:227
Methodgenerate_fewshot_examples
Generate a fewshot prompt given a list of data
workers/chatglm3_6b.py:39
Methodgenerate_fewshot_examples
Generate a fewshot prompt given a list of data
workers/chatglm_med.py:39
Methodgenerate_fewshot_examples
Generate a fewshot prompt given a list of data
workers/qizhen_cama_13b.py:65
Methodgenerate_fewshot_examples
Generate a fewshot prompt given a list of data
workers/doctorglm.py:58
Methodgenerate_fewshot_examples
Generate a fewshot prompt given a list of data
workers/medicalgpt.py:48
Methodget_input_embeddings
(self)
workers/chatglm3_modeling.py:768
Methodget_input_embeddings
(self)
workers/modeling_chatglm_med.py:842
Methodget_layer
(layer_id)
workers/modeling_chatglm_med.py:821
Methodget_masks
(self, input_ids, past_key_values, padding_mask=None)
workers/chatglm3_modeling.py:677
Methodget_output_embeddings
(self)
workers/modeling_chatglm_med.py:1022
Functionget_query
(da, use_cot)
src/generate_fewshot.py:42
Methodget_system_template
(self, t)
workers/base.py:277
Methodinstruction_template
( self, )
workers/baichuanchat.py:36
Methodinstruction_template
(self,)
workers/chatglm3_6b.py:30
Methodinstruction_template
(self,)
workers/chatglm_med.py:30
Methodinstruction_template
(self,)
workers/chatmed_consult.py:44
Methodinstruction_template
(self,)
workers/huatuo_chat.py:30
Methodinstruction_template
(self,)
workers/qizhen_cama_13b.py:51
Methodinstruction_template
(self,)
workers/base.py:88
Methodinstruction_template
(self,)
workers/doctorglm.py:46
Methodinstruction_template
(self,)
workers/medicalgpt.py:34
Methodinstruction_template
(self)
workers/mymodel.py:28
Methodinstruction_template
(self,)
workers/bentsao.py:49
Methodinstruction_template
(self,)
workers/bianque_v2.py:31
Methodinstruction_template_with_fewshot
( self, )
workers/baichuanchat.py:42
Methodinstruction_template_with_fewshot
(self,)
workers/chatglm3_6b.py:33
Methodinstruction_template_with_fewshot
(self,)
workers/chatglm_med.py:33
Methodinstruction_template_with_fewshot
(self,)
workers/chatmed_consult.py:47
Methodinstruction_template_with_fewshot
(self,)
workers/huatuo_chat.py:33
Methodinstruction_template_with_fewshot
(self,)
workers/qizhen_cama_13b.py:54
Methodinstruction_template_with_fewshot
(self,)
workers/base.py:91
Methodinstruction_template_with_fewshot
(self,)
workers/doctorglm.py:49
Methodinstruction_template_with_fewshot
(self,)
workers/medicalgpt.py:37
Methodinstruction_template_with_fewshot
(self,)
workers/mymodel.py:31
Methodinstruction_template_with_fewshot
(self,)
workers/bentsao.py:52
Methodinstruction_template_with_fewshot
(self,)
workers/bianque_v2.py:34
Methodis_main_process
(self)
workers/base.py:160
Methodload_model_and_tokenizer
(self, load_config)
workers/baichuanchat.py:5
Methodload_model_and_tokenizer
(self, load_config)
workers/chatglm3_6b.py:8
Methodload_model_and_tokenizer
(self, load_config)
workers/chatglm_med.py:8
Methodload_model_and_tokenizer
(self, load_config)
workers/chatmed_consult.py:12
Methodload_model_and_tokenizer
(self, load_config)
workers/huatuo_chat.py:11
Methodload_model_and_tokenizer
(self, load_config)
workers/qizhen_cama_13b.py:13
Methodload_model_and_tokenizer
(self, load_config)
workers/doctorglm.py:8
Methodload_model_and_tokenizer
(self, load_config)
workers/medicalgpt.py:10
Methodload_model_and_tokenizer
(self, load_config)
workers/mymodel.py:7
Methodload_model_and_tokenizer
(self, load_config)
workers/bentsao.py:13
Methodload_model_and_tokenizer
(self, load_config )
workers/bianque_v2.py:8
Functionload_tf_weights_in_chatglm_6b
Load tf checkpoints in a pytorch model.
workers/modeling_chatglm_med.py:146
Methodquantize
(self, bits: int)
workers/modeling_chatglm_med.py:1312
Methodquery_prompt_1
(self)
workers/base.py:95
Methodquery_prompt_2
(self)
workers/base.py:98
Methodset_input_embeddings
(self, new_embeddings: torch.Tensor)
workers/modeling_chatglm_med.py:845
Methodset_output_embeddings
(self, new_embeddings)
workers/modeling_chatglm_med.py:1025
Methodstream_chat
(self, tokenizer, query: str, history: List[Dict] = None, role: str = "user", past_key_val
workers/chatglm3_modeling.py:1043
Methodstream_generate
( self, input_ids, generation_config: Optional[GenerationConfig] = None,
workers/modeling_chatglm_med.py:1212
Methodswiglu
(x)
workers/chatglm3_modeling.py:481
Methodsystem_prompt
(self)
workers/baichuanchat.py:32
Methodsystem_prompt
(self)
workers/chatglm3_6b.py:27
Methodsystem_prompt
(self)
workers/chatglm_med.py:27
← previousnext →101–200 of 210, ranked by callers