| 1 | --- |
| 2 | title: "HuggingFace Inference Endpoints" |
| 3 | --- |
| 4 | |
| 5 | 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: |
| 6 | |
| 7 | <Tabs> |
| 8 | <Tab title="YAML"> |
| 9 | ```yaml title="config.yaml" |
| 10 | models: |
| 11 | - name: Hugging Face Inference API |
| 12 | provider: huggingface-inference-api |
| 13 | model: MODEL_NAME |
| 14 | apiKey: <YOUR_HF_TOKEN> |
| 15 | apiBase: <YOUR_HF_INFERENCE_API_ENDPOINT_URL> |
| 16 | ``` |
| 17 | </Tab> |
| 18 | <Tab title="JSON"> |
| 19 | ```json title="config.json" |
| 20 | { |
| 21 | "models": [ |
| 22 | { |
| 23 | "title": "Hugging Face Inference API", |
| 24 | "provider": "huggingface-inference-api", |
| 25 | "model": "MODEL_NAME", |
| 26 | "apiKey": "<YOUR_HF_TOKEN>", |
| 27 | "apiBase": "<YOUR_HF_INFERENCE_API_ENDPOINT_URL>" |
| 28 | } |
| 29 | ] |
| 30 | } |
| 31 | ``` |
| 32 | </Tab> |
| 33 | </Tabs> |
| 34 | |
| 35 | [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) |