Update README.md
Browse files
README.md
CHANGED
@@ -13,7 +13,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
13 |
model_id = "crumb/apricot-wildflower-20"
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
15 |
|
16 |
-
model = AutoModelForCausalLM.from_pretrained(model_id)
|
17 |
|
18 |
text = "Hello my name is"
|
19 |
inputs = tokenizer(text, return_tensors="pt")
|
|
|
13 |
model_id = "crumb/apricot-wildflower-20"
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
15 |
|
16 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, low_cpu_mem_usage=True, device_map="auto", load_in_8bit=True)
|
17 |
|
18 |
text = "Hello my name is"
|
19 |
inputs = tokenizer(text, return_tensors="pt")
|