add model 818a9c1
Andy Janco commited on
How to use apjanco/yi_roberta_oscar with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("fill-mask", model="apjanco/yi_roberta_oscar") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("apjanco/yi_roberta_oscar")
model = AutoModelForMaskedLM.from_pretrained("apjanco/yi_roberta_oscar", device_map="auto")