Walmart-the-bag
commited on
Commit
•
22eb928
1
Parent(s):
c67dc44
Update README.md
Browse files
README.md
CHANGED
@@ -86,8 +86,8 @@ export HF_HUB_ENABLE_HF_TRANSFER=1
|
|
86 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
87 |
import torch
|
88 |
|
89 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
90 |
-
model = AutoModelForCausalLM.from_pretrained("
|
91 |
|
92 |
input_text = "Databricks was founded in "
|
93 |
input_ids = tokenizer(input_text, return_tensors="pt")
|
@@ -101,8 +101,8 @@ print(tokenizer.decode(outputs[0]))
|
|
101 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
102 |
import torch
|
103 |
|
104 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
105 |
-
model = AutoModelForCausalLM.from_pretrained("
|
106 |
|
107 |
input_text = "Databricks was founded in "
|
108 |
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
|
|
|
86 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
87 |
import torch
|
88 |
|
89 |
+
tokenizer = AutoTokenizer.from_pretrained("Undi95/dbrx-base", trust_remote_code=True)
|
90 |
+
model = AutoModelForCausalLM.from_pretrained("Undi95/dbrx-base", device_map="cpu", torch_dtype=torch.bfloat16, trust_remote_code=True)
|
91 |
|
92 |
input_text = "Databricks was founded in "
|
93 |
input_ids = tokenizer(input_text, return_tensors="pt")
|
|
|
101 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
102 |
import torch
|
103 |
|
104 |
+
tokenizer = AutoTokenizer.from_pretrained("Undi95/dbrx-base", trust_remote_code=True)
|
105 |
+
model = AutoModelForCausalLM.from_pretrained("Undi95/dbrx-base", device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
|
106 |
|
107 |
input_text = "Databricks was founded in "
|
108 |
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
|