class_docstr: Adaptive KL controller described in the paper:
  https://arxiv.org/pdf/1909.08593.pdf
class_docstr_tok: ["Adaptive","KL","controller","described","in","the","paper",":","https",":","\/\/arxiv.org\/pdf\/1909.08593.pdf"]
code: def __init__(self, init_kl_coef, target, horizon):
      self.value = init_kl_coef
      self.target = target
      self.horizon = horizon
  
imports: import random
  import warnings
  from collections import deque
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch.nn.utils.rnn import pad_sequence
  from torch.utils.data import IterableDataset
  from transformers import DataCollatorForLanguageModeling, PreTrainedTokenizerBase
  from ..import_utils import is_unsloth_available
label_desc: Use image node_id 1 to create a new AdaptiveKLController object  with example: obj = AdaptiveKLController(init_kl_coef, target, horizon)