初始化项目,由ModelHub XC社区提供模型
Model: cyberagent/CAT-Thinking-8B Source: Original Platform
This commit is contained in:
13
test.py
Normal file
13
test.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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'])
|
||||
Reference in New Issue
Block a user