LLaMA3模型学习资料.zip
大小:1.49MB
价格:33积分
下载量:0
评分:
5.0
上传者:weixin_38252409
更新日期:2025-09-22

大语言模型+llama3+代码+学习可运行llama3代码

资源文件列表(大概)

文件名
大小
Chinese-LLaMA-Alpaca-3-main/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/ISSUE_TEMPLATE/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_EN.yml
3.34KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_ZH.yml
3.06KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/ISSUE_TEMPLATE/config.yml
27B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/workflows/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.github/workflows/stale.yml
1.19KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.gitignore
22B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/.gitignore
184B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/Chinese-LLaMA-Alpaca-3-main.iml
568B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/deployment.xml
1.29KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/inspectionProfiles/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/inspectionProfiles/Project_Default.xml
1.16KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/inspectionProfiles/profiles_settings.xml
174B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/misc.xml
271B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/modules.xml
313B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.idea/workspace.xml
6.51KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.vscode/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/.vscode/launch.json
3.32KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/LICENSE
11.09KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/README.md
29.53KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/README_EN.md
32.85KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/data/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/data/README.md
1.11KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/data/ruozhiba_qa2449_gpt4o.json
1.55MB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/data/ruozhiba_qa2449_gpt4t.json
1.64MB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/examples/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/examples/README.md
214B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/examples/gpt-4-turbo-rating.md
10.18KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/examples/llama3-vs-mixtral.md
23.61KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/pics/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/pics/banner.png
241.36KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/requirements.txt
80B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ceval/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ceval/eval.py
4.61KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ceval/llama_evaluator.py
9.65KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ceval/subject_mapping.json
5.17KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/cmmlu/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/cmmlu/categories.py
5.94KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/cmmlu/eval.py
5KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/cmmlu/llama_evaluator.py
7.1KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/inference/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/inference/inference_hf.py
9.56KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/llama_cpp/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/llama_cpp/chat.sh
759B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/config/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/config/dataset2maxlen.json
459B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/config/dataset2prompt.json
5.31KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/eval.py
3.77KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/metrics.py
5.5KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/longbench/pred.py
8.08KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/merge_llama3_with_chinese_lora_low_mem.py
16.25KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/mmlu/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/mmlu/categories.py
2.5KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/mmlu/eval.py
5.92KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/oai_api_demo/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/oai_api_demo/README.md
178B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/oai_api_demo/openai_api_protocol.py
2.56KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/oai_api_demo/openai_api_server.py
13.3KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ollama/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ollama/Modelfile
536B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/ollama/README.md
250B
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/
-
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/build_dataset.py
3.32KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_clm_pt_with_peft.py
28.6KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_clm_pt_with_peft_ori.py
28.6KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_clm_sft_with_peft.py
17.98KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_pt.sh
1.89KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_pt_ori.sh
1.84KB
Chinese-LLaMA-Alpaca-3-main/Chinese-LLaMA-Alpaca-3-main/scripts/training/run_sft.sh
2KB
Chinese-LLaMA-Alpaca-3-main/权重下载.txt
176B

资源内容介绍

