Update README.md
This commit is contained in:
parent
c9231f629c
commit
2b72492696
@ -285,7 +285,7 @@ pipeline = transformers.pipeline(
|
|||||||
"text-generation",
|
"text-generation",
|
||||||
model=model_id,
|
model=model_id,
|
||||||
model_kwargs={"torch_dtype": torch.bfloat16},
|
model_kwargs={"torch_dtype": torch.bfloat16},
|
||||||
device="cuda",
|
device="auto",
|
||||||
)
|
)
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
@ -300,8 +300,8 @@ prompt = pipeline.tokenizer.apply_chat_template(
|
|||||||
)
|
)
|
||||||
|
|
||||||
terminators = [
|
terminators = [
|
||||||
tokenizer.eos_token_id,
|
pipeline.tokenizer.eos_token_id,
|
||||||
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
pipeline.tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
||||||
]
|
]
|
||||||
|
|
||||||
outputs = pipeline(
|
outputs = pipeline(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user