Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Yuan-Li-FNLP/R3-RAG
/ types & classes
Types & classes
293 in github.com/Yuan-Li-FNLP/R3-RAG
⨍
Functions
1,737
◇
Types & classes
293
↳
Endpoints
12
↓ 188 callers
Class
StringFormatter
train/LLaMA-Factory/src/llamafactory/data/formatter.py:65
↓ 32 callers
Class
EmptyFormatter
train/LLaMA-Factory/src/llamafactory/data/formatter.py:49
↓ 27 callers
Class
Config
tool/FlashRAG/flashrag/config/config.py:9
↓ 24 callers
Class
PromptTemplate
tool/FlashRAG/flashrag/prompt/base_prompt.py:5
↓ 19 callers
Class
Dataset
A container class used to store the whole dataset. Inside the class, each data sample will be stored in `Item` class. The properties of the datase
tool/FlashRAG/flashrag/dataset/dataset.py:75
↓ 16 callers
Class
Actor
Base class for Actor models in reinforcement learning. This class serves as a foundation for implementing various actor models, which are re
train/R3RAG_OpenRLHF/openrlhf/models/actor.py:15
↓ 15 callers
Class
FunctionFormatter
train/LLaMA-Factory/src/llamafactory/data/formatter.py:95
↓ 15 callers
Class
Item
A container class used to store and manipulate a sample within a dataset. Information related to this sample during training/inference will be sto
tool/FlashRAG/flashrag/dataset/dataset.py:9
↓ 15 callers
Class
ToolFormatter
train/LLaMA-Factory/src/llamafactory/data/formatter.py:127
↓ 12 callers
Class
SequentialPipeline
tool/FlashRAG/flashrag/pipeline/pipeline.py:44
↓ 7 callers
Class
DenseRetriever
r"""Dense retriever based on pre-built faiss index.
tool/FlashRAG/flashrag/retriever/retriever.py:375
↓ 7 callers
Class
SFTDataset
Dataset for SFT model Args: dataset: dataset for SFT model tokenizer: tokenizer for SFT model max_length: max length
train/R3RAG_OpenRLHF/openrlhf/datasets/sft_dataset.py:34
↓ 6 callers
Class
DatasetAttr
r""" Dataset attributes.
train/LLaMA-Factory/src/llamafactory/data/parser.py:27
↓ 6 callers
Class
FunctionCall
train/LLaMA-Factory/src/llamafactory/data/tool_utils.py:27
↓ 6 callers
Class
LexicalUnits
tool/FlashRAG/flashrag/refiner/selective_context_compressor.py:21
↓ 6 callers
Class
SaveProcessorCallback
r""" A callback for saving the processor.
train/LLaMA-Factory/src/llamafactory/train/callbacks.py:114
↓ 5 callers
Class
ChatCompletionMessage
train/LLaMA-Factory/src/llamafactory/api/protocol.py:89
↓ 5 callers
Class
Encoder
Encoder class for encoding queries using a specified model. Attributes: model_name (str): The name of the model. model_path
tool/FlashRAG/flashrag/retriever/encoder.py:10
↓ 5 callers
Class
Samples
Samples is a batch of data. There can be 2 formats to store the samples, batched or packed. The batched format means padding is applied to the
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_prm_orm.py:128
↓ 5 callers
Class
Samples
Samples is a batch of data. There can be 2 formats to store the samples, batched or packed. The batched format means padding is applied to the
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_orm.py:128
↓ 5 callers
Class
Samples
Samples is a batch of data. There can be 2 formats to store the samples, batched or packed. The batched format means padding is applied to the
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_only_prm.py:128
↓ 5 callers
Class
Samples
Samples is a batch of data. There can be 2 formats to store the samples, batched or packed. The batched format means padding is applied to the
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker.py:128
↓ 4 callers
Class
PPORayActorGroup
A group of ray actors Functions start with 'async' should return list of object refs Args: num_nodes (int): Number of nodes for
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/launcher.py:143
↓ 4 callers
Class
PromptDataset
Dataset for PPO model Args: dataset: dataset for PPO model tokenizer: tokenizer for PPO model max_length: max length
train/R3RAG_OpenRLHF/openrlhf/datasets/prompts_dataset.py:18
↓ 4 callers
Class
RewardDataset
Dataset for reward model Args: dataset: dataset for reward model self.tokenizer: self.tokenizer for reward model sel
train/R3RAG_OpenRLHF/openrlhf/datasets/reward_dataset.py:49
↓ 3 callers
Class
BM25Retriever
r"""BM25 retriever based on pre-built pyserini index.
tool/FlashRAG/flashrag/retriever/retriever.py:217
↓ 3 callers
Class
ChatModel
r""" General class for chat models. Backed by huggingface or vllm engines. Supports both sync and async methods. Sync methods: chat(), st
train/LLaMA-Factory/src/llamafactory/chat/chat_model.py:39
↓ 3 callers
Class
Evaluator
Evaluator is used to summarize the results of all metrics.
tool/FlashRAG/flashrag/evaluator/evaluator.py:5
↓ 3 callers
Class
Experience
Experience is a batch of data. These data should have the the sequence length and number of actions. Left padding for sequences is applied.
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker.py:74
↓ 3 callers
Class
FinetuningArguments
r""" Arguments pertaining to which techniques we are going to fine-tuning with.
train/LLaMA-Factory/src/llamafactory/hparams/finetuning_args.py:389
↓ 3 callers
Class
GPTLMLoss
GPT Language Model Loss
train/R3RAG_OpenRLHF/openrlhf/models/loss.py:11
↓ 3 callers
Class
IRCOTPipeline
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:926
↓ 3 callers
Class
StopWordCriteria
A stopping criteria that halts the text generation process if any specified stop word is encountered. Inspired by https://discuss.huggingfac
tool/FlashRAG/flashrag/generator/stop_word_criteria.py:11
↓ 2 callers
Class
AverageMeter
r""" Computes and stores the average and current value.
train/LLaMA-Factory/src/llamafactory/extras/misc.py:55
↓ 2 callers
Class
ClipEncoder
ClipEncoder class for encoding queries using CLIP.
tool/FlashRAG/flashrag/retriever/encoder.py:142
↓ 2 callers
Class
DummyOptimizer
r""" A dummy optimizer used for the GaLore or APOLLO algorithm.
train/LLaMA-Factory/src/llamafactory/train/trainer_utils.py:63
↓ 2 callers
Class
EncoderWrapper
tool/FlashRAG/flashrag/generator/fid.py:187
↓ 2 callers
Class
Engine
train/LLaMA-Factory/src/llamafactory/webui/engine.py:29
↓ 2 callers
Class
Experience
Experience is a batch of data. These data should have the the sequence length and number of actions. Left padding for sequences is applied.
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_prm_orm.py:74
↓ 2 callers
Class
Experience
Experience is a batch of data. These data should have the the sequence length and number of actions. Left padding for sequences is applied.
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_orm.py:74
↓ 2 callers
Class
Experience
Experience is a batch of data. These data should have the the sequence length and number of actions. Left padding for sequences is applied.
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/experience_maker_only_prm.py:74
↓ 2 callers
Class
NaivePipeline_Chat
tool/FlashRAG/webui/chat_pipelines/sequential_pipeline.py:71
↓ 2 callers
Class
PairwiseDataCollatorWithPadding
r""" Data collator for pairwise data.
train/LLaMA-Factory/src/llamafactory/data/collator.py:193
↓ 2 callers
Class
ProcessRewardDataset
Dataset for process reward model Args: dataset: dataset for reward model self.tokenizer: self.tokenizer for reward model
train/R3RAG_OpenRLHF/openrlhf/datasets/process_reward_dataset.py:12
↓ 2 callers
Class
REPLUGLogitsProcessor
Merge logits of different docs in one batch. Reference: fastRAG
tool/FlashRAG/flashrag/pipeline/replug_utils.py:204
↓ 2 callers
Class
Response
train/LLaMA-Factory/src/llamafactory/chat/base_engine.py:30
↓ 2 callers
Class
STEncoder
STEncoder class for encoding queries using SentenceTransformers. Attributes: model_name (str): The name of the model. model_
tool/FlashRAG/flashrag/retriever/encoder.py:83
↓ 2 callers
Class
SequentialPipeline_Chat
tool/FlashRAG/webui/chat_pipelines/sequential_pipeline.py:10
↓ 2 callers
Class
TeeStream
tool/FlashRAG/webui/utils.py:52
↓ 2 callers
Class
TokenClfDataset
tool/FlashRAG/flashrag/refiner/llmlingua_compressor.py:27
↓ 2 callers
Class
UnpairedPreferenceDataset
Unpaired preference dataset for algorithm, like KTO Args: dataset: raw dataset self.tokenizer: self.tokenizer for model
train/R3RAG_OpenRLHF/openrlhf/datasets/unpaired_preference_dataset.py:35
↓ 1 callers
Class
ActorPPOTrainer
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/ppo_actor.py:24
↓ 1 callers
Class
AdaptiveKLController
Adaptive KL controller described in the paper: https://arxiv.org/pdf/1909.08593.pdf
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/kl_controller.py:4
↓ 1 callers
Class
AdaptivePipeline
tool/FlashRAG/flashrag/pipeline/pipeline.py:182
↓ 1 callers
Class
BufferItem
BufferItem is an item of experience data. Shapes of each tensor: sequences: (S) action_log_probs: (A) values: (1) returns: (1)
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/replay_buffer.py:14
↓ 1 callers
Class
ChatCompletionResponse
train/LLaMA-Factory/src/llamafactory/api/protocol.py:126
↓ 1 callers
Class
ChatCompletionResponseChoice
train/LLaMA-Factory/src/llamafactory/api/protocol.py:108
↓ 1 callers
Class
ChatCompletionResponseUsage
train/LLaMA-Factory/src/llamafactory/api/protocol.py:120
↓ 1 callers
Class
ChatCompletionStreamResponse
train/LLaMA-Factory/src/llamafactory/api/protocol.py:135
↓ 1 callers
Class
ChatCompletionStreamResponseChoice
train/LLaMA-Factory/src/llamafactory/api/protocol.py:114
↓ 1 callers
Class
ChatSession
startup/RRAG.py:222
↓ 1 callers
Class
Chatter
tool/FlashRAG/webui/chatter.py:7
↓ 1 callers
Class
CheckpointWrapper
Wrapper replacing None outputs by empty tensors, which allows the use of checkpointing.
tool/FlashRAG/flashrag/generator/fid.py:91
↓ 1 callers
Class
CompositeModel
train/LLaMA-Factory/src/llamafactory/model/model_utils/visual.py:40
↓ 1 callers
Class
ComputeAccuracy
r""" Computes reward accuracy and supports `batch_eval_metrics`.
train/LLaMA-Factory/src/llamafactory/train/rm/metric.py:28
↓ 1 callers
Class
ComputeAccuracy
r""" Computes accuracy and supports `batch_eval_metrics`.
train/LLaMA-Factory/src/llamafactory/train/sft/metric.py:64
↓ 1 callers
Class
ComputeSimilarity
r""" Computes text similarity scores and supports `batch_eval_metrics`. Wraps the tokenizer into metric functions, used in CustomSeq2SeqTrain
train/LLaMA-Factory/src/llamafactory/train/sft/metric.py:92
↓ 1 callers
Class
ConditionalPipeline
tool/FlashRAG/flashrag/pipeline/pipeline.py:133
↓ 1 callers
Class
CriticPPOTrainer
train/R3RAG_OpenRLHF/openrlhf/trainer/ray/ppo_critic.py:20
↓ 1 callers
Class
CustomDPOTrainer
train/LLaMA-Factory/src/llamafactory/train/dpo/trainer.py:43
↓ 1 callers
Class
CustomKTOTrainer
train/LLaMA-Factory/src/llamafactory/train/kto/trainer.py:43
↓ 1 callers
Class
CustomPPOTrainer
r""" Inherits PPOTrainer.
train/LLaMA-Factory/src/llamafactory/train/ppo/trainer.py:64
↓ 1 callers
Class
CustomSeq2SeqTrainer
r""" Inherits Seq2SeqTrainer to compute generative metrics such as BLEU and ROUGE.
train/LLaMA-Factory/src/llamafactory/train/sft/trainer.py:46
↓ 1 callers
Class
CustomTrainer
r""" Inherits Trainer for custom optimizer.
train/LLaMA-Factory/src/llamafactory/train/pt/trainer.py:33
↓ 1 callers
Class
DPOLoss
DPO Loss
train/R3RAG_OpenRLHF/openrlhf/models/loss.py:136
↓ 1 callers
Class
DPOTrainer
Trainer for Direct Preference Optimization (DPO) training. Args: model (torch.nn.Module): The primary model to be trained. r
train/R3RAG_OpenRLHF/openrlhf/trainer/dpo_trainer.py:14
↓ 1 callers
Class
DeepspeedStrategy
The strategy for training with Accelerator.
train/R3RAG_OpenRLHF/openrlhf/utils/deepspeed/deepspeed.py:35
↓ 1 callers
Class
DefaultToolUtils
r""" Default tool using template.
train/LLaMA-Factory/src/llamafactory/data/tool_utils.py:96
↓ 1 callers
Class
DistributedSampler
r"""Sampler that restricts data loading to a subset of the dataset. It is especially useful in conjunction with :class:`torch.nn.parallel.Dis
train/R3RAG_OpenRLHF/openrlhf/utils/distributed_sampler.py:17
↓ 1 callers
Class
Empty
train/R3RAG_OpenRLHF/openrlhf/cli/interactive_chat.py:9
↓ 1 callers
Class
Empty
train/R3RAG_OpenRLHF/openrlhf/cli/batch_inference.py:20
↓ 1 callers
Class
Engine
tool/FlashRAG/webui/engine.py:11
↓ 1 callers
Class
EvalTemplate
train/LLaMA-Factory/src/llamafactory/eval/template.py:23
↓ 1 callers
Class
Evaluator
train/LLaMA-Factory/src/llamafactory/eval/evaluator.py:61
↓ 1 callers
Class
FLAREPipeline
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:692
↓ 1 callers
Class
FixedKLController
Fixed KL controller.
train/R3RAG_OpenRLHF/openrlhf/trainer/ppo_utils/kl_controller.py:22
↓ 1 callers
Class
Function
train/LLaMA-Factory/src/llamafactory/api/protocol.py:51
↓ 1 callers
Class
FunctionCall
train/LLaMA-Factory/src/llamafactory/api/protocol.py:67
↓ 1 callers
Class
GLM4ToolUtils
r""" GLM-4 tool using template.
train/LLaMA-Factory/src/llamafactory/data/tool_utils.py:165
↓ 1 callers
Class
HF_REPLUG
Creates a HF model that inherits from REPLUG_Generation class
tool/FlashRAG/flashrag/pipeline/replug_utils.py:226
↓ 1 callers
Class
HuggingfaceEngine
train/LLaMA-Factory/src/llamafactory/chat/hf_engine.py:45
↓ 1 callers
Class
IRCOTPipeline_Chat
tool/FlashRAG/webui/chat_pipelines/active_pipeline.py:284
↓ 1 callers
Class
Index_Builder
r"""A tool class used to build an index used in retrieval.
tool/FlashRAG/flashrag/retriever/index_builder.py:17
↓ 1 callers
Class
IterativePipeline
tool/FlashRAG/flashrag/pipeline/active_pipeline.py:14
↓ 1 callers
Class
KDLoss
Language Model Knowledge Distillation Loss
train/R3RAG_OpenRLHF/openrlhf/models/loss.py:266
↓ 1 callers
Class
KDTrainer
Trainer for Knowledge Distillation. Args: model (torch.nn.Module): The model to be trained. strategy (Strategy): The trainin
train/R3RAG_OpenRLHF/openrlhf/trainer/kd_trainer.py:12
↓ 1 callers
Class
KTODataCollatorWithPadding
r""" Data collator for KTO data.
train/LLaMA-Factory/src/llamafactory/data/collator.py:221
↓ 1 callers
Class
KTOLoss
KTO loss for uneven sampling
train/R3RAG_OpenRLHF/openrlhf/models/loss.py:211
↓ 1 callers
Class
KTOTrainer
Trainer for KTO training. Args: model (torch.nn.Module): The primary model to be trained. ref_model (torch.nn.Module): The r
train/R3RAG_OpenRLHF/openrlhf/trainer/kto_trainer.py:12
↓ 1 callers
Class
LLMLinguaRefiner
Implementation for (Long)LLMLingua.
tool/FlashRAG/flashrag/refiner/refiner.py:34
next →
1–100 of 293, ranked by callers