每当我们在公有云或者私有云发布训练好的大数据模型,为了方便大家辨识、理解和运用,参照huggingface所制定的标准制作一个Model Card展示页,是种非常好的模型展示和组织形式。

下面就是一个Model Card 的示例,我试着把它翻译成了中文,源网址,并且提供了Markdown的模板,供大家参考。在这里你可以看到它的指导手册,以后有时间我也把它翻译过来。

Falcon-180B(猎鹰-180B)的模型卡片

模型详情

Falcon-180B

Falcon-180B是一个1800亿参数的因果解码器模型,它由TII(Technology Innovation Institut)公司研发,基于RefinedWeb增强的语料库,使用3万5千亿个Token进行训练。它提供了Falcon-180B TII License(猎鹰180 TII许可证)Acceptable Use Policy(使用条款).

论文将很快发布

要开始使用Falcon(推理、微调、量化等),我们建议阅读 HF这篇伟大的博客 或者 这篇 Falcon-40B的发布版!

请注意因为180B大于transformers(转换)+acccelerate(加速)可以轻松处理的值, 我们建议使用Text Generation Inference(文本生成推断).

至少需要400GB内存 才能使用Falcon-180B快速进行推理.

为什么要使用Falcon-180B?

  • 它是目前可用的最好的开放访问模型,也是总体上最好的模型之一 Falcon-180B 性能上优于 LLaMA-2, StableLM, RedPajama, MPT, 等等. 请参阅 OpenLLM Leaderboard 排行榜.
  • 它的特点是具有多查询的推理优化架构, (Shazeer et al., 2019).
  • 它提供的许可证允许商业使用。
  • 这是一个原始的、经过预训练的模型,应该针对大多数用例进行进一步的微调。 如果您正在寻找一个更适合在聊天格式中使用通用指令的版本,我们建议您查看 Falcon-180B-Chat.

想找一个更小、更便宜的模型吗? Falcon-7BFalcon-40B 是 Falcon-180B 的小兄弟!

Falcon LLMs 需要 PyTorch 2.0 才能使用 transformers!

模型描述

模型源码

  • 代码: 即将发布.

使用条例

请查看 acceptable use policy.

直接使用

大型语言模型研究;作为进一步专业化和微调特定用例(例如,摘要、文本生成、聊天机器人等)的基础

超出范围的使用

没有对风险和mitigation(抱歉不知道这个词怎么翻译)进行充分评估就在生产环境中使用;任何可能被认为是不负责任或有害的用例。

偏见、风险和限制

Falcon-180B主要接受英语、德语、西班牙语和法语的训练,意大利语、葡萄牙语、波兰语、荷兰语、罗马尼亚语、捷克语和瑞典语的能力有限。它不会适当地推广到其他语言。此外,由于它是在代表网络的大规模语料库上进行训练的,它将携带网上常见的刻板印象和偏见。

建议

我们建议Falcon-180B的用户考虑对其进行微调,以适应感兴趣的特定任务集,并且在生产环境中使用界限和适当的预防措施。

如何开始使用模型

要完全以 bfloat16 精度运行模型您需要大约8张A100 80GB计算卡或者等效容量。

(以下是Python代码)

