Run this model with HF Jobs
Run bigscience/bloom-1b7 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/bigscience/bloom-1b7. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/bigscience/bloom-1b7 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/bigscience/bloom-1b7. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/bigscience/bloom-1b7. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use bigscience/bloom-1b7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigscience/bloom-1b7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigscience/bloom-1b7")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-1b7") model = AutoModelForCausalLM.from_pretrained("bigscience/bloom-1b7", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bigscience/bloom-1b7 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bigscience/bloom-1b7" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigscience/bloom-1b7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bigscience/bloom-1b7
- SGLang
How to use bigscience/bloom-1b7 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bigscience/bloom-1b7" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigscience/bloom-1b7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bigscience/bloom-1b7" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigscience/bloom-1b7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bigscience/bloom-1b7 with Docker Model Runner:
docker model run hf.co/bigscience/bloom-1b7
Model Card Restructure & edits
#42
by Ezi - opened
59 unmodified lines6061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023179 unmodified lines31131231331431531631731831932032132232332432532613 unmodified lines34034134234334434534634734819 unmodified lines36836937037137237337437537623 unmodified lines40040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144233 unmodified lines47647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051111 unmodified lines52352452552652752852953053153253353453518 unmodified lines55455555655755855956056156256356459 unmodified linesVersion 1.0 / 26.May.2022## Table of Contents1. [Model Details](#model-details)2. [Uses](#uses)3. [Training Data](#training-data)4. [Risks and Limitations](#risks-and-limitations)5. [Evaluation](#evaluation)6. [Recommendations](#recommendations)7. [Glossary and Calculations](#glossary-and-calculations)8. [More Information](#more-information)9. [Model Card Authors](#model-card-authors)## Model Details### Basics*This section provides information for anyone who wants to know about the model.*<details><summary>Click to expand</summary> <br/>**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**Version:** 1.0.0**Languages:** Multiple; see [training data](#training-data)**License:** RAIL License v1.0 ([link](https://huggingface.co/spaces/bigscience/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 provides information for people who work on model development.*<details><summary>Click to expand</summary><br/>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:** 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* 1,722,408,960 parameters:* 513,802,240 embedding parameters* 24 layers, 16 attention heads* Hidden layers are 2048-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: 64 V100 16/32GB GPUs (16 nodes):* 4 GPUs per node* 40 CPUs per task* 1 task per node* CPU: AMD* CPU memory: 160GB per node* GPU memory: 64GB or 128GB (depending on node availability during training) 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))#### **Training**- Checkpoint size:- Fp16 weights: 2.6GB (# params * 2)- Full checkpoint with optimizer states: --- Training throughput: --- Number of epochs: 1- Dates:- Start: 11th March, 2022 11:42am PST- End: 20 May, 2022- Server training location: Île-de-France, France#### **Tokenization**The BLOOM tokenizer ([link](https://huggingface.co/bigscience/tokenizer)) is 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,680It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.</details>### Environmental Impact<details><summary>Click to expand</summary><br/>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 upon completion of training.)***Estimated electricity usage:** *(Forthcoming upon completion of training.)*</details><p> </p>## 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 provides information for anyone considering using the model or who is affected by the model.*<details><summary>Click to expand</summary><br/>### Intended Use79 unmodified lines- 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><p> </p>## 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><summary>Click to expand</summary><br/>Details for each dataset are provided in individual [Data Cards](https://huggingface.co/spaces/bigscience/BigScienceCorpus).13 unmodified linesThe following table shows the further distribution of Niger-Congo and Indic languages in the training data.<details><summary>Click to expand</summary><br/>| Niger Congo | Percentage | | Indic | Percentage ||----------------|------------ |------ |-----------|------------|19 unmodified lines| Swahili | 0.02 |</details>The following table shows the distribution of programming languages.<details><summary>Click to expand</summary><br/>| Extension | Language | Number of files ||----------------|------------|-----------------|23 unmodified lines| php5 | PHP | 166 || php4 | PHP | 29 |</details></details><p> </p>## Risks and Limitations*This section identifies foreseeable harms and misunderstandings.*<details><summary>Click to expand</summary><br/>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</details><p> </p>## Evaluation*This section describes the evaluation protocols and provides the results.*<details><summary>Click to expand</summary><br/>### Metrics*This section describes the different ways performance is calculated and why.*33 unmodified lines- [BLOOM Book](https://huggingface.co/spaces/bigscience/bloom-book): Read generations from BLOOM based on prompts provided by the community</details><p> </p>## Recommendations*This section provides information on warnings and potential mitigations.*<details><summary>Click to expand</summary><br/>- 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 pretrained with the LLM 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><p> </p>## Glossary and Calculations*This section defines common terms and how metrics are calculated.*<details><summary>Click to expand</summary><br/>- <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.11 unmodified lines- <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><p> </p>## More Information<details><summary>Click to expand</summary><br/>### Dataset Creation18 unmodified lines### Initial ResultsInitial prompting experiments using interim checkpoints: https://huggingface.co/spaces/bigscience/bloom-book</details><p> </p>## Model Card Authors*Ordered roughly chronologically and by amount of time spent.*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 Muennighoff59 unmodified lines6061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011179 unmodified lines19119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324413 unmodified lines25825926026126226326426519 unmodified lines28528628728828929029129223 unmodified lines31631731831932032132232332432533 unmodified lines35936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447511 unmodified lines48748848949049149249349449518 unmodified lines51451551651751851952052152252352452559 unmodified linesVersion 1.0 / 26.May.2022# Model Card for Bloom-1b7<!-- Provide a quick summary of what the model is/does. -->## Table of Contents1. [Model Details](#model-details)2. [Uses](#uses)3. [Bias, Risks, and Limitations](#bias-risks-and-limitations)4. [Recommendations](#recommendations)5. [Training Data](#training-data)6. [Evaluation](#evaluation)7. [Environmental Impact](#environmental-impact)8. [Technical Specifications](#techincal-specifications)9. [Citation](#citation)10. [Glossary and Calculations](#glossary-and-calculations)11. [More Information](#more-information)12. [Model Card Authors](#model-card-authors)13. [Model Card Contact](#model-card-contact)## Model Details### Model Description*This section provides information for anyone who wants to know about the model.*- **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- **Version:** 1.0.0- **Languages:** Multiple; see [training data](#training-data)- **License:** RAIL License v1.0 ([link](https://huggingface.co/spaces/bigscience/license))- **Release Date Estimate:** Monday, 11.July.2022- **Funded by:*** The French government.* Hugging Face ([website](https://huggingface.co)).* Organizations of contributors. *(Further breakdown of organizations 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 provides information for anyone considering using the model or who is affected by the model.*### Intended Use79 unmodified lines- People and groups exposed to outputs of, or decisions based on, the LLM- People and groups whose original work is included in the LLM## Bias, Risks, and Limitations*This section identifies foreseeable harms and misunderstandings.*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### Recommendations*This section provides information on warnings and potential mitigations.*- 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 pretrained with the LLM 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.## 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).13 unmodified lines**The following table shows the further distribution of Niger-Congo and Indic languages in the training data.**| Niger Congo | Percentage | | Indic | Percentage ||----------------|------------ |------ |-----------|------------|19 unmodified lines| Swahili | 0.02 |</details>**The following table shows the distribution of programming languages.**| Extension | Language | Number of files ||----------------|------------|-----------------|23 unmodified lines| php5 | PHP | 166 || php4 | PHP | 29 |## Evaluation*This section describes the evaluation protocols and provides the results.*### Metrics*This section describes the different ways performance is calculated and why.*33 unmodified lines- [BLOOM Book](https://huggingface.co/spaces/bigscience/bloom-book): Read generations from BLOOM based on prompts provided by the community## Environmental ImpactThe 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 upon completion of training.)***Estimated electricity usage:** *(Forthcoming upon completion of training.)*## Technical Specifications*This section provides information for people who work on model development.*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:** 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* 1,722,408,960 parameters:* 513,802,240 embedding parameters* 24 layers, 16 attention heads* Hidden layers are 2048-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: 64 V100 16/32GB GPUs (16 nodes):* 4 GPUs per node* 40 CPUs per task* 1 task per node* CPU: AMD* CPU memory: 160GB per node* GPU memory: 64GB or 128GB (depending on node availability during training) 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))### **Training**- Checkpoint size:- Fp16 weights: 2.6GB (# params * 2)- Full checkpoint with optimizer states: --- Training throughput: --- Number of epochs: 1- Dates:- Start: 11th March, 2022 11:42am PST- End: 20 May, 2022- Server training location: Île-de-France, France### **Tokenization**The BLOOM tokenizer ([link](https://huggingface.co/bigscience/tokenizer)) is 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,680It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language.## Citation**Cite as:** BigScience, _BigScience Language Open-science Open-access Multilingual (BLOOM) Language Model_. International, May 2021-May 2022## Glossary and Calculations*This section defines common terms and how metrics are calculated.*- <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.11 unmodified lines- <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.## More Information### Dataset Creation18 unmodified lines### Initial ResultsInitial prompting experiments using interim checkpoints: https://huggingface.co/spaces/bigscience/bloom-book## Model Card Authors*Ordered roughly chronologically and by amount of time spent.*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 Card Contact**Send Questions to:** bigscience-contact@googlegroups.com
README.md+175-214