Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/allenai/RL4LMs
/ functions
Functions
555 in github.com/allenai/RL4LMs
⨍
Functions
555
◇
Types & classes
140
Function
main
()
rl4lms/envs/text_generation/preference_reward.py:167
Function
main
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/prepare_references_for_eval.py:128
Function
main
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/prepare_predictions_for_eval.py:39
Function
main
(_)
rl4lms/data_pools/task_utils/totto/eval_utils/totto_parent_eval.py:456
Method
method
(self)
rl4lms/envs/text_generation/caption_metrics/cider.py:263
Method
method
(self)
rl4lms/envs/text_generation/caption_metrics/spice/spice.py:126
Method
mode
(self)
rl4lms/algorithms/common/maskable/distributions.py:154
Method
mode
(self)
rl4lms/algorithms/common/maskable/distributions.py:227
Method
on_log
(self, args, state, control, logs=None, **kwargs)
rl4lms/envs/text_generation/utils_supervised.py:136
Function
overlap_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
Method
predict
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
Method
predict_values
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy.py:130
Method
predict_values
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy/causal_policy.py:311
Method
prepare
(cls, split: str, representation: str = 'subtable', **args)
rl4lms/data_pools/custom_text_generation_pools.py:17
Method
prepare
(cls, split: str, concept_separator_token: str = " ", concept_end_token=" ",
rl4lms/data_pools/custom_text_generation_pools.py:119
Method
prepare
(cls, split: str, prompt_suffix: str = "TL;DR:")
rl4lms/data_pools/custom_text_generation_pools.py:160
Method
prepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:177
Method
prepare
(cls, split: str, seed: int)
rl4lms/data_pools/custom_text_generation_pools.py:214
Method
prepare
(cls, split: str, positive_ratio: int = 1.0)
rl4lms/data_pools/custom_text_generation_pools.py:246
Method
prepare
(cls, split: str)
rl4lms/data_pools/custom_text_generation_pools.py:301
Method
prepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:388
Method
prepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:424
Method
prepare
(cls, split: str, prompt_suffix: str = "", prompt_prefix: str
rl4lms/data_pools/custom_text_generation_pools.py:456
Method
prepare
(cls, split: str, max_context_size: int)
rl4lms/data_pools/custom_text_generation_pools.py:489
Method
prepare
(cls, split: str, context_size: int)
rl4lms/data_pools/custom_text_generation_pools.py:556
Method
prepare
A factory method to instantiate data pool
rl4lms/data_pools/text_generation_pool.py:33
Method
proba_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
Function
quantile_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
Method
render
(self)
rl4lms/envs/text_generation/env.py:172
Method
reset
Resets the episode and returns an observation
rl4lms/envs/common/base_env.py:41
Method
reset
(self)
rl4lms/algorithms/common/maskable/buffers.py:161
Method
reset
(self)
rl4lms/algorithms/common/maskable/logits_processor.py:37
Method
reset
(self)
rl4lms/algorithms/common/maskable/logits_processor.py:183
Method
sample
(self, size: int)
rl4lms/core_components/sampler.py:24
Method
sample
(self)
rl4lms/data_pools/text_generation_pool.py:28
Method
sample
(self)
rl4lms/algorithms/common/maskable/distributions.py:223
Method
save_imager_cache
(self)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:343
Method
save_imager_cache
(self)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:370
Method
score
(self, originals, generateds, **kwargs)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:347
Method
sim
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
Function
three_sentence_summary
Returns first three sentences from the generated text
rl4lms/envs/text_generation/post_processors.py:4
Method
to
(self, device)
rl4lms/envs/text_generation/policy.py:796
Method
to_df
(predictions)
rl4lms/envs/text_generation/logging_utils.py:87
Function
tokenize
(examples)
scripts/reward-modeling/train_intent_classifier.py:56
Function
tokenize_causal
(item, tokenizer)
rl4lms/envs/text_generation/utils_supervised.py:184
Function
tokenize_rewards
(rewards: th.Tensor, tokenizer, device, round=1)
rl4lms/algorithms/common/algo_utils.py:168
Function
tokenize_seq2seq
(item, tokenizer)
rl4lms/envs/text_generation/utils_supervised.py:192
Function
top_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
Method
train
Update policy using the currently gathered rollout buffer.
rl4lms/algorithms/ppo/ppo.py:179
Method
train
Update policy using the currently gathered rollout buffer.
rl4lms/algorithms/trpo/trpo.py:231
Method
train_and_eval
(self)
rl4lms/envs/text_generation/training_utils.py:308
Method
typeerror
()
rl4lms/envs/text_generation/hf_generation_utils.py:1484
Method
update_mask_model
(self)
rl4lms/envs/text_generation/policy/causal_policy.py:604
Method
update_mask_model
(self)
rl4lms/envs/text_generation/policy/seq2seq_policy.py:647
Function
wrap_onpolicy_alg
( alg_class: Type[OnPolicyAlgorithm], alg_kwargs: Dict[str, Any], kl_coeff: float, tracker: Tr
rl4lms/envs/text_generation/alg_wrappers.py:90
← previous
501–555 of 555, ranked by callers