Views
No views yet
trust_remote_code required1from transformers import pipeline
2import torch
3
4device = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu'
5
6pipe = pipeline('text-generation', model='mrfakename/Apriel-5B-Base-llamafied', device=device)
7
8print(pipe('It was a dark and stormy night. The wind')[0]['generated_text'])