Instructions to use alsokit/Phi-3-medium-128K-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use alsokit/Phi-3-medium-128K-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-medium-128k-instruct") model = PeftModel.from_pretrained(base_model, "alsokit/Phi-3-medium-128K-LoRA") - Notebooks
- Google Colab
- Kaggle
| bf16: true | |
| cutoff_len: 20000 | |
| dataset: ALS | |
| dataset_dir: data | |
| ddp_timeout: 180000000 | |
| deepspeed: cache/ds_z2_offload_config.json | |
| do_train: true | |
| finetuning_type: lora | |
| flash_attn: fa2 | |
| gradient_accumulation_steps: 8 | |
| include_num_input_tokens_seen: true | |
| learning_rate: 5.0e-05 | |
| logging_steps: 10 | |
| lora_alpha: 16 | |
| lora_dropout: 0 | |
| lora_rank: 8 | |
| lora_target: all | |
| lr_scheduler_type: cosine | |
| max_grad_norm: 1.0 | |
| max_samples: 100000 | |
| model_name_or_path: microsoft/Phi-3-medium-128k-instruct | |
| num_train_epochs: 3.0 | |
| optim: adamw_torch | |
| output_dir: saves/Custom/lora/train_2024-07-24-15-00-21 | |
| packing: false | |
| per_device_train_batch_size: 2 | |
| plot_loss: true | |
| preprocessing_num_workers: 16 | |
| quantization_bit: 4 | |
| quantization_method: bitsandbytes | |
| report_to: none | |
| save_steps: 500 | |
| stage: sft | |
| template: default | |
| warmup_steps: 50 | |