Update README.md
Browse files
README.md
CHANGED
@@ -28,8 +28,8 @@ pipeline = transformers.pipeline(
|
|
28 |
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
29 |
)
|
30 |
|
31 |
-
messages = [{"role": "user", "content": "
|
32 |
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
33 |
-
outputs = pipeline(prompt, max_new_tokens=
|
34 |
print(outputs[0]["generated_text"])
|
35 |
```
|
|
|
28 |
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
29 |
)
|
30 |
|
31 |
+
messages = [{"role": "user", "content": "Tell me about AI."}]
|
32 |
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
33 |
+
outputs = pipeline(prompt, max_new_tokens=1024, do_sample=True, temperature=0.7, top_k=1000, top_p=0.95)
|
34 |
print(outputs[0]["generated_text"])
|
35 |
```
|