cfierro/alpaca
Viewer • Updated • 52k • 6
How to use coastalcph/llama3-joint-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("NousResearch/Meta-Llama-3-8B")
model = PeftModel.from_pretrained(base_model, "coastalcph/llama3-joint-lora")axolotl version: 0.11.0.dev0
base_model: NousResearch/Meta-Llama-3-8B
# optionally might have model_type or tokenizer_type
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
# Automatically upload checkpoint and final model to HF
# hub_model_id: username/custom_model_name
load_in_8bit: true
load_in_4bit: false
datasets:
- path: cfierro/gsm8k_instr
type: alpaca
- path: cfierro/alpaca-en2fr
type: alpaca
- path: cfierro/alpaca
type: alpaca
dataset_prepared_path: /workspace/axolotl-datasets/llama3-joint
val_set_size: 0.05
output_dir: /workspace/axolotl-outputs/llama3-joint-lora
sequence_len: 4096
sample_packing: true
eval_sample_packing: false
pad_to_sequence_len: true
adapter: lora
lora_model_dir:
lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_linear: true
lora_modules_to_save:
- embed_tokens
- lm_head
merge_lora: true
wandb_project: weight-diff-ft
wandb_entity: cfierro
wandb_watch: all
wandb_name: llama3-joint-lora
wandb_log_model: "false"
hub_model_id: cfierro/llama3-joint-lora
gradient_accumulation_steps: 4
micro_batch_size: 2
max_steps: 1000 # 8k examples at most
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
bf16: auto
tf32: false
gradient_checkpointing: true
resume_from_checkpoint:
logging_steps: 1
flash_attention: true
warmup_steps: 10
early_stopping_patience: 2
eval_steps: 60 # bs=4*2 -> eval every 8*60=480 examples
save_steps: 60 # needed for config validation
save_total_limit: 1
load_best_model_at_end: true
weight_decay: 0.0
special_tokens:
pad_token: <|end_of_text|>
This model is a fine-tuned version of NousResearch/Meta-Llama-3-8B on the cfierro/gsm8k_instr, the cfierro/alpaca-en2fr and the cfierro/alpaca datasets. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0 | 0 | 1.4238 |
| 1.1388 | 0.1648 | 60 | 1.1329 |
| 1.1295 | 0.3297 | 120 | 1.0926 |
| 1.0852 | 0.4945 | 180 | 1.0703 |
| 1.049 | 0.6593 | 240 | 1.0543 |
| 1.0753 | 0.8242 | 300 | 1.0378 |
| 1.1431 | 0.9890 | 360 | 1.0185 |
| 0.7739 | 1.1538 | 420 | 1.0436 |
| 0.8243 | 1.3187 | 480 | 1.0331 |
Base model
NousResearch/Meta-Llama-3-8B