Views
No views yet
max_seq_length:
2048dtype:
None (auto-detection)float16, bfloat16). None allows Unsloth to automatically select the best supported dtype based on the available hardware (BF16 for Ampere GPUs and newer, FP16 otherwise).load_in_4bit:
TrueFalse loads the model in its default precision (FP16/BF16).model_name (within FastLanguageModel.from_pretrained):
"unsloth/Llama-3.2-3B-Instruct"FastLanguageModel.get_peft_model)r:
32target_modules:
["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]lora_alpha:
32lora_alpha equal to r or double r.lora_dropout:
00.bias:
"none""all", "lora_only") or not ("none"). "none" is often preferred for LoRA and is optimized by Unsloth.use_gradient_checkpointing:
"unsloth""unsloth" uses Unsloth's optimized version, which significantly reduces memory usage, especially for long sequences, allowing for larger batch sizes. True uses the standard Hugging Face implementation.SFTTrainer and TrainingArguments)train_dataset:
dataset (variable assumed to hold the training data)datasets library) containing the data used for fine-tuning.dataset_text_field:
"text"train_dataset that contains the text data to be used for training.packing:
FalseTrue, multiple short sequences from the dataset are concatenated and packed into a single max_seq_length input. This can drastically speed up training (up to 5x) if the dataset consists mainly of short sequences, by improving GPU utilization. It's disabled here.per_device_train_batch_size (within TrainingArguments):
2gradient_accumulation_steps (within TrainingArguments):
4per_device_train_batch_size * gradient_accumulation_steps * num_gpus) without increasing VRAM usage proportionally.warmup_steps (within TrainingArguments):
5learning_rate. This helps stabilize training early on.max_steps (within TrainingArguments):
100num_train_epochs is set, max_steps overrides it.learning_rate (within TrainingArguments):
2e-4 (or 0.0002)fp16 (within TrainingArguments):
not is_bfloat16_supported()float16. This speeds up training and reduces memory usage on GPUs that support it well (like Tesla T4, V100). Disabled if bf16 is enabled/supported.bf16 (within TrainingArguments):
is_bfloat16_supported()bfloat16. Offers better numerical stability than fp16 for training deep learning models and is well-supported on newer GPUs (Ampere architecture and later). Enabled if supported by the hardware.logging_steps (within TrainingArguments):
1optim (within TrainingArguments):
"adamw_8bit"adamw_8bit is a version of the AdamW optimizer that uses 8-bit quantization for its states, further reducing memory usage during training.weight_decay (within TrainingArguments):
0.01lr_scheduler_type (within TrainingArguments):
"linear""linear" decays the learning rate linearly from its initial value down to 0 over the max_steps.seed (within TrainingArguments):
3407output_dir (within TrainingArguments):
"outputs"0.708600.