psychopenguin/legal_Phi-3-mini-4k-instruct
015
<!-- 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.16.0.dev0
seed: 9
auto_resume_from_checkpoints: True
tokenizer_save_jinja_files: True
gradient_checkpointing: True
trust_remote_code: False
tokenizer_use_fast: True
load_best_model_at_end: true
base_model: microsoft/Phi-3-mini-4k-instruct
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
chat_template: tokenizer_default
datasets:
- path: psychopenguin/indian_legal_dataset_qna
type: alpaca
split: train
sample_packing: True
pad_to_sequence_len: True
sequence_len: 2048
bf16: True
tf32: True
adapter: lora
lora_target_linear: True
lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
flash_attention: True
flash_attn_cross_entropy: True
optimizer: paged_adamw_8bit
learning_rate: 0.0002
lr_scheduler: cosine
gradient_accumulation_steps: 1
micro_batch_size: 9
num_epochs: 5
neftune_noise_alpha: 5
early_stopping_patience: 5
save_steps: 100
save_total_limit: 3
val_set_size: 0.05
eval_strategy: steps
eval_steps: 100
use_wandb: True
wandb_project: major_project
wandb_name: legal-lm
output_dir: ./final_model
merge_lora: True
hf_use_auth_token: True
hub_model_id: psychopenguin/legal_Phi-3-mini-4k-instruct
</details><br>
legal_Phi-3-mini-4k-instruct
This model is a fine-tuned version of microsoft/Phi-3-mini-4k-instruct on the psychopenguin/indianlegaldataset_qna dataset. It achieves the following results on the evaluation set:
- Loss: 0.9185
- Ppl: 2.5055
- Memory/max Active (gib): 12.9
- Memory/max Allocated (gib): 12.9
- Memory/device Reserved (gib): 22.58
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: 9
- evalbatchsize: 9
- seed: 9
- optimizer: Use OptimizerNames.PAGEDADAMW8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lrschedulertype: cosine
- lrschedulerwarmup_steps: 35
- training_steps: 1195
Training results
Framework versions
- PEFT 0.18.1
- Transformers 5.3.0
- Pytorch 2.9.1+cu128
- Datasets 4.5.0
- Tokenizers 0.22.2
