readme
Browse files
README.md
CHANGED
|
@@ -77,7 +77,12 @@ model_name = "baidu/ERNIE-4.5-300B-A47B-PT"
|
|
| 77 |
|
| 78 |
# load the tokenizer and the model
|
| 79 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 80 |
-
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
# prepare the model input
|
| 83 |
prompt = "Give me a short introduction to large language model."
|
|
|
|
| 77 |
|
| 78 |
# load the tokenizer and the model
|
| 79 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 80 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 81 |
+
model_name,
|
| 82 |
+
device_map="auto",
|
| 83 |
+
torch_dtype=torch.bfloat16,
|
| 84 |
+
tp_plan="auto",
|
| 85 |
+
)
|
| 86 |
|
| 87 |
# prepare the model input
|
| 88 |
prompt = "Give me a short introduction to large language model."
|