MCPcopy Create free account

hub / github.com/allenai/RL4LMs / functions

Functions555 in github.com/allenai/RL4LMs

Functionmain
()
rl4lms/envs/text_generation/preference_reward.py:167
Functionmain
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/prepare_references_for_eval.py:128
Functionmain
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/prepare_predictions_for_eval.py:39
Functionmain
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/totto_parent_eval.py:456
Methodmethod
(self)
rl4lms/envs/text_generation/caption_metrics/cider.py:263
Methodmethod
(self)
rl4lms/envs/text_generation/caption_metrics/spice/spice.py:126
Methodmode
(self)
rl4lms/algorithms/common/maskable/distributions.py:154
Methodmode
(self)
rl4lms/algorithms/common/maskable/distributions.py:227
Methodon_log
(self, args, state, control, logs=None, **kwargs)
rl4lms/envs/text_generation/utils_supervised.py:136
Functionoverlap_probability
Returns the probability that the given n-gram overlaps with the table. A simple implementation which checks how many tokens in the n-gram are als
rl4lms/data_pools/task_utils/totto/eval_utils/totto_parent_eval.py:163
Methodpredict
Get the model's action(s) from an observation. :param observation: the input observation :param state: The last states (can
rl4lms/algorithms/nlpo/nlpo.py:293
Methodpredict_values
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy.py:130
Methodpredict_values
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy/causal_policy.py:311
Methodprepare
(cls, split: str, representation: str = 'subtable', **args)
rl4lms/data_pools/custom_text_generation_pools.py:17
Methodprepare
(cls, split: str, concept_separator_token: str = " ", concept_end_token=" ",
rl4lms/data_pools/custom_text_generation_pools.py:119
Methodprepare
(cls, split: str, prompt_suffix: str = "TL;DR:")
rl4lms/data_pools/custom_text_generation_pools.py:160
Methodprepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:177
Methodprepare
(cls, split: str, seed: int)
rl4lms/data_pools/custom_text_generation_pools.py:214
Methodprepare
(cls, split: str, positive_ratio: int = 1.0)
rl4lms/data_pools/custom_text_generation_pools.py:246
Methodprepare
(cls, split: str)
rl4lms/data_pools/custom_text_generation_pools.py:301
Methodprepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:388
Methodprepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:424
Methodprepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:456
Methodprepare
(cls, split: str, max_context_size: int)
rl4lms/data_pools/custom_text_generation_pools.py:489
Methodprepare
(cls, split: str, context_size: int)
rl4lms/data_pools/custom_text_generation_pools.py:556
Methodprepare
A factory method to instantiate data pool
rl4lms/data_pools/text_generation_pool.py:33
Methodproba_distribution_net
Create the layer that represents the distribution: it will be the logits (flattened) of the MultiCategorical distribution. Yo
rl4lms/algorithms/common/maskable/distributions.py:185
Functionquantile_huber_loss
The quantile-regression loss, as described in the QR-DQN and TQC papers. Partially taken from https://github.com/bayesgroup/tqc_pytorch.
rl4lms/algorithms/common/algo_utils.py:8
Methodrender
(self)
rl4lms/envs/text_generation/env.py:172
Methodreset
Resets the episode and returns an observation
rl4lms/envs/common/base_env.py:41
Methodreset
(self)
rl4lms/algorithms/common/maskable/buffers.py:161
Methodreset
(self)
rl4lms/algorithms/common/maskable/logits_processor.py:37
Methodreset
(self)
rl4lms/algorithms/common/maskable/logits_processor.py:183
Methodsample
(self, size: int)
rl4lms/core_components/sampler.py:24
Methodsample
(self)
rl4lms/data_pools/text_generation_pool.py:28
Methodsample
(self)
rl4lms/algorithms/common/maskable/distributions.py:223
Methodsave_imager_cache
(self)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:343
Methodsave_imager_cache
(self)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:370
Methodscore
(self, originals, generateds, **kwargs)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:347
Methodsim
Compute the cosine similarity of two vectors. :param vec_hyp: array of dictionary for vector corresponding to hypothesis
rl4lms/envs/text_generation/caption_metrics/cider.py:142
Functionthree_sentence_summary
Returns first three sentences from the generated text
rl4lms/envs/text_generation/post_processors.py:4
Methodto
(self, device)
rl4lms/envs/text_generation/policy.py:796
Methodto_df
(predictions)
rl4lms/envs/text_generation/logging_utils.py:87
Functiontokenize
(examples)
scripts/reward-modeling/train_intent_classifier.py:56
Functiontokenize_causal
(item, tokenizer)
rl4lms/envs/text_generation/utils_supervised.py:184
Functiontokenize_rewards
(rewards: th.Tensor, tokenizer, device, round=1)
rl4lms/algorithms/common/algo_utils.py:168
Functiontokenize_seq2seq
(item, tokenizer)
rl4lms/envs/text_generation/utils_supervised.py:192
Functiontop_k_top_p_filtering
Filter a distribution of logits using top-k and/or nucleus (top-p) filtering Args: logits: logits distribution shape (batch size, vo
rl4lms/envs/text_generation/hf_generation_utils.py:3447
Methodtrain
Update policy using the currently gathered rollout buffer.
rl4lms/algorithms/ppo/ppo.py:179
Methodtrain
Update policy using the currently gathered rollout buffer.
rl4lms/algorithms/trpo/trpo.py:231
Methodtrain_and_eval
(self)
rl4lms/envs/text_generation/training_utils.py:308
Methodtypeerror
()
rl4lms/envs/text_generation/hf_generation_utils.py:1484
Methodupdate_mask_model
(self)
rl4lms/envs/text_generation/policy/causal_policy.py:604
Methodupdate_mask_model
(self)
rl4lms/envs/text_generation/policy/seq2seq_policy.py:647
Functionwrap_onpolicy_alg
( alg_class: Type[OnPolicyAlgorithm], alg_kwargs: Dict[str, Any], kl_coeff: float, tracker: Tr
rl4lms/envs/text_generation/alg_wrappers.py:90
← previous501–555 of 555, ranked by callers