from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch model = "tiiuae/falcon-180b" tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto",
)
sequences = pipeline(
"Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron:",
max_length=200,
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")

训练详情

训练数据

训练 Falcon-180B 使用 3万5千亿个Token,使用 RefinedWeb, 一个高质量的过滤和消除重复的网络数据集。我们用策划的语料库进行了增强。我们精心策划的copora的重要组成部分受到The Pile的启发 (Gao et al., 2020).

数据集 比例 Tokens 来源
RefinedWeb-English 75% 750B 大量的网络爬虫数据
RefinedWeb-Europe 7% 70B 来自欧洲的网络爬虫数据
Books 书籍 6% 60B
Conversations 会话 5% 50B Reddit, StackOverflow, HackerNews
Code 代码 5% 50B
Technical 技术 2% 20B arXiv, PubMed, USPTO, etc.

RefinedWeb-欧洲 数据集由以下语言组成:

语言 多语种的笔记 Tokens
德语 26% 18B
西班牙语 24% 17B
法语 23% 16B
意大利语 7% 5B
葡萄牙语 4% 3B
波兰语 4% 3B
荷兰语 4% 3B
罗马尼亚语 3% 2B
捷克语 3% 2B
瑞典语 2% 1B

所有的数据由Falcon Token标记器进行Token化.

训练过程

Falcon-180B 使用4096块Tesla A100 40GB计算卡进行训练, 使用3D并行化策略(TP=8, PP=8, DP=64)与ZeRO相结合.

训练参数

超级参数 备注
精度 bfloat16
优化器 AdamW
学习率 1.25e-4 4B tokens warm-up, cosine decay to 1.25e-5
权重衰减 1e-1
Z-loss 1e-4
批处理大小 2048 100B tokens ramp-up

速度, 大小, 时间

训练于于2023年初开始。

评价

即将发布论文.

有关早期结果,请参阅 OpenLLM Leaderboard 排行榜。

技术规范

模型体系结构和目标

Falcon-180B 是在因果关系语言模型上建立的因果关系解码语言模型 (i.e., 预测下一个Token).

该体系架构广泛改编自GPT-3论文 (Brown et al., 2020), 并且有着以下几方面的不同:

对于多重查询,我们使用一个内部变量,该变量使用每个张量平行度的独立键和值(所谓的多组)。

超参数 备注
层数 80
d_model 14848
head_dim 64 Reduced to optimise for FlashAttention
字典 65024
序列长度 2048

计算基础设施

硬件

Falcon-180B 在 AWS SageMaker 上训练, 使用 P4d 实例中多达 4,096 个 A100 40GB GPUs。

软件

Falcon-180B 是基于定制的分布式训练代码库 Gigatron 进行训练的。 它采用了 3D 并行方法,并结合了 ZeRO 和高性能的 Triton 内核(如 FlashAttention 等)。

引用

将很快推出 (实际上这次). 同时,您可以使用以下信息进行引用:

@article{falcon,
title={The Falcon Series of Language Models: Towards Open Frontier Models},
author={Almazrouei, Ebtesam and Alobeidli, Hamza and Alshamsi, Abdulaziz and Cappelli, Alessandro and Cojocaru, Ruxandra and Alhammadi, Maitha and Daniele, Mazzotta and Heslow, Daniel and Launay, Julien and Malartic, Quentin and Noune, Badreddine and Pannier, Baptiste and Penedo, Guilherme},
year={2023}
}

想要了解有关预训练数据集的更多信息, 请参阅 RefinedWeb paper.

@article{refinedweb,
title={The {R}efined{W}eb dataset for {F}alcon {LLM}: outperforming curated corpora with web data, and web data only},
author={Guilherme Penedo and Quentin Malartic and Daniel Hesslow and Ruxandra Cojocaru and Alessandro Cappelli and Hamza Alobeidli and Baptiste Pannier and Ebtesam Almazrouei and Julien Launay},
journal={arXiv preprint arXiv:2306.01116},
eprint={2306.01116},
eprinttype = {arXiv},
url={https://arxiv.org/abs/2306.01116},
year={2023}
}

联系

falconllm@tii.ae

Model Card的模板

Model Card for {{ model_id | default("Model ID", true) }}

{{ model_summary | default("", true) }}

Model Details

Model Description

{{ model_description | default("", true) }}

  • Developed by: {{ developers | default("[More Information Needed]", true)}}
  • Funded by [optional]: {{ funded_by | default("[More Information Needed]", true)}}
  • Shared by [optional]: {{ shared_by | default("[More Information Needed]", true)}}
  • Model type: {{ model_type | default("[More Information Needed]", true)}}
  • Language(s) (NLP): {{ language | default("[More Information Needed]", true)}}
  • License: {{ license | default("[More Information Needed]", true)}}
  • Finetuned from model [optional]: {{ base_model | default("[More Information Needed]", true)}}

Model Sources [optional]

  • Repository: {{ repo | default("[More Information Needed]", true)}}
  • Paper [optional]: {{ paper | default("[More Information Needed]", true)}}
  • Demo [optional]: {{ demo | default("[More Information Needed]", true)}}

Uses

Direct Use

{{ direct_use | default("[More Information Needed]", true)}}

Downstream Use [optional]

{{ downstream_use | default("[More Information Needed]", true)}}

Out-of-Scope Use

{{ out_of_scope_use | default("[More Information Needed]", true)}}

Bias, Risks, and Limitations

{{ bias_risks_limitations | default("[More Information Needed]", true)}}

Recommendations

{{ bias_recommendations | default("Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.", true)}}

How to Get Started with the Model

Use the code below to get started with the model.

{{ get_started_code | default("[More Information Needed]", true)}}

Training Details

Training Data

{{ training_data | default("[More Information Needed]", true)}}

Training Procedure

Preprocessing [optional]

{{ preprocessing | default("[More Information Needed]", true)}}

Training Hyperparameters

  • Training regime: {{ training_regime | default("[More Information Needed]", true)}}

Speeds, Sizes, Times [optional]

{{ speeds_sizes_times | default("[More Information Needed]", true)}}

Evaluation

Testing Data, Factors & Metrics

Testing Data

{{ testing_data | default("[More Information Needed]", true)}}

Factors

{{ testing_factors | default("[More Information Needed]", true)}}

Metrics

{{ testing_metrics | default("[More Information Needed]", true)}}

Results

{{ results | default("[More Information Needed]", true)}}

Summary

{{ results_summary | default("", true) }}

Model Examination [optional]

{{ model_examination | default("[More Information Needed]", true)}}

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: {{ hardware_type | default("[More Information Needed]", true)}}
  • Hours used: {{ hours_used | default("[More Information Needed]", true)}}
  • Cloud Provider: {{ cloud_provider | default("[More Information Needed]", true)}}
  • Compute Region: {{ cloud_region | default("[More Information Needed]", true)}}
  • Carbon Emitted: {{ co2_emitted | default("[More Information Needed]", true)}}

Technical Specifications [optional]

Model Architecture and Objective

{{ model_specs | default("[More Information Needed]", true)}}

Compute Infrastructure

{{ compute_infrastructure | default("[More Information Needed]", true)}}

Hardware

{{ hardware_requirements | default("[More Information Needed]", true)}}

Software

{{ software | default("[More Information Needed]", true)}}

Citation [optional]

BibTeX:

{{ citation_bibtex | default("[More Information Needed]", true)}}

APA:

{{ citation_apa | default("[More Information Needed]", true)}}

Glossary [optional]

{{ glossary | default("[More Information Needed]", true)}}

More Information [optional]

{{ more_information | default("[More Information Needed]", true)}}

Model Card Authors [optional]

{{ model_card_authors | default("[More Information Needed]", true)}}

Model Card Contact

{{ model_card_contact | default("[More Information Needed]", true)}}

[大数据][机器学习]之Model Card(模型卡片)介绍的更多相关文章

  1. 大数据时代的技术hive:hive介绍

    我最近研究了hive的相关技术,有点心得,这里和大家分享下. 首先我们要知道hive到底是做什么的.下面这几段文字很好的描述了hive的特性: 1.hive是基于Hadoop的一个数据仓库工具,可以将 ...

  2. Spark项目之电商用户行为分析大数据平台之(一)项目介绍

    一.项目概述 本项目主要用于互联网电商企业中,使用Spark技术开发的大数据统计分析平台,对电商网站的各种用户行为(访问行为.购物行为.广告点击行为等)进行复杂的分析.用统计分析出来的数据,辅助公司中 ...

  3. 互联网,IT,大数据,机器学习,AI知识tag云

    互联网基础: tcp/ip网络,linux运维,DNS,ipv6 web前端: javascript, es6, 组件化开发, vuejs, angularjs, react html5, css3, ...

  4. 大数据技术之_13_Azkaban学习_Azkaban(阿兹卡班)介绍 + Azkaban 安装部署 + Azkaban 实战

    一 概述1.1 为什么需要工作流调度系统1.2 常见工作流调度系统1.3 各种调度工具特性对比1.4 Azkaban 与 Oozie 对比二 Azkaban(阿兹卡班) 介绍三 Azkaban 安装部 ...

  5. 【原创】大数据基础之Zookeeper(1)介绍、安装及使用

    zookeeper3.4.11 http://zookeeper.apache.org/ 一 简介 ZooKeeper is a centralized service for maintaining ...

  6. 王家林 大数据Spark超经典视频链接全集[转]

    压缩过的大数据Spark蘑菇云行动前置课程视频百度云分享链接 链接:http://pan.baidu.com/s/1cFqjQu SCALA专辑 Scala深入浅出经典视频 链接:http://pan ...

  7. 第四届CCF大数据学术会议征文通知

    第四届CCF大数据学术会议征文通知 2016年10月,兰州 近几年,大数据是各界高度关注积极布局的热点方向.2015年8月,国务院发表<促进大数据发展行动纲要>,正式将大数据提升为国家战略 ...

  8. 大数据基础知识问答----spark篇,大数据生态圈

    Spark相关知识点 1.Spark基础知识 1.Spark是什么? UCBerkeley AMPlab所开源的类HadoopMapReduce的通用的并行计算框架 dfsSpark基于mapredu ...

  9. [大数据面试题]hadoop核心知识点

    * 面试答案为LZ所写,如需转载请注明出处,谢谢. * 这里不涉及HiveSQL和HBase操作的笔试题,这些东西另有总结. 1.MR意义. MR是一个用于处理大数据的分布式离线计算框架,它采用”分而 ...

  10. BAT、网易、京东等如何做大数据风控的?

    大数据风控目前应该是前沿技术在金融领域的最成熟应用,相对于智能投顾.区块链等还在初期的金融科技应用,大数据风控目前已经在业界逐步普及,从BATJ这样的大企业,到交易规模比较大的网贷平台,再到做现金贷. ...

随机推荐

  1. three.js案例-web3d三维地图大屏炫酷3D地图下钻地图-附源码

    炫酷3D地图效果如下: 代码注释非常详细: create() { // 添加雾,随着距离线性增大,只能看到一个小是视野范围内的场景,地图缩小很多东西就会看不清 //this.scene.fog = n ...

  2. 10分钟了解Flink SQL使用

    Flink 是一个流处理和批处理统一的大数据框架,专门为高吞吐量和低延迟而设计.开发者可以使用SQL进行流批统一处理,大大简化了数据处理的复杂性.本文将介绍Flink SQL的基本原理.使用方法.流批 ...

  3. Python语言:散修笔记

    文章目录 前言 转义字符的使用 原字符 变量的定义 类型转换 注释 接收用户信息 运算规则 整除运算 幂运算 比较运算符 布尔运算 运算优先级 对象的布尔值 if else elif分支结构 条件表达 ...

  4. grafana模板参考

    空的,把面板都删除了 { "__inputs": [ { "name": "DS_PROMETHEUS", "label" ...

  5. go新手常踩的坑

    作为一个5年的phper,这两年公司和个人都在顺应技术趋势,新项目慢慢从php转向了go语言,从2021年到现在,笔者手上也先后开发了两个go项目.在学习go语言的过程中也学习并总结了一些相关的东西, ...

  6. Typora导出html图片转base64

    Typora 导出html图片转base64 Typora 中图片使用绝对路径 图片路径不要使用中文,否则可能会不成功 打包 jar ,jar放在到出 html 同级目录下 必须要有 jdk 环境 一 ...

  7. PasteSpider之appsettings.json中的Serilog的配置,分流不同日志层级的信息!

    在实际使用Serilog中,我们通常会有不一样的需求,常见的比如 1.按照等级,高级哪个等级的才记录 2.记录文件每个多大,超过的划分到下一个文件中 3.不同等级的记录到不同的位置中 4.按照不一样的 ...

  8. web开发遇到的坑之360浏览器缓存问题

    再使用360浏览器,浏览我自己开发的一个配置的web管理后台时,发现,使用ctrl+F5都不能刷新表格的数据,还有,我添加字段时,明明是添加成功的,用sql再数据库查都能查出来.但表格里就是不显示.我 ...

  9. 最小生成树Kruskal算法的实现原理

    到底什么是最小生成树 最小生成树算法应用范围比较广,例如在网络的铺设当中难免会出现环路,需要要生成树算法来取出网络中的环,防止网络风暴的发生.那到底什么是最小生成树呢?我这里就不给严谨的定义了,这种定 ...

  10. HTML——结构和标签格式

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...