{
    "componentChunkName": "component---src-templates-post-tsx",
    "path": "/llama-cpp/",
    "result": {"data":{"logo":null,"markdownRemark":{"html":"<h1>llama.cpp (On device llm inference tool)</h1>\n<img src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSiULtz3uHsF-6HAuU2sAyxlSxP7jRAuNndVA&amp;s\" width=\"400\">\n<p>최근에 <a href=\"https://github.com/ggerganov/llama.cpp\">llama.cpp</a>를 사용해봤는데, 상당히 편리하고 미래에 더 많이 쓰일 툴이라는 생각이 들어서 기록해둔다!</p>\n<h2>llama.cpp란?</h2>\n<p>대표적인 오픈소스 LLM인 Meta의 llama에서 이름을 따온 이 라이브러리는 llama에만 종속되는게 아닌 오픈소스 LLM들을 순수 C/C++로만 인퍼런스 가능하게 해주는 툴이다. 일반적으로 AI 모델들은 대부분 Python 기반으로 작동하기 때문에 온디바이스 상에서 LLM 구동을 위해서는 제약이 꽤 있는 편이다.</p>\n<img src=\"https://github.com/user-attachments/assets/a787c756-2843-4a91-9bdd-cd34a285ddde\" width=\"350\">\n<p>일반적인 리눅스 기반 서버에서는 쉽게 사용 가능한 PyTorch, Hugginface Transformers 등을 온디바이스 상에서 구동하려면 라이브러리 단에서 제공되는 API도 한정적일 뿐더러 연산 대부분이 GPU에 맞춰져 있기 때문에 파이썬 기반으로 llm을 온비다이스에서 구동하기란 상당히 어려운 일이다. (매우 큰 프로젝트가 될 것)</p>\n<p>이러한 문제를 해결하기 위해 llama.cpp는 순수 C/C++ 기반으로 LLM 구동을 가능하게 하며, CUDA/ARM/Android/Vulkan 등 여러 하드웨어 기반으로 돌아갈 수 있도록 하는 프로젝트다!</p>\n<h2>llama.cpp 사용법</h2>\n<img src=\"https://github.com/user-attachments/assets/5ee981ad-e4b5-40b8-9546-3669e08b4d8e\" width=\"400\">\n<p>그럼 llama.cpp 사용법을 살펴보자!</p>\n<h3>Build llama.cpp</h3>\n<p>어떤 환경에서 사용하는지에 따라 빌드 방법이 다르기 때문에 <a href=\"https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md\">llama.cpp의 공식 How to build 도큐먼트</a>를 살펴보는걸 추천한다. 여기서는 linux or Mac 환경에서의 빌드 방법만 다루겠다.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">git clone https://github.com/ggerganov/llama.cpp\ncd llama.cpp</code></pre></div>\n<ul>\n<li>Using make (linux or Mac)</li>\n</ul>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">make</code></pre></div>\n<ul>\n<li>Using CMake</li>\n</ul>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cmake -B build\ncmake --build build --config Release</code></pre></div>\n<h3>Download Huggingface Model</h3>\n<p>프로젝트 build가 되었으면 사용할 허깅페이스 모델을 로컬에 다운받아 놓는다. 여기서 주의할 점은 llama.cpp는 아직 현재진행형 프로젝트이기 때문에 <strong>일부 모델들만 지원</strong>한다는 점이다. llama.cpp의 README.md를 참고하여 내가 사용하려는 모델을 지원하는지를 먼저 꼭 체크해봐야 한다.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">from</span> transformers <span class=\"token keyword\">import</span> AutoTokenizer<span class=\"token punctuation\">,</span> AutoModelForCausalLM\n\nHF_REPO_NAME <span class=\"token operator\">=</span> <span class=\"token string\">\"HF_REPO_NAME\"</span>\n\ntokenizer <span class=\"token operator\">=</span> AutoTokenizer<span class=\"token punctuation\">.</span>from_pretrained<span class=\"token punctuation\">(</span><span class=\"token string\">\"HF_REPO_NAME\"</span><span class=\"token punctuation\">)</span>\nmodel <span class=\"token operator\">=</span> AutoModelForCausalLM<span class=\"token punctuation\">.</span>from_pretrained<span class=\"token punctuation\">(</span><span class=\"token string\">\"HF_REPO_NAME\"</span><span class=\"token punctuation\">)</span>\n\ntokenizer<span class=\"token punctuation\">.</span>save_pretrained<span class=\"token punctuation\">(</span><span class=\"token string\">'hf_model'</span><span class=\"token punctuation\">)</span>\nmodel<span class=\"token punctuation\">.</span>save_pretrained<span class=\"token punctuation\">(</span><span class=\"token string\">'hf_mode'</span><span class=\"token punctuation\">)</span></code></pre></div>\n<h3>Convert Huggingface to gguf Format</h3>\n<p>허깅페이스 포맷의 모델을 다운로드 했으면, 이제 llama.cpp 구동 포맷인 <code class=\"language-text\">gguf</code> 포맷으로 모델을 변환해야한다.<br>\n모델 변환을 하는 파일은 <code class=\"language-text\">convert_hf_to_gguf.py</code> 파일을 실행하면 되는데, 기본적으로 지원이 되는 모델이 아니라면 <code class=\"language-text\">convert_hf_to_gguf_update.py</code> 파일을 한 번 수정 &#x26; 실행해준 뒤에 모델을 변환해야한다.</p>\n<p><code class=\"language-text\">convert_hf_to_gguf_update.py</code>의 <a href=\"https://github.com/ggerganov/llama.cpp/blob/947538acb8617756a092042ff7e58db18dde05ec/convert_hf_to_gguf_update.py#L66C1-L66C7\"><code class=\"language-text\">models</code> 변수가 선언된 부분</a>에 변환하려는 모델을 추가해주어야한다.</p>\n<div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token punctuation\">{</span><span class=\"token string\">\"name\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"exaone\"</span><span class=\"token punctuation\">,</span>         <span class=\"token string\">\"tokt\"</span><span class=\"token punctuation\">:</span> TOKENIZER_TYPE<span class=\"token punctuation\">.</span>BPE<span class=\"token punctuation\">,</span> <span class=\"token string\">\"repo\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct\"</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">]</span></code></pre></div>\n<p>위와 같은 형식으로 토크나이저가 BPE인지 SPM(sentencepiece)인지를 표시하고 허깅페이스 레포 주소를 기록한 뒤 아래 커맨드를 실행하면 된다.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ python3 convert_hf_to_gguf_update.py <span class=\"token variable\">$HF_TOKEN</span></code></pre></div>\n<p>이 파일은 <code class=\"language-text\">convert_hf_to_gguf</code>의 <code class=\"language-text\">get_base_vocab_pre</code>라는 메서드를 생성하는 역할을 한다. 해당 과정이 잘 됐으면 <code class=\"language-text\">convert_hf_to_gguf</code> 파일을 실행하면 된다!</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ python3 convert_hf_to_gguf.py --outfile models/llama-cpp-model.gguf --outtype bf16 --model hf_model</code></pre></div>\n<h3>Run</h3>\n<p>프로젝트 빌드 &#x26; 모델 변환까지 잘 되었으면 아래 명령어를 실행해서 <code class=\"language-text\">-p</code> 옵션으로 준 프롬프트에 대해서 모델이 뒤이어서 잘 생성하는지를 확인하면 된다.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">./build/bin/llama-cli -m your_model.gguf -p <span class=\"token string\">\"I believe the meaning of life is\"</span> -n <span class=\"token number\">128</span>\n\n<span class=\"token comment\"># Output:</span>\n<span class=\"token comment\"># I believe the meaning of life is to find your own truth and to live in accordance with it. For me, this means being true to myself and following my passions, even if they don't align with societal expectations. I think that's what I love about yoga – it's not just a physical practice, but a spiritual one too. It's about connecting with yourself, listening to your inner voice, and honoring your own unique journey.</span></code></pre></div>\n<h3>llama-server</h3>\n<p>위 llama-cli는 간단한 테스트를 위한 파일이라면 실제로 API 형태로 사용을 위해서는 <code class=\"language-text\">llama-server</code> 파일을 이용하면 된다.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">$ ./build/bin/llama-server -m your_model.gguf --port <span class=\"token number\">8080</span>\n\n<span class=\"token comment\"># Basic web UI can be accessed via browser: http://localhost:8080</span></code></pre></div>\n<p>위 명령어가 잘 실행되었으면 아래 같은 curl 등의 커맨드로 요청을 보내면 된다.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> --request POST <span class=\"token punctuation\">\\</span>\n--url http://localhost:8080/completion <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">\"Content-Type: application/json\"</span> <span class=\"token punctuation\">\\</span>\n--data <span class=\"token string\">'{\"prompt\": \"가나다라마바사아자차카타\",\" n_predict\": -1, \"stream\": true}'</span></code></pre></div>\n<p>llama-server 실행시 여러 옵션을 활용할 수 있는데, 자세한 내용은 <a href=\"https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md\">이 문서</a>를 살펴보면 된다.</p>\n<h2>Android에서 llama.cpp 돌려보기</h2>\n<p>감사하게도 llama.cpp에서는 Android NDK를 이용한 빌드도 지원해준다.</p>\n<p>관련 문서는 <a href=\"https://github.com/ggerganov/llama.cpp/blob/master/docs/android.md\">이 문서</a>를 참고하면 된다. 아래 영상은 Pixel 5 폰에서 구동한 llama-2 7B 데모 영상이다.</p>\n<p><a href=\"https://user-images.githubusercontent.com/271616/225014776-1d567049-ad71-4ef2-b050-55b0b3b9274c.mp4\">https://user-images.githubusercontent.com/271616/225014776-1d567049-ad71-4ef2-b050-55b0b3b9274c.mp4</a></p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"h1","properties":{},"children":[{"type":"text","value":"llama.cpp (On device llm inference tool)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"img","properties":{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSiULtz3uHsF-6HAuU2sAyxlSxP7jRAuNndVA&s","width":400},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"최근에 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/ggerganov/llama.cpp"},"children":[{"type":"text","value":"llama.cpp"}]},{"type":"text","value":"를 사용해봤는데, 상당히 편리하고 미래에 더 많이 쓰일 툴이라는 생각이 들어서 기록해둔다!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{},"children":[{"type":"text","value":"llama.cpp란?"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"대표적인 오픈소스 LLM인 Meta의 llama에서 이름을 따온 이 라이브러리는 llama에만 종속되는게 아닌 오픈소스 LLM들을 순수 C/C++로만 인퍼런스 가능하게 해주는 툴이다. 일반적으로 AI 모델들은 대부분 Python 기반으로 작동하기 때문에 온디바이스 상에서 LLM 구동을 위해서는 제약이 꽤 있는 편이다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"img","properties":{"src":"https://github.com/user-attachments/assets/a787c756-2843-4a91-9bdd-cd34a285ddde","width":350},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"일반적인 리눅스 기반 서버에서는 쉽게 사용 가능한 PyTorch, Hugginface Transformers 등을 온디바이스 상에서 구동하려면 라이브러리 단에서 제공되는 API도 한정적일 뿐더러 연산 대부분이 GPU에 맞춰져 있기 때문에 파이썬 기반으로 llm을 온비다이스에서 구동하기란 상당히 어려운 일이다. (매우 큰 프로젝트가 될 것)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"이러한 문제를 해결하기 위해 llama.cpp는 순수 C/C++ 기반으로 LLM 구동을 가능하게 하며, CUDA/ARM/Android/Vulkan 등 여러 하드웨어 기반으로 돌아갈 수 있도록 하는 프로젝트다!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{},"children":[{"type":"text","value":"llama.cpp 사용법"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"img","properties":{"src":"https://github.com/user-attachments/assets/5ee981ad-e4b5-40b8-9546-3669e08b4d8e","width":400},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"그럼 llama.cpp 사용법을 살펴보자!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Build llama.cpp"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"어떤 환경에서 사용하는지에 따라 빌드 방법이 다르기 때문에 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md"},"children":[{"type":"text","value":"llama.cpp의 공식 How to build 도큐먼트"}]},{"type":"text","value":"를 살펴보는걸 추천한다. 여기서는 linux or Mac 환경에서의 빌드 방법만 다루겠다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"git clone https://github.com/ggerganov/llama.cpp\ncd llama.cpp"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Using make (linux or Mac)"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"make"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Using CMake"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cmake -B build\ncmake --build build --config Release"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Download Huggingface Model"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"프로젝트 build가 되었으면 사용할 허깅페이스 모델을 로컬에 다운받아 놓는다. 여기서 주의할 점은 llama.cpp는 아직 현재진행형 프로젝트이기 때문에 "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"일부 모델들만 지원"}]},{"type":"text","value":"한다는 점이다. llama.cpp의 README.md를 참고하여 내가 사용하려는 모델을 지원하는지를 먼저 꼭 체크해봐야 한다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" transformers "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" AutoTokenizer"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" AutoModelForCausalLM\n\nHF_REPO_NAME "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"HF_REPO_NAME\""}]},{"type":"text","value":"\n\ntokenizer "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" AutoTokenizer"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"from_pretrained"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"HF_REPO_NAME\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nmodel "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" AutoModelForCausalLM"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"from_pretrained"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"HF_REPO_NAME\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n\ntokenizer"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"save_pretrained"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'hf_model'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\nmodel"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"save_pretrained"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'hf_mode'"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Convert Huggingface to gguf Format"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"허깅페이스 포맷의 모델을 다운로드 했으면, 이제 llama.cpp 구동 포맷인 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"gguf"}]},{"type":"text","value":" 포맷으로 모델을 변환해야한다."},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"\n모델 변환을 하는 파일은 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"convert_hf_to_gguf.py"}]},{"type":"text","value":" 파일을 실행하면 되는데, 기본적으로 지원이 되는 모델이 아니라면 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"convert_hf_to_gguf_update.py"}]},{"type":"text","value":" 파일을 한 번 수정 & 실행해준 뒤에 모델을 변환해야한다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"convert_hf_to_gguf_update.py"}]},{"type":"text","value":"의 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/ggerganov/llama.cpp/blob/947538acb8617756a092042ff7e58db18dde05ec/convert_hf_to_gguf_update.py#L66C1-L66C7"},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"models"}]},{"type":"text","value":" 변수가 선언된 부분"}]},{"type":"text","value":"에 변환하려는 모델을 추가해주어야한다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"python"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-python"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"name\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"exaone\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"         "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"tokt\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" TOKENIZER_TYPE"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"."}]},{"type":"text","value":"BPE"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"repo\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"위와 같은 형식으로 토크나이저가 BPE인지 SPM(sentencepiece)인지를 표시하고 허깅페이스 레포 주소를 기록한 뒤 아래 커맨드를 실행하면 된다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"$ python3 convert_hf_to_gguf_update.py "},{"type":"element","tagName":"span","properties":{"className":["token","variable"]},"children":[{"type":"text","value":"$HF_TOKEN"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"이 파일은 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"convert_hf_to_gguf"}]},{"type":"text","value":"의 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"get_base_vocab_pre"}]},{"type":"text","value":"라는 메서드를 생성하는 역할을 한다. 해당 과정이 잘 됐으면 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"convert_hf_to_gguf"}]},{"type":"text","value":" 파일을 실행하면 된다!"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"$ python3 convert_hf_to_gguf.py --outfile models/llama-cpp-model.gguf --outtype bf16 --model hf_model"}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Run"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"프로젝트 빌드 & 모델 변환까지 잘 되었으면 아래 명령어를 실행해서 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-p"}]},{"type":"text","value":" 옵션으로 준 프롬프트에 대해서 모델이 뒤이어서 잘 생성하는지를 확인하면 된다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"./build/bin/llama-cli -m your_model.gguf -p "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"I believe the meaning of life is\""}]},{"type":"text","value":" -n "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"128"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# Output:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# I believe the meaning of life is to find your own truth and to live in accordance with it. For me, this means being true to myself and following my passions, even if they don't align with societal expectations. I think that's what I love about yoga – it's not just a physical practice, but a spiritual one too. It's about connecting with yourself, listening to your inner voice, and honoring your own unique journey."}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"llama-server"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"위 llama-cli는 간단한 테스트를 위한 파일이라면 실제로 API 형태로 사용을 위해서는 "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"llama-server"}]},{"type":"text","value":" 파일을 이용하면 된다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"$ ./build/bin/llama-server -m your_model.gguf --port "},{"type":"element","tagName":"span","properties":{"className":["token","number"]},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"# Basic web UI can be accessed via browser: http://localhost:8080"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"위 명령어가 잘 실행되었으면 아래 같은 curl 등의 커맨드로 요청을 보내면 된다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"curl"}]},{"type":"text","value":" --request POST "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\\"}]},{"type":"text","value":"\n--url http://localhost:8080/completion "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\\"}]},{"type":"text","value":"\n--header "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"Content-Type: application/json\""}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\\"}]},{"type":"text","value":"\n--data "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'{\"prompt\": \"가나다라마바사아자차카타\",\" n_predict\": -1, \"stream\": true}'"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"llama-server 실행시 여러 옵션을 활용할 수 있는데, 자세한 내용은 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md"},"children":[{"type":"text","value":"이 문서"}]},{"type":"text","value":"를 살펴보면 된다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{},"children":[{"type":"text","value":"Android에서 llama.cpp 돌려보기"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"감사하게도 llama.cpp에서는 Android NDK를 이용한 빌드도 지원해준다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"관련 문서는 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/ggerganov/llama.cpp/blob/master/docs/android.md"},"children":[{"type":"text","value":"이 문서"}]},{"type":"text","value":"를 참고하면 된다. 아래 영상은 Pixel 5 폰에서 구동한 llama-2 7B 데모 영상이다."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://user-images.githubusercontent.com/271616/225014776-1d567049-ad71-4ef2-b050-55b0b3b9274c.mp4"},"children":[{"type":"text","value":"https://user-images.githubusercontent.com/271616/225014776-1d567049-ad71-4ef2-b050-55b0b3b9274c.mp4"}]}]}],"data":{"quirksMode":false}},"excerpt":"llama.cpp (On device llm inference tool) 최근에 llama.cpp를 사용해봤는데, 상당히 편리하고 미래에 더 많이 쓰일 툴이라는 생각이 들어서 기록해둔다! llama.cpp란? 대표적인 오픈소스 LLM인 Meta…","fields":{"readingTime":{"text":"7 min read"}},"frontmatter":{"title":"llama.cpp (On device llm inference tool)","userDate":"7 September 2024","date":"2024-09-07T10:00:00.000Z","tags":["toolkit","llama","parallelism","ondevice"],"excerpt":null,"image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","backgroundColor":"#f8f8f8","images":{"fallback":{"src":"/static/4e87fa63ace7633b9f27aff5cbd7d283/ccc41/llama-cpp.png","srcSet":"/static/4e87fa63ace7633b9f27aff5cbd7d283/ccc41/llama-cpp.png 512w","sizes":"100vw"},"sources":[{"srcSet":"/static/4e87fa63ace7633b9f27aff5cbd7d283/d689f/llama-cpp.webp 512w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":1}}},"author":[{"id":"Soohwan Kim","bio":"Co-founder/A.I. engineer at TUNiB.","avatar":{"children":[{"gatsbyImageData":{"layout":"fullWidth","backgroundColor":"#282838","images":{"fallback":{"src":"/static/a9e6b445142b247ee4cfa66155398bb2/0d6f4/soohwan.png","srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/248f9/soohwan.png 40w,\n/static/a9e6b445142b247ee4cfa66155398bb2/fd435/soohwan.png 80w,\n/static/a9e6b445142b247ee4cfa66155398bb2/0d6f4/soohwan.png 120w","sizes":"100vw"},"sources":[{"srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/e7f45/soohwan.webp 40w,\n/static/a9e6b445142b247ee4cfa66155398bb2/589ec/soohwan.webp 80w,\n/static/a9e6b445142b247ee4cfa66155398bb2/71a38/soohwan.webp 120w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.6833333333333333}}]}}]}},"relatedPosts":{"totalCount":25,"edges":[{"node":{"id":"f2a32d9d-b206-5141-8c2d-5440e19caf65","excerpt":"llama.cpp (On device llm inference tool) 최근에 llama.cpp를 사용해봤는데, 상당히 편리하고 미래에 더 많이 쓰일 툴이라는 생각이 들어서 기록해둔다! llama.cpp란? 대표적인 오픈소스 LLM인 Meta…","frontmatter":{"title":"llama.cpp (On device llm inference tool)","date":"2024-09-07T10:00:00.000Z"},"fields":{"readingTime":{"text":"7 min read"},"slug":"/llama-cpp/"}}},{"node":{"id":"fa28b462-1fe2-5d0f-932b-f28e32f1da18","excerpt":"Elastic Search logstash - Nori 토크나이저 설정 이번에 회사에서 검색 기능을 구현하면서 Elastic Search를 다루게 됐다. 이 엔진을 다루면서 삽질을 많이 했는데, 다음에는 하지 않도록 기록용으로 남겨둔다. Elastic…","frontmatter":{"title":"[ELK] Elastic Search logstash - Nori 토크나이저 설정","date":"2024-08-24T10:00:00.000Z"},"fields":{"readingTime":{"text":"4 min read"},"slug":"/elastic-search/"}}},{"node":{"id":"d1f4a9ee-591d-5e95-a930-a1bf17701b0e","excerpt":"단 30줄로 ChatGPT 웹페이지 만들기 (Streamlit chat_message) Streamlit은 파이썬 기반의 오픈소스 웹 UI 라이브러리입니다. 매우 간단한 코드로 손쉽게 웹페이지를 띄울 수 있어서 간단한 데모나 PoC…","frontmatter":{"title":"단 30줄로 ChatGPT 웹페이지 만들기 (Streamlit chat_message)","date":"2024-05-01T10:00:00.000Z"},"fields":{"readingTime":{"text":"9 min read"},"slug":"/streamlit-chatgpt/"}}},{"node":{"id":"4e37b604-dce8-5e09-85e8-337d4f03f0cb","excerpt":"Terabyte(TB) 단위 데이터 셔플링 - terashuf 리눅스에서 TB 단위의 데이터를 line 기준으로 셔플링이 필요할 때가 (가끔) 있다. 직접 코딩해서 쓰기에는 메모리, 속도 등을 신경써야해서 생각보다 큰 작업인데, terashuf…","frontmatter":{"title":"Terabyte(TB) 단위 데이터 셔플링 - terashuf","date":"2024-03-20T10:00:00.000Z"},"fields":{"readingTime":{"text":"1 min read"},"slug":"/terashuf/"}}},{"node":{"id":"ec8327c3-3c4d-51da-9440-8cb74fd1effe","excerpt":"tmux - conf Tmux 설정을 위한 tmux configuraion 기록","frontmatter":{"title":"tmux - conf","date":"2024-02-15T10:00:00.000Z"},"fields":{"readingTime":{"text":"2 min read"},"slug":"/tmux-conf/"}}}]}},"pageContext":{"slug":"/llama-cpp/","prev":{"excerpt":"Elastic Search logstash - Nori 토크나이저 설정 이번에 회사에서 검색 기능을 구현하면서 Elastic Search를 다루게 됐다. 이 엔진을 다루면서 삽질을 많이 했는데, 다음에는 하지 않도록 기록용으로 남겨둔다. Elastic…","frontmatter":{"title":"[ELK] Elastic Search logstash - Nori 토크나이저 설정","tags":["toolkit","web","chatgpt"],"date":"2024-08-24T10:00:00.000Z","draft":null,"excerpt":null,"image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/jpeg;base64,/9j/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAANABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUHCAn/xAAVAQEBAAAAAAAAAAAAAAAAAAACBP/aAAwDAQACEAMQAAAB7251qCOUWUTlT//EAB0QAAIBBAMAAAAAAAAAAAAAAAQFAQACAwYHERb/2gAIAQEAAQUCKnLA/HO4OtlCp8ilnb5C3oAPGvE//8QAHBEAAwEAAgMAAAAAAAAAAAAAAgMEAQATFCEk/9oACAEDAQE/AX7UakJRSEyxuVXT8qHNqSqepPh45g9syzZQt5kksIimWO5ub65//8QAGhEAAwEBAQEAAAAAAAAAAAAAAgMEARQABf/aAAgBAgEBPwHjRt4fRPo16oqYVBldISYFL5Hm1kQsyV9AbIIJe1RNStjwUYi5uH7/xAApEAADAAAFAgMJAAAAAAAAAAABAgMABBESEwUGISIjFBUxMzVBQlJT/9oACAEBAAY/Ar8Cl78NeFAyoWrxtxrvbypufQbm8q/E+Aw0uu9qdxdt57Ke0Jb37lxI0eGbbLhUok1jbVdKJWTOlZaVVmU7jh7x6lnunZlcpSCvlabZ6alw1Jgo1CCzD5q+RmX8jj651tSdDTjzegY7dFHqCrmUwfSlalh/U2xHJye1JQUpNr0NaBNxKoXPiVmDsT9UVV+2P//EABoQAQACAwEAAAAAAAAAAAAAAAERIQAQMUH/2gAIAQEAAT8hSzTiqQr6DvHuYEwZoZArG04V1Kg0eiOdEQFWqQiPjgurikAeu2YQogiMYAG8Qwc//9oADAMBAAIAAwAAABAQz//EABYRAQEBAAAAAAAAAAAAAAAAAAEQMf/aAAgBAwEBPxDRce8uZNWkTY//xAAVEQEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAgEBPxC9D46IaA0NHL//xAAYEAEBAQEBAAAAAAAAAAAAAAABABEhMf/aAAgBAQABPxDg/e28m956YuWY0rK8HCOIgRNPG6KYHx6IJhBWMzbUvCh+BACQFX0ghu2BmdVlP//Z"},"images":{"fallback":{"src":"/static/a212cca5adc07a10c064f5aa2d19cb90/c4c9c/logstash.jpg","srcSet":"/static/a212cca5adc07a10c064f5aa2d19cb90/c4c9c/logstash.jpg 512w","sizes":"100vw"},"sources":[{"srcSet":"/static/a212cca5adc07a10c064f5aa2d19cb90/023c4/logstash.webp 512w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.6328125}}},"author":[{"id":"Soohwan Kim","bio":"Co-founder/A.I. engineer at TUNiB.","avatar":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAABYlAAAWJQFJUiTwAAADjElEQVQ4y23Oy48TdQDA8TExEaTttvSBfdHddru7bWc6bWd+8+i0u23n0SdlBRQXZGHDgiiLDwgqXjCIJEaC8cLBmHgwUU9EYzRqQuLJi/4NJB6NF+8evgbOHr7XT76SM5ix7s4QnRHnnm9yZzvBTIswN8JcP5bC67ZoWi7CdtFsn5bloZo+dSNAMYbIIqCmD6mJIVXdR3J6I7r9IQ3T59pZlW+uxzndCbPdC/HZXoq3TikowsfqBOjOmFZ7SrM9p2kfRbXn1O0jKNbsSbJ5BMnu9Gl3+qiiz4OPSvz0QRLHFGwOZH6+neLHT5YRbRerM0J0JrTas/8FZXNKzZgg2es+ZtvDdbs8+iHJl+9lWVP7OG2br26k+PvXJCfmFqoYIpwhTXtMwxpTN0coxhjFmCKbE2rGmKoYPQY9qi2fyzsq//4e5sNXi5TlLqbd5t6lPH/9kuDTG2usqgGi7dO0hzSsIXUzQDaGKGKMLEZUxZCKCJB02+PUpMH9vQwP7ybYnSxyfNrjwumA3dEiD94v8cfnK7xzWsbpujQtH9X0qBs+iuEjC5+a7lPVPSqai9SyelyYFbjkh5hqC3TkKOutLON2nkYpgtuMcT6IszdPslo8SLlcpmUH1A0XRQyQhUtNuFQ1l4o2QFI1h3OTVXbcg+grIfSVBRqlEGopgrYSRi0e4KiIse1mScSeopA/iLADmoZL3Rgg631q+oCq1qeq95FOzhQefpzn7eMpBmqcoBVj04pzwkky0eNMRYIdL8F3twusLe2nslrE6g5pGX1U8/FhD1nvUW1tUJK7SH9+n+DR1zF2vQSvH0lz88wiV45V2J1WuHqsxLXNAnuzNJdfWmK5/BylUgFhb6DZAxR9g7rpIos+Wttja2uE9M9vYb69k+DqfJErWzLOuoVqdKlpDo4jODms4zlFckuHObx4iHwuRi6fYqmYY201x/LqMrnFDNl8gRvvukhNdT9394rcOlNFMxrUhYFmW9imTEsp0mhWKC2nWSokyWSiFA7HSKcXiEb34fayyLVniUQk8rmn2drKIqlqiNcuVrh2ymQS1Nh8sc/GoMEbl7u8eb5D1yqTzkRJJsOkkiGymQVShyLE4yHWKnEq1RjpTIhmI8r2y3mkyloI38uha1n6bpVXrkw5+4LD/S/2uHnrIopaJhZ9hmQqwqHkAXJP8BDhyD46ZoWdMxOGcx/PNfECk/8AbxXdRjRliPoAAAAASUVORK5CYII="},"images":{"fallback":{"src":"/static/a9e6b445142b247ee4cfa66155398bb2/7cf1f/soohwan.png","srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/34f77/soohwan.png 750w,\n/static/a9e6b445142b247ee4cfa66155398bb2/a94f6/soohwan.png 1080w,\n/static/a9e6b445142b247ee4cfa66155398bb2/7cf1f/soohwan.png 1148w","sizes":"100vw"},"sources":[{"srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/38420/soohwan.webp 750w,\n/static/a9e6b445142b247ee4cfa66155398bb2/7470d/soohwan.webp 1080w,\n/static/a9e6b445142b247ee4cfa66155398bb2/b5ef6/soohwan.webp 1148w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.6829268292682927}}}}]},"fields":{"readingTime":{"text":"4 min read"},"layout":"post","slug":"/elastic-search/"}},"next":{"excerpt":"Throwback 2024 Throwback 2024 2020년 회고 글 2021년 회고 글 2023년 회고 글 어느덧 4번째 1년 회고글이자, 5년차 회고글입니다! 2024년은 유독 길게 느껴졌습니다. 202…","frontmatter":{"title":"Throwback 2024","tags":["record"],"date":"2025-01-01T10:00:00.000Z","draft":false,"excerpt":null,"image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAADlUlEQVQ4yxXRW09bBQDA8eOjDz746jfwcckWjfpgMuLM1GwOiI4Bc1Aug1E6yp1CKW25lJZLodCutB2XlnIKhwI9PS2FCkJl4zJgF3BGUMThvCQ6zVyMiX/j7yv8BKMkUZVYpiWRxKlEGJRnMSsxzHKc7liMqUWZfkVm9+GXJNcWGEvIGBa/QDO/zA0lSfXiCpZIBPP0NO0RGaEkOMWl8OcY5xf4/kGSw71VzNMSE0tJfPEY7niEpojMyZNHbOxtMLScxL2xgW51Hf+9TXLjqyjLCn5pnOKJGYSbosRSapGuWIzQwjy8eEJvTOGK20/t7TEC0TCt8TgjU0EazGYMchxXLML8zjo8P0E/OYtNDGEYHkUjRRA04yGO91NY766hFqMk5mW0cwqnTp8m7c23cIZCtITnMDbU8kba+0hLCayd7XSNegiGRKokGa00h8oXoDIsI6hFCePCMhU+H10uO9JUkPqeLrSlhWjVZVTMRNFMzlHW2ESzpQmdnKAzLNNgbGPUWMvlmw1oBz2kf5xOiXcUoXRikvzREH2uAT41tHG+UE1n6TWyLXaK2joxBMdp9I+R1zfAZ40G8rXVaBwu2tpb+OiDi5wrr6PaPUJhxhVKHE6ECnGG4sAM191+Mr1TvG12kuEMkBlQKB+6jb/XgEVfhaWjmQL7ECr7LWqGfGQNhzlvdXPFMUyRV+Rqt5ea/1NOze7y0sY/CLvw2tozHAc/cnbnN4RteDV+xIeuCc6KS7weWuOV1WekH/xO6niZtK1fOLP1jJe3/6X16Z8U7v/MGfkRwsXoHYpXdjn3zV/krH8LR+sEHt7nwv2fkA++pnf7ATlHz/nk6AWlT/+m7dc/0D3a44ejB+wePua9rWOqN7coTG1yeXUPwZpc4vawl7HNu2ijSd5tcZI7lcCvzHLyeI3wnRU863fJKdZgPzymXVQwjYpI8Vn6HYOMfHeAZTJE89I9fF/tIzTOyhQbTWhsXVhv9fPODT21/YOYfB7KVCpsfd2YdvYoKFJjF4cxeT0YtBV46rXUdfcxLQ3h0ldRGkvRm1pFCM4EyLP1ofL6MQSDZGdlo66qxBAUGcvPQHGYyatqJvPSVUY6dNhKclDlXqP2RhkTNgN1qgJM5cXISoiVVBTBOeGloLOH6y4fWT23uGC0kmHpQ+3y0e7owe0boLJJT019HfpmHfpWI94xJ75xN4FxN55uE/YOHZ09VsZFD/8B1xbYlZPDnsMAAAAASUVORK5CYII="},"images":{"fallback":{"src":"/static/ebbacb98281fd6ed90e44538e57d577b/77b95/2024.png","srcSet":"/static/ebbacb98281fd6ed90e44538e57d577b/26a01/2024.png 750w,\n/static/ebbacb98281fd6ed90e44538e57d577b/11604/2024.png 1080w,\n/static/ebbacb98281fd6ed90e44538e57d577b/f775f/2024.png 1366w,\n/static/ebbacb98281fd6ed90e44538e57d577b/77b95/2024.png 1920w","sizes":"100vw"},"sources":[{"srcSet":"/static/ebbacb98281fd6ed90e44538e57d577b/4d752/2024.webp 750w,\n/static/ebbacb98281fd6ed90e44538e57d577b/286f5/2024.webp 1080w,\n/static/ebbacb98281fd6ed90e44538e57d577b/78496/2024.webp 1366w,\n/static/ebbacb98281fd6ed90e44538e57d577b/e61f8/2024.webp 1920w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.6416666666666666}}},"author":[{"id":"Soohwan Kim","bio":"Co-founder/A.I. engineer at TUNiB.","avatar":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAABYlAAAWJQFJUiTwAAADjElEQVQ4y23Oy48TdQDA8TExEaTttvSBfdHddru7bWc6bWd+8+i0u23n0SdlBRQXZGHDgiiLDwgqXjCIJEaC8cLBmHgwUU9EYzRqQuLJi/4NJB6NF+8evgbOHr7XT76SM5ix7s4QnRHnnm9yZzvBTIswN8JcP5bC67ZoWi7CdtFsn5bloZo+dSNAMYbIIqCmD6mJIVXdR3J6I7r9IQ3T59pZlW+uxzndCbPdC/HZXoq3TikowsfqBOjOmFZ7SrM9p2kfRbXn1O0jKNbsSbJ5BMnu9Gl3+qiiz4OPSvz0QRLHFGwOZH6+neLHT5YRbRerM0J0JrTas/8FZXNKzZgg2es+ZtvDdbs8+iHJl+9lWVP7OG2br26k+PvXJCfmFqoYIpwhTXtMwxpTN0coxhjFmCKbE2rGmKoYPQY9qi2fyzsq//4e5sNXi5TlLqbd5t6lPH/9kuDTG2usqgGi7dO0hzSsIXUzQDaGKGKMLEZUxZCKCJB02+PUpMH9vQwP7ybYnSxyfNrjwumA3dEiD94v8cfnK7xzWsbpujQtH9X0qBs+iuEjC5+a7lPVPSqai9SyelyYFbjkh5hqC3TkKOutLON2nkYpgtuMcT6IszdPslo8SLlcpmUH1A0XRQyQhUtNuFQ1l4o2QFI1h3OTVXbcg+grIfSVBRqlEGopgrYSRi0e4KiIse1mScSeopA/iLADmoZL3Rgg631q+oCq1qeq95FOzhQefpzn7eMpBmqcoBVj04pzwkky0eNMRYIdL8F3twusLe2nslrE6g5pGX1U8/FhD1nvUW1tUJK7SH9+n+DR1zF2vQSvH0lz88wiV45V2J1WuHqsxLXNAnuzNJdfWmK5/BylUgFhb6DZAxR9g7rpIos+Wttja2uE9M9vYb69k+DqfJErWzLOuoVqdKlpDo4jODms4zlFckuHObx4iHwuRi6fYqmYY201x/LqMrnFDNl8gRvvukhNdT9394rcOlNFMxrUhYFmW9imTEsp0mhWKC2nWSokyWSiFA7HSKcXiEb34fayyLVniUQk8rmn2drKIqlqiNcuVrh2ymQS1Nh8sc/GoMEbl7u8eb5D1yqTzkRJJsOkkiGymQVShyLE4yHWKnEq1RjpTIhmI8r2y3mkyloI38uha1n6bpVXrkw5+4LD/S/2uHnrIopaJhZ9hmQqwqHkAXJP8BDhyD46ZoWdMxOGcx/PNfECk/8AbxXdRjRliPoAAAAASUVORK5CYII="},"images":{"fallback":{"src":"/static/a9e6b445142b247ee4cfa66155398bb2/7cf1f/soohwan.png","srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/34f77/soohwan.png 750w,\n/static/a9e6b445142b247ee4cfa66155398bb2/a94f6/soohwan.png 1080w,\n/static/a9e6b445142b247ee4cfa66155398bb2/7cf1f/soohwan.png 1148w","sizes":"100vw"},"sources":[{"srcSet":"/static/a9e6b445142b247ee4cfa66155398bb2/38420/soohwan.webp 750w,\n/static/a9e6b445142b247ee4cfa66155398bb2/7470d/soohwan.webp 1080w,\n/static/a9e6b445142b247ee4cfa66155398bb2/b5ef6/soohwan.webp 1148w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.6829268292682927}}}}]},"fields":{"readingTime":{"text":"22 min read"},"layout":"","slug":"/2024/"}},"primaryTag":"toolkit"}},
    "staticQueryHashes": ["3170763342","3229353822"]}