| 1 | --- |
| 2 | title: "HuggingFace Inference Endpoints" |
| 3 | description: "Configure HuggingFace Inference Endpoints with Continue to deploy and access open-source language models on any cloud, including setup instructions for models like WizardCoder" |
| 4 | --- |
| 5 | |
| 6 | Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: |
| 7 | |
| 8 | <Tabs> |
| 9 | <Tab title="YAML"> |
| 10 | ```yaml title="config.yaml" |
| 11 | models: |
| 12 | - name: Hugging Face Inference API |
| 13 | provider: huggingface-inference-api |
| 14 | model: MODEL_NAME |
| 15 | apiKey: <YOUR_HF_TOKEN> |
| 16 | apiBase: <YOUR_HF_INFERENCE_API_ENDPOINT_URL> |
| 17 | ``` |
| 18 | </Tab> |
| 19 | <Tab title="JSON"> |
| 20 | ```json title="config.json" |
| 21 | { |
| 22 | "models": [ |
| 23 | { |
| 24 | "title": "Hugging Face Inference API", |
| 25 | "provider": "huggingface-inference-api", |
| 26 | "model": "MODEL_NAME", |
| 27 | "apiKey": "<YOUR_HF_TOKEN>", |
| 28 | "apiBase": "<YOUR_HF_INFERENCE_API_ENDPOINT_URL>" |
| 29 | } |
| 30 | ] |
| 31 | } |
| 32 | ``` |
| 33 | </Tab> |
| 34 | </Tabs> |
| 35 | |
| 36 | [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) |