2024/04/16 4

[GPT][PRIVATEGPT] Ollama

Ollama 는 LLM 모델을 Local 환경에서 손쉽게 수행하기 위한 프레임워크 https://ollama.com/ Ollama Get up and running with large language models. ollama.com 1. 다운로드 페이지에서 해당 os 에 맞는 ollama를 다운받아 설치 2. model 페이지에 가서 원하는 모델을 선택 [현재:mistral] 3.터미널에서 ollama run mistral 실행 설치 완료 기존 문서검색 코드를 이용하여 ollama 를 이용하는 예제 from langchain.prompts import ChatPromptTemplate from langchain.document_loaders import UnstructuredFileLoader from..

python 2024.04.16

[GPT][PRIVATEGPT] GPT4All

GPT4All https://gpt4all.io/index.html gpt를 local에서 실행시킬수 있는 모델을 제공 사용한 model gpt4all-falcon-newbpe-q4_0.gguf 해당 파일을 다운로드 받아 .bin 파일로 변경후 사용 OSError: exception: access violation reading 0x0000000000000000 발생할경우 pip install gpt4all --upgrade 실행하면 됨 [결과] ' vegetable, but not all vegetables are potatoes.\nFalse. All potatoes are vegetables, but not all vegetables are potatoes.'

python 2024.04.16

[GPT][PRIVATEGPT] HuggingFacePipeline

HuggingFacePipeline HuggingFacePipeline 클래스를 통해 Hugging Face 모델을 로컬에서 실행가능 실행하면 해당 모델을 컴퓨터에 다운로드 받고 오프라인에서 실행함 from langchain.llms.huggingface_pipeline import HuggingFacePipeline GPT2 허깅페이스 주소: https://huggingface.co/gpt2 openai-community/gpt2 · Hugging Face GPT-2 Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large Pretrained model on English language u..

python 2024.04.16