{
  "trainer": "sft",
  "experiment_name": "zccfegd-2",
  "fine_tuning_image": "registry.aifrica.co.kr/cheetah/cheetahai-finetuning-pytorch-transformer:0.0.12-2.8.0-cuda12.8-cudnn9-devel-4.57.6",
  "model": {
    "model_path": "/cheetah/input/model/groupuser/Llama-3.2-1B-Instruct",
    "model_branch": "main",
    "model_repository": "git@git.dev2.aifrica.co.kr:groupuser/Llama-3.2-1B-Instruct.git",
    "type": "git"
  },
  "save_model": {
    "model_repository": "git@git.dev2.aifrica.co.kr:groupuser/Llama-3.2-1B-Instruct-tensorboard_n_graph.git",
    "type": "git"
  },
  "dataset": {
    "dataset_path": "/cheetah/input/dataset/groupuser/minized_parquet_datasets",
    "dataset_branch": "main",
    "dataset_files": "*.parquet",
    "pre_processing": "ZGVmIF9ub3JtYWxpemVfcm9sZShyYXdfcm9sZSk6CiAgICByb2xlID0gc3RyKHJhd19yb2xlKS5zdHJpcCgpLmxvd2VyKCkKCiAgICBpZiByb2xlIGluICgiaHVtYW4iLCAidXNlciIpOgogICAgICAgIHJldHVybiAidXNlciIKICAgIGlmIHJvbGUgaW4gKCJncHQiLCAiYXNzaXN0YW50IiwgIm1vZGVsIik6CiAgICAgICAgcmV0dXJuICJhc3Npc3RhbnQiCiAgICBpZiByb2xlID09ICJzeXN0ZW0iOgogICAgICAgIHJldHVybiAic3lzdGVtIgoKICAgICMg7JWMIOyImCDsl4bripQgcm9sZeydgCDtlZnsirUg7KSR64uoIOuMgOyLoCBhc3Npc3RhbnTroZwg67O064K07KeAIOunkOqzoCDrqoXtmZXtnogg7Iuk7YyoCiAgICByYWlzZSBWYWx1ZUVycm9yKGYiVW5zdXBwb3J0ZWQgcm9sZToge3Jhd19yb2xlfSIpCgoKZGVmIF9leHRyYWN0X3R1cm4odHVybik6CiAgICAjIOuztO2GtSBwYXJxdWV0IC0+IGRhdGFzZXRzIOyXkOyEnOuKlCBkaWN0IO2Yle2DnOuhnCDrk6TslrTsmLQKICAgIGlmIGlzaW5zdGFuY2UodHVybiwgZGljdCk6CiAgICAgICAgaWYgImZyb20iIGluIHR1cm4gYW5kICJ2YWx1ZSIgaW4gdHVybjoKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICJyb2xlIjogX25vcm1hbGl6ZV9yb2xlKHR1cm5bImZyb20iXSksCiAgICAgICAgICAgICAgICAiY29udGVudCI6ICIiIGlmIHR1cm5bInZhbHVlIl0gaXMgTm9uZSBlbHNlIHN0cih0dXJuWyJ2YWx1ZSJdKSwKICAgICAgICAgICAgfQogICAgICAgIGlmICJyb2xlIiBpbiB0dXJuIGFuZCAiY29udGVudCIgaW4gdHVybjoKICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICJyb2xlIjogX25vcm1hbGl6ZV9yb2xlKHR1cm5bInJvbGUiXSksCiAgICAgICAgICAgICAgICAiY29udGVudCI6ICIiIGlmIHR1cm5bImNvbnRlbnQiXSBpcyBOb25lIGVsc2Ugc3RyKHR1cm5bImNvbnRlbnQiXSksCiAgICAgICAgICAgIH0KCiAgICAjIOyYiOyZuOyggeycvOuhnCBbcm9sZSwgY29udGVudF0g7ZiV7YOc7J28IOuVjOuPhCDsspjrpqwKICAgIGlmIGlzaW5zdGFuY2UodHVybiwgKGxpc3QsIHR1cGxlKSkgYW5kIGxlbih0dXJuKSA9PSAyOgogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICJyb2xlIjogX25vcm1hbGl6ZV9yb2xlKHR1cm5bMF0pLAogICAgICAgICAgICAiY29udGVudCI6ICIiIGlmIHR1cm5bMV0gaXMgTm9uZSBlbHNlIHN0cih0dXJuWzFdKSwKICAgICAgICB9CgogICAgcmFpc2UgVmFsdWVFcnJvcihmIlVuc3VwcG9ydGVkIGNvbnZlcnNhdGlvbiB0dXJuIGZvcm1hdDoge3R1cm59IikKCgpkZWYgZm9ybWF0dGluZ19mdW5jKGV4YW1wbGUpOgogICAgaWYgImNvbnZlcnNhdGlvbnMiIG5vdCBpbiBleGFtcGxlOgogICAgICAgIHJhaXNlIFZhbHVlRXJyb3IoZiJNaXNzaW5nICdjb252ZXJzYXRpb25zJy4gQXZhaWxhYmxlIGNvbHVtbnM6IHtsaXN0KGV4YW1wbGUua2V5cygpKX0iKQoKICAgIG1lc3NhZ2VzID0gW19leHRyYWN0X3R1cm4odHVybikgZm9yIHR1cm4gaW4gZXhhbXBsZVsiY29udmVyc2F0aW9ucyJdXQoKICAgICMg67mIIOuplOyLnOyngOuKlCDsoJzqsbAKICAgIG1lc3NhZ2VzID0gW20gZm9yIG0gaW4gbWVzc2FnZXMgaWYgbVsiY29udGVudCJdLnN0cmlwKCldCgogICAgaWYgbm90IG1lc3NhZ2VzOgogICAgICAgIHJhaXNlIFZhbHVlRXJyb3IoIk5vIHZhbGlkIG1lc3NhZ2VzIGZvdW5kIGluIGV4YW1wbGUiKQoKICAgIGZvcm1hdHRlZF90ZXh0ID0gdG9rZW5pemVyLmFwcGx5X2NoYXRfdGVtcGxhdGUoCiAgICAgICAgbWVzc2FnZXMsCiAgICAgICAgdG9rZW5pemU9RmFsc2UsCiAgICAgICAgYWRkX2dlbmVyYXRpb25fcHJvbXB0PUZhbHNlLAogICAgKQoKICAgIHJldHVybiB7InRleHQiOiBmb3JtYXR0ZWRfdGV4dH0KCgpmb3Igc3BsaXQgaW4gbGlzdChkYXRhc2V0X2RpY3Qua2V5cygpKToKICAgIGRhdGFzZXRfZGljdFtzcGxpdF0gPSBkYXRhc2V0X2RpY3Rbc3BsaXRdLm1hcCgKICAgICAgICBmb3JtYXR0aW5nX2Z1bmMsCiAgICAgICAgYmF0Y2hlZD1GYWxzZSwKICAgICAgICByZW1vdmVfY29sdW1ucz1kYXRhc2V0X2RpY3Rbc3BsaXRdLmNvbHVtbl9uYW1lcywKICAgICk=",
    "dataset_repository": "git@git.dev2.aifrica.co.kr:groupuser/minized_parquet_datasets.git",
    "type": "git"
  },
  "quantization": {
    "bnb_4bit_use_double_quant": true,
    "load_in_4bit": true,
    "bnb_4bit_compute_dtype": "bfloat16",
    "bnb_4bit_quant_type": "nf4",
    "type": "bitsandbytes"
  },
  "peft": {
    "lora_dropout": 0.05,
    "bias": "none",
    "lora_alpha": 31,
    "peft": true,
    "task_type": "CAUSAL_LM",
    "r": 15,
    "tuner": "lora",
    "target_modules": "all-linear",
    "merge_adapter": false
  },
  "tokenizer_parameters": {
    "padding_side": "right",
    "add_eos_token": true,
    "max_length": 2048
  },
  "train_model_parameters": {
    "torch_dtype": "float16",
    "fp16": true,
    "bf16": false,
    "packing": false,
    "optim": "paged_adamw_8bit",
    "weight_decay": 0,
    "max_grad_norm": 1,
    "warmup_ratio": 0.1,
    "report_to": "tensorboard",
    "do_train": true,
    "do_eval": true,
    "per_device_train_batch_size": 3,
    "per_device_eval_batch_size": 2,
    "gradient_accumulation_steps": 5,
    "gradient_checkpointing": true,
    "output_dir": "/cheetah/fine-tuning/output",
    "use_flash_attention": true,
    "attn_implementation": "flash_attention_2",
    "dataset_text_field": "text",
    "max_seq_length": 2048,
    "num_train_epochs": 2,
    "auto_find_batch_size": true,
    "learning_rate": 1e-05,
    "lr_scheduler_type": "cosine",
    "eval_strategy": "steps",
    "save_strategy": "epoch",
    "save_total_limit": 2,
    "logging_strategy": "epoch",
    "logging_steps": 1,
    "seed": 42
  }
}
