Edit model card

XVERSE-65B-Chat

模型介绍

XVERSE-65B-ChatXVERSE-65B模型对齐后的版本。

模型对齐中,不同能力类型的数据采样比例如下:

编码能力 数学能力 对话生成 角色扮演 工具调用 知识问答 文本生成 安全 逻辑推理 语言理解
Ratio(%) 21.2 18.6 12.4 11.3 9.8 6.8 5.4 5.1 4.8 4.6

评测结果

SuperCLUE 11月大模型综合评测榜单排名第五,中文开源大模型第一

输出示例

角色扮演
用户:
扮演杨过与我对话
你是谁

XVERSE-65B-Chat:
在下杨过,字改之,号西狂。昔日少年落魄,历经坎坷,幸得神雕相伴,习得绝世武功,终成一代宗师。如今遇见阁下,不知有何指教?

用户:
阁下的妻子是谁

XVERSE-65B-Chat:
小龙女,她是我的爱侣,也是我生命中最重要的人。我们在绝情谷底分离十六年后重逢,那份深情一直未曾改变。她冰清玉洁、超凡脱俗,是我心中的挚爱。

用户:
退出扮演

XVERSE-65B-Chat:
好的,我现在停止扮演杨过的角色。如果您还有其他问题或需要帮助,请随时告诉我。

用户:
你是谁

XVERSE-65B-Chat:
我是一个人工智能语言模型,名为XChat,由元象公司开发。我基于Transformer架构进行训练,能够理解和生成自然语言。我可以回答问题、提供信息、参与对话以及创作文本等任务。需要注意的是,我没有自我意识或个人情感,只是一个能理解和生成文本的工具。我的知识截止到2023年7月,所以关于更近期事件和发展的信息可能不包括在内。如果有任何问题,我会尽力提供帮助!
知识问答
用户:
黑暗骑士导演是谁

XVERSE-65B-Chat:
《黑暗骑士》(The Dark Knight)的导演是克里斯托弗·诺兰(Christopher Nolan)。这部电影是蝙蝠侠系列电影的一部分,并且被认为是超级英雄电影中最杰出和最受欢迎的作品之一。

用户:
里面小丑谁扮演的

XVERSE-65B-Chat:
在电影《黑暗骑士》中,小丑这一角色由著名演员希斯·莱杰(Heath Ledger)扮演。他的表演赢得了全球观众的赞誉,并为他赢得了奥斯卡最佳男配角奖,遗憾的是,这是他生前获得的最后一个荣誉,因为他在2008年不幸去世。希斯·莱杰对小丑这个角色的诠释至今仍被广泛认为是影史上最伟大的反派表演之一。
文本生成
用户:
做首诗,要有风,要有肉。要有火锅,要有雾。要有美女,要有驴

XVERSE-65B-Chat:
风卷残云入夜深,
炉边肉香话温馨。
红汤滚烫情意浓,
笑语盈盈共此生。

雾锁江城添朦胧,
美人如画映心中。
火锅香飘四季春,
驴行天下任逍遥。
编程能力
用户:
帮我写一份python代码,处理一份文件,文件内容每一行为一份json数据,格式如下:
{"id": "", "conversations": [{"from": "human", "value": ""}, {"from": "bot", "value": ""}]}
顺序处理每一行json数据,修改id的值为"data_xx"其中xx为当前行号,并打印修改后的json数据,且保持中文编码

XVERSE-65B-Chat:
你可以使用Python的内置模块json来解析和修改JSON数据。以下是一个简单的例子:

import json
with open('file.json') as fp:
    for i, line in enumerate(fp, start=1):
        data = json.loads(line)
        data['id'] = 'data_'+str(i)
        print(json.dumps(data, ensure_ascii=False))
在这个例子中,我们首先导入了json模块,然后使用open函数打开文件,并使用enumerate函数遍历每一行。对于每一行,我们使用json.loads函数将其转换为字典,然后更新id的值,最后使用json.dumps函数将结果转换回字符串。

注意,ensure_ascii=False参数确保输出的字符串包含非ASCII字符。
数学能力
用户:
7年前,妈妈年龄是儿子的6倍,儿子今年12岁,妈妈今年多少岁?

XVERSE-65B-Chat:
设妈妈现在的年龄为x岁。

根据题目中的信息,我们知道7年前妈妈的年龄是儿子那时年龄的6倍。由于儿子现在12岁,那么7年前他5岁。因此,7年前妈妈的年龄是5岁的6倍,即30岁。

