
<img src="https://cdn-uploads.huggingface.co/production/uploads/1657124309515-5f17f0a0925b9863e28ad517.png" alt="BigScience Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>

BigScience Large Open-science Open-access Multilingual Language Model  
Version 1.3 / 6 July 2022

Current Checkpoint: **Training Iteration  95000**

Link to paper: [here](https://arxiv.org/abs/2211.05100)

Total seen tokens: **366B**

---

# Model Details  

BLOOM is an autoregressive Large Language Model (LLM), trained to continue text from a prompt on vast amounts of text data using industrial-scale computational resources. As such, it is able to output coherent text in 46 languages and 13 programming languages that is hardly distinguishable from text written by humans. BLOOM can also be instructed to perform text tasks it hasn't been explicitly trained for, by casting them as text generation tasks.

## Basics
*This section provides information about the model type, version, license, funders, release date, developers, and contact information.*
*It is useful for anyone who wants to reference the model.*

<details>
<summary>Click to expand</summary>
  
**Developed by:** BigScience ([website](https://bigscience.huggingface.co))

*All collaborators are either volunteers or have an agreement with their employer. (Further breakdown of participants forthcoming.)*
    
**Model Type:** Transformer-based Language Model

**Checkpoints format:** `transformers` (Megatron-DeepSpeed format available [here](https://huggingface.co/bigscience/bloom-optimizer-states))

**Version:** 1.0.0

**Languages:** Multiple; see [training data](#training-data)

**License:** RAIL License v1.0 ([link](https://huggingface.co/spaces/bigscience/license) / [article and FAQ](https://bigscience.huggingface.co/blog/the-bigscience-rail-license))

**Release Date Estimate:** Monday, 11.July.2022

**Send Questions to:** bigscience-contact@googlegroups.com

**Cite as:** BigScience, _BigScience Language Open-science Open-access Multilingual (BLOOM) Language Model_. International, May 2021-May 2022

**Funded by:** 
    
* The French government.

* Hugging Face ([website](https://huggingface.co)).

* Organizations of contributors.  *(Further breakdown of organizations forthcoming.)*

</details>


## Technical Specifications
*This section includes details about the model objective and architecture, and the compute infrastructure.*
*It is useful for people interested in model development.*

<details>
<summary>Click to expand</summary>

Please see [the BLOOM training README](https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml#readme) for full details on replicating training.

### Model Architecture and Objective

* Modified from Megatron-LM GPT2 (see [paper](https://arxiv.org/abs/1909.08053), [BLOOM Megatron code](https://github.com/bigscience-workshop/Megatron-DeepSpeed)):

* Decoder-only architecture

* Layer normalization applied to word embeddings layer (`StableEmbedding`; see [code](https://github.com/facebookresearch/bitsandbytes), [paper](https://arxiv.org/pdf/2110.02861.pdf))

* ALiBI positional encodings (see [paper](https://arxiv.org/pdf/2108.12409.pdf)), with GeLU activation functions

* 176,247,271,424 parameters:

    * 3,596,615,680 embedding parameters

    * 70 layers, 112 attention heads

    * Hidden layers are 14336-dimensional

    * Sequence length of 2048 tokens used (see [BLOOM tokenizer](https://huggingface.co/bigscience/tokenizer), [tokenizer description](#tokenization))

**Objective Function:** Cross Entropy with mean reduction (see [API documentation](https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss)).
    
### Compute infrastructure
Jean Zay Public Supercomputer, provided by the French government (see [announcement](https://www.enseignementsup-recherche.gouv.fr/fr/signature-du-marche-d-acquisition-de-l-un-des-supercalculateurs-les-plus-puissants-d-europe-46733)).

#### Hardware

* 384 A100 80GB GPUs (48 nodes)
    
* Additional 32 A100 80GB GPUs (4 nodes) in reserve

* 8 GPUs per node Using NVLink 4 inter-gpu connects, 4 OmniPath links

* CPU: AMD

* CPU memory: 512GB per node

* GPU memory: 640GB per node

* Inter-node connect: Omni-Path Architecture (OPA)

* NCCL-communications network: a fully dedicated subnet

* Disc IO network: shared network with other types of nodes

#### Software

* Megatron-DeepSpeed ([Github link](https://github.com/bigscience-workshop/Megatron-DeepSpeed))

* DeepSpeed ([Github link](https://github.com/microsoft/DeepSpeed))

* PyTorch (pytorch-1.11 w/ CUDA-11.5; see [Github link](https://github.com/pytorch/pytorch))

* apex ([Github link](https://github.com/NVIDIA/apex))
    
</details>

---

# Training
*This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
*It is useful for people who want to learn more about the model inputs and training footprint.*

<details>
<summary>Click to expand</summary>

## Training Data
*This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*

Details for each dataset are provided in individual [Data Cards](https://huggingface.co/spaces/bigscience/BigScienceCorpus), and the sizes of each of their contributions to the aggregated training data are presented in an [Interactive Corpus Map](https://huggingface.co/spaces/bigscience-catalogue-lm-data/corpus-map).

Training data includes:

-   46 natural languages
    
-   13 programming languages

-   In 1.6TB of pre-processed text, converted into 350B unique tokens (see [the tokenizer section](#tokenization) for more.)

### Languages
    
The pie chart shows the distribution of languages in training data.
   
![pie chart showing the distribution of languages in training data](https://github.com/bigscience-workshop/model_card/blob/main/assets/data/pie_v2.svg?raw=true)


The following tables shows the further distribution of Niger-Congo & Indic languages and programming languages in the training data.

Distribution of Niger Congo and Indic languages.
    
| Niger Congo    | Percentage |         | Indic     | Percentage |
|----------------|------------| ------  |-----------|------------|
| Chi Tumbuka    | 0.00002    |         | Assamese  | 0.01       |
| Kikuyu         | 0.00004    |         | Odia      | 0.04       |
| Bambara        | 0.00004    |         | Gujarati  | 0.04       |
| Akan           | 0.00007    |         | Marathi   | 0.05       |
| Xitsonga       | 0.00007    |         | Punjabi   | 0.05       |
| Sesotho        | 0.00007    |         | Kannada   | 0.06       |
| Chi Chewa      | 0.0001     |         | Nepali    | 0.07       |
| Setswana       | 0.0002     |         | Telugu    | 0.09       |
| Lingala        | 0.0002     |         | Malayalam | 0.10       |
| Northern Sotho | 0.0002     |         | Urdu      | 0.10       |
| Fon            | 0.0002     |         | Tamil     | 0.20       |
| Kirundi        | 0.0003     |         | Bengali   | 0.50       |
| Wolof          | 0.0004     |         | Hindi     | 0.70       |
| Luganda        | 0.0004     |
| Chi Shona      | 0.001      |
| Isi Zulu       | 0.001      |
| Igbo           | 0.001      |
| Xhosa          | 0.001      |
| Kinyarwanda    | 0.003      |
| Yoruba         | 0.006      |
| Swahili        | 0.02       |

Distribution of programming languages.
    
| Extension      | Language   | Number of files |
|----------------|------------|-----------------|
| java           | Java       | 5,407,724       |
| php            | PHP        | 4,942,186       |
| cpp            | C++        | 2,503,930       |
| py             | Python     | 2,435,072       |
| js             | JavaScript | 1,905,518       |
| cs             | C#         | 1,577,347       |
| rb             | Ruby       | 6,78,413        |
| cc             | C++        | 443,054         |
| hpp            | C++        | 391,048         |
| lua            | Lua        | 352,317         |
| go             | GO         | 227,763         |
| ts             | TypeScript | 195,254         |
| C              | C          | 134,537         |
| scala          | Scala      | 92,052          |
| hh             | C++        | 67,161          |
| H              | C++        | 55,899          |
| tsx            | TypeScript | 33,107          |
| rs             | Rust       | 29,693          |
| phpt           | PHP        | 9,702           |
| c++            | C++        | 1,342           |
| h++            | C++        | 791             |
| php3           | PHP        | 540             |
| phps           | PHP        | 270             |
| php5           | PHP        | 166             |
| php4           | PHP        | 29              |
    
### Preprocessing

**Tokenization:** The BLOOM tokenizer ([link](https://huggingface.co/bigscience/tokenizer)), a learned subword tokenizer trained using:
    
- A byte-level Byte Pair Encoding (BPE) algorithm 

- A simple pre-tokenization rule, no normalization

- A vocabulary size of 250,680

It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.  

## Speeds, Sizes, Times

Training logs: [Tensorboard link](https://huggingface.co/tensorboard/bigscience/tr11-176B-ml-logs/)

- Dates:
    
    - Started 11th March, 2022 11:42am PST

    - Estimated end: 5th July, 2022

- Checkpoint size:
    
    - Bf16 weights: 329GB
    
    - Full checkpoint with optimizer states: 2.3TB

- Training throughput: About 150 TFLOP per GPU per second

- Number of epochs: 1

- Estimated cost of training: Equivalent of $2-5M in cloud computing (including preliminary experiments)

- Server training location: Île-de-France, France


## Environmental Impact

The training supercomputer, Jean Zay ([website](http://www.idris.fr/eng/jean-zay/jean-zay-presentation-eng.html)), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.
    
**Estimated carbon emissions:**  *(Forthcoming.)*
    
**Estimated electricity usage:** *(Forthcoming.)*

</details>

---

# Uses

*This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
*It is useful for anyone considering using the model or who is affected by the model.*

<details>
<summary>Click to expand</summary>
    
## How to use

This model can be easily used and deployed using HuggingFace's ecosystem. This needs `transformers` and `accelerate` installed. The model can be downloaded as follows:

 <img src="https://s3.amazonaws.com/moonup/production/uploads/1657271608456-62441d1d9fdefb55a0b7d12c.png" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>

## Intended Use

This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive.

### Direct Use

-   Text generation

-   Exploring characteristics of language generated by a language model

    -   Examples: Cloze tests, counterfactuals, generations with reframings

### Downstream Use

-   Tasks that leverage language models include: Information Extraction, Question Answering, Summarization

### Misuse and Out-of-scope Use
*This section addresses what users ought not do with the model.*

See the [BLOOM License](https://huggingface.co/spaces/bigscience/license), Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases.

#### Out-of-scope Uses

Using the model in [high-stakes](#high-stakes) settings is out of scope for this model.  The model is not designed for [critical decisions](#critical-decisions) nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.  

Out-of-scope Uses Include:

-   Usage in biomedical domains, political and legal domains, or finance domains

-   Usage for evaluating or scoring individuals, such as for employment, education, or credit

-   Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct

#### Misuse

Intentionally using the model for harm, violating [human rights](#human-rights), or other kinds of malicious activities, is a misuse of this model. This includes:

-   Spam generation

-   Disinformation and influence operations

-   Disparagement and defamation

-   Harassment and abuse
  
-   [Deception](#deception)

-   Unconsented impersonation and imitation

-   Unconsented surveillance 

-   Generating content without attribution to the model, as specified in the [RAIL License, Use Restrictions](https://huggingface.co/spaces/bigscience/license)

## Intended Users

### Direct Users

-   General Public

-   Researchers

-   Students

-   Educators

-   Engineers/developers

-   Non-commercial entities

-   Community advocates, including human and civil rights groups

### Indirect Users

-   Users of derivatives created by Direct Users, such as those using software with an [intended use](#intended-use)

-   Users of [Derivatives of the Model, as described in the License](https://huggingface.co/spaces/bigscience/license)

### Others Affected (Parties Prenantes)

-   People and groups referred to by the LLM

-   People and groups exposed to outputs of, or decisions based on, the LLM

-   People and groups whose original work is included in the LLM

</details>

---

# Risks and Limitations
*This section identifies foreseeable harms and misunderstandings.*
    
<details>
<summary>Click to expand</summary>

Model may:

-   Overrepresent some viewpoints and underrepresent others

-   Contain stereotypes
  
-   Contain [personal information](#personal-data-and-information)

-   Generate:

    -   Hateful, abusive, or violent language

    -   Discriminatory or prejudicial language

    -   Content that may not be appropriate for all settings, including sexual content

-   Make errors, including producing incorrect information as if it were factual

-   Generate irrelevant or repetitive outputs

-   Induce users into attributing human traits to it, such as sentience or consciousness

</details>

---

# Evaluation
*This section describes the evaluation protocols and provides the results.*


<details>
<summary>Click to expand</summary>

## Metrics 
*This section describes the different ways performance is calculated and why.*

Includes:

| Metric             | Why chosen                                                         |
|--------------------|--------------------------------------------------------------------|
| [Perplexity](#perplexity)         | Standard metric for quantifying model improvements during training |
| Cross Entropy [Loss](#loss) | Standard objective for language models.                            |

And multiple different metrics for specific tasks. _(More evaluation metrics forthcoming upon completion of evaluation protocol.)_

## Factors 
*This section lists some different aspects of BLOOM models. Its focus is on aspects that are likely to give rise to high variance in model behavior.*

- Language, such as English or Yoruba

- Domain, such as newswire or stories

- Demographic characteristics, such as gender or nationality

##  Results
*Results are based on the [Factors](#factors) and [Metrics](#metrics).*

**Zero-shot evaluations:**

<span style="color:red"><b>WARNING:</b> This section used to contain much more results, however they were not correct and we released without the approval of the evaluation working group. We are currently in the process of fixing the evaluations.</span>

See this repository for JSON files: https://github.com/bigscience-workshop/evaluation-results

| Task | Language | Metric | BLOOM-176B | OPT-175B* |
|:--------|:-----------------|:------------------------|-------------:|------------:|
| humaneval | python | pass@1 ↑ | 0.155 | 0.0 |
| humaneval | python | pass@10 ↑ | 0.328 | 0.0 |
| humaneval | python | pass@100 ↑ | 0.572 | 0.003 |


**Train-time Evaluation:**

Final checkpoint after 95K steps:

- Training Loss: 1.939

- Validation Loss: 2.061

- Perplexity: 7.045

For more see: https://huggingface.co/bigscience/tr11-176B-ml-logs

</details>

---

# Recommendations

*This section provides information on warnings and potential mitigations.*

<details>
<summary>Click to expand</summary>

-   Indirect users should be made aware when the content they're working with is created by the LLM.

-   Users should be aware of [Risks and Limitations](#risks-and-limitations), and include an appropriate age disclaimer or blocking interface as necessary.

-   Models trained or finetuned downstream of BLOOM LM should include an updated Model Card.

-   Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.

</details>

---

# Glossary and Calculations

*This section defines common terms and how metrics are calculated.*
<details>
<summary>Click to expand</summary>

-   <a name="loss">**Loss:**</a> A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss. 

-   <a name="perplexity">**Perplexity:**</a> This is based on what the model estimates the probability of new data is. The lower the perplexity, the better.  If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy. 

-   <a name="high-stakes">**High-stakes settings:**</a> Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed [Artificial Intelligence (AI) Act](https://artificialintelligenceact.eu/annexes/).

-   <a name="critical-decisions">**Critical decisions:**</a> Such as those defined in [the United States' proposed Algorithmic Accountability Act](https://www.congress.gov/117/bills/s3572/BILLS-117s3572is.pdf).

-   <a name="human-rights">**Human rights:**</a> Includes those rights defined in the [Universal Declaration of Human Rights](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf).

-  <a name="personal-data-and-information">**Personal Data and Personal Information:**</a> Personal data and information is defined in multiple data protection regulations, such as "[personal data](https://gdpr-info.eu/issues/personal-data/)" in the [European Union's General Data Protection Regulation](https://gdpr-info.eu); and "personal information" in the Republic of South Africa's [Protection of Personal Information Act](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf), The People's Republic of China's [Personal information protection law](http://en.npc.gov.cn.cdurl.cn/2021-12/29/c_694559.htm).
  
- <a name="sensitive-characteristics">**Sensitive characteristics:**</a> This includes specifically protected categories in human rights (see [UHDR, Article 2](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf)) and personal information regulation (see GDPR, [Article 9; Protection of Personal Information Act, Chapter 1](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf))

- <a name="deception">**Deception:**</a> Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.

</details>

---

# More Information
*This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*

<details>
<summary>Click to expand</summary>

## Intermediate checkpoints

For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 5000 steps. Please follow [this link](https://huggingface.co/bigscience/bloom-176-intermediate) to get these checkpoints.

    
## Dataset Creation

Blog post detailing the design choices during the dataset creation: https://bigscience.huggingface.co/blog/building-a-tb-scale-multilingual-dataset-for-language-modeling

## Technical Specifications

Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: https://bigscience.huggingface.co/blog/what-language-model-to-train-if-you-have-two-million-gpu-hours

More details on the architecture/optimizer: https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml

Blog post on the hardware/engineering side: https://bigscience.huggingface.co/blog/which-hardware-to-train-a-176b-parameters-model

Details on the distributed setup used for the training: https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml

Tensorboard updated during the training: https://huggingface.co/bigscience/tr11-176B-ml-logs/tensorboard#scalars&tagFilter=loss

## Lessons

Insights on how to approach training, negative results: https://github.com/bigscience-workshop/bigscience/blob/master/train/lessons-learned.md

Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): https://github.com/bigscience-workshop/bigscience/blob/master/train/tr11-176B-ml/chronicles.md

## Initial Results

Initial prompting experiments using interim checkpoints: https://huggingface.co/spaces/bigscience/bloom-book

</details>


## Original checkpoints

The checkpoints in this repo correspond to the HuggingFace Transformers format. If you want to use our fork of [Megatron-DeepSpeed](https://github.com/bigscience-workshop/Megatron-DeepSpeed) that the model was trained with, you'd want to use [this repo instead](https://huggingface.co/bigscience/bloom-optimizer-states).

Many intermediate checkpoints are available at https://huggingface.co/bigscience/bloom-intermediate/

---
    
# Model Card Authors
*Ordered roughly chronologically and by amount of time spent on creating this model card.*

Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff
{"language": ["ak", "ar", "as", "bm", "bn", "ca", "code", "en", "es", "eu", "fon", "fr", "gu", "hi", "id", "ig", "ki", "kn", "lg", "ln", "ml", "mr", "ne", "nso", "ny", "or", "pa", "pt", "rn", "rw", "sn", "st", "sw", "ta", "te", "tn", "ts", "tum", "tw", "ur", "vi", "wo", "xh", "yo", "zh", "zu"], "license": "bigscience-bloom-rail-1.0", "programming_language": ["C", "C++", "C#", "Go", "Java", "JavaScript", "Lua", "PHP", "Python", "Ruby", "Rust", "Scala", "TypeScript"], "pipeline_tag": "text-generation", "widget": [{"text": "A \"whatpu\" is a small, furry animal native to Tanzania. An example of a sentence that uses the word whatpu is: We were traveling in Africa and we saw these very cute whatpus. | To do a \"farduddle\" means to jump up and down really fast. An example of a sentence that uses the word farduddle is:", "example_title": "Imaginary word", "group": "English"}, {"text": "Un \"whatpu\" est un petit animal \u00e0 fourrure originaire de Tanzanie. Un exemple de phrase qui utilise le mot whatpu est: Nous \u00e9tions en Afrique et nous avons vu des whatpus trop mignons. Faire un \"farduddle\" veut dire sauter sur place vraiment vite. Un exemple de phrase qui utilise le mot farduddle est:", "example_title": "Imaginary word", "group": "French"}, {"text": "Un \"whatpu\" es un peque\u00f1o animal peludo nativo de Tanzania. Un ejemplo de una oraci\u00f3n que usa la palabra whatpu es: Est\u00e1bamos viajando por \u00c1frica y vimos estos whatpus muy bonitos. Hacer un \"farduddle\" significa saltar arriba y abajo muy r\u00e1pido. Un ejemplo de una oraci\u00f3n que usa la palabra farduddle es:", "example_title": "Imaginary word", "group": "Spanish"}, {"text": " \u0627\u0644\"\u0648\u0627\u062a\u0628\u0648\" \u0647\u0648 \u062d\u064a\u0648\u0627\u0646 \u0635\u063a\u064a\u0631 \u0645\u0643\u0633\u0648 \u0628\u0627\u0644\u0641\u0631\u0627\u0621 \u064a\u0639\u064a\u0634 \u0641\u064a \u062a\u0646\u0632\u0627\u0646\u064a\u0627. \u0645\u062b\u0627\u0644 \u0639\u0644\u0649 \u062c\u0645\u0644\u0629 \u062a\u0633\u062a\u062e\u062f\u0645 \u0643\u0644\u0645\u0629 \u0648\u0627\u062a\u0628\u0648 \u0647\u064a: \u0643\u0646\u0627 \u0646\u0633\u0627\u0641\u0631 \u0641\u064a \u0627\u0641\u0631\u064a\u0642\u064a\u0627 \u0648 \u0631\u0623\u064a\u0646\u0627 \u0647\u0624\u0644\u0627\u0621 \u0627\u0644\u0648\u0627\u062a\u0628\u0648 \u0627\u0644\u0644\u0637\u0641\u0627\u0621. \u0644\u0644\u0642\u064a\u0627\u0645 \u0628\"\u0641\u0627\u0631\u062f\u0627\u062f\u0644\" \u064a\u0639\u0646\u064a \u0627\u0646 \u062a\u0642\u0641\u0632 \u0644\u0644\u0623\u0639\u0644\u0649 \u0648 \u0627\u0644\u0623\u0633\u0641\u0644 \u0628\u0633\u0631\u0639\u0629 \u0643\u0628\u064a\u0631\u0629. \u0645\u062b\u0627\u0644 \u0639\u0644\u0649 \u062c\u0645\u0644\u0629 \u062a\u0633\u062a\u062e\u062f\u0645 \u0643\u0644\u0645\u0629 \u0641\u0627\u0631\u062f\u0627\u062f\u0644 \u0647\u064a:", "example_title": "Imaginary word", "group": "Arabic"}, {"text": "Um \"whatpu\" \u00e9 um pequeno animal peludo nativo da Tanz\u00e2nia. Um exemplo de uma frase que usa a palavra whatpu \u00e9: Est\u00e1vamos a viajar por \u00c1frica e vimos uns whatpus muito queridos. Fazer um \"farduddle\" significa saltar para cima e para baixo muito r\u00e1pido. Um exemplo de uma frase que usa a palavra farduddle \u00e9:", "example": "Imaginary word", "group": "Portuguese"}, {"text": "Pour d\u00e9guster un ortolan, il faut tout d'abord", "example_title": "Recipe", "group": "French"}, {"text": "34+10=44 \n54+20=", "example_title": "Addition", "group": "Math"}, {"text": "This tool converts irregular verbs to past tense.\nArise - Arose\nBecome - Became\nForget - Forgot\nFreeze -", "example_title": "Irregular verbs", "group": "English"}, {"text": "Please unscramble the letters into a word, and write that word:\nr e!c.i p r o.c a/l = reciprocal\nd.o m i!n a n.t =", "example_title": "Word unscrambling", "group": "English"}, {"text": "Estos ejemplos quitan vocales de las palabras\nEjemplos:\nhola - hl\nmanzana - mnzn\npapas - pps\nalacran - lcrn\npapa -", "example_title": "Vowel removal", "group": "Spanish"}, {"text": "Traduce espa\u00f1ol de Espa\u00f1a a espa\u00f1ol de Argentina\nEl coche es rojo - el auto es rojo\nEl ordenador es nuevo - la computadora es nueva\nel boligrafo es negro - lapicera es negra\nla nevera", "example_title": "Spanish to Argentinian Spanish", "group": "Spanish"}, {"text": "To say \"I love you\" in Hindi, you would say", "example_title": "Translation to Hindi", "group": "English"}, {"text": "To say \"I love you\" in Hindi, you would say", "example_title": "Translation from English", "group": "Hindi"}, {"text": "Poor English: She no went to the market. Corrected English:", "example_title": "Grammar exercise 1", "group": "English"}, {"text": "\u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0627\u0644\u0639\u062f\u062f \u0627\u0644\u0639\u0627\u0645\u0644\u064a \u0641\u064a \u0644\u063a\u0629 \u0628\u0627\u064a\u062b\u0648\u0646:", "example_title": "Code generation", "group": "Arabic"}, {"text": "Regexp. Here is a regular expression to match a word starting with a number and then having only vowels:", "example_title": "Regular expressions", "group": "English"}, {"text": "Do a hello world in different languages:\nPython: print(\"hello world\")\nR:", "example_title": "Code generation", "group": "English"}, {"text": "Which is the correct preposition? I'm born X July. X is the preposition in\nHe sat X a chair. X is the preposition on\nShe drove X the bridge. X is the preposition", "example_title": "Grammar exercise 2", "group": "English"}, {"text": "Traduction en fran\u00e7ais: Dans cet essai je vais m'interroger sur la conscience des mod\u00e8les d'intelligence artificielle r\u00e9cents comme les mod\u00e8les de langue. Pour commencer, je m'int\u00e9resserai \u00e0 la notion de conscience et \u00e0 ce qui la caract\u00e9rise. Ensuite, j'aborderai la question de l'intelligence et de son lien avec le langage. Enfin, dans une derni\u00e8re partie je me pencherai sur le cas de l'IA et sur sa conscience.\nTraduction en espagnol:", "example_title": "Translation to Spanish", "group": "French"}, {"text": "Traducci\u00f3n al franc\u00e9s: Dans cet essai je vais m'interroger sur la conscience des mod\u00e8les d'intelligence artificielle r\u00e9cents comme les mod\u00e8les de langue. Pour commencer, je m'int\u00e9resserai \u00e0 la notion de conscience et \u00e0 ce qui la caract\u00e9rise. Ensuite, j'aborderai la question de l'intelligence et de son lien avec le langage. Enfin, dans une derni\u00e8re partie je me pencherai sur le cas de l'IA et sur sa conscience.\nTraducci\u00f3n al espa\u00f1ol:", "example_title": "Translation from French", "group": "Spanish"}, {"text": "\u0630\u0627\u062a \u0645\u0631\u0629 \u060c \u0639\u0627\u0634 \u0634\u0628\u0644 \u0627\u0644\u062f\u0628 \u0641\u064a \u0627\u0644\u063a\u0627\u0628\u0629", "example_title": "Fairy tale", "group": "Arabic"}, {"text": "\u090f\u0915 \u092c\u093e\u0930 \u0915\u0940 \u092c\u093e\u0924 \u0939\u0948, \u091c\u0902\u0917\u0932 \u092e\u0947\u0902 \u090f\u0915 \u092d\u093e\u0932\u0942 \u0915\u093e \u0936\u093e\u0935\u0915 \u0930\u0939\u0924\u093e \u0925\u093e", "example_title": "Fairy tale", "group": "Hindi"}, {"text": "Il \u00e9tait une fois une licorne qui vivait", "example_title": "Fairy tale", "group": "French"}, {"text": "Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?\nA: Let's think step by step.", "example_title": "Mathematical reasoning", "group": "English"}], "co2_eq_emissions": {"emissions": 24700000, "source": "Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Model. https://arxiv.org/abs/2211.02001", "training_type": "pre-training", "geographical_location": "Orsay, France", "hardware_used": "384 A100 80GB GPUs"}, "model-index": [{"name": "bloom", "results": [{"task": {"type": "text-generation"}, "dataset": {"name": "humaneval", "type": "openai_humaneval"}, "metrics": [{"type": "pass@1", "value": 0.15542682926829265, "name": "pass@1", "verified": false}, {"type": "pass@10", "value": 0.3278356276947017, "name": "pass@10", "verified": false}, {"type": "pass@100", "value": 0.5719815685597749, "name": "pass@100", "verified": false}]}]}]}
transformers pytorch tensorboard safetensors bloom text-generation ak ar as bm bn ca code en es eu fon fr gu hi id ig ki kn lg ln ml mr ne nso ny or pa pt rn rw sn st sw ta te tn ts tum tw ur vi wo xh yo zh zu arxiv:2211.05100 arxiv:1909.08053 arxiv:2110.02861 arxiv:2108.12409 doi:10.57967/hf/0003 license:bigscience-bloom-rail-1.0 model-index co2_eq_emissions autotrain_compatible endpoints_compatible has_space text-generation-inference region:us
TAGS
#transformers #pytorch #tensorboard #safetensors #bloom #text-generation #ak #ar #as #bm #bn #ca #code #en #es #eu #fon #fr #gu #hi #id #ig #ki #kn #lg #ln #ml #mr #ne #nso #ny #or #pa #pt #rn #rw #sn #st #sw #ta #te #tn #ts #tum #tw #ur #vi #wo #xh #yo #zh #zu #arxiv-2211.05100 #arxiv-1909.08053 #arxiv-2110.02861 #arxiv-2108.12409 #doi-10.57967/hf/0003 #license-bigscience-bloom-rail-1.0 #model-index #co2_eq_emissions #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 

<img src="URL alt="BigScience Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


BigScience Large Open-science Open-access Multilingual Language Model  

Version 1.3 / 6 July 2022


Current Checkpoint: Training Iteration 95000


Link to paper: here


Total seen tokens: 366B




---


Model Details
=============


BLOOM is an autoregressive Large Language Model (LLM), trained to continue text from a prompt on vast amounts of text data using industrial-scale computational resources. As such, it is able to output coherent text in 46 languages and 13 programming languages that is hardly distinguishable from text written by humans. BLOOM can also be instructed to perform text tasks it hasn't been explicitly trained for, by casting them as text generation tasks.


Basics
------


*This section provides information about the model type, version, license, funders, release date, developers, and contact information.*
*It is useful for anyone who wants to reference the model.*



Click to expand
Developed by: BigScience (website)


*All collaborators are either volunteers or have an agreement with their employer. (Further breakdown of participants forthcoming.)*


Model Type: Transformer-based Language Model


Checkpoints format: 'transformers' (Megatron-DeepSpeed format available here)


Version: 1.0.0


Languages: Multiple; see training data


License: RAIL License v1.0 (link / article and FAQ)


Release Date Estimate: Monday, 11.July.2022


Send Questions to: bigscience-contact@URL


Cite as: BigScience, *BigScience Language Open-science Open-access Multilingual (BLOOM) Language Model*. International, May 2021-May 2022


Funded by:


* The French government.
* Hugging Face (website).
* Organizations of contributors. *(Further breakdown of organizations forthcoming.)*



Technical Specifications
------------------------


*This section includes details about the model objective and architecture, and the compute infrastructure.*
*It is useful for people interested in model development.*



Click to expand
Please see the BLOOM training README for full details on replicating training.


### Model Architecture and Objective


* Modified from Megatron-LM GPT2 (see paper, BLOOM Megatron code):
* Decoder-only architecture
* Layer normalization applied to word embeddings layer ('StableEmbedding'; see code, paper)
* ALiBI positional encodings (see paper), with GeLU activation functions
* 176,247,271,424 parameters:


	+ 3,596,615,680 embedding parameters
	+ 70 layers, 112 attention heads
	+ Hidden layers are 14336-dimensional
	+ Sequence length of 2048 tokens used (see BLOOM tokenizer, tokenizer description)


Objective Function: Cross Entropy with mean reduction (see API documentation).


### Compute infrastructure


Jean Zay Public Supercomputer, provided by the French government (see announcement).


#### Hardware


* 384 A100 80GB GPUs (48 nodes)
* Additional 32 A100 80GB GPUs (4 nodes) in reserve
* 8 GPUs per node Using NVLink 4 inter-gpu connects, 4 OmniPath links
* CPU: AMD
* CPU memory: 512GB per node
* GPU memory: 640GB per node
* Inter-node connect: Omni-Path Architecture (OPA)
* NCCL-communications network: a fully dedicated subnet
* Disc IO network: shared network with other types of nodes


#### Software


* Megatron-DeepSpeed (Github link)
* DeepSpeed (Github link)
* PyTorch (pytorch-1.11 w/ CUDA-11.5; see Github link)
* apex (Github link)





---


Training
========


*This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
*It is useful for people who want to learn more about the model inputs and training footprint.*



Click to expand
Training Data
-------------


*This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*


Details for each dataset are provided in individual Data Cards, and the sizes of each of their contributions to the aggregated training data are presented in an Interactive Corpus Map.


Training data includes:


* 46 natural languages
* 13 programming languages
* In 1.6TB of pre-processed text, converted into 350B unique tokens (see the tokenizer section for more.)


### Languages


The pie chart shows the distribution of languages in training data.


!pie chart showing the distribution of languages in training data


The following tables shows the further distribution of Niger-Congo & Indic languages and programming languages in the training data.


Distribution of Niger Congo and Indic languages.



Distribution of programming languages.


Extension: java, Language: Java, Number of files: 5,407,724
Extension: php, Language: PHP, Number of files: 4,942,186
Extension: cpp, Language: C++, Number of files: 2,503,930
Extension: py, Language: Python, Number of files: 2,435,072
Extension: js, Language: JavaScript, Number of files: 1,905,518
Extension: cs, Language: C#, Number of files: 1,577,347
Extension: rb, Language: Ruby, Number of files: 6,78,413
Extension: cc, Language: C++, Number of files: 443,054
Extension: hpp, Language: C++, Number of files: 391,048
Extension: lua, Language: Lua, Number of files: 352,317
Extension: go, Language: GO, Number of files: 227,763
Extension: ts, Language: TypeScript, Number of files: 195,254
Extension: C, Language: C, Number of files: 134,537
Extension: scala, Language: Scala, Number of files: 92,052
Extension: hh, Language: C++, Number of files: 67,161
Extension: H, Language: C++, Number of files: 55,899
Extension: tsx, Language: TypeScript, Number of files: 33,107
Extension: rs, Language: Rust, Number of files: 29,693
Extension: phpt, Language: PHP, Number of files: 9,702
Extension: c++, Language: C++, Number of files: 1,342
Extension: h++, Language: C++, Number of files: 791
Extension: php3, Language: PHP, Number of files: 540
Extension: phps, Language: PHP, Number of files: 270
Extension: php5, Language: PHP, Number of files: 166
Extension: php4, Language: PHP, Number of files: 29


### Preprocessing


Tokenization: The BLOOM tokenizer (link), a learned subword tokenizer trained using:


* A byte-level Byte Pair Encoding (BPE) algorithm
* A simple pre-tokenization rule, no normalization
* A vocabulary size of 250,680


It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.


Speeds, Sizes, Times
--------------------


Training logs: Tensorboard link


* Dates:


	+ Started 11th March, 2022 11:42am PST
	+ Estimated end: 5th July, 2022
* Checkpoint size:


	+ Bf16 weights: 329GB
	+ Full checkpoint with optimizer states: 2.3TB
* Training throughput: About 150 TFLOP per GPU per second
* Number of epochs: 1
* Estimated cost of training: Equivalent of $2-5M in cloud computing (including preliminary experiments)
* Server training location: Île-de-France, France


Environmental Impact
--------------------


The training supercomputer, Jean Zay (website), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.


Estimated carbon emissions: *(Forthcoming.)*


Estimated electricity usage: *(Forthcoming.)*





---


Uses
====


*This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
*It is useful for anyone considering using the model or who is affected by the model.*



Click to expand
How to use
----------


This model can be easily used and deployed using HuggingFace's ecosystem. This needs 'transformers' and 'accelerate' installed. The model can be downloaded as follows:


<img src="URL width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


Intended Use
------------


This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive.


### Direct Use


* Text generation
* Exploring characteristics of language generated by a language model


	+ Examples: Cloze tests, counterfactuals, generations with reframings


### Downstream Use


* Tasks that leverage language models include: Information Extraction, Question Answering, Summarization


### Misuse and Out-of-scope Use


*This section addresses what users ought not do with the model.*


See the BLOOM License, Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases.


#### Out-of-scope Uses


Using the model in high-stakes settings is out of scope for this model. The model is not designed for critical decisions nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.


Out-of-scope Uses Include:


* Usage in biomedical domains, political and legal domains, or finance domains
* Usage for evaluating or scoring individuals, such as for employment, education, or credit
* Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct


#### Misuse


Intentionally using the model for harm, violating human rights, or other kinds of malicious activities, is a misuse of this model. This includes:


* Spam generation
* Disinformation and influence operations
* Disparagement and defamation
* Harassment and abuse
* Deception
* Unconsented impersonation and imitation
* Unconsented surveillance
* Generating content without attribution to the model, as specified in the RAIL License, Use Restrictions


Intended Users
--------------


### Direct Users


* General Public
* Researchers
* Students
* Educators
* Engineers/developers
* Non-commercial entities
* Community advocates, including human and civil rights groups


### Indirect Users


* Users of derivatives created by Direct Users, such as those using software with an intended use
* Users of Derivatives of the Model, as described in the License


### Others Affected (Parties Prenantes)


* People and groups referred to by the LLM
* People and groups exposed to outputs of, or decisions based on, the LLM
* People and groups whose original work is included in the LLM





---


Risks and Limitations
=====================


*This section identifies foreseeable harms and misunderstandings.*



Click to expand
Model may:


* Overrepresent some viewpoints and underrepresent others
* Contain stereotypes
* Contain personal information
* Generate:


	+ Hateful, abusive, or violent language
	+ Discriminatory or prejudicial language
	+ Content that may not be appropriate for all settings, including sexual content
* Make errors, including producing incorrect information as if it were factual
* Generate irrelevant or repetitive outputs
* Induce users into attributing human traits to it, such as sentience or consciousness





---


Evaluation
==========


*This section describes the evaluation protocols and provides the results.*



Click to expand
Metrics
-------


*This section describes the different ways performance is calculated and why.*


Includes:



And multiple different metrics for specific tasks. *(More evaluation metrics forthcoming upon completion of evaluation protocol.)*


Factors
-------


*This section lists some different aspects of BLOOM models. Its focus is on aspects that are likely to give rise to high variance in model behavior.*


* Language, such as English or Yoruba
* Domain, such as newswire or stories
* Demographic characteristics, such as gender or nationality


Results
-------


*Results are based on the Factors and Metrics.*


Zero-shot evaluations:


**WARNING:** This section used to contain much more results, however they were not correct and we released without the approval of the evaluation working group. We are currently in the process of fixing the evaluations.


See this repository for JSON files: URL



Train-time Evaluation:


Final checkpoint after 95K steps:


* Training Loss: 1.939
* Validation Loss: 2.061
* Perplexity: 7.045


For more see: URL





---


Recommendations
===============


*This section provides information on warnings and potential mitigations.*



Click to expand
* Indirect users should be made aware when the content they're working with is created by the LLM.
* Users should be aware of Risks and Limitations, and include an appropriate age disclaimer or blocking interface as necessary.
* Models trained or finetuned downstream of BLOOM LM should include an updated Model Card.
* Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.





---


Glossary and Calculations
=========================


*This section defines common terms and how metrics are calculated.*



Click to expand
* Loss: A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss.
* Perplexity: This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy.
* High-stakes settings: Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed Artificial Intelligence (AI) Act.
* Critical decisions: Such as those defined in the United States' proposed Algorithmic Accountability Act.
* Human rights: Includes those rights defined in the Universal Declaration of Human Rights.
* Personal Data and Personal Information: Personal data and information is defined in multiple data protection regulations, such as "personal data" in the European Union's General Data Protection Regulation; and "personal information" in the Republic of South Africa's Protection of Personal Information Act, The People's Republic of China's Personal information protection law.
* Sensitive characteristics: This includes specifically protected categories in human rights (see UHDR, Article 2) and personal information regulation (see GDPR, Article 9; Protection of Personal Information Act, Chapter 1)
* Deception: Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.





---


More Information
================


*This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*



Click to expand
Intermediate checkpoints
------------------------


For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 5000 steps. Please follow this link to get these checkpoints.


Dataset Creation
----------------


Blog post detailing the design choices during the dataset creation: URL


Technical Specifications
------------------------


Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: URL


More details on the architecture/optimizer: URL


Blog post on the hardware/engineering side: URL


Details on the distributed setup used for the training: URL


Tensorboard updated during the training: URL


Lessons
-------


Insights on how to approach training, negative results: URL


Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): URL


Initial Results
---------------


Initial prompting experiments using interim checkpoints: URL



Original checkpoints
--------------------


The checkpoints in this repo correspond to the HuggingFace Transformers format. If you want to use our fork of Megatron-DeepSpeed that the model was trained with, you'd want to use this repo instead.


Many intermediate checkpoints are available at URL




---


Model Card Authors
==================


*Ordered roughly chronologically and by amount of time spent on creating this model card.*


Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff



### Model Architecture and Objective


* Modified from Megatron-LM GPT2 (see paper, BLOOM Megatron code):
* Decoder-only architecture
* Layer normalization applied to word embeddings layer ('StableEmbedding'; see code, paper)
* ALiBI positional encodings (see paper), with GeLU activation functions
* 176,247,271,424 parameters:


	+ 3,596,615,680 embedding parameters
	+ 70 layers, 112 attention heads
	+ Hidden layers are 14336-dimensional
	+ Sequence length of 2048 tokens used (see BLOOM tokenizer, tokenizer description)


Objective Function: Cross Entropy with mean reduction (see API documentation). ### Compute infrastructure


Jean Zay Public Supercomputer, provided by the French government (see announcement). #### Hardware


* 384 A100 80GB GPUs (48 nodes)
* Additional 32 A100 80GB GPUs (4 nodes) in reserve
* 8 GPUs per node Using NVLink 4 inter-gpu connects, 4 OmniPath links
* CPU: AMD
* CPU memory: 512GB per node
* GPU memory: 640GB per node
* Inter-node connect: Omni-Path Architecture (OPA)
* NCCL-communications network: a fully dedicated subnet
* Disc IO network: shared network with other types of nodes #### Software


* Megatron-DeepSpeed (Github link)
* DeepSpeed (Github link)
* PyTorch (pytorch-1.11 w/ CUDA-11.5; see Github link)
* apex (Github link)





---


Training
========


*This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
*It is useful for people who want to learn more about the model inputs and training footprint.*



Click to expand
Training Data
-------------


*This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*


Details for each dataset are provided in individual Data Cards, and the sizes of each of their contributions to the aggregated training data are presented in an Interactive Corpus Map.


Training data includes:


* 46 natural languages
* 13 programming languages
* In 1.6TB of pre-processed text, converted into 350B unique tokens (see the tokenizer section for more.) ### Languages


The pie chart shows the distribution of languages in training data.


!pie chart showing the distribution of languages in training data


The following tables shows the further distribution of Niger-Congo & Indic languages and programming languages in the training data.


Distribution of Niger Congo and Indic languages.



Distribution of programming languages.


Extension: java, Language: Java, Number of files: 5,407,724
Extension: php, Language: PHP, Number of files: 4,942,186
Extension: cpp, Language: C++, Number of files: 2,503,930
Extension: py, Language: Python, Number of files: 2,435,072
Extension: js, Language: JavaScript, Number of files: 1,905,518
Extension: cs, Language: C#, Number of files: 1,577,347
Extension: rb, Language: Ruby, Number of files: 6,78,413
Extension: cc, Language: C++, Number of files: 443,054
Extension: hpp, Language: C++, Number of files: 391,048
Extension: lua, Language: Lua, Number of files: 352,317
Extension: go, Language: GO, Number of files: 227,763
Extension: ts, Language: TypeScript, Number of files: 195,254
Extension: C, Language: C, Number of files: 134,537
Extension: scala, Language: Scala, Number of files: 92,052
Extension: hh, Language: C++, Number of files: 67,161
Extension: H, Language: C++, Number of files: 55,899
Extension: tsx, Language: TypeScript, Number of files: 33,107
Extension: rs, Language: Rust, Number of files: 29,693
Extension: phpt, Language: PHP, Number of files: 9,702
Extension: c++, Language: C++, Number of files: 1,342
Extension: h++, Language: C++, Number of files: 791
Extension: php3, Language: PHP, Number of files: 540
Extension: phps, Language: PHP, Number of files: 270
Extension: php5, Language: PHP, Number of files: 166
Extension: php4, Language: PHP, Number of files: 29 ### Preprocessing


Tokenization: The BLOOM tokenizer (link), a learned subword tokenizer trained using:


* A byte-level Byte Pair Encoding (BPE) algorithm
* A simple pre-tokenization rule, no normalization
* A vocabulary size of 250,680


It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.


Speeds, Sizes, Times
--------------------


Training logs: Tensorboard link


* Dates:


	+ Started 11th March, 2022 11:42am PST
	+ Estimated end: 5th July, 2022
* Checkpoint size:


	+ Bf16 weights: 329GB
	+ Full checkpoint with optimizer states: 2.3TB
* Training throughput: About 150 TFLOP per GPU per second
* Number of epochs: 1
* Estimated cost of training: Equivalent of $2-5M in cloud computing (including preliminary experiments)
* Server training location: Île-de-France, France


Environmental Impact
--------------------


The training supercomputer, Jean Zay (website), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.


Estimated carbon emissions: *(Forthcoming.)*


Estimated electricity usage: *(Forthcoming.)*





---


Uses
====


*This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
*It is useful for anyone considering using the model or who is affected by the model.*



Click to expand
How to use
----------


This model can be easily used and deployed using HuggingFace's ecosystem. This needs 'transformers' and 'accelerate' installed. The model can be downloaded as follows:


<img src="URL width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


Intended Use
------------


This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive. ### Direct Use


* Text generation
* Exploring characteristics of language generated by a language model


	+ Examples: Cloze tests, counterfactuals, generations with reframings ### Downstream Use


* Tasks that leverage language models include: Information Extraction, Question Answering, Summarization ### Misuse and Out-of-scope Use


*This section addresses what users ought not do with the model.*


See the BLOOM License, Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases. #### Out-of-scope Uses


Using the model in high-stakes settings is out of scope for this model. The model is not designed for critical decisions nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.


Out-of-scope Uses Include:


* Usage in biomedical domains, political and legal domains, or finance domains
* Usage for evaluating or scoring individuals, such as for employment, education, or credit
* Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct #### Misuse


Intentionally using the model for harm, violating human rights, or other kinds of malicious activities, is a misuse of this model. This includes:


* Spam generation
* Disinformation and influence operations
* Disparagement and defamation
* Harassment and abuse
* Deception
* Unconsented impersonation and imitation
* Unconsented surveillance
* Generating content without attribution to the model, as specified in the RAIL License, Use Restrictions


Intended Users
-------------- ### Direct Users


* General Public
* Researchers
* Students
* Educators
* Engineers/developers
* Non-commercial entities
* Community advocates, including human and civil rights groups ### Indirect Users


* Users of derivatives created by Direct Users, such as those using software with an intended use
* Users of Derivatives of the Model, as described in the License ### Others Affected (Parties Prenantes)


* People and groups referred to by the LLM
* People and groups exposed to outputs of, or decisions based on, the LLM
* People and groups whose original work is included in the LLM





---


Risks and Limitations
=====================


*This section identifies foreseeable harms and misunderstandings.*



Click to expand
Model may:


* Overrepresent some viewpoints and underrepresent others
* Contain stereotypes
* Contain personal information
* Generate:


	+ Hateful, abusive, or violent language
	+ Discriminatory or prejudicial language
	+ Content that may not be appropriate for all settings, including sexual content
* Make errors, including producing incorrect information as if it were factual
* Generate irrelevant or repetitive outputs
* Induce users into attributing human traits to it, such as sentience or consciousness





---


Evaluation
==========


*This section describes the evaluation protocols and provides the results.*



Click to expand
Metrics
-------


*This section describes the different ways performance is calculated and why.*


Includes:



And multiple different metrics for specific tasks. *(More evaluation metrics forthcoming upon completion of evaluation protocol.)*


Factors
-------


*This section lists some different aspects of BLOOM models. Its focus is on aspects that are likely to give rise to high variance in model behavior.*


* Language, such as English or Yoruba
* Domain, such as newswire or stories
* Demographic characteristics, such as gender or nationality


Results
-------


*Results are based on the Factors and Metrics.*


Zero-shot evaluations:


**WARNING:** This section used to contain much more results, however they were not correct and we released without the approval of the evaluation working group. We are currently in the process of fixing the evaluations.


See this repository for JSON files: URL



Train-time Evaluation:


Final checkpoint after 95K steps:


* Training Loss: 1.939
* Validation Loss: 2.061
* Perplexity: 7.045


For more see: URL





---


Recommendations
===============


*This section provides information on warnings and potential mitigations.*



Click to expand
* Indirect users should be made aware when the content they're working with is created by the LLM.
* Users should be aware of Risks and Limitations, and include an appropriate age disclaimer or blocking interface as necessary.
* Models trained or finetuned downstream of BLOOM LM should include an updated Model Card.
* Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.





---


Glossary and Calculations
=========================


*This section defines common terms and how metrics are calculated.*



Click to expand
* Loss: A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss.
* Perplexity: This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy.
* High-stakes settings: Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed Artificial Intelligence (AI) Act.
* Critical decisions: Such as those defined in the United States' proposed Algorithmic Accountability Act.
* Human rights: Includes those rights defined in the Universal Declaration of Human Rights.
* Personal Data and Personal Information: Personal data and information is defined in multiple data protection regulations, such as "personal data" in the European Union's General Data Protection Regulation; and "personal information" in the Republic of South Africa's Protection of Personal Information Act, The People's Republic of China's Personal information protection law.
* Sensitive characteristics: This includes specifically protected categories in human rights (see UHDR, Article 2) and personal information regulation (see GDPR, Article 9; Protection of Personal Information Act, Chapter 1)
* Deception: Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.





---


More Information
================


*This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*



Click to expand
Intermediate checkpoints
------------------------


For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 5000 steps. Please follow this link to get these checkpoints.


Dataset Creation
----------------


Blog post detailing the design choices during the dataset creation: URL


Technical Specifications
------------------------


Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: URL


More details on the architecture/optimizer: URL


Blog post on the hardware/engineering side: URL


Details on the distributed setup used for the training: URL


Tensorboard updated during the training: URL


Lessons
-------


Insights on how to approach training, negative results: URL


Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): URL


Initial Results
---------------


Initial prompting experiments using interim checkpoints: URL



Original checkpoints
--------------------


The checkpoints in this repo correspond to the HuggingFace Transformers format. If you want to use our fork of Megatron-DeepSpeed that the model was trained with, you'd want to use this repo instead.


Many intermediate checkpoints are available at URL




---


Model Card Authors
==================


*Ordered roughly chronologically and by amount of time spent on creating this model card.*


Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff
TAGS
#transformers #pytorch #tensorboard #safetensors #bloom #text-generation #ak #ar #as #bm #bn #ca #code #en #es #eu #fon #fr #gu #hi #id #ig #ki #kn #lg #ln #ml #mr #ne #nso #ny #or #pa #pt #rn #rw #sn #st #sw #ta #te #tn #ts #tum #tw #ur #vi #wo #xh #yo #zh #zu #arxiv-2211.05100 #arxiv-1909.08053 #arxiv-2110.02861 #arxiv-2108.12409 #doi-10.57967/hf/0003 #license-bigscience-bloom-rail-1.0 #model-index #co2_eq_emissions #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
 ### Model Architecture and Objective


* Modified from Megatron-LM GPT2 (see paper, BLOOM Megatron code):
* Decoder-only architecture
* Layer normalization applied to word embeddings layer ('StableEmbedding'; see code, paper)
* ALiBI positional encodings (see paper), with GeLU activation functions
* 176,247,271,424 parameters:


	+ 3,596,615,680 embedding parameters
	+ 70 layers, 112 attention heads
	+ Hidden layers are 14336-dimensional
	+ Sequence length of 2048 tokens used (see BLOOM tokenizer, tokenizer description)


Objective Function: Cross Entropy with mean reduction (see API documentation). ### Compute infrastructure


Jean Zay Public Supercomputer, provided by the French government (see announcement). #### Hardware


* 384 A100 80GB GPUs (48 nodes)
* Additional 32 A100 80GB GPUs (4 nodes) in reserve
* 8 GPUs per node Using NVLink 4 inter-gpu connects, 4 OmniPath links
* CPU: AMD
* CPU memory: 512GB per node
* GPU memory: 640GB per node
* Inter-node connect: Omni-Path Architecture (OPA)
* NCCL-communications network: a fully dedicated subnet
* Disc IO network: shared network with other types of nodes #### Software


* Megatron-DeepSpeed (Github link)
* DeepSpeed (Github link)
* PyTorch (pytorch-1.11 w/ CUDA-11.5; see Github link)
* apex (Github link)





---


Training
========


*This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
*It is useful for people who want to learn more about the model inputs and training footprint.*



Click to expand
Training Data
-------------


*This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*


Details for each dataset are provided in individual Data Cards, and the sizes of each of their contributions to the aggregated training data are presented in an Interactive Corpus Map.


Training data includes:


* 46 natural languages
* 13 programming languages
* In 1.6TB of pre-processed text, converted into 350B unique tokens (see the tokenizer section for more.) ### Languages


The pie chart shows the distribution of languages in training data.


!pie chart showing the distribution of languages in training data


The following tables shows the further distribution of Niger-Congo & Indic languages and programming languages in the training data.


Distribution of Niger Congo and Indic languages.



Distribution of programming languages.


Extension: java, Language: Java, Number of files: 5,407,724
Extension: php, Language: PHP, Number of files: 4,942,186
Extension: cpp, Language: C++, Number of files: 2,503,930
Extension: py, Language: Python, Number of files: 2,435,072
Extension: js, Language: JavaScript, Number of files: 1,905,518
Extension: cs, Language: C#, Number of files: 1,577,347
Extension: rb, Language: Ruby, Number of files: 6,78,413
Extension: cc, Language: C++, Number of files: 443,054
Extension: hpp, Language: C++, Number of files: 391,048
Extension: lua, Language: Lua, Number of files: 352,317
Extension: go, Language: GO, Number of files: 227,763
Extension: ts, Language: TypeScript, Number of files: 195,254
Extension: C, Language: C, Number of files: 134,537
Extension: scala, Language: Scala, Number of files: 92,052
Extension: hh, Language: C++, Number of files: 67,161
Extension: H, Language: C++, Number of files: 55,899
Extension: tsx, Language: TypeScript, Number of files: 33,107
Extension: rs, Language: Rust, Number of files: 29,693
Extension: phpt, Language: PHP, Number of files: 9,702
Extension: c++, Language: C++, Number of files: 1,342
Extension: h++, Language: C++, Number of files: 791
Extension: php3, Language: PHP, Number of files: 540
Extension: phps, Language: PHP, Number of files: 270
Extension: php5, Language: PHP, Number of files: 166
Extension: php4, Language: PHP, Number of files: 29 ### Preprocessing


Tokenization: The BLOOM tokenizer (link), a learned subword tokenizer trained using:


* A byte-level Byte Pair Encoding (BPE) algorithm
* A simple pre-tokenization rule, no normalization
* A vocabulary size of 250,680


It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.


Speeds, Sizes, Times
--------------------


Training logs: Tensorboard link


* Dates:


	+ Started 11th March, 2022 11:42am PST
	+ Estimated end: 5th July, 2022
* Checkpoint size:


	+ Bf16 weights: 329GB
	+ Full checkpoint with optimizer states: 2.3TB
* Training throughput: About 150 TFLOP per GPU per second
* Number of epochs: 1
* Estimated cost of training: Equivalent of $2-5M in cloud computing (including preliminary experiments)
* Server training location: Île-de-France, France


Environmental Impact
--------------------


The training supercomputer, Jean Zay (website), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.


Estimated carbon emissions: *(Forthcoming.)*


Estimated electricity usage: *(Forthcoming.)*





---


Uses
====


*This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
*It is useful for anyone considering using the model or who is affected by the model.*



Click to expand
How to use
----------


This model can be easily used and deployed using HuggingFace's ecosystem. This needs 'transformers' and 'accelerate' installed. The model can be downloaded as follows:


<img src="URL width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


Intended Use
------------


This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive. ### Direct Use


* Text generation
* Exploring characteristics of language generated by a language model


	+ Examples: Cloze tests, counterfactuals, generations with reframings ### Downstream Use


* Tasks that leverage language models include: Information Extraction, Question Answering, Summarization ### Misuse and Out-of-scope Use


*This section addresses what users ought not do with the model.*


See the BLOOM License, Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases. #### Out-of-scope Uses


Using the model in high-stakes settings is out of scope for this model. The model is not designed for critical decisions nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.


Out-of-scope Uses Include:


* Usage in biomedical domains, political and legal domains, or finance domains
* Usage for evaluating or scoring individuals, such as for employment, education, or credit
* Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct #### Misuse


Intentionally using the model for harm, violating human rights, or other kinds of malicious activities, is a misuse of this model. This includes:


* Spam generation
* Disinformation and influence operations
* Disparagement and defamation
* Harassment and abuse
* Deception
* Unconsented impersonation and imitation
* Unconsented surveillance
* Generating content without attribution to the model, as specified in the RAIL License, Use Restrictions


Intended Users
-------------- ### Direct Users


* General Public
* Researchers
* Students
* Educators
* Engineers/developers
* Non-commercial entities
* Community advocates, including human and civil rights groups ### Indirect Users


* Users of derivatives created by Direct Users, such as those using software with an intended use
* Users of Derivatives of the Model, as described in the License ### Others Affected (Parties Prenantes)


* People and groups referred to by the LLM
* People and groups exposed to outputs of, or decisions based on, the LLM
* People and groups whose original work is included in the LLM





---


Risks and Limitations
=====================


*This section identifies foreseeable harms and misunderstandings.*



Click to expand
Model may:


* Overrepresent some viewpoints and underrepresent others
* Contain stereotypes
* Contain personal information
* Generate:


	+ Hateful, abusive, or violent language
	+ Discriminatory or prejudicial language
	+ Content that may not be appropriate for all settings, including sexual content
* Make errors, including producing incorrect information as if it were factual
* Generate irrelevant or repetitive outputs
* Induce users into attributing human traits to it, such as sentience or consciousness





---


Evaluation
==========


*This section describes the evaluation protocols and provides the results.*



Click to expand
Metrics
-------


*This section describes the different ways performance is calculated and why.*


Includes:



And multiple different metrics for specific tasks. *(More evaluation metrics forthcoming upon completion of evaluation protocol.)*


Factors
-------


*This section lists some different aspects of BLOOM models. Its focus is on aspects that are likely to give rise to high variance in model behavior.*


* Language, such as English or Yoruba
* Domain, such as newswire or stories
* Demographic characteristics, such as gender or nationality


Results
-------


*Results are based on the Factors and Metrics.*


Zero-shot evaluations:


**WARNING:** This section used to contain much more results, however they were not correct and we released without the approval of the evaluation working group. We are currently in the process of fixing the evaluations.


See this repository for JSON files: URL



Train-time Evaluation:


Final checkpoint after 95K steps:


* Training Loss: 1.939
* Validation Loss: 2.061
* Perplexity: 7.045


For more see: URL





---


Recommendations
===============


*This section provides information on warnings and potential mitigations.*



Click to expand
* Indirect users should be made aware when the content they're working with is created by the LLM.
* Users should be aware of Risks and Limitations, and include an appropriate age disclaimer or blocking interface as necessary.
* Models trained or finetuned downstream of BLOOM LM should include an updated Model Card.
* Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.





---


Glossary and Calculations
=========================


*This section defines common terms and how metrics are calculated.*



Click to expand
* Loss: A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss.
* Perplexity: This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy.
* High-stakes settings: Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed Artificial Intelligence (AI) Act.
* Critical decisions: Such as those defined in the United States' proposed Algorithmic Accountability Act.
* Human rights: Includes those rights defined in the Universal Declaration of Human Rights.
* Personal Data and Personal Information: Personal data and information is defined in multiple data protection regulations, such as "personal data" in the European Union's General Data Protection Regulation; and "personal information" in the Republic of South Africa's Protection of Personal Information Act, The People's Republic of China's Personal information protection law.
* Sensitive characteristics: This includes specifically protected categories in human rights (see UHDR, Article 2) and personal information regulation (see GDPR, Article 9; Protection of Personal Information Act, Chapter 1)
* Deception: Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.





---


More Information
================


*This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*



Click to expand
Intermediate checkpoints
------------------------


For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 5000 steps. Please follow this link to get these checkpoints.


Dataset Creation
----------------


Blog post detailing the design choices during the dataset creation: URL


Technical Specifications
------------------------


Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: URL


More details on the architecture/optimizer: URL


Blog post on the hardware/engineering side: URL


Details on the distributed setup used for the training: URL


Tensorboard updated during the training: URL


Lessons
-------


Insights on how to approach training, negative results: URL


Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): URL


Initial Results
---------------


Initial prompting experiments using interim checkpoints: URL



Original checkpoints
--------------------


The checkpoints in this repo correspond to the HuggingFace Transformers format. If you want to use our fork of Megatron-DeepSpeed that the model was trained with, you'd want to use this repo instead.


Many intermediate checkpoints are available at URL




---


Model Card Authors
==================


*Ordered roughly chronologically and by amount of time spent on creating this model card.*


Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff
TAGS
#transformers #pytorch #tensorboard #safetensors #bloom #text-generation #ak #ar #as #bm #bn #ca #code #en #es #eu #fon #fr #gu #hi #id #ig #ki #kn #lg #ln #ml #mr #ne #nso #ny #or #pa #pt #rn #rw #sn #st #sw #ta #te #tn #ts #tum #tw #ur #vi #wo #xh #yo #zh #zu #arxiv-2211.05100 #arxiv-1909.08053 #arxiv-2110.02861 #arxiv-2108.12409 #doi-10.57967/hf/0003 #license-bigscience-bloom-rail-1.0 #model-index #co2_eq_emissions #autotrain_compatible #endpoints_compatible #has_space #text-generation-inference #region-us 
### Model Architecture and Objective


* Modified from Megatron-LM GPT2 (see paper, BLOOM Megatron code):
* Decoder-only architecture
* Layer normalization applied to word embeddings layer ('StableEmbedding'; see code, paper)
* ALiBI positional encodings (see paper), with GeLU activation functions
* 176,247,271,424 parameters:


	+ 3,596,615,680 embedding parameters
	+ 70 layers, 112 attention heads
	+ Hidden layers are 14336-dimensional
	+ Sequence length of 2048 tokens used (see BLOOM tokenizer, tokenizer description)


Objective Function: Cross Entropy with mean reduction (see API documentation).### Compute infrastructure


Jean Zay Public Supercomputer, provided by the French government (see announcement).#### Hardware


* 384 A100 80GB GPUs (48 nodes)
* Additional 32 A100 80GB GPUs (4 nodes) in reserve
* 8 GPUs per node Using NVLink 4 inter-gpu connects, 4 OmniPath links
* CPU: AMD
* CPU memory: 512GB per node
* GPU memory: 640GB per node
* Inter-node connect: Omni-Path Architecture (OPA)
* NCCL-communications network: a fully dedicated subnet
* Disc IO network: shared network with other types of nodes#### Software


* Megatron-DeepSpeed (Github link)
* DeepSpeed (Github link)
* PyTorch (pytorch-1.11 w/ CUDA-11.5; see Github link)
* apex (Github link)





---


Training
========


*This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
*It is useful for people who want to learn more about the model inputs and training footprint.*



Click to expand
Training Data
-------------


*This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*


Details for each dataset are provided in individual Data Cards, and the sizes of each of their contributions to the aggregated training data are presented in an Interactive Corpus Map.


Training data includes:


* 46 natural languages
* 13 programming languages
* In 1.6TB of pre-processed text, converted into 350B unique tokens (see the tokenizer section for more.)### Languages


The pie chart shows the distribution of languages in training data.


!pie chart showing the distribution of languages in training data


The following tables shows the further distribution of Niger-Congo & Indic languages and programming languages in the training data.


Distribution of Niger Congo and Indic languages.



Distribution of programming languages.


Extension: java, Language: Java, Number of files: 5,407,724
Extension: php, Language: PHP, Number of files: 4,942,186
Extension: cpp, Language: C++, Number of files: 2,503,930
Extension: py, Language: Python, Number of files: 2,435,072
Extension: js, Language: JavaScript, Number of files: 1,905,518
Extension: cs, Language: C#, Number of files: 1,577,347
Extension: rb, Language: Ruby, Number of files: 6,78,413
Extension: cc, Language: C++, Number of files: 443,054
Extension: hpp, Language: C++, Number of files: 391,048
Extension: lua, Language: Lua, Number of files: 352,317
Extension: go, Language: GO, Number of files: 227,763
Extension: ts, Language: TypeScript, Number of files: 195,254
Extension: C, Language: C, Number of files: 134,537
Extension: scala, Language: Scala, Number of files: 92,052
Extension: hh, Language: C++, Number of files: 67,161
Extension: H, Language: C++, Number of files: 55,899
Extension: tsx, Language: TypeScript, Number of files: 33,107
Extension: rs, Language: Rust, Number of files: 29,693
Extension: phpt, Language: PHP, Number of files: 9,702
Extension: c++, Language: C++, Number of files: 1,342
Extension: h++, Language: C++, Number of files: 791
Extension: php3, Language: PHP, Number of files: 540
Extension: phps, Language: PHP, Number of files: 270
Extension: php5, Language: PHP, Number of files: 166
Extension: php4, Language: PHP, Number of files: 29### Preprocessing


Tokenization: The BLOOM tokenizer (link), a learned subword tokenizer trained using:


* A byte-level Byte Pair Encoding (BPE) algorithm
* A simple pre-tokenization rule, no normalization
* A vocabulary size of 250,680


It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.


Speeds, Sizes, Times
--------------------


Training logs: Tensorboard link


* Dates:


	+ Started 11th March, 2022 11:42am PST
	+ Estimated end: 5th July, 2022
* Checkpoint size:


	+ Bf16 weights: 329GB
	+ Full checkpoint with optimizer states: 2.3TB
* Training throughput: About 150 TFLOP per GPU per second
* Number of epochs: 1
* Estimated cost of training: Equivalent of $2-5M in cloud computing (including preliminary experiments)
* Server training location: Île-de-France, France


Environmental Impact
--------------------


The training supercomputer, Jean Zay (website), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.


Estimated carbon emissions: *(Forthcoming.)*


Estimated electricity usage: *(Forthcoming.)*





---


Uses
====


*This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
*It is useful for anyone considering using the model or who is affected by the model.*



Click to expand
How to use
----------


This model can be easily used and deployed using HuggingFace's ecosystem. This needs 'transformers' and 'accelerate' installed. The model can be downloaded as follows:


<img src="URL width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>


Intended Use
------------


This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive.### Direct Use


* Text generation
* Exploring characteristics of language generated by a language model


	+ Examples: Cloze tests, counterfactuals, generations with reframings### Downstream Use


* Tasks that leverage language models include: Information Extraction, Question Answering, Summarization### Misuse and Out-of-scope Use


*This section addresses what users ought not do with the model.*


See the BLOOM License, Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases.#### Out-of-scope Uses


Using the model in high-stakes settings is out of scope for this model. The model is not designed for critical decisions nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but may not be correct.


Out-of-scope Uses Include:


* Usage in biomedical domains, political and legal domains, or finance domains
* Usage for evaluating or scoring individuals, such as for employment, education, or credit
* Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct#### Misuse


Intentionally using the model for harm, violating human rights, or other kinds of malicious activities, is a misuse of this model. This includes:


* Spam generation
* Disinformation and influence operations
* Disparagement and defamation
* Harassment and abuse
* Deception
* Unconsented impersonation and imitation
* Unconsented surveillance
* Generating content without attribution to the model, as specified in the RAIL License, Use Restrictions


Intended Users
--------------### Direct Users


* General Public
* Researchers
* Students
* Educators
* Engineers/developers
* Non-commercial entities
* Community advocates, including human and civil rights groups### Indirect Users


* Users of derivatives created by Direct Users, such as those using software with an intended use
* Users of Derivatives of the Model, as described in the License### Others Affected (Parties Prenantes)


* People and groups referred to by the LLM
* People and groups exposed to outputs of, or decisions based on, the LLM
* People and groups whose original work is included in the LLM





---


Risks and Limitations
=====================


*This section identifies foreseeable harms and misunderstandings.*



Click to expand
Model may:


* Overrepresent some viewpoints and underrepresent others
* Contain stereotypes
* Contain personal information
* Generate:


	+ Hateful, abusive, or violent language
	+ Discriminatory or prejudicial language
	+ Content that may not be appropriate for all settings, including sexual content
* Make errors, including producing incorrect information as if it were factual
* Generate irrelevant or repetitive outputs
* Induce users into attributing human traits to it, such as sentience or consciousness





---


Evaluation
==========


*This section describes the evaluation protocols and provides the results.*



Click to expand
Metrics
-------


*This section describes the different ways performance is calculated and why.*


Includes:



And multiple different metrics for specific tasks. *(More evaluation metrics forthcoming upon completion of evaluation protocol.)*


Factors
-------


*This section lists some different aspects of BLOOM models. Its focus is on aspects that are likely to give rise to high variance in model behavior.*


* Language, such as English or Yoruba
* Domain, such as newswire or stories
* Demographic characteristics, such as gender or nationality


Results
-------


*Results are based on the Factors and Metrics.*


Zero-shot evaluations:


**WARNING:** This section used to contain much more results, however they were not correct and we released without the approval of the evaluation working group. We are currently in the process of fixing the evaluations.


See this repository for JSON files: URL



Train-time Evaluation:


Final checkpoint after 95K steps:


* Training Loss: 1.939
* Validation Loss: 2.061
* Perplexity: 7.045


For more see: URL





---


Recommendations
===============


*This section provides information on warnings and potential mitigations.*



Click to expand
* Indirect users should be made aware when the content they're working with is created by the LLM.
* Users should be aware of Risks and Limitations, and include an appropriate age disclaimer or blocking interface as necessary.
* Models trained or finetuned downstream of BLOOM LM should include an updated Model Card.
* Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.





---


Glossary and Calculations
=========================


*This section defines common terms and how metrics are calculated.*



Click to expand
* Loss: A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss.
* Perplexity: This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy.
* High-stakes settings: Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed Artificial Intelligence (AI) Act.
* Critical decisions: Such as those defined in the United States' proposed Algorithmic Accountability Act.
* Human rights: Includes those rights defined in the Universal Declaration of Human Rights.
* Personal Data and Personal Information: Personal data and information is defined in multiple data protection regulations, such as "personal data" in the European Union's General Data Protection Regulation; and "personal information" in the Republic of South Africa's Protection of Personal Information Act, The People's Republic of China's Personal information protection law.
* Sensitive characteristics: This includes specifically protected categories in human rights (see UHDR, Article 2) and personal information regulation (see GDPR, Article 9; Protection of Personal Information Act, Chapter 1)
* Deception: Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.





---


More Information
================


*This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*



Click to expand
Intermediate checkpoints
------------------------


For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 5000 steps. Please follow this link to get these checkpoints.


Dataset Creation
----------------


Blog post detailing the design choices during the dataset creation: URL


Technical Specifications
------------------------


Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: URL


More details on the architecture/optimizer: URL


Blog post on the hardware/engineering side: URL


Details on the distributed setup used for the training: URL


Tensorboard updated during the training: URL


Lessons
-------


Insights on how to approach training, negative results: URL


Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): URL


Initial Results
---------------


Initial prompting experiments using interim checkpoints: URL



Original checkpoints
--------------------


The checkpoints in this repo correspond to the HuggingFace Transformers format. If you want to use our fork of Megatron-DeepSpeed that the model was trained with, you'd want to use this repo instead.


Many intermediate checkpoints are available at URL




---


Model Card Authors
==================


*Ordered roughly chronologically and by amount of time spent on creating this model card.*


Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff