mymusise commited on
Commit
f9e5e5d
1 Parent(s): 8a77ef7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -1,3 +1,23 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ - Loda LLM
6
+
7
+ ```
8
+ from modeling_chatglm import ChatGLMForConditionalGeneration
9
+ import torch
10
+
11
+
12
+ torch.set_default_tensor_type(torch.cuda.HalfTensor)
13
+ model = ChatGLMForConditionalGeneration.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, device_map='auto')
14
+ ```
15
+
16
+ - Load LoRA
17
+
18
+ ```
19
+ from peft import PeftModel
20
+
21
+ model = PeftModel.from_pretrained(model, "mymusise/chatGLM-6B-alpaca-lora")
22
+ torch.set_default_tensor_type(torch.cuda.FloatTensor)
23
+ ```