class_docstr: This task configuration loads a given model from the Hugging Face hub and fine-tunes it on the provided dataset
  (also from Hugging Face hub),
  utilizing the SFT and QLoRA techniques. The final model is pushed
  to Hugging Face hub.
  
  Args:
      model_name: The model that you want to train from the Hugging Face hub. E.g. gpt2, gpt2-xl, bert, etc.
      dataset_name: The instruction dataset to use.
      new_model_name: The name to use for pushing the fine-tuned model to the Hugging Face Hub. If unset, it defaults to the name of the run.
      env: The list of environment variables, e.g. `"HUGGING_FACE_HUB_TOKEN"`, `"WANDB_API_KEY"`, `"WANDB_PROJECT"`, etc.
      report_to: Supported integrations include `"wandb"` and `"tensorboard"`.
      per_device_train_batch_size: Batch size per GPU for training.
      per_device_eval_batch_size: Batch size per GPU for evaluation.
      gradient_accumulation_steps: Number of update steps to accumulate the gradients for.
      learning_rate: Initial learning rate (AdamW optimizer).
      max_grad_norm: Maximum gradient normal (gradient clipping).
      weight_decay: Weight decay to apply to all layers except bias/LayerNorm weights.
      lora_alpha: Alpha parameter for LoRA scaling.
      lora_dropout: Dropout probability for LoRA layers.
      lora_r: LoRA attention dimension.
      max_seq_length: Maximum sequence length to use.
      use_4bit: Activate 4bit precision base model loading.
      use_nested_quant: Activate nested quantization for 4bit base models.
      bnb_4bit_compute_dtype: Compute dtype for 4bit base models.
      bnb_4bit_quant_type: Quantization type fp4 or nf4.
      num_train_epochs: The number of training epochs for the reward model.
      fp16: Enables fp16 training.
      bf16: Enables bf16 training.
      packing: Use packing dataset creating.
      gradient_checkpointing: Enables gradient checkpointing.
      optim: The optimizer to use.
      lr_scheduler_type: Learning rate schedule. Constant a bit better than cosine, and has advantage for analysis
      max_steps: How many optimizer update steps to take
      warmup_ratio: Fraction of steps to do a warmup for
      group_by_length: Group sequences into batches with same length. Saves memory and speeds up training considerably.
      save_steps: Save checkpoint every X updates steps.
      logging_steps: Log every X updates steps.
code: def get_repo(self) -> FineTuningTaskRepo:
      return FineTuningTaskRepo(
          repo_id="dstack.api._public.huggingface.finetuning.sft"
      )
  
file_path: dstack/src/dstack/api/_public/huggingface/finetuning/sft/__init__.py
imports: import os
  import re
  from typing import Any, Dict, Optional
  from dstack._internal.core.models.configurations import TaskConfiguration
  from dstack._internal.core.models.repos.virtual import VirtualRepo
  from dstack.api._public.huggingface.finetuning import sft
label_desc: Use image node_id 3 for calling the FineTuningTask obj's underlying member method code with example usage: obj.get_repo() and returns: FineTuningTaskRepo