Huggingface provides access to thousands of open-source models through their Inference API. Great for experimentation with cutting-edge models.Model Class:HuggingFaceModel
Authentication
export HF_TOKEN="hf_..."
Examples
from upsonic import Agent, Taskfrom upsonic.models.huggingface import HuggingFaceModelmodel = HuggingFaceModel(model_name="meta-llama/Llama-3.3-70B-Instruct")agent = Agent(model=model)task = Task("Hello, how are you?")result = agent.do(task)print(result)
Model Settings
You can set model parameters in two ways: on the model or on the Agent.On the model: