Nostalgia for Bloom

Reddit r/LocalLLaMA Models

Summary

BLOOMZ and mT0 are multilingual models finetuned on the crosslingual task mixture xP3, enabling zero-shot instruction following in dozens of languages.

No content available
Original Article
View Cached Full Text

Cached at: 07/10/26, 10:27 PM

bigscience/bloomz-p3 · Hugging Face

Source: https://huggingface.co/bigscience/bloomz-p3 xmtf

https://huggingface.co/bigscience/bloomz-p3#table-of-contentsTable of Contents

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

https://huggingface.co/bigscience/bloomz-p3#model-summaryModel 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.

https://huggingface.co/bigscience/bloomz-p3#useUse

https://huggingface.co/bigscience/bloomz-p3#intended-useIntended use

We recommend using the model to perform tasks expressed in natural language. For example, given the prompt “Translate to English: Je t’aime.”, 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!

https://huggingface.co/bigscience/bloomz-p3#how-to-useHow to use

https://huggingface.co/bigscience/bloomz-p3#cpuCPU

Click to expand```

pip install -q transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = “bigscience/bloomz-p3”

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

inputs = tokenizer.encode(“Translate to English: Je t’aime.”, return_tensors=“pt”) outputs = model.generate(inputs) print(tokenizer.decode(outputs[0]))


### [https://huggingface.co/bigscience/bloomz-p3#gpu](https://huggingface.co/bigscience/bloomz-p3#gpu)GPU

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

checkpoint = "bigscience/bloomz-p3"

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

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

https://huggingface.co/bigscience/bloomz-p3#gpu-in-8bitGPU in 8bit

Click to expand```

pip install -q transformers accelerate bitsandbytes

from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = “bigscience/bloomz-p3”

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

inputs = tokenizer.encode(“Translate to English: Je t’aime.”, return_tensors=“pt”).to(“cuda”) outputs = model.generate(inputs) print(tokenizer.decode(outputs[0]))


### [https://huggingface.co/bigscience/bloomz-p3#](https://huggingface.co/bigscience/bloomz-p3#)

## [https://huggingface.co/bigscience/bloomz-p3#limitations](https://huggingface.co/bigscience/bloomz-p3#limitations)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\.*"\.

## [https://huggingface.co/bigscience/bloomz-p3#training](https://huggingface.co/bigscience/bloomz-p3#training)Training

## [https://huggingface.co/bigscience/bloomz-p3#model](https://huggingface.co/bigscience/bloomz-p3#model)Model

- **Architecture:**Same as[bloom](https://huggingface.co/bigscience/bloom), also refer to the`config\.json`file
- **Finetuning steps:**498
- **Finetuning tokens:**2\.09 billion
- **Finetuning layout:**72x pipeline parallel, 1x tensor parallel, 4x data parallel
- **Precision:**bfloat16

## [https://huggingface.co/bigscience/bloomz-p3#hardware](https://huggingface.co/bigscience/bloomz-p3#hardware)Hardware

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

## [https://huggingface.co/bigscience/bloomz-p3#software](https://huggingface.co/bigscience/bloomz-p3#software)Software

- **Orchestration:**[Megatron\-DeepSpeed](https://github.com/bigscience-workshop/Megatron-DeepSpeed)
- **Optimizer & parallelism:**[DeepSpeed](https://github.com/microsoft/DeepSpeed)
- **Neural networks:**[PyTorch](https://github.com/pytorch/pytorch)\(pytorch\-1\.11 w/ CUDA\-11\.5\)
- **FP16 if applicable:**[apex](https://github.com/NVIDIA/apex)

## [https://huggingface.co/bigscience/bloomz-p3#evaluation](https://huggingface.co/bigscience/bloomz-p3#evaluation)Evaluation

We refer to Table 7 from our[paper](https://arxiv.org/abs/2211.01786)&[bigscience/evaluation\-results](https://huggingface.co/datasets/bigscience/evaluation-results)for zero\-shot results on unseen tasks\. The sidebar reports zero\-shot performance of the best prompt per dataset config\.

## [https://huggingface.co/bigscience/bloomz-p3#citation](https://huggingface.co/bigscience/bloomz-p3#citation)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} }

Similar Articles

tencent/Hy-MT2-7B

Hugging Face Models Trending

Tencent open-sourced the Hy-MT2 family of fast-thinking multilingual translation models (1.8B, 7B, 30B-A3B) supporting 33 languages, along with extreme quantization for on-device deployment and a new instruction-following benchmark IFMTBench.

Multilingual-Multimodal-NLP/LoopCoder-V2 · Hugging Face

Reddit r/LocalLLaMA

LoopCoder-V2 is a 7B instruction-tuned code model built on the Parallel Loop Transformer (PLT), demonstrating non-monotonic test-time scaling with two loops providing the best gain-cost trade-off and significant improvements over baselines on code generation and reasoning benchmarks.