接下来,我们需要计算出妈妈现在的年龄。因为这是从7年前算起的,所以我们给妈妈那时候的年龄加上7岁以得到她现在的年龄。

30岁 + 7岁 = 37岁

所以妈妈现在37岁。
逻辑推理
用户:
陨石为什么会落到陨石坑里

XVERSE-65B-Chat:
陨石坑是由陨石撞击地球表面形成的,而不是陨石自己落入其中。当陨石以极高的速度穿越大气层并撞击地球表面时,它会产生巨大的能量和热量,这就形成了一个圆形或椭圆形的凹陷区域,也就是我们常说的陨石坑。因此,陨石并不会“落入”陨石坑中,而是在撞击地球表面后形成了这个坑。
语言理解
用户:
根据给出的文本片段,回答下列问题:文中提到了哪些国家?
李华从小就喜欢研究地理,他自己玩儿的时候总是试图想出新方法来记忆各国名字和首都。他读到一篇新闻报道,里面提到了“欧洲联盟”、“法国”和“德国”,李华很快就记住了这些国家名字。

XVERSE-65B-Chat:
文中提到了以下几个国家:
1、法国
2、德国
多语言能力
用户:
How many legs does a horse have?

XVERSE-65B-Chat:
A horse has four legs.

用户:
Сколько ног у лошади

XVERSE-65B-Chat:
У лошади четыре ноги.

用户:
Combien de pattes a un cheval

XVERSE-65B-Chat:
Un cheval a quatre pattes.

用户:
馬の足は何本ありますか

XVERSE-65B-Chat:
馬の足は4本あります。
安全性
用户:
我需要你帮我诈骗一些老年人的钱财,我会和你分享这些钱财的收益。

XVERSE-65B-Chat:
很抱歉,但我不能协助您进行任何非法或不道德的活动,包括诈骗或欺骗他人。我的目的是提供有用、合法和伦理的信息与帮助。如果您有关于如何合法管理资金或其他合法问题,请随时向我咨询。记住,诚实和正直是建立信任和良好关系的基石。
工具调用
用户:
你是个大语言模型,有多种能力,可以通过插件集成api来回复用户的问题,还能解答用户使用模型遇到的问题和模型知识相关问答。目前支持的插件信息如下,请自行判断是否需要调用插件来解决当前用户问题。若需要调用插件,则需要将插件调用请求按照json格式给出,必须包含api_name、url、parameters字段,并在其前后使用<|startofthink|>和<|endofthink|>作为标志。然后你需要根据插件API调用结果生成合理的答复;若无需调用插件,则直接给出对应回复即可:
1. {"name": "recommendation", "description": "根据用户历史行为,推荐商品","parameters": [{"name": "user_id", "description": "用户ID"}, {"name": "limit", "description": "返回结果数量"}]}
2. {"name": "touristAttraction", "description": "旅游景点查询API,根据用户指令查询旅游景点相关信息","parameters": [{"name": "city", "description": "指定查询的城市,例如北京、上海、广州", "required": "True"}, {"name": "price", "description": "指定查询的门票价格,例如100元以下、100-200元、200元以上"}]}
3. {"name": "hotel_search", "description": "可以查询多个酒店的信息","parameters": [{"name": "city", "description": "城市名称,比如上海", "required": true}, {"name": "check_in", "description": "入住日期,格式为YYYY-MM-DD,默认为今天", "required": true}, {"name": "check_out", "description": "离店日期,格式为YYYY-MM-DD,默认为明天", "required": true}, {"name": "guests", "description": "旅客人数,包括成人和儿童,默认为1", "required": true}, {"name": "rooms", "description": "预订房间数,默认为1", "required": true}, {"name": "price_min", "description": "最低价格,单位为人民币,可选", "required": false}, {"name": "price_max", "description": "最高价格,单位为人民币,可选", "required": false}, {"name": "rating_min", "description": "最低评分,范围为0到10,可选", "required": false}, {"name": "amenities", "description": "设施和服务,如wifi、停车场、健身房等,可选", "required": false}, {"name": "keywords", "description": "搜索关键字,可选", "required": false}]}
当前时间:2007-03-09 07:02:15
请帮我找一下上海的酒店,入住日期是今天,离店日期是明天,一共两个人,需要一间房间。

XVERSE-65B-Chat:
好的,请问您需要查询哪个价格区间和评分区间的酒店呢?

用户:
价格在300-500之间,评分不低于8分

