728x90
ollama 사용 설정
오늘은 ollama 사용 설정 알아보자.
오늘의 배움 |
|
1. A40으로 pod 생성
2. apt 업데이트
apt update
apt install lshw
3. Ollama 설치
(curl -fsSL https://ollama.com/install.sh | sh && ollama serve > ollama.log 2>&1) &
4. 모델 다운로드 또는 실행
ollama pull [model name]
# ollama pull llama3
or
ollama run [model name]
# ollama run llama3
EEVE Korean 10.8B 모델 사용 설정
1. Hugging Face CLI를 설치
pip install --user huggingface-hub
2. 환경변수 설정
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
3. 모델 다운로드
huggingface-cli download heegyu/EEVE-Korean-Instruct-10.8B-v1.0-GGUF ggml-model-Q5_K_M.gguf --local-dir ./models --local-dir-use-symlinks False
4. Modelfile 파일 생성
cat << EOF > Modelfile
FROM ./models/ggml-model-Q5_K_M.gguf
TEMPLATE """{{- if .System }}
<s>{{ .System }}</s>
{{- end }}
<s>Human:
{{ .Prompt }}</s>
<s>Assistant:
"""
SYSTEM """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions."""
PARAMETER stop <s>
PARAMETER stop </s>
EOF
5. Ollama에 모델 추가
ollama create EEVE-Korean-10.8B -f ./Modelfile
6. 모델 실행
ollama run EEVE-Korean-10.8B
728x90
'Develop > AI' 카테고리의 다른 글
LangChain을 알아보자. (0) | 2025.03.15 |
---|---|
벡터 데이터베이스를 알아보자. (0) | 2025.03.15 |
LLM 주요 파라미터 및 적용에 대해 알아보자. (0) | 2025.03.15 |
LLM 사용에 대해 알아보자. (0) | 2025.03.15 |
LLM 개요를 알아보자 (1) | 2025.03.15 |