Spaces:
Runtime error
Runtime error
import torch | |
from transformers import pipeline | |
pipe = pipeline( | |
"text-generation", | |
model="silma-ai/SILMA-9B-Instruct-v1.0", | |
model_kwargs={"torch_dtype": torch.bfloat16}, | |
device="cuda", # replace with "mps" to run on a Mac device | |
) | |
messages = [ | |
{"role": "user", "content": "ุงูุชุจ ุฑุณุงูุฉ ุชุนุชุฐุฑ ูููุง ูู ุฏูุฑู ูู ุงูุนู ู ุนู ุงูุญุถูุฑ ุงูููู ูุฃุณุจุงุจ ู ุฑุถูุฉ."}, | |
] | |
outputs = pipe(messages, max_new_tokens=256) | |
assistant_response = outputs[0]["generated_text"][-1]["content"].strip() | |
print(assistant_response) | |