UnicomAI commited on
Commit
e01c1f6
1 Parent(s): d6ae094

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -5
README.md CHANGED
@@ -26,13 +26,14 @@ import torch
26
 
27
  model_id = "UnicomLLM/Unichat-llama3-Chinese-8B"
28
 
29
- tokenizer = AutoTokenizer.from_pretrained(model_id)
30
- model = AutoModelForCausalLM.from_pretrained(
31
- model_id,
32
- torch_dtype=torch.bfloat16,
33
- device_map="auto",
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?"},