Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenLMLab/MOSS-RLHF
/ functions
Functions
158 in github.com/OpenLMLab/MOSS-RLHF
⨍
Functions
158
◇
Types & classes
20
Method
__init__
(self, num=0, denom=0)
metric.py:31
Method
__init__
(self, sum_=0)
metric.py:60
Method
__init__
(self, val=0)
metric.py:80
Method
__init__
(self, opt: Dict[str, Any], accelerator, mode='train')
metric.py:111
Method
__init__
(self, config, opt, tokenizer)
train_ppo.py:114
Method
__init__
Calculates the running mean and standard deviation of a data stream. Modified version of https://github.com/DLR-RM/stable-baselines3/
utils.py:89
Method
__init__
(self, config, opt: Dict[str, Any], tokenizer, **kwargs)
train_rm.py:14
Method
__init__
(self, opt, accelerator, mode: str = 'train', **kwargs)
rm/reward_datahelper.py:38
Method
__init__
(self)
rm/reward_trainer.py:23
Method
__init__
(self, opt, model: nn.Module, accelerator, eval_only=False)
rm/reward_trainer.py:43
Method
__init__
(self, opt, accelerator, mode = 'train', **kwargs)
ppo/ppo_datahelper.py:103
Method
__init__
(self, data, opt, accelerator, mode = 'train', **kwargs)
ppo/ppo_datahelper.py:176
Method
__init__
(self, opt, accelerator, **kwargs)
ppo/ppo_datahelper.py:275
Method
__init__
(self, policy_model, critic_model)
ppo/ppo_trainer.py:30
Method
__init__
(self, opt, policy_model, ref_model, critic_model, reward_model, accelerator, **kwargs)
ppo/ppo_trainer.py:48
Method
__iter__
(self)
rm/reward_datahelper.py:75
Method
__iter__
(self)
ppo/ppo_datahelper.py:98
Method
__len__
(self)
rm/reward_datahelper.py:72
Method
__len__
(self)
ppo/ppo_datahelper.py:59
Method
__radd__
(self, other)
metric.py:26
Method
_invsqrt_lr
(step)
rm/reward_trainer.py:232
Method
_invsqrt_lr
(step)
ppo/ppo_trainer.py:169
Method
_invsqrt_lr_with_warmup
(step)
rm/reward_trainer.py:236
Method
_invsqrt_lr_with_warmup
(step)
ppo/ppo_trainer.py:173
Method
_run_fake_forward
(self)
rm/reward_trainer.py:106
Method
_warmup_lr
(step)
rm/reward_trainer.py:234
Method
_warmup_lr
(step)
ppo/ppo_trainer.py:171
Method
add
(self, val: Any)
metric.py:35
Method
add
(self, val)
metric.py:63
Method
batch_generator
(self)
ppo/ppo_datahelper.py:166
Method
batch_generator
(self)
ppo/ppo_datahelper.py:232
Method
batch_generator
(self)
ppo/ppo_datahelper.py:353
Method
batchify
(self, batch_samples: List[Dict[str, Any]])
ppo/ppo_datahelper.py:157
Method
batchify
(self, batch_samples: List[Dict[str, Any]])
ppo/ppo_datahelper.py:237
Method
format
(self, sample: List[str])
ppo/ppo_datahelper.py:139
Method
format
(self, sample: Dict[str, Any])
ppo/ppo_datahelper.py:210
Method
forward
(self, decoder_input, only_last=True)
train_ppo.py:120
Method
forward
(self, decoder_input: torch.LongTensor, rank_all=False)
train_rm.py:26
Method
forward
(self, inputs, **kwargs)
ppo/ppo_trainer.py:35
Method
load_state_dict
(self, state_dict)
rm/reward_trainer.py:35
Function
main
(task, **kwargs)
merge_weight_en.py:176
Function
main
(task, **kwargs)
merge_weight_zh.py:132
Function
make_diff
Make the weight diff. This function is given to present full transparency of how the weight diff was created. Run: python weight_dif
merge_weight_en.py:25
Function
make_diff
Make the weight diff. This function is given to present full transparency of how the weight diff was created. Run: python weight_dif
merge_weight_zh.py:25
Method
many
(self, vals: List[Any], denoms: Optional[List[int]] = None)
metric.py:39
Method
many
(self, vals: List[Any])
metric.py:86
Function
recover
Recover the original weights from the released weight diff. This function is given for you to run. Things to do before running this:
merge_weight_en.py:90
Function
recover
Recover the original weights from the released weight diff. This function is given for you to run. Things to do before running this:
merge_weight_zh.py:69
Method
reset
(self)
metric.py:53
Method
reset
(self)
metric.py:72
Method
reset
(self)
metric.py:92
Method
reset
(self, no_reset = ['global_exs'])
metric.py:133
Method
state_dict
(self)
rm/reward_trainer.py:28
Method
train
(self, mode=True)
ppo/ppo_trainer.py:38
Method
val
(self)
metric.py:48
Method
val
(self)
metric.py:69
Method
val
(self)
metric.py:89
Method
val
(self)
metric.py:99
← previous
101–158 of 158, ranked by callers