b25119ms/sympathetic_700
Viewer • Updated • 686 • 11 • 2
How to use b25119ms/TinySwallow-Instruct-sympathetic-1.5B with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("SakanaAI/TinySwallow-1.5B-Instruct")
model = PeftModel.from_pretrained(base_model, "b25119ms/TinySwallow-Instruct-sympathetic-1.5B")This model is a fine-tuned version of SakanaAI/TinySwallow-1.5B-Instruct. It has been trained using TRL.
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
This model was trained with SFT.
Cite TRL as:
@misc{vonwerra2022trl,
title = {b25119ms/TinySwallow-Instruct-sympathetic},
author = {masako},
year = 2025,
journal = {Hugging Face repository},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/b25119ms/TinySwallow-Instruct-sympathetic-1.5B}}
}
Base model
Qwen/Qwen2.5-1.5B