> For the complete documentation index, see [llms.txt](https://docs.skydeck.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skydeck.ai/ko/integrations/llms-and-databases/huggingface-integration.md).

# HuggingFace 통합

HuggingFace에서 추론 엔드포인트를 배포한 후, 다음 사용자 인터페이스를 볼 수 있어야 합니다:

<figure><img src="/files/CH4wzNRr80FScg1N6rNm" alt="huggingface 배포 인터페이스"><figcaption></figcaption></figure>

이 페이지에서는 다음 정보를 필요로 합니다:

* 엔드포인트 URL
* 모델 리포지토리
* API 토큰. 이는 Call Examples 코드 블록에서 "Add API token" 상자를 체크하여 확인할 수 있습니다.

이 외에도 모델의 컨텍스트 윈도우가 필요합니다. 이는 모델의 정보 페이지에서 찾을 수 있습니다.

이 정보를 수집한 후, 아래 예시와 같이 JSON 형식으로 포맷합니다:

```json
{
    "api_key":"your_api_key",
    "endpoint": "your_api_endpoint",
    "model_name": "meta-llama/Llama-2-7b-chat-hf",
    "context_window": 4096
}
```

다음으로, 이를 통합의 Credential 필드에 붙여넣습니다.

<figure><img src="/files/QrzLTlaXZiZ8AOzXbcUS" alt="credential 필드"><figcaption></figcaption></figure>

자격 증명이 성공적으로 검증되면, GenStudio의 모델 목록에 HuggingFace 모델이 나열되는 것을 볼 수 있습니다:

<figure><img src="/files/sRfEcWntrM05gDsDlaU3" alt="huggingface 모델이 genstudio 모델로"><figcaption></figcaption></figure>

### HuggingFace 엔드포인트의 제로로 스케일링

0으로 스케일링은 Inference 엔드포인트가 제공하는 동적 기능으로, 리소스 사용량과 비용을 최적화하는 데 설계되었습니다. 이는 기발하게 요청 패턴을 모니터링하고 유휴 시간 동안 복제본 수를 없앨 경우, 필요할 때만 리소스를 사용하도록 보장합니다.

그러나, 이렇게 하면 트래픽이 재개될 때 차가운 시작 기간이 있고, 주의해야 할 몇 가지 사항이 있습니다. 이 기능이 어떻게 작동하는지, 그 장점과 잠재적인 도전 과제에 대한 심도있는 연구를 원한다면, [HuggingFace의 Autoscaling에 대한 가이드](https://huggingface.co/docs/inference-endpoints/autoscaling)를 참조하십시오.

### 지원되는 모델

현재 우리는 `text-generation` 태그가 있는 모델에 대해 `text-generation-inference` 컨테이너로 배포된 엔드포인트만 지원합니다. 지원되는 모델 목록을 확장하기 위해 작업 중입니다.

<figure><img src="/files/tkYtbSgDvuy7cME3HGVK" alt="image (48)"><figcaption><p>LLaMA 2는 텍스트 생성 태그가 있는 모델입니다</p></figcaption></figure>

<figure><img src="/files/kNg68RcBCuEOmWO0eVHM" alt="image (49)"><figcaption><p>배포 중에 컨테이너 유형으로 텍스트 생성 추론을 선택해야 합니다</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.skydeck.ai/ko/integrations/llms-and-databases/huggingface-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