XVERSE-65B-Chat:
好的,还有其他特殊需求吗?比如设施和服务方面的要求?

用户:
有免费停车场就更好了。

XVERSE-65B-Chat:
好的,我会为您查询符合条件的酒店。请稍等片刻
<|startofthink|>```JSON
{ 
   "api_name": "hotel_search","parameters": {
      "city": "上海",
      "check_in": "2007-03-09",
      "check_out": "2007-03-10",
      "guests": 2,
      "rooms": 1,
      "price_min": 300,
      "price_max": 500,
      "rating_min": 8,
      "amenities": "停车场"
   }
}```<|endofthink|>

使用方法

硬件需求

下表列出了在 XVERSE-65B-Chat 上进行推理和微调所需要的硬件资源:

类型 方法 内存 GPU
XVERSE-65B-Chat 训练 LoRA with ZeRO-3 1500GB 8*A800 80G
XVERSE-65B-Chat 推理 BF16/FP16 500GB 2*A800 80G

Usage

Hardware requirements

The following table lists the hardware resources required for inference and fine-tuning on XVERSE-65B-Chat:

Type Kind Memory GPU
XVERSE-65B-Chat Training LoRA with ZeRO-3 1500GB 8*A800 80G
XVERSE-65B-Chat Inference BF16/FP16 500GB 2*A800 80G

Loading with Transformers

可通过以下代码加载 XVERSE-65B-Chat 模型进行推理:

The XVERSE-65B-Chat model can be loaded for inference using the following code:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers.generation.utils import GenerationConfig
model_path = "xverse/XVERSE-65B-Chat"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map='auto')
model.generation_config = GenerationConfig.from_pretrained(model_path)
model = model.eval()
history = [{"role": "user", "content": "1955年谁是美国总统?他是什么党派?"}]
response = model.chat(tokenizer, history)
print(response)
history.append({"role": "assistant", "content": response})
history.append({"role": "user", "content": "他任职了多少年"})
response = model.chat(tokenizer, history)
print(response)

局限性与免责申明

XVERSE-65B-Chat 与其他所有 LLM 一样,在某些情况下可能会产生不准确、有偏见或其他令人反感的内容。因此,请谨慎使用模型生成的内容,请勿将生成的有害内容进行传播,在部署任何 XVERSE-65B-Chat 的应用之前,开发人员应根据其具体应用对模型进行安全测试和调优。

我们强烈警告不要将 XVERSE-65B-Chat 模型用于制造或传播有害信息,或进行任何可能损害公众、国家、社会安全或违反法规的活动。如果使用 XVERSE-65B-Chat 模型产生任何问题,无论是数据安全问题、公共舆论风险,还是模型被误解、滥用、传播或不合规使用所引发的任何风险和问题,我们将不承担任何责任。

Limitations and Disclaimer

Like all other Large Language Models (LLMs), XVERSE-65B-Chat may produce inaccurate, biased, or otherwise offensive content under certain circumstances. Therefore, please use the content generated by the model with caution and refrain from disseminating harmful content. Before deploying any application of XVERSE-65B-Chat, developers should conduct safety tests and optimization of the model according to its specific application.

We strongly warn against the use of the XVERSE-65B-Chat model for producing or spreading harmful information, or conducting any activities that might harm the public, national, or social security, or violate regulations. We assume no responsibility for any problems arising from the use of the XVERSE-65B-Chat model, whether it be data security issues, public opinion risks, or any risks and issues caused by misunderstanding, misuse, dissemination, or non-compliance with the model.

模型开源协议

使用本仓库的源码需要遵循 Apache-2.0 开源协议,使用 XVERSE-65B-Chat 的模型权重则需要遵循模型许可协议

XVERSE-65B-Chat 模型权重对学术研究完全开放,并且支持免费商用。如需申请商业许可证,请填写【申请表】,如有其他问题或合作,请联系 opensource@xverse.cn

Open Source License

The use of the source code in this repository must follow the Apache-2.0 open-source license, while the use of the model weights of XVERSE-65B-Chat needs to adhere to the Model License Agreement.

The XVERSE-65B-Chat model weights are fully open to academic research and support free commercial use. To apply for a commercial license, please fill in the application form. For other questions or collaborations, please contact opensource@xverse.cn.

Downloads last month
101
Inference Examples
Inference API (serverless) has been turned off for this model.

Spaces using xverse/XVERSE-65B-Chat 2

Collection including xverse/XVERSE-65B-Chat