Hugging Face
Hugging Face provides access to thousands of models via their Inference Endpoints.
Basic Example
client<llm> MyClient {
provider openai-generic
options {
base_url "https://api-inference.huggingface.co/v1"
api_key env.HUGGINGFACE_API_KEY
model "meta-llama/Llama-3-70B-Instruct"
}
}
BAML-Specific Options
| Option | Type | Default | Description |
|---|---|---|---|
base_url | string | - | https://api-inference.huggingface.co/v1 |
api_key | string | env.HUGGINGFACE_API_KEY | API key |
model | string | - | Model identifier |
See Hugging Face Inference Endpoints for more information.