Update README.md
Browse files
README.md
CHANGED
@@ -19,8 +19,8 @@ import torch
|
|
19 |
model_id = "FlagAlpha/Llama3-Chinese-8B-Instruct"
|
20 |
|
21 |
pipeline = transformers.pipeline(
|
22 |
-
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.
|
23 |
)
|
24 |
|
25 |
-
pipeline("介绍一下机器学习?")
|
26 |
```
|
|
|
19 |
model_id = "FlagAlpha/Llama3-Chinese-8B-Instruct"
|
20 |
|
21 |
pipeline = transformers.pipeline(
|
22 |
+
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.float16}, device_map="auto"
|
23 |
)
|
24 |
|
25 |
+
print(pipeline("介绍一下机器学习?"))
|
26 |
```
|