Views
No views yet
1from transformers import pipeline
2
3question = "An 65 year old M has chestpain of ASY, a resting blood pressure of 130 mmHg, and cholesterol levels of 275 mg/dl. Their fasting blood sugar is normal (120 mg/dl or less). Resting ECG results are ST. The maximum heart rate achieved is 115. Exercise induced angina is Y. The oldpeak value is 1.0. The slope of the peak exercise ST segment is Flat. Does this individual likely have heart disease?"
4generator = pipeline("text-generation", model="LordPatil/phi3-mini-yoda-adapter", device="cuda")
5output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
6print(output["generated_text"])1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{https://github.com/huggingface/trl}}
8}