patrickvonplaten commited on
Commit
cac7ab3
·
verified ·
1 Parent(s): a3cd77b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -109,6 +109,8 @@ completion_request = ChatCompletionRequest(
109
  ],
110
  )
111
 
 
 
112
  out_tokens, _ = generate([tokens], model, max_tokens=64, temperature=0.0, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
113
  result = tokenizer.instruct_tokenizer.tokenizer.decode(out_tokens[0])
114
 
 
109
  ],
110
  )
111
 
112
+ tokens = tokenizer.encode_chat_completion(completion_request).tokens
113
+
114
  out_tokens, _ = generate([tokens], model, max_tokens=64, temperature=0.0, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
115
  result = tokenizer.instruct_tokenizer.tokenizer.decode(out_tokens[0])
116