Transformers
German
bjoernp commited on
Commit
b715d77
·
1 Parent(s): 977a2ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -5
README.md CHANGED
@@ -15,10 +15,12 @@ for more info and exact hyperparameters.
15
 
16
  To run this model, simply instantiate the `facebook/opt-2.7b` model as per usual and activate the adapter with PEFT:
17
 
18
- from peft import PeftModel, PeftConfig
19
- from transformers import AutoModelForCausalLM
20
-
21
- model = AutoModelForCausalLM.from_pretrained("facebook/opt-2.7b")
22
- model = PeftModel.from_pretrained(model, "bjoernp/opt2.7B-de-lora")
 
 
23
 
24
  Refer to the [OPT Documentation](https://huggingface.co/facebook/opt-2.7b) for more infos on how to run the model and use the processor.
 
15
 
16
  To run this model, simply instantiate the `facebook/opt-2.7b` model as per usual and activate the adapter with PEFT:
17
 
18
+ ```python
19
+ from peft import PeftModel, PeftConfig
20
+ from transformers import AutoModelForCausalLM
21
+
22
+ model = AutoModelForCausalLM.from_pretrained("facebook/opt-2.7b")
23
+ model = PeftModel.from_pretrained(model, "bjoernp/opt2.7B-de-lora")
24
+ ```
25
 
26
  Refer to the [OPT Documentation](https://huggingface.co/facebook/opt-2.7b) for more infos on how to run the model and use the processor.