ecnu-icalk / educhat Goto Github PK
View Code? Open in Web Editor NEWAn open-source educational chat model from ICALK, East China Normal University. 开源中英教育对话大模型。(通用基座模型,GPU部署,数据清理) 致敬: LLaMA, MOSS, BELLE, Ziya, vLLM
Home Page: http://educhat.top/
An open-source educational chat model from ICALK, East China Normal University. 开源中英教育对话大模型。(通用基座模型,GPU部署,数据清理) 致敬: LLaMA, MOSS, BELLE, Ziya, vLLM
Home Page: http://educhat.top/
transformers
、pytorch
、gradio
均已成功安装
运行这个命令时 python educhat_gradio.py
报了如下错误
(educhat) [root@VM-0-2-tencentos demo]# python educhat_gradio.py
Traceback (most recent call last): File "educhat_gradio.py", line 7, in <module> from model_training.custom_datasets.formatting import QA_SPECIAL_TOKENS, format_pairs, format_system_prefix ModuleNotFoundError: No module named 'model_training'
好像有些模块没装上,请问能告诉是哪个包吗?搜索了一下好像没找正确的模块
作者您好,请问近期有无公开和心理相关领域的数据的打算呢?我过滤了一些公开的数据集没发现里面有和心理相关的语料
请教一下,如何支持多卡运行?
您好,看了CleanTool的源码,没有理解“低质过滤”是在哪一段实现的,可以增加一下备注,或者提供一个截图吗?感谢。
你好,请问EduChat可以从互联网上获取最新的信息,确保回复的准确和可信,这一块是怎么做的?
如标题
一点小建议
作者您好:
我想尝试一下首页显示的作文批改功能。请问我应该怎么做。
我现在的情况是:下载了educhat-sft-002-7b模型并跑通了educhat_gradio.py。
但是我不知道怎么才能执行作文批改,我看你的gif图里面左下角工具图标边上显示作文批改。请问这个作文批改代表着一个特殊的prompt还是包含一些其他的工具or模型的修改在里面?
首先感谢作者贡献很棒的行业大模型,我使用网页demo+单卡部署下面的代码两种方式都尝试,比如输入query:你好,出来的是一堆非常奇怪的文字,回答完全和query不相关,具体看下面的例子:
demo.py:
import torch
from transformers import LlamaForCausalLM, LlamaTokenizer
system_prompt =
"<|system|>"'''你是一个人工智能助手,名字叫EduChat。
tokenizer = LlamaTokenizer.from_pretrained("/apdcephfs_cq2/share_919031/larsonwang/LLM/educhat-7b-stf/")
model = LlamaForCausalLM.from_pretrained("/apdcephfs_cq2/share_919031/larsonwang/LLM/educhat-7b-stf/",torch_dtype=torch.float16,).half().cuda()
model = model.eval()
query = system_prompt + "<|prompter|>你好<|assistant|>"
print("query1:",query)
inputs = tokenizer(query, return_tensors="pt", padding=True).to(0)
outputs = model.generate(**inputs, do_sample=True, temperature=0.7, top_p=0.8, repetition_penalty=1.02, max_new_tokens=512)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("output1",response)
query = query + response + "<|prompter|>:给我推荐几本心理相关的书籍<|assistant|>:"
print("query2:",query)
inputs = tokenizer(query, return_tensors="pt", padding=True).to(0)
outputs = model.generate(**inputs, do_sample=True, temperature=0.7, top_p=0.8, repetition_penalty=1.02, max_new_tokens=512)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("output2",response)
demo.py output:
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████| 2/2 [00:26<00:00, 13.23s/it]
query1: <|system|>你是一个人工智能助手,名字叫EduChat。
启发式教学数据集是否已经开源?
少了tokenizer.model,tokenizer_config.json,tokenization_baichuan.py和special_tokens_map.json;可能还缺了added_tokens.json,config.json中的"vocab_size": 64016,跟官方64000不一致,能上传一下吗?感谢!
了解到本项目使用了英文情感支持数据集ESConv (Liuet al., 2021)翻译成中文为ESConv-zh。如果能够共享的话,可以方便其他使用相关数据的人翻译成中文了😁。
你好,请问有计划开源 sft数据: 教育领域多技能数据?
yuhaogege、zhikaigege tql
你好!可否透露一下你们的增量预训练阶段的:
-语料的大致情况:因为我看到你们和出版社合作,提供的是什么样量级的文本?干净程度?以及是否全集中在教育领域?
-计算资源和大致的时间。
-是否使用了Lora进行预训练。
谢谢!
如题,
Step1:将原始LLaMA权重转换为huggingface版本。 成功,但是
Step2:使用解密脚本将增量权重加到原始LLaMA权重上。 失败
错误如下所示:
Traceback (most recent call last):
File "../EduChat/decrypt.py", line 175, in <module>
apply_delta(args.delta_path, args.target_model_path, args.base_model_path)
File "../EduChat/decrypt.py", line 140, in apply_delta
base = AutoModelForCausalLM.from_pretrained(
File "/home/xxxxx/jnulzl/educhat_env/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 566, in from_pretrained
return model_class.from_pretrained(
File "/home/xxxxx/jnulzl/educhat_env/lib/python3.8/site-packages/transformers/modeling_utils.py", line 3351, in from_pretrained
resolved_archive_file, sharded_metadata = get_checkpoint_shard_files(
File "/home/xxxxx/jnulzl/educhat_env/lib/python3.8/site-packages/transformers/utils/hub.py", line 994, in get_checkpoint_shard_files
index = json.loads(f.read())
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 138 column 19 (char 11002)
python 版本为:3.8.10
transformers 版本为:4.36.2
交流群二维码已过期,求分享最新二维码
你好,感谢你们团队无私的贡献,开源了这个模型
我想要一个内侧账号,并且有一些疑问想要交流,但是这个微信群的二维码过期了,无法加入
可以再重新发一个吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.