Views
No views yet
1from petals import DistributedBloomForCausalLM
2
3model = DistributedBloomForCausalLM.from_pretrained("bigscience/bloom-petals")
4# Embeddings & prompts are on your device, BLOOM blocks are distributed across the Internet
5
6inputs = tokenizer("A cat sat", return_tensors="pt")["input_ids"]
7outputs = model.generate(inputs, max_new_tokens=5)
8print(tokenizer.decode(outputs[0])) # A cat sat on a mat...python -m petals.cli.run_server bigscience/bloom-petals