본문 바로가기
데이터&AI/LLM

llamafile 포트 및 ip 정보 바꾸기!!

by 일등박사 2023. 12. 27.

 

LLAMAFILE!!! 

오픈소스 LLM 모델들을 한개의 파일로 손쉽게 실행할 수 있어 참 좋습니다!!

 

https://github.com/Mozilla-Ocho/llamafile/

 

GitHub - Mozilla-Ocho/llamafile: Distribute and run LLMs with a single file.

Distribute and run LLMs with a single file. Contribute to Mozilla-Ocho/llamafile development by creating an account on GitHub.

github.com

 

 

ㅁ 간단한 사용방법

## 파일을 받고
wget https://huggingface.co/jartine/llava-v1.5-7B-GGUF/resolve/main/llava-v1.5-7b-q4-server.llamafile?download=true

## 권한을 변경하고
chmod +x llava-v1.5-7b-q4-server.llamafile

## 실행하면 끝!!
./llava-v1.5-7b-q4-server.llamafile

 

 

적용가능한 모델들 llava, mistral, mixtral, wizardcoder

그런데 이런 좋은 서비스를!!! 

내 컴퓨터에서 만이 아니라 서버로 실행시켜

외부포트로 오픈시키고 싶다면!!!

아래의 코드 하나면 끝입니다!

./llava-v1.5-7b-q4-server.llamafile --host 0.0.0.0 --port {내가 오픈하고자하는 포트}

## 예시
#$ ./llava-v1.5-7b-q4-server.llamafile --host 0.0.0.0 --port 9003

 

그 결과!! url 에 서버 ip + :9003을 입력하면!! llamafile이 실행된것을 확인할 수 있어요!!

 

댓글