Skip to main content
The HuggingFace model provides access to models hosted on the HuggingFace Hub.

Parameters

ParameterTypeDefaultDescription
idstr"microsoft/DialoGPT-medium"The id of the Hugging Face model to use
namestr"HuggingFace"The name of the model
providerstr"HuggingFace"The provider of the model
api_keyOptional[str]NoneThe API key for Hugging Face (defaults to HF_TOKEN env var)
base_urlstr"https://api-inference.huggingface.co/models"The base URL for Hugging Face Inference API
wait_for_modelboolTrueWhether to wait for the model to load if it’s cold
use_cacheboolTrueWhether to use caching for faster inference
max_tokensOptional[int]NoneMaximum number of tokens to generate
temperatureOptional[float]NoneControls randomness in the model’s output
top_pOptional[float]NoneControls diversity via nucleus sampling
repetition_penaltyOptional[float]NonePenalty for repeating tokens (higher values reduce repetition)
I