Update README.md
Browse files
README.md
CHANGED
@@ -99,11 +99,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
99 |
|
100 |
peft_checkpoint = "bigcode/astraios-1b-lora"
|
101 |
checkpoint = "bigcode/starcoderbase-1b"
|
102 |
-
model =
|
103 |
-
|
104 |
-
model.merge_and_unload()
|
105 |
-
except:
|
106 |
-
pass
|
107 |
device = "cuda" # for GPU usage or "cpu" for CPU usage
|
108 |
|
109 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
|
|
99 |
|
100 |
peft_checkpoint = "bigcode/astraios-1b-lora"
|
101 |
checkpoint = "bigcode/starcoderbase-1b"
|
102 |
+
model = AutoModelForCausalLM.from_pretrained(checkpoint)
|
103 |
+
model = PeftModel.from_pretrained(model, peft_checkpoint)
|
|
|
|
|
|
|
104 |
device = "cuda" # for GPU usage or "cpu" for CPU usage
|
105 |
|
106 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|