Jennny commited on
Commit
713909c
1 Parent(s): e5d8615

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -3
README.md CHANGED
@@ -1,3 +1,32 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # Model Card for LoRA-FLAN-T5 large
5
+
6
+ This repository contains the LoRA (Low Rank Adapters) of `flan-t5-base` that has been fine-tuned on [`knkarthick/dialogsum`](https://huggingface.co/datasets/knkarthick/dialogsum) dataset.
7
+
8
+ ## Usage
9
+
10
+ Use this adapter with `peft` library
11
+
12
+ ```python
13
+ # pip install peft transformers
14
+ import torch
15
+ from peft import PeftModel, PeftConfig
16
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
17
+
18
+ base_model_id = "google/flan-t5-base"
19
+ peft_model_id = "Jennny/flan-t5-base-erionis-summarization-exp"
20
+
21
+ # Load tokenizer and models
22
+ tokenizer = AutoTokenizer.from_pretrained(base_model_id)
23
+ base_model = AutoModelForSeq2SeqLM.from_pretrained(
24
+ base_model_id, torch_dtype=torch.bfloat16
25
+ ).to(device)
26
+ model = PeftModel.from_pretrained(
27
+ base_model_id,
28
+ peft_model_id,
29
+ torch_dtype=torch.bfloat16,
30
+ is_trainable=False,
31
+ ).to(device)
32
+ ```