Download tcod/trinity/algorithm/__init__.py from SeanWang0027/ftb-sciworld-repro: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/SeanWang0027/ftb-sciworld-repro/resolve/main/tcod/trinity/algorithm/__init__.py
- Command line
-
hf download hf://SeanWang0027/ftb-sciworld-repro/tcod/trinity/algorithm/__init__.py
-
curl -L -o __init__.py https://huggingface.co/SeanWang0027/ftb-sciworld-repro/resolve/main/tcod/trinity/algorithm/__init__.py
2.27 kB
| from trinity.algorithm.advantage_fn import ADVANTAGE_FN, AdvantageFn | |
| from trinity.algorithm.algorithm import AlgorithmType | |
| from trinity.algorithm.entropy_loss_fn import ENTROPY_LOSS_FN, EntropyLossFn | |
| from trinity.algorithm.kl_fn import KL_FN, KLFn | |
| from trinity.algorithm.policy_loss_fn.sdpo_policy_loss import compute_self_distillation_loss | |
| from trinity.algorithm.policy_loss_fn import POLICY_LOSS_FN, PolicyLossFn | |
| from trinity.algorithm.sample_strategy import SAMPLE_STRATEGY, SampleStrategy | |
| from trinity.utils.registry import Registry | |
| ALGORITHM_TYPE: Registry = Registry( | |
| "algorithm", | |
| default_mapping={ | |
| "sft": "trinity.algorithm.algorithm.SFTAlgorithm", | |
| "ppo": "trinity.algorithm.algorithm.PPOAlgorithm", | |
| "grpo": "trinity.algorithm.algorithm.GRPOAlgorithm", | |
| "reinforceplusplus": "trinity.algorithm.algorithm.ReinforcePlusPlusAlgorithm", | |
| "rloo": "trinity.algorithm.algorithm.RLOOAlgorithm", | |
| "opmd": "trinity.algorithm.algorithm.OPMDAlgorithm", | |
| "asymre": "trinity.algorithm.algorithm.AsymREAlgorithm", | |
| "dpo": "trinity.algorithm.algorithm.DPOAlgorithm", | |
| "topr": "trinity.algorithm.algorithm.TOPRAlgorithm", | |
| "cispo": "trinity.algorithm.algorithm.CISPOAlgorithm", | |
| "gspo": "trinity.algorithm.algorithm.GSPOAlgorithm", | |
| "sapo": "trinity.algorithm.algorithm.SAPOAlgorithm", | |
| "mix": "trinity.algorithm.algorithm.MIXAlgorithm", | |
| "mix_chord": "trinity.algorithm.algorithm.MIXCHORDAlgorithm", | |
| "raft": "trinity.algorithm.algorithm.RAFTAlgorithm", | |
| "sppo": "trinity.algorithm.algorithm.sPPOAlgorithm", | |
| "rec": "trinity.algorithm.algorithm.RECAlgorithm", | |
| "multi_step_grpo": "trinity.algorithm.algorithm.MultiStepGRPOAlgorithm", | |
| "on_policy_distill": "trinity.algorithm.algorithm.OnPolicyDistillAlgorithm", | |
| "jsd": "trinity.algorithm.algorithm.JSDAlgorithm", | |
| "sdpo": "trinity.algorithm.algorithm.SDPOAlgorithm", | |
| }, | |
| ) | |
| __all__ = [ | |
| "ALGORITHM_TYPE", | |
| "AlgorithmType", | |
| "AdvantageFn", | |
| "ADVANTAGE_FN", | |
| "PolicyLossFn", | |
| "POLICY_LOSS_FN", | |
| "KLFn", | |
| "KL_FN", | |
| "EntropyLossFn", | |
| "ENTROPY_LOSS_FN", | |
| "SampleStrategy", | |
| "SAMPLE_STRATEGY", | |
| "compute_self_distillation_loss", | |
| ] | |