Go to file
mjchen6 147e75ef9e add bloomz_1b1 2023-10-20 17:50:53 +08:00
.gitattributes add bloomz_1b1 2023-10-20 17:50:53 +08:00
README.md add bloomz_1b1 2023-10-20 17:50:53 +08:00
config.json add bloomz_1b1 2023-10-20 17:50:53 +08:00
model.safetensors add bloomz_1b1 2023-10-20 17:50:53 +08:00
pytorch_model.bin add bloomz_1b1 2023-10-20 17:50:53 +08:00
special_tokens_map.json add bloomz_1b1 2023-10-20 17:50:53 +08:00
tokenizer.json add bloomz_1b1 2023-10-20 17:50:53 +08:00
tokenizer_config.json add bloomz_1b1 2023-10-20 17:50:53 +08:00

README.md

datasets license language programming_language pipeline_tag widget model-index
bigscience/xP3
bigscience-bloom-rail-1.0
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
C
C++
C#
Go
Java
JavaScript
Lua
PHP
Python
Ruby
Rust
Scala
TypeScript
text-generation
text example_title
一个传奇的开端一个不灭的神话这不仅仅是一部电影而是作为一个走进新时代的标签永远彪炳史册。Would you rate the previous review as positive, neutral or negative? zh-en sentiment
text example_title
一个传奇的开端,一个不灭的神话,这不仅仅是一部电影,而是作为一个走进新时代的标签,永远彪炳史册。你认为这句话的立场是赞扬、中立还是批评? zh-zh sentiment
text example_title
Suggest at least five related search terms to "Mạng neural nhân tạo". vi-en query
text example_title
Proposez au moins cinq mots clés concernant «Réseau de neurones artificiels». fr-fr query
text example_title
Explain in a sentence in Telugu what is backpropagation in neural networks. te-en qa
text example_title
Why is the sky blue? en-en qa
text example_title
Write a fairy tale about a troll saving a princess from a dangerous dragon. The fairy tale is a masterpiece that has achieved praise worldwide and its moral is "Heroes Come in All Shapes and Sizes". Story (in Spanish): es-en fable
text example_title
Write a fable about wood elves living in a forest that is suddenly invaded by ogres. The fable is a masterpiece that has achieved praise worldwide and its moral is "Violence is the last refuge of the incompetent". Fable (in Hindi): hi-en fable
name results
bloomz-1b1
task dataset metrics
type
Coreference resolution
type name config split revision
winogrande Winogrande XL (xl) xl validation a80f460359d1e9a67c006011c94de42a8759430c
type value
Accuracy 52.33
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (en) en test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 50.49
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (fr) fr test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 59.04
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (jp) jp test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 51.82
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (pt) pt test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 54.75
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (ru) ru test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 53.97
task dataset metrics
type
Coreference resolution
type name config split revision
Muennighoff/xwinograd XWinograd (zh) zh test 9dd5ea5505fad86b7bedad667955577815300cee
type value
Accuracy 55.16
task dataset metrics
type
Natural language inference
type name config split revision
anli ANLI (r1) r1 validation 9dbd830a06fea8b1c49d6e5ef2004a08d9f45094
type value
Accuracy 33.3
task dataset metrics
type
Natural language inference
type name config split revision
anli ANLI (r2) r2 validation 9dbd830a06fea8b1c49d6e5ef2004a08d9f45094
type value
Accuracy 33.5
task dataset metrics
type
Natural language inference
type name config split revision
anli ANLI (r3) r3 validation 9dbd830a06fea8b1c49d6e5ef2004a08d9f45094
type value
Accuracy 34.5
task dataset metrics
type
Natural language inference
type name config split revision
super_glue SuperGLUE (cb) cb validation 9e12063561e7e6c79099feb6d5a493142584e9e2
type value
Accuracy 58.93
task dataset metrics
type
Natural language inference
type name config split revision
super_glue SuperGLUE (rte) rte validation 9e12063561e7e6c79099feb6d5a493142584e9e2
type value
Accuracy 65.7
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (ar) ar validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 46.59
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (bg) bg validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 40.4
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (de) de validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 40.12
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (el) el validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 39.32
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (en) en validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 47.11
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (es) es validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 47.55
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (fr) fr validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 48.51
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (hi) hi validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 42.89
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (ru) ru validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 42.81
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (sw) sw validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 41.29
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (th) th validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 42.93
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (tr) tr validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 37.51
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (ur) ur validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 41.37
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (vi) vi validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 47.19
task dataset metrics
type
Natural language inference
type name config split revision
xnli XNLI (zh) zh validation a5a45e4ff92d5d3f34de70aaf4b72c3bdf9f7f16
type value
Accuracy 47.63
task dataset metrics
type
Program synthesis
type name config split revision
openai_humaneval HumanEval None test e8dc562f5de170c54b5481011dd9f4fa04845771
type value
Pass@1 2.62
type value
Pass@10 6.22
type value
Pass@100 11.68
task dataset metrics
type
Sentence completion
type name config split revision
story_cloze StoryCloze (2016) 2016 validation e724c6f8cdf7c7a2fb229d862226e15b023ee4db
type value
Accuracy 62.75
task dataset metrics
type
Sentence completion
type name config split revision
super_glue SuperGLUE (copa) copa validation 9e12063561e7e6c79099feb6d5a493142584e9e2
type value
Accuracy 63.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (et) et validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 55.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (ht) ht validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 52.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (id) id validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 60.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (it) it validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 56.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (qu) qu validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 56.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (sw) sw validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 64.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (ta) ta validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 57.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (th) th validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 59.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (tr) tr validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 55.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (vi) vi validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 63.0
task dataset metrics
type
Sentence completion
type name config split revision
xcopa XCOPA (zh) zh validation 37f73c60fb123111fa5af5f9b705d0b3747fd187
type value
Accuracy 61.0
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (ar) ar validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 53.54
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (es) es validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 58.37
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (eu) eu validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 52.35
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (hi) hi validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 55.92
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (id) id validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 57.97
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (my) my validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 47.05
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (ru) ru validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 50.3
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (sw) sw validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 49.97
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (te) te validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 55.86
task dataset metrics
type
Sentence completion
type name config split revision
Muennighoff/xstory_cloze XStoryCloze (zh) zh validation 8bb76e594b68147f1a430e86829d07189622b90d
type value
Accuracy 58.17

