MCPcopy Create free account

hub / github.com/chenyiqun/MMOA-RAG / functions

Functions656 in github.com/chenyiqun/MMOA-RAG

↓ 210 callersMethodappend
( self, chatbot: List[List[Optional[str]]], messages: Sequence[Dict[str, str]],
LLaMA-Factory/src/llamafactory/webui/chatter.py:120
↓ 66 callersFunctionregister_model_group
( models: Dict[str, Dict[DownloadSource, str]], template: Optional[str] = None, vision: bool = Fal
LLaMA-Factory/src/llamafactory/extras/constants.py:112
↓ 64 callersFunction_register_template
r""" Registers a chat template. To add the following chat template: ``` [HUMAN]: user prompt here [AI]: model response he
LLaMA-Factory/src/llamafactory/data/template.py:204
↓ 44 callersMethodupdate
(self, val, n=1)
LLaMA-Factory/src/llamafactory/extras/misc.py:68
↓ 38 callersFunctionget_logger
r""" Returns a logger with the specified name. It it not supposed to be accessed externally.
LLaMA-Factory/src/llamafactory/extras/logging.py:113
↓ 33 callersMethodget_elem_by_id
r""" Gets element by id. Example: top.lang, train.dataset
LLaMA-Factory/src/llamafactory/webui/manager.py:49
↓ 22 callersMethodapply
r""" Forms a list of slots according to the inputs to encode.
LLaMA-Factory/src/llamafactory/data/formatter.py:37
↓ 21 callersFunctionget_mm_plugin
( name: str, image_token: Optional[str] = None, video_token: Optional[str] = None, )
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:618
↓ 20 callersFunctionload_tokenizer
r""" Loads pretrained tokenizer and optionally loads processor. Note: including inplace operation of model_args.
LLaMA-Factory/src/llamafactory/model/loader.py:61
↓ 18 callersFunctionget_template_and_fix_tokenizer
r""" Gets chat template and fixes the tokenizer.
LLaMA-Factory/src/llamafactory/data/template.py:355
↓ 17 callersFunctionget_save_dir
r""" Gets the path to saved model checkpoints.
LLaMA-Factory/src/llamafactory/webui/common.py:54
↓ 16 callersMethod_validate_input
r""" Validates if this model accepts the input modalities.
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:59
↓ 15 callersFunctionload_model
r""" Loads pretrained model.
LLaMA-Factory/src/llamafactory/model/loader.py:118
↓ 15 callersFunctionload_train_model
(add_valuehead: bool = False, **kwargs)
LLaMA-Factory/src/llamafactory/train/test_utils.py:63
↓ 12 callersFunctionis_gradio_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:53
↓ 11 callersFunction_is_package_available
(name: str)
LLaMA-Factory/src/llamafactory/extras/packages.py:30
↓ 10 callersMethod_get_mm_inputs
r""" Processes visual inputs. Returns: (llava and paligemma) pixel_values: tensor with shape (B, C, H, W) Return
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:142
↓ 10 callersMethodencode_oneturn
r""" Returns a single pair of token ids representing prompt and response respectively.
LLaMA-Factory/src/llamafactory/data/template.py:55
↓ 10 callersFunctionget_dataset
r""" Gets the train dataset and optionally gets the evaluation dataset.
LLaMA-Factory/src/llamafactory/data/loader.py:212
↓ 9 callersMethodprocess_messages
r""" Pre-processes input messages before tokenization for VLMs.
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:190
↓ 9 callersFunctionshift
(state: "torch.Tensor")
LLaMA-Factory/src/llamafactory/model/model_utils/longlora.py:92
↓ 8 callersFunctionload_reference_model
( model_path: str, lora_path: Optional[str] = None, use_lora: bool = False, use_pissa: bool =
LLaMA-Factory/src/llamafactory/train/test_utils.py:75
↓ 8 callersMethodprocess_token_ids
r""" Pre-processes token ids after tokenization for VLMs.
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:203
↓ 8 callersMethodset_attr
(self, key: str, obj: Dict[str, Any], default: Optional[Any] = None)
LLaMA-Factory/src/llamafactory/data/parser.py:70
↓ 8 callersMethodto_dict
(self)
LLaMA-Factory/src/llamafactory/hparams/model_args.py:311
↓ 7 callersFunction_check_plugin
( plugin: "BasePlugin", tokenizer: "PreTrainedTokenizer", processor: "ProcessorMixin", expecte
LLaMA-Factory/tests/data/test_mm_plugin.py:87
↓ 7 callersFunction_load_tokenizer_module
(model_name_or_path: str)
LLaMA-Factory/tests/data/test_mm_plugin.py:81
↓ 7 callersMethodadd_elems
r""" Adds elements to manager.
LLaMA-Factory/src/llamafactory/webui/manager.py:27
↓ 7 callersFunctioncompare_model
(model_a: "torch.nn.Module", model_b: "torch.nn.Module", diff_keys: Sequence[str] = [])
LLaMA-Factory/src/llamafactory/train/test_utils.py:34
↓ 7 callersMethodeval
(self)
LLaMA-Factory/src/llamafactory/eval/evaluator.py:79
↓ 7 callersFunctionget_current_device
r""" Gets the current available device.
LLaMA-Factory/src/llamafactory/extras/misc.py:118
↓ 7 callersFunctionload_infer_model
(add_valuehead: bool = False, **kwargs)
LLaMA-Factory/src/llamafactory/train/test_utils.py:69
↓ 7 callersFunctionload_train_dataset
(**kwargs)
LLaMA-Factory/src/llamafactory/train/test_utils.py:105
↓ 7 callersMethodsave_model
r""" Saves model checkpoint. Subclass and override to inject custom behavior.
LLaMA-Factory/src/llamafactory/train/ppo/trainer_qr_s_g.py:1248
↓ 6 callersFunction_get_mm_inputs
(processor: "ProcessorMixin")
LLaMA-Factory/tests/data/test_mm_plugin.py:67
↓ 6 callersFunctioncreate_custom_optimizer
( model: "PreTrainedModel", training_args: "Seq2SeqTrainingArguments", finetuning_args: "Finetunin
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:398
↓ 6 callersFunctioncreate_custom_scheduler
( training_args: "Seq2SeqTrainingArguments", num_training_steps: int, optimizer: Optional["torch.o
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:416
↓ 6 callersFunctionget_train_args
(args: Optional[Dict[str, Any]] = None)
LLaMA-Factory/src/llamafactory/hparams/parser.py:161
↓ 6 callersFunctioninfer_seqlen
r""" Computes the real sequence length after truncation by the cutoff_len.
LLaMA-Factory/src/llamafactory/data/processors/processor_utils.py:51
↓ 6 callersFunctionnumpify
r""" Casts a torch tensor or a numpy array to a numpy array.
LLaMA-Factory/src/llamafactory/extras/misc.py:197
↓ 6 callersFunctionplot_loss
r""" Plots loss curves and saves the image.
LLaMA-Factory/src/llamafactory/extras/ploting.py:73
↓ 6 callersFunctionrun_exp
(args: Optional[Dict[str, Any]] = None, callbacks: List["TrainerCallback"] = [])
LLaMA-Factory/src/llamafactory/train/tuner.py:43
↓ 6 callersFunctiontorch_gc
r""" Collects GPU or NPU memory.
LLaMA-Factory/src/llamafactory/extras/misc.py:219
↓ 5 callersFunction_set_z3_leaf_modules
(model: "PreTrainedModel", leaf_modules: Sequence["torch.nn.Module"])
LLaMA-Factory/src/llamafactory/model/model_utils/moe.py:28
↓ 5 callersFunctioncreate_modelcard_and_push
( trainer: "Trainer", model_args: "ModelArguments", data_args: "DataArguments", training_args:
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:73
↓ 5 callersFunctionload_config
r""" Loads user config if exists.
LLaMA-Factory/src/llamafactory/webui/common.py:73
↓ 4 callersFunction_check_template
Checks template for both the slow tokenizer and the fast tokenizer. Args: model_id: the model id on hugging face hub. templa
LLaMA-Factory/tests/data/test_template.py:64
↓ 4 callersFunction_convert_slots_to_jinja
(slots: "SLOTS", tokenizer: "PreTrainedTokenizer", placeholder: str = "content")
LLaMA-Factory/src/llamafactory/data/template.py:290
↓ 4 callersFunctionget_device_count
r""" Gets the number of available GPU or NPU devices.
LLaMA-Factory/src/llamafactory/extras/misc.py:136
↓ 4 callersMethodget_elem_list
r""" Returns the list of all elements.
LLaMA-Factory/src/llamafactory/webui/manager.py:36
↓ 4 callersMethodget_mm_inputs
r""" Builds batched multimodal inputs for VLMs.
LLaMA-Factory/src/llamafactory/data/mm_plugin.py:218
↓ 4 callersMethodstream_chat
r""" Gets the response token-by-token of the chat model.
LLaMA-Factory/src/llamafactory/chat/chat_model.py:93
↓ 4 callersFunctionuse_modelscope
()
LLaMA-Factory/src/llamafactory/extras/misc.py:247
↓ 3 callersMethod__call__
(self, features: Sequence[Dict[str, Any]])
LLaMA-Factory/src/llamafactory/data/collator.py:157
↓ 3 callersFunction_check_extra_dependencies
( model_args: "ModelArguments", finetuning_args: "FinetuningArguments", training_args: Optional["S
LLaMA-Factory/src/llamafactory/hparams/parser.py:111
↓ 3 callersFunction_check_tokenization
( tokenizer: "PreTrainedTokenizer", batch_input_ids: Sequence[Sequence[int]], batch_text: Sequence[str] )
LLaMA-Factory/tests/data/test_template.py:42
↓ 3 callersMethod_close_thread_pool
(self)
LLaMA-Factory/src/llamafactory/train/callbacks.py:234
↓ 3 callersFunction_create_stream_chat_completion_chunk
( completion_id: str, model: str, delta: "ChatCompletionMessage", index: Optional[int] = 0,
LLaMA-Factory/src/llamafactory/api/chat.py:130
↓ 3 callersFunction_get_decay_parameter_names
r""" Returns a list of names of parameters with weight decay. (weights in non-layernorm layers)
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:179
↓ 3 callersFunction_get_init_kwargs
r""" Gets arguments to load config/tokenizer/model. Note: including inplace operation of model_args.
LLaMA-Factory/src/llamafactory/model/loader.py:45
↓ 3 callersMethod_initialize
(self, data: Dict["Component", Any], do_train: bool, from_preview: bool)
LLaMA-Factory/src/llamafactory/webui/runner.py:57
↓ 3 callersFunction_jinja_escape
(content: str)
LLaMA-Factory/src/llamafactory/data/template.py:286
↓ 3 callersFunction_parse_args
(parser: "HfArgumentParser", args: Optional[Dict[str, Any]] = None)
LLaMA-Factory/src/llamafactory/hparams/parser.py:56
↓ 3 callersFunction_set_transformers_logging
(log_level: Optional[int] = logging.INFO)
LLaMA-Factory/src/llamafactory/hparams/parser.py:76
↓ 3 callersMethod_update_component
r""" Gets the dict to update the components.
LLaMA-Factory/src/llamafactory/webui/engine.py:39
↓ 3 callersFunction_verify_model_args
( model_args: "ModelArguments", data_args: "DataArguments", finetuning_args: "FinetuningArguments"
LLaMA-Factory/src/llamafactory/hparams/parser.py:82
↓ 3 callersFunctionbatch_get_response
(model, tokenizer, messages_list, logits_processor=[])
evaluate_qr_s_g.py:155
↓ 3 callersFunctionchange_name
(name: str, old_index: int, new_index: int)
LLaMA-Factory/scripts/llama_pro.py:42
↓ 3 callersFunctioncheck_lora_model
(model: "LoraModel")
LLaMA-Factory/src/llamafactory/train/test_utils.py:45
↓ 3 callersMethodcopyfrom
(cls, old_arg: "Self", **kwargs)
LLaMA-Factory/src/llamafactory/hparams/model_args.py:315
↓ 3 callersFunctioncreate_ref_model
r""" Creates reference model for PPO/DPO training. Evaluation mode is not supported. The valuehead parameter is randomly initialized since it
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:99
↓ 3 callersFunctionexport_model
(args: Optional[Dict[str, Any]] = None)
LLaMA-Factory/src/llamafactory/train/tuner.py:63
↓ 3 callersMethodextract
(self, content: str)
LLaMA-Factory/src/llamafactory/data/formatter.py:147
↓ 3 callersFunctionfix_valuehead_checkpoint
r""" The model is already unwrapped. There are three cases: 1. full tuning without ds_zero3: state_dict = {"model.layers.*": ..., "v_head
LLaMA-Factory/src/llamafactory/train/callbacks.py:54
↓ 3 callersMethodformat_example
r""" Converts dataset examples to messages.
LLaMA-Factory/src/llamafactory/eval/template.py:36
↓ 3 callersMethodget_base_elems
r""" Gets the base elements that are commonly used.
LLaMA-Factory/src/llamafactory/webui/manager.py:63
↓ 3 callersFunctionget_eval_template
(name: str)
LLaMA-Factory/src/llamafactory/eval/template.py:62
↓ 3 callersFunctionget_infer_args
(args: Optional[Dict[str, Any]] = None)
LLaMA-Factory/src/llamafactory/hparams/parser.py:367
↓ 3 callersMethodget_inputs
r""" Generates model's responses given queries.
LLaMA-Factory/src/llamafactory/train/ppo/trainer_qr_s_g.py:1099
↓ 3 callersFunctionget_logits_processor
r""" Gets logits processor that removes NaN and Inf logits.
LLaMA-Factory/src/llamafactory/extras/misc.py:150
↓ 3 callersFunctionis_pillow_available
()
LLaMA-Factory/src/llamafactory/extras/packages.py:61
↓ 3 callersFunctionload_config
r""" Loads model config.
LLaMA-Factory/src/llamafactory/model/loader.py:110
↓ 3 callersFunctionnormalize_answer
Normalizes answers by removing articles, punctuation, fixing whitespace, and optionally converting to lowercase.
normalize_answers.py:33
↓ 3 callersFunctionnormalize_answer
Normalizes answers by removing articles, punctuation, fixing whitespace, and optionally converting to lowercase.
LLaMA-Factory/src/llamafactory/train/ppo/normalize_answers.py:33
↓ 3 callersMethodreset
(self)
LLaMA-Factory/src/llamafactory/extras/misc.py:62
↓ 3 callersMethodstep
(self, closure: Optional[Callable[[], float]] = None)
LLaMA-Factory/src/llamafactory/train/trainer_utils.py:69
↓ 3 callersMethodtrans_text_to_token
(self, messages_list)
LLaMA-Factory/src/llamafactory/train/ppo/trainer_qr_s_g.py:631
↓ 2 callersFunction_add_or_replace_eos_token
(tokenizer: "PreTrainedTokenizer", eos_token: str)
LLaMA-Factory/src/llamafactory/data/template.py:273
↓ 2 callersFunction_check_single_template
( model_id: str, template_name: str, prompt_str: str, answer_str: str, extra_str: str, use_fast: bool )
LLaMA-Factory/tests/data/test_template.py:50
↓ 2 callersMethod_convert_elements_to_ids
r""" Converts elements to token ids.
LLaMA-Factory/src/llamafactory/data/template.py:133
↓ 2 callersFunction_convert_sharegpt_to_openai
(messages: List[Dict[str, str]])
LLaMA-Factory/tests/data/processors/test_pairwise.py:47
↓ 2 callersMethod_create_thread_pool
(self, output_dir: str)
LLaMA-Factory/src/llamafactory/train/callbacks.py:230
↓ 2 callersMethod_dump
(self)
LLaMA-Factory/src/llamafactory/train/rm/metric.py:33
↓ 2 callersMethod_dump
(self)
LLaMA-Factory/src/llamafactory/train/sft/metric.py:69
↓ 2 callersMethod_dump
(self)
LLaMA-Factory/src/llamafactory/train/sft/metric.py:101
↓ 2 callersMethod_encode
r""" Encodes formatted inputs to pairs of token ids. Turn 0: prefix + system + query resp Turn t: sep + query
LLaMA-Factory/src/llamafactory/data/template.py:92
↓ 2 callersFunction_encode_supervised_example
( prompt: Sequence[Dict[str, str]], response: Sequence[Dict[str, str]], system: Optional[str],
LLaMA-Factory/src/llamafactory/data/processors/supervised.py:34
↓ 2 callersMethod_form_config_dict
(self, data: Dict["Component", Any])
LLaMA-Factory/src/llamafactory/webui/runner.py:319
↓ 2 callersMethod_generate
( self, messages: Sequence[Dict[str, str]], system: Optional[str] = None, tool
LLaMA-Factory/src/llamafactory/chat/vllm_engine.py:99
↓ 2 callersFunction_get_jinja_template
r""" Returns the jinja template.
LLaMA-Factory/src/llamafactory/data/template.py:312
next →1–100 of 656, ranked by callers