Update README.md
Browse files
README.md
CHANGED
@@ -12,14 +12,13 @@ license: mit
|
|
12 |
## How to Get Started with the Model
|
13 |
```python
|
14 |
import torch
|
15 |
-
from transformers import AutoModelForCausalLM
|
16 |
from peft import PeftModel, PeftConfig
|
17 |
-
from transformers import AutoModelForCausalLM
|
18 |
|
19 |
config = PeftConfig.from_pretrained("yamete4/codegen-350M-mono-QLoRa-flytech")
|
20 |
model = AutoModelForCausalLM.from_pretrained("shpotes/codegen-350M-mono",
|
21 |
-
quantization_config=config,)
|
22 |
-
|
23 |
|
24 |
|
25 |
|
|
|
12 |
## How to Get Started with the Model
|
13 |
```python
|
14 |
import torch
|
15 |
+
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
|
16 |
from peft import PeftModel, PeftConfig
|
|
|
17 |
|
18 |
config = PeftConfig.from_pretrained("yamete4/codegen-350M-mono-QLoRa-flytech")
|
19 |
model = AutoModelForCausalLM.from_pretrained("shpotes/codegen-350M-mono",
|
20 |
+
quantization_config=BitsAndBytesConfig(config),)
|
21 |
+
peft_model = PeftModel.from_pretrained(model, "yamete4/codegen-350M-mono-QLoRa-flytech")
|
22 |
|
23 |
|
24 |
|