Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Yuan-Li-FNLP/R3-RAG
/ functions
Functions
1,737 in github.com/Yuan-Li-FNLP/R3-RAG
⨍
Functions
1,737
◇
Types & classes
293
↳
Endpoints
12
↓ 2 callers
Function
_register_eval_template
(name: str, system: str, choice: str, answer: str)
train/LLaMA-Factory/src/llamafactory/eval/template.py:58
↓ 2 callers
Method
_regularize_videos
r""" Regularizes videos to avoid error. Including reading, resizing and converting.
train/LLaMA-Factory/src/llamafactory/data/mm_plugin.py:135
↓ 2 callers
Method
_reset
(self, max_steps: int = 0)
train/LLaMA-Factory/src/llamafactory/train/callbacks.py:206
↓ 2 callers
Method
_timing
(self, cur_steps: int)
train/LLaMA-Factory/src/llamafactory/train/callbacks.py:213
↓ 2 callers
Function
_z3_params_to_fetch
(param_list)
train/R3RAG_OpenRLHF/openrlhf/utils/deepspeed/deepspeed_utils.py:106
↓ 2 callers
Method
achat
r""" Asynchronously gets a list of responses of the chat model.
train/LLaMA-Factory/src/llamafactory/chat/chat_model.py:79
↓ 2 callers
Method
aget_scores
r""" Asynchronously gets a list of scores of the reward model.
train/LLaMA-Factory/src/llamafactory/chat/chat_model.py:139
↓ 2 callers
Method
astream_chat
r""" Asynchronously gets the response token-by-token of the chat model.
train/LLaMA-Factory/src/llamafactory/chat/chat_model.py:113
↓ 2 callers
Method
async_save_model
Save actor model on rank 0. Returns: List: list of remote object refs.
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/launcher.py:303
↓ 2 callers
Method
build_single_doc_prompt
(self, question: str, doc_list: List[str])
tool/FlashRAG/flashrag/pipeline/branching_pipeline.py:25
↓ 2 callers
Function
calculate_tps
r""" Calculates effective tokens per second.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:103
↓ 2 callers
Method
chat
(self, query)
tool/FlashRAG/webui/chat_pipelines/conditional_pipeline.py:96
↓ 2 callers
Method
chat
(self, query)
tool/FlashRAG/webui/chat_pipelines/active_pipeline.py:140
↓ 2 callers
Function
clean_cmd
r""" Removes args with NoneType or False or empty string value.
train/LLaMA-Factory/src/llamafactory/webui/utils.py:100
↓ 2 callers
Function
compute_bleu
Computes BLEU score of translated segments against one or more references. Args: reference_corpus: list of lists of references for each tra
tool/FlashRAG/flashrag/evaluator/_bleu.py:149
↓ 2 callers
Method
concatenated_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/rm_trainer.py:312
↓ 2 callers
Method
concatenated_forward
( self, model: "PreTrainedModel", batch: Dict[str, "torch.Tensor"] )
train/LLaMA-Factory/src/llamafactory/train/kto/trainer.py:164
↓ 2 callers
Method
concatenated_forward
r""" Computes the sum log probabilities of the labels under given logits if loss_type is not IPO, ORPO or SimPO. Otherwise the averag
train/LLaMA-Factory/src/llamafactory/train/dpo/trainer.py:187
↓ 2 callers
Function
convert_ring_attn_params
(sequences, attention_mask, packed_seq_lens, ring_attn_group)
train/R3RAG_OpenRLHF/openrlhf/models/ring_attn_utils.py:63
↓ 2 callers
Function
count_parameters
r""" Returns the number of trainable parameters and number of all parameters in the model.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:118
↓ 2 callers
Function
create_app
(chat_model: "ChatModel")
train/LLaMA-Factory/src/llamafactory/api/app.py:70
↓ 2 callers
Function
create_chat_box
( engine: "Engine", visible: bool = False )
train/LLaMA-Factory/src/llamafactory/webui/components/chatbot.py:32
↓ 2 callers
Function
create_preview_box
(dataset_dir: "gr.Textbox", dataset: "gr.Dropdown")
train/LLaMA-Factory/src/llamafactory/webui/components/data.py:84
↓ 2 callers
Function
create_ui
(demo_mode: bool = False)
train/LLaMA-Factory/src/llamafactory/webui/interface.py:36
↓ 2 callers
Method
critic_preds
Evaluate predictions using different retrieval docs
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:219
↓ 2 callers
Function
dictify
(data: "BaseModel")
train/LLaMA-Factory/src/llamafactory/api/common.py:23
↓ 2 callers
Function
em_prompt
(question, answer)
benchmark/R3-RAG/src/cal_metric.py:68
↓ 2 callers
Function
em_prompt
(question, answer)
benchmark/batch_check/batch_check.py:169
↓ 2 callers
Method
empty_cache
(self)
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/ppo_critic.py:180
↓ 2 callers
Method
evaluate
The evaluation process after finishing overall generation
tool/FlashRAG/flashrag/pipeline/mm_pipeline.py:23
↓ 2 callers
Function
export_model
(args: Optional[Dict[str, Any]] = None)
train/LLaMA-Factory/src/llamafactory/train/tuner.py:95
↓ 2 callers
Function
extract_candidate_answers_strict
(llm_output)
benchmark/R3-RAG/src/cal_metric.py:117
↓ 2 callers
Function
extract_candidate_answers_strict
(llm_output)
benchmark/batch_check/batch_check.py:231
↓ 2 callers
Function
extract_substring
(text, str1, str2="")
data/construct/02sample_from_dataset/mainv1.py:56
↓ 2 callers
Function
extract_substring
(text, str1, str2="")
data/construct/02sample_from_dataset/main.py:54
↓ 2 callers
Method
extract_tool
r""" Extracts tool message.
train/LLaMA-Factory/src/llamafactory/data/template.py:86
↓ 2 callers
Method
fit
(self, args, consumed_samples=0, num_update_steps_per_epoch=None)
train/R3RAG_OpenRLHF/openrlhf/trainer/kd_trainer.py:94
↓ 2 callers
Method
format_ref
(titles, texts)
tool/FlashRAG/flashrag/pipeline/branching_pipeline.py:130
↓ 2 callers
Method
forward
r""" Runs forward pass and computes the log probabilities.
train/LLaMA-Factory/src/llamafactory/train/kto/trainer.py:139
↓ 2 callers
Method
forward
(self, input_ids=None, attention_mask=None, **kwargs)
tool/FlashRAG/flashrag/generator/fid.py:32
↓ 2 callers
Function
gen_config
(args: Dict[str, Any])
tool/FlashRAG/webui/utils.py:18
↓ 2 callers
Function
get_batch_logps
r""" Computes the log probabilities of the given labels under the given logits. Returns: logps: A tensor of shape (batch_size,) conta
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:543
↓ 2 callers
Method
get_condition_ppl
( self, text: str, question: str, condition_in_question: str = "none",
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:1070
↓ 2 callers
Method
get_config_files
Used in basic module to get the saved config files.
tool/FlashRAG/webui/runner.py:316
↓ 2 callers
Function
get_config_path
r""" Gets the path to user config.
train/LLaMA-Factory/src/llamafactory/webui/common.py:66
↓ 2 callers
Method
get_elem_iter
r""" Returns an iterator over all elements with their names.
tool/FlashRAG/webui/manager.py:33
↓ 2 callers
Method
get_estimate_threshold_base_distribution
(self, ppl, ratio: float, condition_flag: bool = False)
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:1533
↓ 2 callers
Function
get_forbidden_modules
r""" Freezes vision tower and language model for VLM full/freeze tuning.
train/LLaMA-Factory/src/llamafactory/model/model_utils/visual.py:152
↓ 2 callers
Function
get_local_ip
获取本机IP地址
startup/R3-RAG.py:12
↓ 2 callers
Method
get_mm_inputs
r""" Builds batched multimodal inputs for VLMs. Arguments: images: a list of image inputs, shape (num_images,)
train/LLaMA-Factory/src/llamafactory/data/mm_plugin.py:233
↓ 2 callers
Function
get_pure_token
(token, model_name)
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:100
↓ 2 callers
Method
get_rank_results
( self, context: list, question: str, rank_method: str, condition_in_q
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:1801
↓ 2 callers
Function
get_reranker
(config)
tool/FlashRAG/flashrag/utils/utils.py:98
↓ 2 callers
Method
get_stop_token_ids
r""" Returns stop token ids.
train/LLaMA-Factory/src/llamafactory/data/template.py:92
↓ 2 callers
Method
get_string_with_varying_examplars
Select the maximum number of examplars that can be placed in the prompt
tool/FlashRAG/flashrag/prompt/base_prompt.py:142
↓ 2 callers
Function
get_token_params
Extract max_tokens and max_new_tokens from a parameter dictionary.
tool/FlashRAG/flashrag/generator/utils.py:18
↓ 2 callers
Function
get_tool_utils
(name: str)
train/LLaMA-Factory/src/llamafactory/data/tool_utils.py:346
↓ 2 callers
Function
init_process_group
( backend: Union[str, Backend] = None, init_method: Optional[str] = None, timeout: Optional[timede
train/R3RAG_OpenRLHF/openrlhf/utils/distributed_util.py:19
↓ 2 callers
Function
is_fastapi_available
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:45
↓ 2 callers
Function
is_matplotlib_available
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:61
↓ 2 callers
Function
is_ray_available
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:69
↓ 2 callers
Function
is_requests_available
()
train/LLaMA-Factory/src/llamafactory/extras/packages.py:73
↓ 2 callers
Function
judge_image
(x)
tool/FlashRAG/flashrag/retriever/utils.py:167
↓ 2 callers
Method
judge_retrieve
Calculate whether a retrieve is required based on the output probability of the special token in the model
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:175
↓ 2 callers
Method
judge_sent_confidence
(self, sent, sent_score)
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:736
↓ 2 callers
Function
load_args
r""" Loads saved arguments.
train/LLaMA-Factory/src/llamafactory/webui/utils.py:191
↓ 2 callers
Function
load_image_from_source
(image_path)
tool/FlashRAG/flashrag/generator/utils.py:99
↓ 2 callers
Function
load_model
(model_path: str, use_fp16: bool = False)
tool/FlashRAG/flashrag/retriever/utils.py:54
↓ 2 callers
Function
load_replug_model
(name_or_path)
tool/FlashRAG/flashrag/pipeline/replug_utils.py:225
↓ 2 callers
Function
load_valuehead_params
r""" Loads value head parameters from Hugging Face Hub or local disk. Returns: dict with keys `v_head.summary.weight` and `v_head.summary.bia
train/LLaMA-Factory/src/llamafactory/model/model_utils/valuehead.py:33
↓ 2 callers
Function
make_experience_batch
(items: List[BufferItem], packing_samples=False)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/replay_buffer.py:90
↓ 2 callers
Method
make_experience_list
Make a list of experience with the micro_rollout_batch_size. This method will first calculate the response sequences and rewards for
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker.py:210
↓ 2 callers
Function
merge_dataset
(dataset_split: dict, split_symbol: list)
tool/FlashRAG/flashrag/dataset/utils.py:46
↓ 2 callers
Method
multi_gpu_encode
(self, query_list: Union[List[str], str], batch_size=64, is_query=True)
tool/FlashRAG/flashrag/retriever/encoder.py:76
↓ 2 callers
Function
nested_detach
r""" Detach `tensors` (even if it's a nested list/tuple/dict of tensors).
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:564
↓ 2 callers
Function
normalize_answer
Normalize text by removing articles, punctuation, and extra whitespace, and converting to lowercase.
benchmark/R3-RAG/src/cal_metric.py:148
↓ 2 callers
Function
normalize_answer
Normalize text by removing articles, punctuation, and extra whitespace, and converting to lowercase.
benchmark/batch_check/batch_check.py:218
↓ 2 callers
Method
packed_samples_forward
(self, model, packed_input_ids, packed_attention_masks, packed_seq_lens)
train/R3RAG_OpenRLHF/openrlhf/trainer/rm_trainer.py:357
↓ 2 callers
Method
parse_candidates
Parse candidates from model response
tool/FlashRAG/flashrag/pipeline/branching_pipeline.py:141
↓ 2 callers
Method
parse_ranking
Parse model's pair ranking result into score
tool/FlashRAG/flashrag/pipeline/branching_pipeline.py:161
↓ 2 callers
Method
parse_validation
Parse model's validation result into score based on the paper formula
tool/FlashRAG/flashrag/pipeline/branching_pipeline.py:152
↓ 2 callers
Function
pooling
(pooler_output, last_hidden_state, attention_mask=None, pooling_method="mean")
tool/FlashRAG/flashrag/retriever/utils.py:66
↓ 2 callers
Function
prompt_question_initv2
(question)
data/construct/02sample_from_dataset/prompt_template.py:46
↓ 2 callers
Function
prompt_question_newv2
(previous_steps, question)
data/construct/02sample_from_dataset/prompt_template.py:386
↓ 2 callers
Function
ray_noset_visible_devices
(env_vars=os.environ)
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/utils.py:4
↓ 2 callers
Function
read_args
(args: Optional[Union[Dict[str, Any], List[str]]] = None)
train/LLaMA-Factory/src/llamafactory/hparams/parser.py:57
↓ 2 callers
Function
remote_rm_fn
remote reward model API api_url: RM API, We assume that the API supports two modes: merging query + response and not merging queries: query+re
train/R3RAG_OpenRLHF/openrlhf/utils/remote_rm_utils.py:32
↓ 2 callers
Function
replace_model
r""" Replaces the default/reward modules in the model. The model is already unwrapped.
train/LLaMA-Factory/src/llamafactory/train/ppo/ppo_utils.py:45
↓ 2 callers
Method
reset_session
(self)
startup/R3-RAG.py:140
↓ 2 callers
Function
resolve_tokens
Resolve between max_tokens and max_new_tokens values based on priority. Returns the resolved token value or None if no valid value fo
tool/FlashRAG/flashrag/generator/utils.py:22
↓ 2 callers
Method
rrf_merge
Perform Reciprocal Rank Fusion (RRF) on retrieval results. Args: results (list of list of dict): Retrieval results for m
tool/FlashRAG/flashrag/retriever/retriever.py:786
↓ 2 callers
Method
run
r"""Get refining result. Args: item: dataset item, contains question, retrieval result... Returns: str: refi
tool/FlashRAG/flashrag/refiner/refiner.py:19
↓ 2 callers
Function
save_args
r""" Saves arguments.
train/LLaMA-Factory/src/llamafactory/webui/utils.py:202
↓ 2 callers
Method
save_checkpoint
(self, tag)
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/ppo_critic.py:193
↓ 2 callers
Method
signature
(self)
tool/FlashRAG/flashrag/evaluator/_bleu.py:74
↓ 2 callers
Function
smooth
r""" EMA implementation according to TensorBoard.
train/LLaMA-Factory/src/llamafactory/extras/ploting.py:34
↓ 2 callers
Function
split_dataset
(dataset: Dataset, split_symbol: list)
tool/FlashRAG/flashrag/dataset/utils.py:34
↓ 2 callers
Function
split_response
(response)
benchmark/R3-RAG/src/inference_4gpu.py:44
↓ 2 callers
Function
split_response
(response)
benchmark/R3-RAG/src/inference_new.py:44
↓ 2 callers
Function
split_response
(response)
benchmark/R3-RAG/src/inference.py:44
← previous
next →
301–400 of 1,737, ranked by callers