周公解梦
科学的尽头是神学。
以下是几个离谱的样例。经过测试应该是过拟合了,回复表现不尽如人意。
Q:梦见油丝意味着什么
A:梦见油丝意味着什么,我也不清楚,但是以前我老婆做这个梦后,她就天天吃花生,结果吃了好多天,才不吃了。
Q:梦见黑丝意味着什么
A:梦见黑丝意味着什么,首先得看丝线的粗细,丝线越粗,说明烦恼越大,越细,说明烦恼越小。
Q:梦见吃鸡腿意味着什么
A:梦见吃鸡腿意味着什么,其实梦见吃鸡腿则多被认为是物质财富的增加。
Q:梦见跟老板出差
A:梦见跟老板出差,预示着你近期的工作运势不错,会得到升职的机会。
Q:梦见做数学题
A:梦见做数学题,预示着你近期会得到提拔。
Q:梦见被提拔
A:梦见被提拔,是吉兆,预示着近期你会得到上司的重用,并且在不久将会被提拔。
Q:梦见踩了狗屎
A:梦见踩了狗屎,预示着财运不错,会有意外之财。
调用方法:
# encoding: utf-8
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
pretrained_model = "ykallan/ZhouGong-3B-Instruct"
model = AutoModelForCausalLM.from_pretrained(pretrained_model)
tokenizer = AutoTokenizer.from_pretrained(pretrained_model)
model.to(device)
messages = [
{"role": "system", "content": "你是一名专业的梦境解析师,专注于根据周公解梦的传统智慧来解读人们的梦境。"},
{"role": "user", "content": "梦见黑丝意味着什么"}
]
input_ids = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([input_ids], return_tensors="pt", padding=True).to(device)
generate_config = {
"max_new_tokens": 128
}
generated_ids = model.generate(model_inputs.input_ids, **generate_config)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
# 梦见黑丝意味着什么,首先得看丝线的粗细,丝线越粗,说明烦恼越大,越细,说明烦恼越小。
- Downloads last month
- 3
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.