> For the complete documentation index, see [llms.txt](https://genos-docs.gitbook.io/default/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://genos-docs.gitbook.io/default/v1.7.8/basic-tutorials/guides/llm/interactive-blocks.md).

# LLM 모델 서빙

### LLM 모델 서빙하기

<figure><img src="/files/Xot8GHwWBwpzX59Bo0Lo" alt=""><figcaption></figcaption></figure>

* **LLM 서빙 생성 버튼**을 클릭합니다.

<figure><img src="/files/CaHiQbVRiEnUpPup7pNe" alt=""><figcaption></figcaption></figure>

* LLM 생성을 위한 필수 정보를 입력합니다.

<figure><img src="/files/3nne5e1zHseoaQf95GJs" alt=""><figcaption></figcaption></figure>

* LLM 서빙 목록에서 생성한 항목을 더블 클릭합니다.
* LLM 서빙에서는 **서빙 리비전 추가와** **LoRA 어댑터 리비전 추가** 2가지가 있습니다.
  * LoRA 어댑터 리비전 추가는 서빙 리비전이 추가 되어야지 가능합니다.
* 우선 LLM 서빙 상세 메뉴에서 **서빙 리비전 추가 버튼**을 클릭합니다.

<figure><img src="/files/Fgt0h50l6PeGBgxvPJfa" alt=""><figcaption></figcaption></figure>

figure>![](/files/bEzuvdnuQXSoQeJzPaTj)

* LLM 서빙 리비전 생성에 필요한 정보를 입력합니다.
  * 도커이미지 : 서빙에 사용할 환경인 도커이미지를 선택합니다.
  * 인스턴스타입 : 서빙에 필요한 CPU, 메모리 사이즈인 인스턴스 타입을 선택합니다.
  * 모델, 모델 리비전 : 서빙에 사용할 모델과 모델 리비전을 선택합니다.
  * GPU 할당량 : 서빙에 사용할 할당량을 선택하고, 할당량에서 사용가능한 잔여 GPU 중 서빙에 사용할 GPU 수를 선택합니다.
  * args : 서빙 시 사용할 파라미터 정보를 입력합니다.
* 주의사항

  > 1. T4 GPU를 사용할 경우 dtype을 지원하지 않으므로 dtype:half를 설정해야합니다.
  >
  > 2. LoRA 어댑터를 사용하기 위해서는 해당 args에서 'max\_lora\_rank'와 'enable\_auto\_tool\_choice' , 'tool\_call\_parser', 'enable\_lora'설정을 입력해주세요.
  >
  > * LoRA를 사용하지 않는다면 설정하지 않으셔도 됩니다.

<figure><img src="/files/bLzXgEvUbN0JDcoHjQlX" alt=""><figcaption></figcaption></figure>

* 리비전 목록 탭에서 추가한 리비전을 더블 클릭합니다.

<figure><img src="/files/umXPV5Dg8U6XdbByvYa8" alt=""><figcaption></figcaption></figure>

* LLM 리비전 상세 페이지에서 **배포 버튼**을 클릭합니다.
* 배포 버튼이 배포 취소 버튼으로 바뀌고, 승인 상태 창이 배포신청으로 바뀌면 배포 신청이 완료 된것입니다.
* 승인권한을 가지고 있는 사용자가 배포승인을 해주어야 배포가 완료 됩니다.
* LLM 서빙 리비전 배포가 승인되면 상태가 Online으로 바뀌고 모델 사용이 가능합니다.
* 서빙 리비전이 배포 된 후 테스트 버튼을 클릭하여 모델의 동작을 확인할 수 있습니다.

### LoRA 어댑터 리비전 등록

<figure><img src="/files/mhNVU7kFJtTkQUQNq8Nc" alt=""><figcaption></figcaption></figure>

* 해당 버튼을 클릭합니다

<figure><img src="/files/5Lp5RpaRL0jzidhOuhUm" alt=""><figcaption></figcaption></figure>

* **(LLM 모델 서빙하기)** 에서 배포한 리비전이 **기반 서빙 리비전**입니다.
* **LoRA 어댑터** 부분은 사용할 LoRA 파인튜닝한 어댑터를 선택합니다.

<figure><img src="/files/Lnu9QRB2ZhLUpTUw4Zj1" alt=""><figcaption></figcaption></figure>

리비전 목록에서 어댑터가 적용된것을 확인할 수 있습니다.

### 대표 리비전 등록

* 대표 리비전은 리비전들을 대표하는 리비전으로 서빙 엔드 포인트를 노출합니다.
* 대표 리비전으로 등록해야 워크플로우 flowise chatmnc 노드에서 서빙된 모델을 사용하거나, 인증키를 활용한 API 호출을 사용할 수 있습니다.

<figure><img src="/files/GYUlZe6gLxpb3zT0B68G" alt=""><figcaption></figcaption></figure>

* 기본 정보 탭에서 수정 버튼을 누릅니다.
* 대표리비전 아이디 트래픽 분배를 설정합니다. 설정 후 저장버튼을 누릅니다.

<figure><img src="/files/vfWIg5GyH25NZrAXGZEs" alt=""><figcaption></figcaption></figure>

* 대표 리비전 아이디가 등록 되었습니다.
* 이제 API 호출 및 워크플로우에서 서빙된 모델을 사용할 수 있습니다.

<figure><img src="/files/iiEZX4CrU2YsHtNHYt8h" alt=""><figcaption></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://genos-docs.gitbook.io/default/v1.7.8/basic-tutorials/guides/llm/interactive-blocks.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.
