Downloads · 30 days
345
100% of all-time downloads
thealper2/bloom-560m-totto
bloom-560m-totto is a text generation model from thealper2. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as bigscience-bloom-rail-1.0.
bigscience/bloom-560m fully fine-tuned on GEM/ToTTo for table-to-text generation: given a Wikipedia table with highlighted cells, it writes a one-sentence description of those cells.
Downloads · 30 days
345
100% of all-time downloads
All-time downloads
345
Public
Parameters
559M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README
bigscience/bloom-560m fully fine-tuned on GEM/ToTTo for table-to-text generation: given a Wikipedia table with highlighted cells, it writes a one-sentence description of those cells.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "thealper2/bloom-560m-totto"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id).eval()
table = (
"<page_title> List of national independence days </page_title> "
"<table> <cell> Senegal <col_header> Country </col_header> </cell> "
"<cell> 1960 <col_header> Year celebrated </col_header> </cell> </table>"
)
prompt = 'Table:\n{table}\n\nDescription:\n'.format(table=table)
inputs = tokenizer(prompt, return_tensors="pt")
out = model.generate(
**inputs,
max_new_tokens=64,
num_beams=4,
do_sample=False,
pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True).strip())
The prompt format is part of the model: it was trained on Table:\n{table}\n\nDescription:\n followed by the description and EOS, with the loss computed on the description only. Tables are linearized in the standard ToTTo style (<page_title>, <section_title>, <cell>, <col_header>, <row_header>). Feeding a differently formatted prompt will degrade output.
Deterministic beam search (num_beams=4, no sampling) on 1000 examples of the held-out test split. ToTTo's official test split ships without references, so the held-out half of the official validation split is used for reporting.
| Metric | Fine-tuned | bigscience/bloom-560m (zero-shot) |
|---|---|---|
| BLEU | 42.64 | 2.80 |
| ROUGE-1 | 72.88 | 19.68 |
| ROUGE-2 | 51.01 | 9.20 |
| ROUGE-L | 62.59 | 15.63 |
bigscience/bloom-560m (559,214,592 parameters, all of them trained - no adapters)adamw_torch_fusedbigscience-bloom-rail-1.0 use restrictions.@inproceedings{parikh2020totto,
title = {{ToTTo}: A Controlled Table-To-Text Generation Dataset},
author = {Parikh, Ankur P. and Wang, Xuezhi and Gehrmann, Sebastian and
Faruqui, Manaal and Dhingra, Bhuwan and Yang, Diyi and Das, Dipanjan},
booktitle = {EMNLP},
year = {2020}
}