File size: 851 Bytes
b56fb3c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ---
base_model: microsoft/Phi-3-mini-4k-instruct
library_name: peft
tags:
- lora
- peft
- sft
- transformers
- trl
license: mit
pipeline_tag: text-generation
---
# phi3-mr-lora-fixed-v3 (LoRA adapter)
This repository contains **LoRA (PEFT) adapter weights only**.
It **does not** include the base model weights.
## Base model
microsoft/Phi-3-mini-4k-instruct
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "microsoft/Phi-3-mini-4k-instruct"
adapter_id = "TUO_USERNAME/phi3-mr-lora-fixed-v3"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_id,
load_in_4bit=True,
device_map="auto",
torch_dtype="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id, device_map="auto")
```
|