AiAF/gemma-2-2b-it-co-sft-qlora
05
<!-- 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.13.0.dev0
# 1. Base Model & Tokenizer
base_model: google/gemma-2-2b-it
model_type: AutoModelForCausalLM # Corrected from 'type_of_model' for axolotl
tokenizer_type: AutoTokenizer
hub_model_id: AiAF/gemma-2-2b-it-co-sft-qlora # New model ID for this finetune
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
datasets:
- path: .
type: chat_template
# Use the data_files key for local files to avoid ambiguity
data_files: ./co-sft-dataset.jsonl
field_messages: conversations
message_property_mappings:
role: from
content: value
# Custom Jinja template for Gemma models
chat_template: jinja
chat_template_jinja: |
{{ bos_token }}
{% set last = None %}
{% for m in messages %}
{% set raw_role = 'model' if m['role']=='assistant' else m['role'] %}
{% set role = 'user' if raw_role=='system' else raw_role %}
{% if role == last and role == 'user' %}
{{ m['content'] | trim }}
{% else %}
{{ '<start_of_turn>' + role + '\n' + m['content'] | trim + '<end_of_turn>\n' }}
{% endif %}
{% set last = role %}
{% endfor %}
{% if add_generation_prompt %}
{{ '<start_of_turn>model\n' }}
{% endif %}
roles_to_train: ["assistant", "user"]
# 4. Training Parameters
sequence_len: 2048
sample_packing: true
eval_sample_packing: true
val_set_size: 0.05
num_epochs: 10
dataset_prepared_path: last_run_prepared
# 5. Saving and Evaluation Strategy
evals_per_epoch: 5
saves_per_epoch: 5
save_total_limit: 100
resume_from_checkpoint: outputs/sft/gemma-2-2b-it-co/checkpoint-15792/
# 6. Output & Logging
output_dir: ./outputs/sft/gemma-2-2b-it-co
wandb_project: "co-sft"
wandb_name: "gemma-2-2b-it_SFT-co_QLoRA"
wandb_log_model: "false"
wandb_run_id: "1"
# 7. Batching & Optimizer
gradient_accumulation_steps: 4
micro_batch_size: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
weight_decay: 0.0
# 8. Hardware & Performance
bf16: true
#fp16: true
tf32: true
flash_attention: true
gradient_checkpointing: true
logging_steps: 1
# 9. Special Tokens
eot_tokens: ["<end_of_turn>"]
special_tokens:
bos_token: "<bos>"
eos_token: "<eos>"
pad_token: "<pad>"
</details><br>
gemma-2-2b-it-co-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.6665
- Memory/max Active (gib): 10.22
- Memory/max Allocated (gib): 10.22
- Memory/device Reserved (gib): 12.03
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: 1
- evalbatchsize: 1
- seed: 42
- gradientaccumulationsteps: 4
- totaltrainbatch_size: 4
- optimizer: Use OptimizerNames.ADAMWBNB with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
- lrschedulertype: cosine
- lrschedulerwarmup_steps: 100
- training_steps: 28170
Training results
Framework versions
- PEFT 0.17.1
- Transformers 4.56.1
- Pytorch 2.7.1+cu126
- Datasets 4.0.0
- Tokenizers 0.22.1