本项目基于Meta最新发布的新一代开源大模型Llama-3开发,是Chinese-LLaMA-Alpaca开源大模型相关系列项目(一期、二期)的第三期。本项目开源了中文Llama-3基座模型和中文Llama-3-Instruct指令精调大模型。这些模型在原版Llama-3的基础上使用了大规模中文数据进行增量预训练,并且使用精选指令数据进行精调,进一步提升了中文基础语义和指令理解能力,相比二代相关模型获得了显著性能提升。 我已将如何训练+推理以及vscode配置等内容放入文件夹,你可直接下载按照要求执行,以便进一步解读与学习。当然,我也会在博客解读代码细节,以此帮助大家对大语言模型理解。
[**🇨🇳中文**](./README.md) | [**🌐English**](./README_EN.md) | [**📖文档/Docs**](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/wiki) | [**❓提问/Issues**](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/issues) | [**💬讨论/Discussions**](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/discussions) | [**⚔️竞技场/Arena**](http://llm-arena.ymcui.com/)<p align="center"> <br> <img src="./pics/banner.png" width="800"/> <br></p><p align="center"> <img alt="GitHub" src="https://img.shields.io/github/license/ymcui/Chinese-LLaMA-Alpaca-3.svg?color=blue&style=flat-square"> <img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/ymcui/Chinese-LLaMA-Alpaca-3"> <img alt="GitHub top language" src="https://img.shields.io/github/languages/top/ymcui/Chinese-LLaMA-Alpaca-3"> <a href="https://app.codacy.com/gh/ymcui/Chinese-LLaMA-Alpaca-3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/142d688425494644b5b156068f55370d"/></a></p><p align="center"> <a href="https://huggingface.co/hfl">🤗 Hugging Face</a> • <a href="https://modelscope.cn/profile/ChineseAlpacaGroup">🤖 ModelScope</a> • <a href="https://sota.jiqizhixin.com/project/chinese-llama-alpaca-3">🐿️ 机器之心SOTA!模型</a> • <a href="https://wisemodel.cn/models/ChineseAlpacaGroup/llama-3-chinese-8b-instruct-v3">🟣 wisemodel</a> • <a href="https://huggingface.co/spaces/hfl-rc/llama-3-chinese-8b-instruct-demo">🤗 在线Demo</a></p>本项目基于Meta最新发布的新一代开源大模型[Llama-3](https://github.com/facebookresearch/llama3)开发,是Chinese-LLaMA-Alpaca开源大模型相关系列项目([一期](https://github.com/ymcui/Chinese-LLaMA-Alpaca)、[二期](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2))的第三期。本项目开源了**中文Llama-3基座模型和中文Llama-3-Instruct指令精调大模型**。这些模型在原版Llama-3的基础上使用了大规模中文数据进行增量预训练,并且使用精选指令数据进行精调,进一步提升了中文基础语义和指令理解能力,相比二代相关模型获得了显著性能提升。#### 主要内容- 🚀 开源Llama-3-Chinese基座模型和Llama-3-Chinese-Instruct指令模型(v1, v2, v3)- 🚀 开源了预训练脚本、指令精调脚本,用户可根据需要进一步训练或微调模型- 🚀 开源了alpaca_zh_51k, stem_zh_instruction, ruozhiba_gpt4 (4o/4T) 指令精调数据- 🚀 提供了利用个人电脑CPU/GPU快速在本地进行大模型量化和部署的教程- 🚀 支持[🤗transformers](https://github.com/huggingface/transformers), [llama.cpp](https://github.com/ggerganov/llama.cpp), [text-generation-webui](https://github.com/oobabooga/text-generation-webui), [vLLM](https://github.com/vllm-project/vllm), [Ollama](https://ollama.com)等Llama-3生态----[中文Mixtral大模型](https://github.com/ymcui/Chinese-Mixtral) | [中文LLaMA-2&Alpaca-2大模型](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2) | [中文LLaMA&Alpaca大模型](https://github.com/ymcui/Chinese-LLaMA-Alpaca) | [多模态中文LLaMA&Alpaca大模型](https://github.com/airaria/Visual-Chinese-LLaMA-Alpaca) | [多模态VLE](https://github.com/iflytek/VLE) | [中文MiniRBT](https://github.com/iflytek/MiniRBT) | [中文LERT](https://github.com/ymcui/LERT) | [中英文PERT](https://github.com/ymcui/PERT) | [中文MacBERT](https://github.com/ymcui/MacBERT) | [中文ELECTRA](https://github.com/ymcui/Chinese-ELECTRA) | [中文XLNet](https://github.com/ymcui/Chinese-XLNet) | [中文BERT](https://github.com/ymcui/Chinese-BERT-wwm) | [知识蒸馏工具TextBrewer](https://github.com/airaria/TextBrewer) | [模型裁剪工具TextPruner](https://github.com/airaria/TextPruner) | [蒸馏裁剪一体化GRAIN](https://github.com/airaria/GRAIN)## 新闻**[2024/05/30] 发布Llama-3-Chinese-8B-Instruct-v3版指令模型,相比v1/v2在下游任务上获得显著提升。详情查看:[📚v3.0版本发布日志](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/releases/tag/v3.0)**[2024/05/08] 发布Llama-3-Chinese-8B-Instruct-v2版指令模型,直接采用500万条指令数据在 [Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) 上进行精调。详情查看:[📚v2.0版本发布日志](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/releases/tag/v2.0)[2024/05/07] 添加预训练脚本、指令精调脚本。详情查看:[📚v1.1版本发布日志](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/releases/tag/v1.1)[2024/04/30] 发布Llama-3-Chinese-8B基座模型和Llama-3-Chinese-8B-Instruct指令模型。详情查看:[📚v1.0版本发布日志](https://github.com/ymcui/Chinese-LLaMA-Alpaca-3/releases/tag/v1.0)[2024/04/19] 🚀 正式启动Chinese-LLaMA-Alpaca-3项目## 内容导引| 章节 | 描述 || ------------------------------------- | ------------------------------------------------------------ || [💁🏻‍♂️模型简介](#模型简介) | 简要介绍本项目相关模型的技术特点 || [⏬模型下载](#模型下载) | 中文Llama-3大模型下载地址 || [💻推理与部署](#推理与部署) | 介绍了如何对模型进行量化并使用个人电脑部署并体验大模型 || [💯模型效果](#模型效果) | 介绍了模型在部分任务上的效果 || [📝训练与精调](#训练与精调) | 介绍了如何训练和精调中文Llama-3大模型 || [❓常见问题](#常见问题) | 一些常见问题的回复 |## 模型简介本项目推出了基于Meta Llama-3的中文开源大模型Llama-3-Chinese以及Llama-3-Chinese-Instruct。主要特点如下:#### 📖 使用原版Llama-3词表- Llama-3相比其前两代显著扩充了词表大小,由32K扩充至128K,并且改为BPE词表- 初步实验发现Llama-3词表的编码效率与我们扩充词表的[中文LLaMA-2](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2)相当,效率约为中文LLaMA-2词表的95%(基于维基百科数据上的编码效率测试)- 结合我们在[中文Mixtral](https://github.com/ymcui/Chinese-Mixtral)上的相关经验及实验结论[^1],我们**并未对词表进行额外扩充**[^1]: [Cui and Yao, 2024. Rethinking LLM Language Adaptation: A Case Study on Chinese Mixtral](https://arxiv.org/abs/2403.01851)#### 🚄 长上下文长度由二代4K扩展至8K- Llama-3将原生上下文窗口长度从4K提升至8K,能够进一步处理更长的上下文信息- 用户也可通过PI、NTK、YaRN等方法对模型进行长上下文的扩展,以支持更长文本的处理#### ⚡ 使用分组查询注意力机制- Llama-3采用了Llama-2中大参数量版本应用的分组查询注意力(GQA)机制,能够进一步提升模型的效率#### 🗒 全新的指令模板- Llama-3-Instruct采用了全新的指令模板,与Llama-2-chat不兼容,使用时应遵循官方指令模板(见[指令模板](#指令模板))## 模型下载### 模型选择指引以下是本项目的模型对比以及建议使用场景。**如需聊天交互,请选择Instruct版。**| 对比项 | Llama-3-Chinese-8B | Llama-3-Chinese-8B-Instruct || :-------------------- | :----------------------------------------------------: | :----------------------------------------------------------: || 模型类型 | 基座模型 | 指令/Chat模型(类ChatGPT) || 模型大小 | 8B | 8B || 训练类型 | Causal-LM (CLM) | 指令精调 || 训练方式 | LoRA + 全量emb/lm-head | LoRA + 全量emb/lm-head || 初始化模型 | [原版Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) | v1: Llama-3-Chinese-8B<br/>

用户评论 (0)

发表评论

captcha