Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

facebook
/
blenderbot-3B

Transformers
PyTorch
English
blenderbot
text2text-generation
convAI
conversational
facebook
Model card Files Files and versions
xet
Community
11

Instructions to use facebook/blenderbot-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use facebook/blenderbot-3B with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
    
    tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-3B")
    model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-3B")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    inputs = tokenizer.apply_chat_template(
    	messages,
    	add_generation_prompt=True,
    	tokenize=True,
    	return_dict=True,
    	return_tensors="pt",
    ).to(model.device)
    
    outputs = model.generate(**inputs, max_new_tokens=40)
    print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Request: DOI

#11 opened about 1 year ago by
IgorAlekseyevich

Adding `safetensors` variant of this model

#10 opened over 1 year ago by
SFconvertbot

Fixed link to wrong paper.

#9 opened almost 2 years ago by
amarfurt

Inference Interface Broke the Bot

#6 opened about 2 years ago by
orick96

Is Free blenderbot-B3 API still working?

1
#5 opened almost 3 years ago by
pashy16

Adding `safetensors` variant of this model

#4 opened about 3 years ago by
SFconvertbot

Is it possible to give Blenderbot a persona during Inference?

👍 2
2
#2 opened about 3 years ago by
rlekhwani-umass

Is Blenderbot endpoint deployed in GPU?

#1 opened over 3 years ago by
manuelsh
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs