Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Using Huggingface models with Upsonic
HuggingFaceModel
export HF_TOKEN="hf_..."
from upsonic import Agent, Task from upsonic.models.huggingface import HuggingFaceModel model = 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)
from upsonic import Agent, Task from upsonic.models.huggingface import HuggingFaceModel, HuggingFaceModelSettings model = HuggingFaceModel( model_name="meta-llama/Llama-3.3-70B-Instruct", settings=HuggingFaceModelSettings(max_tokens=1024, temperature=0.7) ) agent = Agent(model=model)
from upsonic import Agent, Task from upsonic.models.huggingface import HuggingFaceModelSettings agent = Agent( model="huggingface/meta-llama/Llama-3.3-70B-Instruct", settings=HuggingFaceModelSettings(max_tokens=1024) )
max_tokens
int
temperature
float
top_p
seed
stop_sequences
list[str]
timeout