Views
No views yet

model = FastLanguageModel.get_peft_model(
model,
r = 4,
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj",],
lora_alpha = 4,
lora_dropout = 0.05,
bias = "none",
use_gradient_checkpointing = "unsloth",
random_state = 3407,
use_rslora = False,
loftq_config = None,
)
from trl import SFTTrainer
from transformers import TrainingArguments
from unsloth import is_bfloat16_supported
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = dataset,
dataset_text_field = "completion",
max_seq_length = max_seq_length,
dataset_num_proc = 2,
packing = False,
args = TrainingArguments(
per_device_train_batch_size = 10,
gradient_accumulation_steps = 4,
warmup_steps = 5,
max_steps=5000,
learning_rate = 2e-4,
fp16 = not is_bfloat16_supported(),
bf16 = is_bfloat16_supported(),
logging_steps = 1,
optim = "adamw_8bit",
weight_decay = 0.01,
lr_scheduler_type = "cosine",
seed = 3407,
output_dir = "outputs_4",
push_to_hub=True,
hub_always_push=True,
),
)| Model | Max Global VRAM (MB) | Max Process VRAM (MB) | Max Reserved VRAM (MB) | Max Allocated VRAM (MB) |
|---|---|---|---|---|
| Llama-3.1-8B | 18521.98 | 16630.42 | 16196.30 | 16060.54 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 16319.97 | 14428.41 | 13994.30 | 13879.42 |
| Model | Latency Mean (s) | Throughput (tokens/s) |
|---|---|---|
| Llama-3.1-8B | 0.8104 | 38.2536 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.5530 | 56.0570 |
| Model | Average Score | boolq (0 shots) | boolq contrastset (0 shots) |
|---|---|---|---|
| meta-llama/Meta-Llama-3.1-8B | 0.569 | 0.569 | 0.568 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers | 0.240 | 0.240 | 0.240 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.833 | 0.834 | 0.831 |
| Model | Average Score | bigbench:causal_judgment (0 shots) | bigbench:date_understanding (0 shots) | bigbench:disambiguation_qa (0 shots) | bigbench:geometric_shapes (0 shots) | bigbench:logical_deduction (0 shots) | ... |
|---|---|---|---|---|---|---|---|
| meta-llama/Meta-Llama-3.1-8B | 0.351 | 0.574 | 0.499 | 0.302 | 0.164 | 0.208 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers | 0.299 | 0.537 | 0.341 | 0.314 | 0.200 | 0.212 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.364 | 0.579 | 0.610 | 0.407 | 0.264 | 0.208 | ... |
| Model | Average Score | arc:challenge (25 shots) | hellaswag (10 shots) | mmlu:abstract_algebra (5 shots) | mmlu:college_chemistry (5 shots) | mmlu:college_computer_science (5 shots) | mmlu:college_mathematics (5 shots) | ... |
|---|---|---|---|---|---|---|---|---|
| meta-llama/Meta-Llama-3.1-8B | 0.552 | 0.541 | 0.620 | 0.290 | 0.450 | 0.480 | 0.350 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers | 0.516 | 0.462 | 0.549 | 0.290 | 0.440 | 0.460 | 0.280 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.544 | 0.479 | 0.554 | 0.340 | 0.480 | 0.520 | 0.350 | ... |
| Model | Average Score | bigbench:causal_judgment (3 shots) | bigbench:date_understanding (3 shots) | bigbench:disambiguation_qa (3 shots) | bigbench:geometric_shapes (3 shots) | bigbench:logical_deduction (3 shots) | ... |
|---|---|---|---|---|---|---|---|
| meta-llama/Meta-Llama-3.1-8B | 0.442 | 0.563 | 0.596 | 0.593 | 0.181 | 0.298 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers | 0.420 | 0.563 | 0.642 | 0.574 | 0.217 | 0.258 | ... |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.450 | 0.621 | 0.686 | 0.663 | 0.225 | 0.332 | ... |
| Model | Overall Average Score |
|---|---|
| meta-llama/Meta-Llama-3.1-8B | 0.472 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers | 0.364 |
| Na0s/Llama-3.1-8B-Pruned-4-Layers_LoRA-PEFT-3.0 | 0.513 |