Files
CAT-Thinking-8B/test.py
ModelHub XC d6ccc92591 初始化项目,由ModelHub XC社区提供模型
Model: cyberagent/CAT-Thinking-8B
Source: Original Platform
2026-06-07 05:52:18 +08:00

14 lines
504 B
Python

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'])