You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/examples/models/huggingface_example.py

9 lines
217 B

from swarms.models import HuggingfaceLLM
model_id = "NousResearch/Yarn-Mistral-7b-128k"
inference = HuggingfaceLLM(model_id=model_id)
task = "Once upon a time"
generated_text = inference(task)
print(generated_text)