Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- macro lens #EF #FD
- ESP32 #Arduino
- cycloidal #rv reducer
- k6 #피코프레소
- ITOP40
- VirtualBox #VMware
- centos7 #yum update #/boot
- Dell #Latitude #BIOS
- TensorFlow #Python #pip
- Arduino #Wall Plotter
- razer #deathadder #viper #g102
- egpu #aorus gaming box #gtx1070 #tb3
- Callaway #Mavrik #Epic Flash
- fat32 #rufus
- Xeon #E5-2680
- VMware #Shared Folder
- Java #MacBook #macOS
- Oh My Zsh #macOS
- Arduino #PlatformIO #macOS
- Linux #VirtualBox
- Laptop #CPUID
- Octave #homebrew #macOS
- XTU #Virtual Machine System
- CM-EF-NEX
- x99 itx/ac
- 다이슨 #배터리
- Tarantula #3D 프린터
- 피코프레소 #ITOP40
- 매크로렌즈 #리버스링
- VNC #Firewall #CenOS7 #VMware
Archives
- Today
- Total
얕고 넓게
[AI] 허깅페이스 모델 다운로드 & 변환 본문
2025.03.08
ETRI Eagle을 Ollama에서 돌리기 위해.
https://grip.news/archives/3000/
[LLM] 허깅페이스 모델을 OLLAMA 형식으로 변환하기 (HuggingFace model to Ollama) – GRIP.News
[LLM] 허깅페이스 모델을 OLLAMA 형식으로 변환하기 (HuggingFace model to Ollama) by grip.news · 2024-07-11 허깅페이스(HuggingFace)에는 유용하고 다양한 LLM 이 등록 되어 있지만, Ollama 에는 대표적인 모델들만 등
grip.news
1. 다운로드
git,huggingface-cli가 쉬운 방법인데 로그인 문제로 python 으로 했다.
from huggingface_hub import snapshot_download
import huggingface_hub
model_id = "etri-lirs/eagle-3b-preview"
huggingface_hub.login('hf_...')
snapshot_download(repo_id=model_id, local_dir="sample", local_dir_use_symlinks=False, revision="main")
python download.py
짜깁기 해서 로그인 후 다운로드 완료.
git clone https://github.com/ggerganov/llama.cpp.git
python -m venv hf2ollama
hf2ollama/scripts/activate
..
pip install -r llama.cpp/requirements.txt
...
python llama.cpp/convert_hf_to_gguf.py -h
usage: convert_hf_to_gguf.py [-h] [--vocab-only] [--outfile OUTFILE] [--outtype {f32,f16,bf16,q8_0,auto}] [--bigendian] [--use-temp-file] [--no-lazy]
[--model-name MODEL_NAME] [--verbose] [--split-max-tensors SPLIT_MAX_TENSORS] [--split-max-size SPLIT_MAX_SIZE] [--dry-run]
[--no-tensor-first-split]
model
python llama.cpp/convert_hf_to_gguf.py sample --outfile eagle-3b-preview-q8_0.gguf --outtype q8_0
echo "from eagle-3b-preview-q8_0.gguf" > ./Modelfile
ollama create eagle-3b-preview -f ./Modelfile
변환 툴 다운로드
sample 디렉토리에 다운 받았으므로 이 위치를 지정.
필요한 python 라이브러리 설치
변환 실행
ollama에서 생성
'IT > AI.ML' 카테고리의 다른 글
[AI] GPU 모니터링 (0) | 2025.03.12 |
---|---|
[AI] Open-WebUI + Pipeline (0) | 2025.03.08 |
[AI] Open-WebUI @ Python Virtual Env 정리 (0) | 2025.03.08 |
[AI] Open-WebUI @Linux (0) | 2025.03.08 |
[AI] Docker + Open-webui (0) | 2025.03.08 |