cfierro/fr_alpaca
Viewer • Updated • 55.2k • 12
How to use coastalcph/llama3-fr_alpaca-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-fr_alpaca-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/fr_alpaca
type: alpaca
dataset_prepared_path: /workspace/axolotl-datasets/llama3-fr_alpaca
val_set_size: 0.05
output_dir: /workspace/axolotl-outputs/llama3-fr_alapaca-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
wandb_project: weight-diff-ft
wandb_entity: cfierro
wandb_watch: all
wandb_name: llama3-fr_alpaca-lora
wandb_log_model: "false"
hub_model_id: cfierro/llama3-fr_alapaca-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: 5
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/fr_alpaca dataset. 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.0157 |
| 0.8517 | 0.3061 | 60 | 0.8213 |
| 0.7548 | 0.6122 | 120 | 0.7892 |
| 0.7335 | 0.9184 | 180 | 0.7639 |
| 0.553 | 1.2245 | 240 | 0.7702 |
| 0.5687 | 1.5306 | 300 | 0.7620 |
| 0.6222 | 1.8367 | 360 | 0.7538 |
| 0.4544 | 2.1429 | 420 | 0.7803 |
| 0.4577 | 2.4490 | 480 | 0.7835 |
| 0.4629 | 2.7551 | 540 | 0.7733 |
| 0.3282 | 3.0612 | 600 | 0.8035 |
| 0.3396 | 3.3673 | 660 | 0.8144 |
Base model
NousResearch/Meta-Llama-3-8B