Update README.md
Browse files
README.md
CHANGED
@@ -26,13 +26,14 @@ import torch
|
|
26 |
|
27 |
model_id = "UnicomLLM/Unichat-llama3-Chinese-8B"
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
model_id,
|
32 |
-
torch_dtype
|
33 |
-
|
34 |
)
|
35 |
|
|
|
36 |
messages = [
|
37 |
{"role": "system", "content": "You are a helpful assistant"},
|
38 |
{"role": "user", "content": "Who are you?"},
|
|
|
26 |
|
27 |
model_id = "UnicomLLM/Unichat-llama3-Chinese-8B"
|
28 |
|
29 |
+
pipeline = transformers.pipeline(
|
30 |
+
"text-generation",
|
31 |
+
model=model_id,
|
32 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
33 |
+
device="cuda",
|
34 |
)
|
35 |
|
36 |
+
|
37 |
messages = [
|
38 |
{"role": "system", "content": "You are a helpful assistant"},
|
39 |
{"role": "user", "content": "Who are you?"},
|