gpt4all:一个使用包括代码、故事和对话在内的大量干净助手数据训练的聊天机器人

作者:Sec-Labs | 发布时间:

项目地址

https://github.com/nomic-ai/gpt4all

GPT4All

该项目提供演示、数据和代码,用于训练一个基于LLaMa的助手式大型语言模型,包含约800k个基于GPT-3.5-Turbo生成的对话。

📗 技术报告

Discord

353009bb1c111145

在M1 Mac上运行(未加速!)

自己试试

下载CPU量化的gpt4all模型检查点:gpt4all-lora-quantized.bin

克隆此存储库并将量化模型放在chat目录中,然后通过运行以下命令开始聊天:

  • 在M1 Mac / OSX上运行 cd chat;./gpt4all-lora-quantized-OSX-m1
  • 在Windows / Linux上运行 cd chat;./gpt4all-lora-quantized-linux-x86

要针对自定义硬件进行编译,请查看我们的 Alpaca C++ 存储库。

注意:在GPU上完整模型(需要16GB RAM)在我们的定性评估中表现更好。

可重现性

训练得到的LoRa权重:

原始数据:

我们不提供LLaMa 7B检查点。

您可以通过以下方式重现我们训练的模型:

设置

克隆存储库

git clone --recurse-submodules git@github.com:nomic-ai/gpt4all.git

git submodule configure && git submodule update

设置环境

python -m pip install -r requirements.txt

cd transformers
pip install -e . 

cd ../peft
pip install -e .

训练

accelerate launch --dynamo_backend=inductor --num_processes=8 --num_machines=1 --machine_rank=0 --deepspeed_multinode_launcher standard --mixed_precision=bf16  --use_deepspeed --deepspeed_config_file=configs/deepspeed/ds_config.json train.py --config configs/train/finetune-7b.yaml

生成

python generate.py --config configs/generate/generate.yaml --prompt "Write a script to reverse a string in Python"

示例生成

提供给定运动的说明。Leg Raises

Leg Raises

  1. 双脚站立,脚宽与肩同宽,膝盖稍微弯曲。
  2. 将双臂伸直向前。
  3. 缓慢弯曲膝盖,将脚跟离开地面。
  4. 保持此姿势计数 3 次,然后缓慢将脚跟放回地面。
  5. 重复这个过程 10 次。
  6. 不要让你的膝盖超过你的脚尖。
  7. 保持你的背部挺直,收紧你的腹部肌肉。
  8. 不要让你的臀部下垂或你的背部拱起。
  9. 保持你的手臂伸直和你的肘关节锁定。
  10. 不要让你的头部下垂或你的肩膀上升。
  11. 在整个运动过程中正常呼吸。
  12. 休息30秒后再次重复运动。
  13. 随着你变得更强壮,逐渐增加重复次数。

提供了一个颜色描述。找到与该颜色相关的CSS代码。一种带有中等浅粉色的淡红色

与所提供颜色相关的CSS代码为:#FF6347

想出一个新电影情节的有趣想法。你的情节应该用标题和摘要来描述。

  1. 你的电影情节的标题应该是“最后的防线”。
  2. 你的电影情节的摘要应该是:一群雇佣兵被聘请保护一座小镇,以防止一个正在逃亡的危险罪犯的袭击。然而,小镇的警长不愿意让他们接管,并决定自己处理此事。

在python中反转一个字符串。

在Python中,您可以使用reversed()函数来反转列表或元组。以下是如何使用此方法与字符串的示例:

my_string = "Hello World" # 在此定义您的原始字符串
reversed_str = my_string[::-1]   # 使用切片和负索引进行反向排序
print(reversed_str)     # 输出将是输入字符串的反向版本。

用五音步诗写一首关于朱利叶斯·凯撒坠入凯撒沙拉的诗。

The fall of Julius Ceasar into a ceasar salad In iambic pentameter, The mighty Roman emperor Fell into a salad of lettuce and croutons, His empire crumbling around him, As he was devoured by the hungry diners. The once mighty emperor Was now just a salad topping, His legacy reduced to a mere garnish, As he was consumed by the masses. The fall of Julius Ceasar into a ceasar salad, In iambic pentameter, Was a tragic end to a great man, Who had once ruled the world with an iron fist. But now, he was just a salad topping, His legacy reduced to a mere garnish, As he was consumed by the masses.

用三个单词描述以下关键字:棒球,橄榄球,足球:

运动、竞技、比赛

如果您在下游项目中使用此存储库、模型或数据,请考虑引用它:

@misc{gpt4all,
  author = {Yuvanesh Anand and Zach Nussbaum and Brandon Duderstadt and Benjamin Schmidt and Andriy Mulyar},
  title = {GPT4All: Training an Assistant-style Chatbot with Large Scale Data Distillation from GPT-3.5-Turbo},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/nomic-ai/gpt4all}},
}

 

 
标签:工具分享, ChatGPT