분류 전체보기 (200) 썸네일형 리스트형 DeepSeek 저는 LLM관련 개발자나 전문가는 아님IT업에 종사하는 개발자이자 엔지니어이자 데이터 분석가로써 LLM을 활용하고자 여기저기 기웃거림따라서 잘못된 내용이 있을 수 있음 이 글은 아들에게 전달해주기 위해서 간략하게 정리한 내용으로 상세한 내용 보다는 대략적인 개념 위주로 정리함 아들아DeepSeek에 대해서 간단하게 핵심만 알아본 내용이라고 생각하면 될 것 같다.어제 Local에 다운 받은 모델이고 ~ 사이에 추론 과정을 보여주며 결과를 만드는 것을 보고 어떻게 느꼈는지 모르겠지만 스케일링의 법칙 아래서 거대 조직에서만 가능할 거라 생각했던 모델을 만드는 것이 이렇게 여러가지 기법을 가지고 그 한계를 극복하는 과정을 걷고 있는 중국이 무섭기도 하지만 새로운 가능성을 만들어 주고 있다고 생각한다. 내.. Try it 목표 :- LLM 관련 Chatbot 구동- Local LLM 및 Vector store - 모든 환경은 docker container 단계 1. Install Linux(Ububtu) on Windows windows + wsl - linux env on windows - ubuntu * (Searching keyword) windoes wsl ubuntu 2. connect to Linux ssh and telnet client - ex) putty, mobaxterm* * (Searching keyword) putty or mobaxterm 3. Install Docker install docker - install docker * (Searching keyword) install.. (Docker) ollama + chroma로 RAG 구성 RAG 구성 with docker 환경 정의환경 변수>>> CHROMA_IP = '***'>>> CHROMA_PORT = 8000>>> OLLAMA_IP = '***'>>> OLLAMA_PORT = 11434>>> LLM_MODEL = 'llama3.1'ollama / chromadb 모두 docker로 구성됨 Vector store 구성 및 Document embeddingChromadb client 정의>>> import chromadb>>> clientChroma = chromadb.HttpClient(host=CHROMA_IP, port=CHROMA_PORT)>>> print(clientChroma.list_collections())chromadb 접속을 위한 client 정의list_colle.. LangChain - LLM Parameter from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate prompt = ChatPromptTemplate.from_messages([ ("system", "This system can response about IT system"), ("user", "{user_input}"), ]) params = { "temperature" : 0.3, "max_tokens" : 100, "frequency_penalty" : 0.5, "presence_penalty" : 0.5, "stop" : ["\n"] } model = ChatOpenAI(max_tokens=500) query = 'Pacemake.. LangChain - 2.6 Retrievers 참조 : https://python.langchain.com/docs/modules/data_connection/retrievers/ Retrievers | 🦜️🔗 Langchain A retriever is an interface that returns documents given an unstructured query. It is more general than a vector store. python.langchain.com Retrievers 구조화 되지 않은 쿼리가 제공되면 문서를 반환하는 Interface로 문서 저장 없이 반환하기만 함 Name Index Type Uses an LLM When to use Description Vectorstore Vectorstore No 쉽게 사용 가능 .. LangChain - 2.5 Vector stores GetStarted 참조 : https://python.langchain.com/docs/modules/data_connection/vectorstores/ Vector stores | 🦜️🔗 Langchain Head to Integrations for documentation on built-in integrations with 3rd-party vector stores. python.langchain.com Vector stores Embedding 된 vector 값을 저장하는 DB 여기서는 Chroma 기준으로 테스트 진행함 from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings f.. LangChain - 2.4 Text embedding models 참조 : https://python.langchain.com/docs/modules/data_connection/text_embedding/ Text embedding models | 🦜️🔗 Langchain Head to Integrations for documentation on built-in integrations with text embedding model providers. python.langchain.com Text embedding models Embedding class = text embedding models와 i/f를 위하여 design되었으며 다양한 embedding model 제공됨 (OpenAI, Hugging Face, Cohere 등) Embedding은 Text 조각의.. LangChain - 2.3 Text Splitter 참조 : https://python.langchain.com/docs/modules/data_connection/document_transformers/ Text Splitters | 🦜️🔗 Langchain Once you've loaded documents, you'll often want to transform them to better suit your application. The simplest example python.langchain.com Text Splitter 다음과 같이 동작 아주 작은 chunk 단위 (문장)로 나눔 특정 크기에 도달할때 까지 작은 단위를 큰 단위의 chunk 단위로 결합 해당 크기에 도달하면 해당 chunk를 고유한 텍스트 조작으로 만든 다음 약간 겹치는 새로운.. 이전 1 2 3 4 ··· 25 다음