Skip to main content

LibreChat is joining ClickHouse. Learn more

LibreChat

Huggingface

LibreChat에서 Huggingface를 사용자 지정 endpoint로 구성하세요.

Huggingface는 OpenAI 호환 추론 API를 통해 호스팅된 모델을 제공하며, 이를 사용자 지정 endpoint로 LibreChat에 추가할 수 있습니다.

API 키 발급받기

huggingface.co/settings/tokens에서 토큰을 생성하세요. 이를 .env 파일에 추가하세요:

HUGGINGFACE_TOKEN=your-api-key

구성

librechat.yaml의 endpoints.custom 아래에 해당 endpoint를 추가하세요:

    - name: 'HuggingFace'
      apiKey: '${HUGGINGFACE_TOKEN}'
      baseURL: 'https://api-inference.huggingface.co/v1'
      models:
        default: [
          "codellama/CodeLlama-34b-Instruct-hf",
          "google/gemma-1.1-2b-it",
          "google/gemma-1.1-7b-it",
          "HuggingFaceH4/starchat2-15b-v0.1",
          "HuggingFaceH4/zephyr-7b-beta",
          "meta-llama/Meta-Llama-3-8B-Instruct",
          "microsoft/Phi-3-mini-4k-instruct",
          "mistralai/Mistral-7B-Instruct-v0.1",
          "mistralai/Mistral-7B-Instruct-v0.2",
          "mistralai/Mixtral-8x7B-Instruct-v0.1",
          "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
        ]
        fetch: true
      titleConvo: true
      titleModel: "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO"
      dropParams: ["top_p"]
      modelDisplayLabel: "HuggingFace"

위의 모델 목록은 2024년 5월 9일에 마지막으로 업데이트되었습니다.

참고 사항

  • 나열된 모델들은 무료이지만 사용량 제한이 있으며, 무료 티어에서는 답변이 매우 짧을 수 있습니다. 일부 모델은 다른 모델보다 더 나은 성능을 보입니다.
  • 모델 목록 가져오기가 지원되지 않으므로 default 배열을 직접 설정하세요.
  • dropParams: ["top_p"] 설정이 필수입니다. 이 설정이 없으면 Huggingface가 top_p 매개변수를 거부하여 요청이 실패합니다. dropParams를 참조하세요.

이 가이드는 어떤가요?