File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 11# Best of N sampling: Alternative ways to get better model output without RL based fine-tuning
22
3+ > [ !WARNING]
4+ > Best-of-N sampling is deprecated and will be removed in TRL 0.25.0.
5+
36Within the extras module is the ` best-of-n ` sampler class that serves as an alternative method of generating better model output.
47As to how it fares against the RL based fine-tuning, please look in the ` examples ` directory for a comparison example
58
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import warnings
1516from typing import Any , Callable , Optional , Union
1617
1718import torch
@@ -42,8 +43,16 @@ class BestOfNSampler:
4243 generation_config ([`~transformers.GenerationConfig`], *optional*):
4344 Generation config passed to the underlying model's `generate` method. See
4445 [`~transformers.GenerationConfig`] for more details.
46+
47+ <Deprecated version="0.24.0">
48+
49+ `BestOfNSampler` is deprecated and will be removed in version 0.25.
50+
51+ </Deprecated>
4552 """
4653
54+ warnings .warn ("`BestOfNSampler` is deprecated and will be removed in TRL 0.25." , FutureWarning , stacklevel = 2 )
55+
4756 def __init__ (
4857 self ,
4958 model : PreTrainedModelWrapper ,
You can’t perform that action at this time.
0 commit comments