File size: 554 Bytes
4366b5c 30f8de5 4366b5c f9e5e5d 30f8de5 f9e5e5d 30f8de5 f9e5e5d b2b5354 f9e5e5d 30f8de5 |
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 |
---
license: apache-2.0
datasets:
- tatsu-lab/alpaca
- shibing624/alpaca-zh
---
- Loda LLM
```python
from modeling_chatglm import ChatGLMForConditionalGeneration
import torch
torch.set_default_tensor_type(torch.cuda.HalfTensor)
model = ChatGLMForConditionalGeneration.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True, device_map='auto')
```
- Load LoRA
```python
from peft import PeftModel
model = PeftModel.from_pretrained(model, "visual-openllm/visual-openllm-chatglm-6b-rola")
torch.set_default_tensor_type(torch.cuda.FloatTensor)
``` |