IlyaGusev commited on
Commit
f23a2cd
1 Parent(s): d049e55

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -1
README.md CHANGED
@@ -9,7 +9,22 @@ inference: false
9
 
10
  # LLaMA 7B trained on the ru_turbo_alpaca, Russian instructions dataset
11
 
12
- Adapter only.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  Examples:
15
  ```
 
9
 
10
  # LLaMA 7B trained on the ru_turbo_alpaca, Russian instructions dataset
11
 
12
+ An adapter only version.
13
+
14
+ ```python
15
+ from peft import PeftModel
16
+ from transformers import LLaMATokenizer, LLaMAForCausalLM, GenerationConfig
17
+
18
+ MODEL_NAME = "IlyaGusev/llama_7b_ru_turbo_alpaca_lora"
19
+
20
+ config = PeftConfig.from_pretrained(MODEL_NAME)
21
+ model = AutoModelForCausalLM.from_pretrained(
22
+ config.base_model_name_or_path,
23
+ load_in_8bit=True,
24
+ device_map="auto"
25
+ )
26
+ model = PeftModel.from_pretrained(model, MODEL_NAME)
27
+ ```
28
 
29
  Examples:
30
  ```