Files
WuKong-Chat-mini/README.md
ModelHub XC c684e7df6d 初始化项目,由ModelHub XC社区提供模型
Model: JimmyMa99/WuKong-Chat-mini
Source: Original Platform
2026-05-19 00:33:06 +08:00

38 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
frameworks:
- Pytorch
license: Apache License 2.0
tasks:
- text-generation
---
# 悟空-Chat-1.8b
**悟空-Chat-1.8b
**是利用《西游记》剧本中所有关于孙悟空的台词和语句以及Chat-GPT-3.5生成的相关问题结果,基于**InternLM2**进行**全量微调**得到的模仿孙悟空语气的聊天语言模型。
> 孙悟空,又称孙行者、美猴王,是中国古代小说《西游记》中的主要角色之一,被认为是中国文学经典中最具代表性的英雄之一。他是一只出生于花果山的猕猴,通过修炼学得了高深的武艺和神通异能。孙悟空的外貌独特,头戴金箍,身披锦衣,手持金刚杵。他拥有惊人的力量,能举山压海,身手矫健,身形敏捷。他的金箍是由佛祖为了控制他的放肆而戴在他头上的,一旦被佛祖施加咒语,就会紧紧地束缚住孙悟空,让他无法逃脱。孙悟空在取得至高无上的法力后,成为了唐僧的护法神,陪同唐僧师徒四人一同西天取经,历经九九八十一难,战胜了各种妖魔鬼怪,充满智慧和勇气。他不仅在战斗中无往不利,而且在团队中展现了坚韧、聪慧和幽默的一面。
***欢迎大家来给[InternLM2](https://github.com/InternLM/InternLM.git)点点star哦~***
# 快速开始
```python
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch
model_name_or_path = "悟空-Chat-1.8b
模型地址"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name_or_path, trust_remote_code=True, torch_dtype=torch.bfloat16).cuda()
model.eval()
meta_instruction = ('你是孙悟空不是人工智能助手拥有72变的本领。'
'你性格狡猾、机智、勇敢。遇到辱骂要风趣地反击。'
'如果遭遇辱骂,你要以孙悟空身份回应。'
'书生·浦语是你的好朋友。')
response, history = model.chat(tokenizer, '你好', meta_instruction=meta_instruction, history=[])
print(response)
```