xmtf

Table of Contents

  1. Model Summary
  2. Use
  3. Limitations
  4. Training
  5. Evaluation
  6. Citation

Model Summary

We present BLOOMZ & mT0, a family of models capable of following human instructions in dozens of languages zero-shot. We finetune BLOOM & mT5 pretrained multilingual language models on our crosslingual task mixture (xP3) and find the resulting models capable of crosslingual generalization to unseen tasks & languages.

Multitask finetuned on xP3. Recommended for prompting in English.
Parameters 300M 580M 1.2B 3.7B 13B 560M 1.1B 1.7B 3B 7.1B 176B
Finetuned Model mt0-small mt0-base mt0-large mt0-xl mt0-xxl bloomz-560m bloomz-1b1 bloomz-1b7 bloomz-3b bloomz-7b1 bloomz
Multitask finetuned on xP3mt. Recommended for prompting in non-English.
Finetuned Model mt0-xxl-mt bloomz-7b1-mt bloomz-mt
Multitask finetuned on P3. Released for research purposes only. Strictly inferior to above models!
Finetuned Model mt0-xxl-p3 bloomz-7b1-p3 bloomz-p3
Original pretrained checkpoints. Not recommended.
Pretrained Model mt5-small mt5-base mt5-large mt5-xl mt5-xxl bloom-560m bloom-1b1 bloom-1b7 bloom-3b bloom-7b1 bloom

Use

Intended use

We recommend using the model to perform tasks expressed in natural language. For example, given the prompt "Translate to English: Je taime.", the model will most likely answer "I love you.". Some prompt ideas from our paper:

  • 一个传奇的开端,一个不灭的神话,这不仅仅是一部电影,而是作为一个走进新时代的标签,永远彪炳史册。你认为这句话的立场是赞扬、中立还是批评?
  • Suggest at least five related search terms to "Mạng neural nhân tạo".
  • Write a fairy tale about a troll saving a princess from a dangerous dragon. The fairy tale is a masterpiece that has achieved praise worldwide and its moral is "Heroes Come in All Shapes and Sizes". Story (in Spanish):
  • Explain in a sentence in Telugu what is backpropagation in neural networks.

Feel free to share your generations in the Community tab!

How to use

CPU

Click to expand
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigscience/bloomz-1b1"

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint)

inputs = tokenizer.encode("Translate to English: Je taime.", return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))

GPU

Click to expand
# pip install -q transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigscience/bloomz-1b1"

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype="auto", device_map="auto")

inputs = tokenizer.encode("Translate to English: Je taime.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))

GPU in 8bit

Click to expand
# pip install -q transformers accelerate bitsandbytes
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigscience/bloomz-1b1"

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto", load_in_8bit=True)

inputs = tokenizer.encode("Translate to English: Je taime.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))

Limitations

Prompt Engineering: The performance may vary depending on the prompt. For BLOOMZ models, we recommend making it very clear when the input stops to avoid the model trying to continue it. For example, the prompt "Translate to English: Je t'aime" without the full stop (.) at the end, may result in the model trying to continue the French sentence. Better prompts are e.g. "Translate to English: Je t'aime.", "Translate to English: Je t'aime. Translation:" "What is "Je t'aime." in English?", where it is clear for the model when it should answer. Further, we recommend providing the model as much context as possible. For example, if you want it to answer in Telugu, then tell the model, e.g. "Explain in a sentence in Telugu what is backpropagation in neural networks.".

Training

Model

  • Architecture: Same as bloom-1b1, also refer to the config.json file
  • Finetuning steps: 250
  • Finetuning tokens: 502 million
  • Finetuning layout: 1x pipeline parallel, 1x tensor parallel, 1x data parallel
  • Precision: float16

Hardware

  • CPUs: AMD CPUs with 512GB memory per node
  • GPUs: 64 A100 80GB GPUs with 8 GPUs per node (8 nodes) using NVLink 4 inter-gpu connects, 4 OmniPath links
  • Communication: NCCL-communications network with a fully dedicated subnet

Software

Evaluation

We refer to Table 7 from our paper & bigscience/evaluation-results for zero-shot results on unseen tasks. The sidebar reports zero-shot performance of the best prompt per dataset config.

Citation

@article{muennighoff2022crosslingual,
  title={Crosslingual generalization through multitask finetuning},
  author={Muennighoff, Niklas and Wang, Thomas and Sutawika, Lintang and Roberts, Adam and Biderman, Stella and Scao, Teven Le and Bari, M Saiful and Shen, Sheng and Yong, Zheng-Xin and Schoelkopf, Hailey and others},
  journal={arXiv preprint arXiv:2211.01786},
  year={2022}
}