Files
CAT-Thinking-8B/test.py

14 lines
504 B
Python
Raw Normal View History

from transformers import pipeline
# Load the model
chat_pipeline = pipeline("text-generation", model=".")
prompt = "You have two cats, one male and one female. A female cat gives birth to up to 12 kittens per year.\n" + \
"Assume you don't spay them. In three years, how many cats might you need to take care of at most?"
user_input = [{"role": "user", "content": prompt}]
response = chat_pipeline(user_input, max_new_tokens=8192, temperature=0.8, top_p=0.95)
print(response[0]['generated_text'])