DPO Part3 Inference
In [ ]:
Copied!
! pip install transformers accelerate bitsandbytes peft
! pip install transformers accelerate bitsandbytes peft
In [ ]:
Copied!
from transformers import pipeline
pipe = pipeline("text-generation", "Vasanth/dpo-santacoder1b", max_length=256, top_p=0.9, device="cuda", no_repeat_ngram_size=3)
from transformers import pipeline
pipe = pipeline("text-generation", "Vasanth/dpo-santacoder1b", max_length=256, top_p=0.9, device="cuda", no_repeat_ngram_size=3)
In [ ]:
Copied!
pipe("Human: Should you buy a case to protect your cell phone? Assistant:")
pipe("Human: Should you buy a case to protect your cell phone? Assistant:")
In [ ]:
Copied!
from transformers import pipeline
pipe1 = pipeline("text-generation", "TabbyML/SantaCoder-1B", max_length=256, top_p=0.9, device="cuda", no_repeat_ngram_size=3)
from transformers import pipeline
pipe1 = pipeline("text-generation", "TabbyML/SantaCoder-1B", max_length=256, top_p=0.9, device="cuda", no_repeat_ngram_size=3)
In [ ]:
Copied!
pipe1("Should you buy a case to protect your cell phone?")
pipe1("Should you buy a case to protect your cell phone?")
In [ ]:
Copied!