MCPcopy Create free account

hub / github.com/Yuan-Li-FNLP/R3-RAG / functions

Functions1,737 in github.com/Yuan-Li-FNLP/R3-RAG

↓ 7 callersFunctionclean_string
(str)
data/construct/02sample_from_dataset/main.py:95
↓ 7 callersFunctionget_dataset
r""" Gets the train dataset and optionally gets the evaluation dataset.
train/LLaMA-Factory/src/llamafactory/data/loader.py:225
↓ 7 callersFunctionget_llm_for_sequence_regression
Retrieve a transformer model with a sequence regression head on top. This function loads a pretrained transformer model and attaches a linear lay
train/R3RAG_OpenRLHF/openrlhf/models/model.py:22
↓ 7 callersMethodprocess_token_ids
r""" Pre-processes token ids after tokenization for VLMs.
train/LLaMA-Factory/src/llamafactory/data/mm_plugin.py:218
↓ 7 callersMethodrun
(self, dataset, do_eval=True, pred_process_fun=None)
tool/FlashRAG/flashrag/pipeline/pipeline.py:82
↓ 7 callersMethodsave_model
r""" Saves model checkpoint. Subclass and override to inject custom behavior.
train/LLaMA-Factory/src/llamafactory/train/ppo/trainer.py:485
↓ 7 callersMethodset_epoch
r""" Set the epoch for this sampler. When :attr:`shuffle=True`, this ensures all replicas use a different random ordering for
train/R3RAG_OpenRLHF/openrlhf/utils/distributed_sampler.py:139
↓ 7 callersMethodwarning_rank0_once
(self, *args, **kwargs)
train/LLaMA-Factory/src/llamafactory/extras/logging.py:80
↓ 6 callersMethodcalculate_rouge
(self, pred, golden_answers)
tool/FlashRAG/flashrag/evaluator/metrics.py:293
↓ 6 callersFunctioncreate_custom_optimizer
( model: "PreTrainedModel", training_args: "TrainingArguments", finetuning_args: "FinetuningArgume
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:497
↓ 6 callersFunctioncreate_custom_scheduler
( training_args: "TrainingArguments", num_training_steps: int, optimizer: Optional["torch.optim.Op
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:518
↓ 6 callersMethodevaluate
(self, eval_dataloader, steps=0)
train/R3RAG_OpenRLHF/openrlhf/trainer/kd_trainer.py:208
↓ 6 callersMethodgenerate
(self, input_ids: torch.Tensor, **kwargs)
train/R3RAG_OpenRLHF/openrlhf/models/actor.py:122
↓ 6 callersFunctionjudge_zh
(input_str: str)
tool/FlashRAG/flashrag/retriever/utils.py:27
↓ 6 callersFunctionnumpify
r""" Casts a torch tensor or a numpy array to a numpy array.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:226
↓ 6 callersFunctionplot_loss
r""" Plots loss curves and saves the image.
train/LLaMA-Factory/src/llamafactory/extras/ploting.py:73
↓ 6 callersMethodpostprocess_prediction
(self, pred)
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:352
↓ 6 callersFunctiontorch_gc
r""" Collects GPU or NPU memory.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:248
↓ 5 callersMethod__init__
( self, config, threshold=0.2, look_ahead_steps=64, max_generation_len
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:693
↓ 5 callersMethod_regularize_images
r""" Regularizes images to avoid error. Including reading and pre-processing.
train/LLaMA-Factory/src/llamafactory/data/mm_plugin.py:112
↓ 5 callersMethod_search_or_batch_search
(self, query: Union[str, list], target_modal, num, return_score, method, retriever_list)
tool/FlashRAG/flashrag/retriever/retriever.py:659
↓ 5 callersFunction_set_z3_leaf_modules
(model: "PreTrainedModel", leaf_modules: Sequence["torch.nn.Module"])
train/LLaMA-Factory/src/llamafactory/model/model_utils/moe.py:29
↓ 5 callersMethodbatch_run
(self, dataset, batch_size=None)
tool/FlashRAG/flashrag/judger/judger.py:33
↓ 5 callersMethodclear
(self)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/replay_buffer.py:187
↓ 5 callersFunctioncreate_modelcard_and_push
( trainer: "Trainer", model_args: "ModelArguments", data_args: "DataArguments", training_args:
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:84
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
startup/RRAG.py:16
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
startup/R3-RAG.py:38
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
benchmark/NaiveRAG/src/inference.py:29
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
benchmark/NaiveGeneration/src/inference.py:22
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
benchmark/R3-RAG/src/inference_4gpu.py:27
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
benchmark/R3-RAG/src/inference_new.py:27
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
benchmark/R3-RAG/src/inference.py:27
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
data/construct/02sample_from_dataset/mainv1.py:77
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
data/construct/02sample_from_dataset/main.py:75
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_prm_orm.py:1244
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_orm.py:1246
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_only_prm.py:1244
↓ 5 callersFunctionextract_substring2
(text, start_str, stop_strs)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker.py:1244
↓ 5 callersMethodformat_reference
(self, retrieval_result)
tool/FlashRAG/flashrag/refiner/refiner.py:62
↓ 5 callersMethodgenerate
Get responses from the generater. Args: input_list: it contains input texts, each item represents a sample. Returns:
tool/FlashRAG/flashrag/generator/generator.py:49
↓ 5 callersFunctionget_current_device
r""" Gets the current available device.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:147
↓ 5 callersMethodget_ppl
( self, text: str, granularity: str = "sentence", input_ids=None, atte
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:303
↓ 5 callersMethodget_scores
r""" Gets a list of scores of the reward model.
train/LLaMA-Factory/src/llamafactory/chat/chat_model.py:128
↓ 5 callersFunctioninfer_seqlen
r""" Computes the real sequence length after truncation by the cutoff_len.
train/LLaMA-Factory/src/llamafactory/data/processors/processor_utils.py:51
↓ 5 callersFunctionload_config
r""" Loads user config if exists.
train/LLaMA-Factory/src/llamafactory/webui/common.py:73
↓ 5 callersFunctionload_docs
(corpus, doc_idxs: List[int])
tool/FlashRAG/flashrag/retriever/utils.py:148
↓ 5 callersMethodnormalize
(self, attribute: str, strategy)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/replay_buffer.py:208
↓ 5 callersMethodprocess_sequences
(self, sequences: torch.Tensor, input_len, eos_token_id, pad_token_id)
train/R3RAG_OpenRLHF/openrlhf/models/actor.py:155
↓ 5 callersMethodsave
Save the dataset into the original format.
tool/FlashRAG/flashrag/dataset/dataset.py:186
↓ 5 callersMethodstep
(self, closure: Optional[Callable[[], float]] = None)
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:80
↓ 5 callersMethodto_dict
Convert all information within the data sample into a dict. Information generated during the inference will be saved into output field.
tool/FlashRAG/flashrag/dataset/dataset.py:51
↓ 5 callersMethodtruncate_prompt
(self, prompt)
tool/FlashRAG/flashrag/prompt/base_prompt.py:59
↓ 5 callersFunctionuse_modelscope
()
train/LLaMA-Factory/src/llamafactory/extras/misc.py:289
↓ 5 callersFunctionuse_openmind
()
train/LLaMA-Factory/src/llamafactory/extras/misc.py:293
↓ 5 callersFunctionuse_ray
()
train/LLaMA-Factory/src/llamafactory/extras/misc.py:297
↓ 4 callersMethod__compress
( self, context_list: list, reduce_rate: float = 0.5, token_to_word: str = "me
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:2227
↓ 4 callersMethod__init__
(self, config)
tool/FlashRAG/flashrag/generator/generator.py:20
↓ 4 callersMethod__init__
(self, config)
tool/FlashRAG/flashrag/retriever/retriever.py:116
↓ 4 callersMethod__init__
(self, config)
tool/FlashRAG/flashrag/refiner/refiner.py:12
↓ 4 callersFunction_convert_slots_to_jinja
(slots: "SLOTS", tokenizer: "PreTrainedTokenizer", placeholder: str = "content")
train/LLaMA-Factory/src/llamafactory/data/template.py:286
↓ 4 callersFunction_get_decay_parameter_names
r""" Returns a list of names of parameters with weight decay. (weights in non-layernorm layers)
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:190
↓ 4 callersFunction_parse_args
( parser: "HfArgumentParser", args: Optional[Union[Dict[str, Any], List[str]]] = None, allow_extra_keys: b
train/LLaMA-Factory/src/llamafactory/hparams/parser.py:69
↓ 4 callersMethod_parse_pipeline_args
(self, data: Dict["Component", Any])
tool/FlashRAG/webui/runner.py:26
↓ 4 callersMethod_setup_distributed
(self, strategy: DeepspeedStrategy)
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/launcher.py:54
↓ 4 callersMethod_unwrap_model
(self, model)
train/R3RAG_OpenRLHF/openrlhf/utils/deepspeed/deepspeed.py:177
↓ 4 callersMethod_update_dict
(old_dict: dict, new_dict: dict)
tool/FlashRAG/flashrag/config/config.py:56
↓ 4 callersMethodasync_init_model_from_pretrained
Init model from pretrained checkpoint. Returns: List: list of remote object refs.
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/launcher.py:232
↓ 4 callersMethodcompress_prompt
Compresses the given context. Args: context (List[str]): List of context strings that form the basis of the prompt.
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:552
↓ 4 callersMethodcompute_model_logps_with_KL
the front half is matched for spv, the latter half is unmatched for KL
train/R3RAG_OpenRLHF/openrlhf/trainer/kto_trainer.py:273
↓ 4 callersFunctioncompute_reward
( r: Union[torch.Tensor, float], kl_coef: float, kl: Union[torch.Tensor, list[torch.Tensor]],
train/R3RAG_OpenRLHF/openrlhf/models/utils.py:37
↓ 4 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
train/R3RAG_OpenRLHF/openrlhf/trainer/dpo_trainer.py:316
↓ 4 callersFunctionconvert_token_to_id
(token, tokenizer)
train/R3RAG_OpenRLHF/openrlhf/utils/utils.py:122
↓ 4 callersFunctionget_device_count
r""" Gets the number of available GPU or NPU devices.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:165
↓ 4 callersMethodget_elem_list
r""" Returns the list of all elements.
train/LLaMA-Factory/src/llamafactory/webui/manager.py:36
↓ 4 callersMethodget_elem_list_without_accordion
(self)
tool/FlashRAG/webui/manager.py:26
↓ 4 callersFunctionget_judger
(config)
tool/FlashRAG/flashrag/utils/utils.py:109
↓ 4 callersMethodget_next_sentence
(self, output, scores)
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:718
↓ 4 callersFunctionis_pillow_available
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:65
↓ 4 callersFunctionis_transformers_version_equal_to_4_46
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:91
↓ 4 callersMethodjudge
(self, dataset)
tool/FlashRAG/flashrag/judger/judger.py:87
↓ 4 callersMethodpacked_samples_forward
(self, model, packed_input_ids, packed_attention_masks, packed_seq_lens, prompt_id_lens)
train/R3RAG_OpenRLHF/openrlhf/trainer/dpo_trainer.py:404
↓ 4 callersFunctionprocess
(text)
benchmark/R3-RAG/src/cal_metric.py:13
↓ 4 callersFunctionprocess
(text)
benchmark/batch_check/batch_check.py:49
↓ 4 callersFunctionresolve_max_tokens
Resolve and validate max_tokens parameters from both params and generation_params. Args: params: Dictionary containing user-provided
tool/FlashRAG/flashrag/generator/utils.py:4
↓ 4 callersFunctionrun_exp
(args: Optional[Dict[str, Any]] = None, callbacks: Optional[List["TrainerCallback"]] = None)
train/LLaMA-Factory/src/llamafactory/train/tuner.py:79
↓ 4 callersMethodsample
(self)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/replay_buffer.py:191
↓ 4 callersMethodsave_faiss_index
( self, all_embeddings, faiss_type, index_save_path, )
tool/FlashRAG/flashrag/retriever/index_builder.py:338
↓ 4 callersMethodto_device
(self, device: torch.device)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_prm_orm.py:103
↓ 4 callersMethodto_device
(self, device: torch.device)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_orm.py:103
↓ 4 callersMethodto_device
(self, device: torch.device)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_only_prm.py:103
↓ 3 callersFunctionGetRetrieval
(query, retriver_url)
startup/RRAG.py:86
↓ 3 callersFunctionGetRetrieval
(query)
data/construct/02sample_from_dataset/mainv1.py:32
↓ 3 callersFunctionGetRetrieval
(query)
data/construct/02sample_from_dataset/main.py:30
↓ 3 callersFunctionGetRetrieval
(query)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_prm_orm.py:1526
↓ 3 callersFunctionGetRetrieval
(query)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_orm.py:1528
↓ 3 callersFunctionGetRetrieval
(query)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_only_prm.py:1526
↓ 3 callersFunctionGetRetrieval
(query)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker.py:1526
↓ 3 callersMethod__call__
(self, features: Sequence[Dict[str, Any]])
train/LLaMA-Factory/src/llamafactory/data/collator.py:226
↓ 3 callersMethod__init__
(self, config)
tool/FlashRAG/flashrag/generator/fid.py:13
↓ 3 callersMethod__init__
(self, config, prompt_template=None)
tool/FlashRAG/flashrag/pipeline/pipeline.py:12
← previousnext →101–200 of 1,737, ranked by callers