Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,10 @@ tokenizer = AutoTokenizer.from_pretrained(ft)
|
|
22 |
model = AutoModelForCausalLM.from_pretrained(ft, torch_dtype=torch.float16, low_cpu_mem_usage=True)
|
23 |
model.to(device)
|
24 |
|
|
|
|
|
|
|
25 |
prepared = tokenizer.encode(inp, return_tensors='pt').to(model.device)
|
26 |
out = model.generate(input_ids=prepared, **gen_kwargs)
|
27 |
generated = tokenizer.decode(out[0])
|
28 |
-
```
|
|
|
22 |
model = AutoModelForCausalLM.from_pretrained(ft, torch_dtype=torch.float16, low_cpu_mem_usage=True)
|
23 |
model.to(device)
|
24 |
|
25 |
+
inp = '''Sophia, 29, a student, meets a male programmer Alex from India, who is 45 <|endoftext|> alex: How was your vacation? <|endoftext|> sofie: It was amazing! I went to the beach and it felt like paradise. What about you?
|
26 |
+
<|endoftext|> Alex: i'm good. Tell me a joke <|endoftext|> Sofie:'''
|
27 |
+
|
28 |
prepared = tokenizer.encode(inp, return_tensors='pt').to(model.device)
|
29 |
out = model.generate(input_ids=prepared, **gen_kwargs)
|
30 |
generated = tokenizer.decode(out[0])
|
31 |
+
```
|