CoolFace
Modelpublic

AiAF/combined-70-30-rp-sft-qlora

sourceHugging Facegemmaupdated 6mo agoView on Hugging Face
0likes4downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/> <details><summary>See axolotl config</summary>

axolotl version: 0.16.0.dev0

yaml
# 1. Base Model & Tokenizer
base_model: google/gemma-2-2b-it  # Or your preferred 2B model
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
hub_model_id: AiAF/combined-70-30-rp-sft-qlora
hub_strategy: checkpoint
# 2. LoRA / QLoRA Configuration
load_in_4bit: true
adapter: qlora
lora_r: 64
lora_alpha: 128
lora_dropout: 0.05
lora_target_linear: true
# 3. Dataset Configuration
streaming: false
#streaming_multipack_buffer_size: 5000
#sample_packing: true
datasets:
  - path: .
    data_files: combined_70_30_shuffled.jsonl
    type: chat_template
    split: train
    field_messages: conversations
    message_property_mappings:
      role: from
      content: value
    chat_template: jinja
    chat_template_jinja: |
      {{ bos_token }}
      {% for m in messages %}
        {% set role = 'model' if m['role']=='assistant' else 'user' %}
        {{ '<start_of_turn>' + role + '\n' + m['content'] | trim + '<end_of_turn>\n' }}
      {% endfor %}
      {% if add_generation_prompt %}
      {{ '<start_of_turn>model\n' }}
      {% endif %}
    roles_to_train: ["assistant"]
    train_on_eos: "turn"
# Small eval set (use a slice of your data)
test_datasets:
  - path: .
    name: json
    type: chat_template
    data_files: eval_1000.jsonl
    split: train
    field_messages: conversations
    message_property_mappings:
      role: from
      content: value
    chat_template: jinja
    chat_template_jinja: |
      {{ bos_token }}
      {% for m in messages %}
        {% set role = 'model' if m['role']=='assistant' else 'user' %}
        {{ '<start_of_turn>' + role + '\n' + m['content'] | trim + '<end_of_turn>\n' }}
      {% endfor %}
      {% if add_generation_prompt %}
      {{ '<start_of_turn>model\n' }}
      {% endif %}
    roles_to_train: ["assistant"]
# 4. Training Parameters
sequence_len: 2048
sample_packing: true
eval_sample_packing: true
max_steps: 1500  # ~2-3 epochs on 12K samples
dataset_prepared_path: last_run_prepared
# 5. Saving and Evaluation Strategy
evaluation_strategy: steps
save_strategy: steps
eval_steps: 100
save_steps: 100
save_total_limit: 20
# 6. Output & Logging
output_dir: /workspace/data/axolotl-outputs/sft/combined-70-30-rp-sft-qlora
wandb_project: "rp-sft"
wandb_name: "combined-70-30-gemma-2b"
wandb_log_model: "false"
# 7. Batching & Optimizer
gradient_accumulation_steps: 4
micro_batch_size: 2
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
weight_decay: 0.0
# 8. Hardware & Performance
bf16: true
tf32: true
flash_attention: true
gradient_checkpointing: true
logging_steps: 1
# 9. Special Tokens
special_tokens:
  bos_token: "<bos>"
  eos_token: "<eos>"
  pad_token: "<pad>"
eot_tokens: ["<end_of_turn>"]

</details><br>

combined-70-30-rp-sft-qlora

This model is a fine-tuned version of google/gemma-2-2b-it on an unknown dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.0001
  • —Ppl: 1.0001
  • —Memory/max Active (gib): 12.39
  • —Memory/max Allocated (gib): 12.39
  • —Memory/device Reserved (gib): 20.44

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 0.0002
  • —trainbatchsize: 2
  • —evalbatchsize: 2
  • —seed: 42
  • —gradientaccumulationsteps: 4
  • —totaltrainbatch_size: 8
  • —optimizer: Use OptimizerNames.ADAMWBNB with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
  • —lrschedulertype: cosine
  • —training_steps: 1500

Training results

Training LossEpochStepValidation LossPplActive (gib)Allocated (gib)Reserved (gib)
No log001.85646.400612.2212.2218.19
0.09574.77111000.08761.091612.3912.3922.39
0.00849.53012000.00621.006312.3912.3920.44
0.011614.28923000.00331.003312.3912.3920.44
0.001119.04824000.00231.002312.3912.3920.44
0.001623.81935000.00381.003812.3912.3920.44
0.000828.57836000.00151.001512.3912.3920.44
0.000433.33737000.00051.000612.3912.3920.44
0.000338.09648000.00031.000412.3912.3920.44
0.000442.86759000.00021.000212.3912.3920.44
0.000247.626510000.00011.000112.3912.3920.44
0.000152.385511000.00011.000112.3912.3920.44
0.000157.144612000.00011.000112.3912.3920.44
0.000261.915713000.00011.000112.3912.3920.44
0.000166.674714000.00011.000112.3912.3920.44
0.000171.433715000.00011.000112.3912.3920.44

Framework versions

  • —PEFT 0.18.1
  • —Transformers 5.3.0
  • —Pytorch 2.9.1+cu128
  • —Datasets 4.5.0
  • —Tokenizers 0.22.2