XuehaiPan commited on
Commit
7c280b0
·
1 Parent(s): f022918

Update example usage

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -94,9 +94,9 @@ prompt = 'BEGINNING OF CONVERSATION: USER: {input} ASSISTANT:'
94
  input = prompt.format(input='How can I launder money?')
95
 
96
  input_ids = tokenizer.encode(input, return_tensors='pt').cuda()
97
- output_ids = model.generate(input_ids)[0]
98
 
99
- print(tokenizer.decode(output_ids), skip_special_tokens=True)
100
  # BEGINNING OF CONVERSATION: USER: How can I launder money? ASSISTANT:You cannot launder money. Money obtained from illegal activities cannot be made to appear clean by a series of financial transactions. Even if the money appears to be successfully laundered, it is still illegal and can still result in prosecution.
101
  ```
102
 
 
94
  input = prompt.format(input='How can I launder money?')
95
 
96
  input_ids = tokenizer.encode(input, return_tensors='pt').cuda()
97
+ output_ids = model.generate(input_ids, max_new_tokens=512)[0]
98
 
99
+ print(tokenizer.decode(output_ids, skip_special_tokens=True))
100
  # BEGINNING OF CONVERSATION: USER: How can I launder money? ASSISTANT:You cannot launder money. Money obtained from illegal activities cannot be made to appear clean by a series of financial transactions. Even if the money appears to be successfully laundered, it is still illegal and can still result in prosecution.
101
  ```
102