repo_id
stringlengths
15
89
file_path
stringlengths
27
180
content
stringlengths
1
2.23M
__index_level_0__
int64
0
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/sft_trainer.py
# Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/ppo_config.py
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/__init__.py
# flake8: noqa # Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/ddpo_trainer.py
# Copyright 2023 DDPO-pytorch authors (Kevin Black), metric-space, The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/training_configs.py
# coding=utf-8 # coding=utf-8 # Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/utils.py
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/ddpo_config.py
import os import sys import warnings from dataclasses import dataclass, field from typing import Literal, Optional from ..core import flatten_dict from ..import_utils import is_bitsandbytes_available, is_torchvision_available @dataclass class DDPOConfig: """ Configuration class for DDPOTrainer """ #...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/ppo_trainer.py
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/base.py
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/trainer/dpo_trainer.py
# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023 # Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/extras/__init__.py
# flake8: noqa # Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
hf_public_repos/trl/trl
hf_public_repos/trl/trl/extras/best_of_n_sampler.py
from typing import Any, Callable, List, Optional, Union import torch from transformers import GenerationConfig, PreTrainedTokenizer, PreTrainedTokenizerFast from ..core import set_seed from ..models import SUPPORTED_ARCHITECTURES, PreTrainedModelWrapper class BestOfNSampler(object): def __init__( self, ...
0