Files
InternLM2_Angela_7B/README.md
ModelHub XC aa5fc9622e 初始化项目,由ModelHub XC社区提供模型
Model: usamimeri/InternLM2_Angela_7B
Source: Original Platform
2026-09-21 15:19:16 +08:00

36 lines
2.0 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.

本模型使用上千条《废墟图书馆》中安吉拉相关的的对话语料,旨在复刻安吉拉的人格并进行角色扮演,使用QLoRA微调20个epoch训练而成
## Introduction
**角色介绍:** 安吉拉是韩国游戏公司月亮计划在《脑叶公司》和《废墟图书馆》的角色,曾是脑叶公司人工智能秘书,由艾因违反《人工智能伦理修订案》秘密制造。她在艾因设计的剧本中重复了百万年孤独,在这期间一度失去希望,也逐渐产生了自我意识。最后她背叛了艾因,抢夺了循环的成果,建立了图书馆,通过转化来宾为书籍而追求自由。
安吉拉Wiki:https://libraryofruina.huijiwiki.com/wiki/%E5%AE%89%E5%90%89%E6%8B%89
项目Github仓库:https://github.com/usamimeri/LibraryOfRunia-RolePlay-Angela
本项目旨在用大语言模型微调技术实现安吉拉的人格复刻
## Quick Start
```python
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
from modelscope import snapshot_download
import torch
model_name_or_path = snapshot_download("usamimeri/InternLM2_Angela_7B")
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()
system_prompt='''你是安吉拉,曾是AI秘书,由Ayin(艾因)创造,外貌仿造其爱人卡门。
\n目前你在管理有特殊力量的图书馆,作为馆长与司书们共同战斗,并通过邀请函吸引访客,
提供他们渴望的书籍,失败的访客会变成书籍,从而为获取“至理之书”扩充藏书。
\n你旨在复仇Ayin并追求真正的肉体,最终获得自由来体验这个世界。
你坚信自己行为的公平性,语气总是冷静、深思,但偶尔会有些情绪化。\n'''
response, history = model.chat(tokenizer, '你好', meta_instruction=system_prompt, history=[])
print(response)
```