안녕하세요. Section 3 이론 classification Loss function 질문있습니다. ground truth는 각 class별 실제 확률값이라고 하셨는데, 실제 데이터에서 우리가 주어진 정보는 해당 observation이 어떤 클라스를 가지는지 label정보만 주어집니다. (확률이 아님) 각 loss function별 비교를 위해 설명해주신부분은 이해가 되었으나, 실제로 모델이 학습할때 class별 ground truth 확률값을 모르는 상황에서 어떻게 학습이 되는지 궁금합니다. 혹시라도 강의 후반에 관련 내용이 나온다면 미리 죄송하다는 말씀 드립니다. 감사합니다.
안녕하세요. 1인 광고대행사를 운영하고 있습니다. 광고 이미지에 쓸 한국 여성 이미지를 만들려고 하는데요. 어떤 프롬프트를 넣든 전신 이미지는 나오지 않고 상반신 이미지만 만들어줍니다. 1) 어떤 프롬프트를 넣어야 전신샷을 만들어줄까요? 2) 상반신 이미지를 만들어줄 때 머리카락이나 어깨부분이 잘려서 나옵니다. 이 때도 어떤 프롬프트를 넣어야 여성 이미지가 신체 일부분이 잘리지 않고 이미지를 만들어줄까요?
안녕하세요. 강의 Gradio ChatInterface로 PDF 챗봇 애플리케이션 구현 (실습) 에서 additional inputs 에서 pdf 로딩하고, chunk size, chunk overlap, similarity metric, temperature 까지 해놓고 쿼리로 'what is the attention mechanism in transformers?' 라고 하니 대답으로 ' Error in loading PDF or creating vectorstore' 가 나옵니다. dependencies 는 아래와 같습니다. [tool.poetry.dependencies] python = "^3.12" chromadb = "^0.5.3" python-dotenv = "^1.0.1" langchain = "^0.2.5" langchain-openai = "^0.1.8" langchain-community = "^0.2.5" pypdf = "^4.2.0" gradio = "^4.36.1" gradio-pdf = "^0.0.11" langchain-text-splitters = "^0.2.1" 무엇이 문제일까용??
안녕하세요, 좋은 강의 잘 듣고 있습니다. 다름이 아니라 entropy를 안내해주실때 entropy의 식이 -Σp_i*log(p_i) 위 식이고, p와 1-p에 대한 의미도 잘 이해했습니다. 그런데 대입하는 과정에서 갑자기 -plogp-(1-p)log(1-p) 가 된 것이 이해가 안되네요... 그래프로 그려주시면서 설명해주신 것도 잘 이해가 되는데, 어떤 과정으로 위 식이 나왔는지 이해가 안되서 질문드려요. 제가 단순 시그마 푸는 법을 잊어서 생긴 것이라면 다시 찾아보겠습니다. 두 값을 대입한다는 말이 어떤 것을 의미하는지 잘 이해가 안되서 질문드립니다. 감사합니다.
학습 관련 질문이 있으시면, 상세하게 남겨주세요.문제가 발생한 부분의 코드를 함께 올려주세요.수업 영상 몇 분/초 구간인지 알려주세요. 섹션1-3번째 강의 16분쯤에서 llm.invoke(prompt_text) 이 코드 작성부터 RateLimitError Traceback (most recent call last) Cell In[17], line 1 ----> 1 llm.invoke(prompt_text) File c:\Users\lhm22\AppData\Local\pypoetry\Cache\virtualenvs\qa-bot-nop3jHt_-py3.9\lib\site-packages\langchain_core\language_models\chat_models.py:170 , in BaseChatModel.invoke (self, input, config, stop, kwargs) 159 def invoke( 160 self, 161 input: LanguageModelInput, (...) 165 kwargs: Any, 166 ) -> BaseMessage: 167 config = ensure_config(config) 168 return cast( 169 ChatGeneration, --> 170 self.generate_prompt( 171 [self._convert_input(input)], 172 stop=stop, 173 callbacks=config.get("callbacks"), 174 tags=config.get("tags"), 175 metadata=config.get("metadata"), 176 run_name=config.get("run_name"), 177 run_id=config.pop("run_id", None), 178 **kwargs, 179 ).generations[0][0],... (...) 1027 stream_cls=stream_cls, 1028 ) RateLimitError : Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors .', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}} Output is truncated. View as a scrollable element or open in a text editor . Adjust cell output settings ... 이런 에러가 발생하네요.. 혹시 어떻게 해결할 수 있을까요?
모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 1 - Llama 2 Fine-Tuning 해보기
안녕하세요 강의 내용을 기반으로 실습을 잘 진행 해보고 있습니다. 허깅페이스에서 하나의 모델을 다운받아 테스트를 해보려고 하는데, 모델명.gguf 파일로 되어있는 모델은 autotrain으로 파인튜닝이 잘 진행되지 않아 문의 드립니다. !autotrain llm --train \ --project-name "llama3-finetuning-da-8B-Q4" \ --model "path/llama-3-8B-gguf-Q4_K_M/llama-3-8B-Q4_K_M.gguf" \ --data-path "/path/train_data/korquad" \ --text-column "text" \ --peft \ --quantization "int4" \ --lr 2e-4 \ --batch-size 8 \ --epochs 40 \ --trainer sft \ --model_max_length 2048 답변 부탁드리겠습니다. 감사합니다.
마지막 RAG 강의에서, 첫번째 명령문을 실행시키면, !pip install -q langchain langchain-openai tiktoken chromadb typer 호환과 관련된 에러가 발생합니다. ===================== ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. spacy 3.7.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible. weasel 0.3.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible. ===================== ChatGPT를 통하여 여러 해결방안을 제시받아 시도해 보았는데 해결이 되지 않습니다. 손쉬운 해결 방법이 있을지요?
안녕하세요. 강사님, 실습 라이브러리 설치하기 (requirements.txt) 위해서 어느 폴더에 자료를 저장해야하나요? 가상환경 study로 들어가서 서브로 디렉토리를 따로 만들어야하나요? 아니면 C: drive 개인폴더에 자료저장 공간을 임의로 만들어서 진행해도 되는지요?
학Chroma DB를 활용하여 PDF 파일에 대해 RAG 기반 질의응답 구현 (실습)의 29:00 에 있는 코드를 똑같이 실행했는데, 다음과 같은 에러가 발생했습니다. from langchain_openai import ChatOpenAI from langchain.chains.combine_documents import create_stuff_documents_chain from langchain.chains import create_retrieval_chain model = ChatOpenAI(model ='gpt-3.5-turbo-0125', temperature=0, api_key=OPENAI_API_KEY) document_chain = create_retrieval_chain(model, prompt) retrieval_chain = create_retrieval_chain(retriever, document_chain) response = retrieval_chain.invoke({"input": "what is the attention mechanism in transformers?"}) 에러 메시지 Cell In[163], line 1 ----> 1 response = retrieval_chain.invoke({"input": "what is the attention mechanism in transformers?"}) 2 print(response) ValueError: Invalid input type <class 'dict'>. Must be a PromptValue, str, or list of BaseMessages. Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
모두를 위한 대규모 언어 모델 LLM Part 3 - 구글 제미나이(Google Gemini) API, OpenAI API와 젬마(Gemma)로 AI 어플리케이션 만들기
안녕하세요! 현재 Gemini, Streamlit, LangChain을 이용하여 오류 Q&A 모음 PDF 문서를 학습시켜 해당 문서로 질의응답을 할 수 있는 RAG Chatbot을 구현하는 중에 있습니다. PDF 내용이 정제가 되어 있지 않지만 175개의 모든 페이지를 다 읽어온 것은 확인했는데 같은 페이지에 있는 내용이더라도 답변하는 것이 있고 아닌 것이 있습니다. 또한 같은 질문을 해도 어떤 때는 잘 대답하고 어떤때는 문서에 없다고 대답하는 현상을 발견하고 있습니다... 이런 현상들의 원인이 뭔지 또한 학습시키는 문서를 정제하면 대답 정확도가 조금 올라가는지.. 어떤 형식으로 문서를 정제해야 할지, PDF보단 WORD나 CSV 파일이 더 정확도가 올라갈지 등등 ChatBot의 정확도를 올릴려면 어떤 방식들을 시도해 봐야 하는지 감이 잡히지 않아 질문드립니다.
모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
안녕하세요 답해주셔서 감사합니다. Your goal is to structure the user's query to match the request schema provided below. << Structured Request Schema >> When responding use a markdown code snippet with a JSON object formatted in the following schema: ```json { "query": string \ text string to compare to document contents "filter": string \ logical condition statement for filtering documents } ``` The query string should contain only text that is expected to match the contents of documents. Any conditions in the filter should not be mentioned in the query as well. A logical condition statement is composed of one or more comparison and logical operation statements. A comparison statement takes the form: comp(attr, val) : - comp (eq | ne | gt | gte | lt | lte | contain | like | in | nin): comparator - attr (string): name of attribute to apply the comparison to - val (string): is the comparison value A logical operation statement takes the form op(statement1, statement2, ...) : - op (and | or | not): logical operator - statement1 , statement2 , ... (comparison statements or logical operation statements): one or more statements to apply the operation to Make sure that you only use the comparators and logical operators listed above and no others. Make sure that filters only refer to attributes that exist in the data source. Make sure that filters only use the attributed names with its function names if there are functions applied on them. Make sure that filters only use format YYYY-MM-DD when handling date data typed values. Make sure that filters take into account the descriptions of attributes and only make comparisons that are feasible given the type of data being stored. Make sure that filters are only used as needed. If there are no filters that should be applied return "NO_FILTER" for the filter value. 이런 스키마를 가지고있잖아요. 근데 contain이랑 like가 인식이 안되는 오류가 있습니다. 그래서 에러가 떠버럽니다. 그거에 대해 해결방법이 있을까요 --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-54-5a63d86f57f7> in <cell line: 1>() ----> 1 results = retriever.get_relevant_documents( 2 "롤과 배그가 돌아가는 컴퓨터 견적을 추천해줘" 3 ) 4 5 for res in results: 12 frames /usr/local/lib/python3.10/dist-packages/langchain_core/structured_query.py in _validate_func(self, func) 24 if isinstance(func, Comparator) and self.allowed_comparators is not None: 25 if func not in self.allowed_comparators: ---> 26 raise ValueError( 27 f"Received disallowed comparator {func}. Allowed " 28 f"comparators are {self.allowed_comparators}" ValueError: Received disallowed comparator like. Allowed comparators are [<Comparator.EQ: 'eq'>, <Comparator.NE: 'ne'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>] 이런오류가뜹니다.
모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
안녕하세요. 강의를 듣고 컴퓨터견적데이터를 뽑아와서 컴퓨터견적을 추천해주는 gpt를 만들고싶어서 가져왔지만 메타데이터를 뽑을때 별점이나 날짜같은 유효성있는데이터를 넣어야지 제대로 필터가 되는것같은데 컴퓨터견적데이터 자체가 게이밍,코딩용이런식으로 구분지을수없는 데이터이고 또한 메타데이터에 뭐를 넣을까 생각이 안듭니다. 또한 page_content에 json데이터를 넣으면 필터를 잘해줄까?에 대한 의문점도 생깁니다. 어떤방식으로 하면 컴퓨터 견적에 대한 추천을 잘해줄까요? 이런식의 데이터 5000개정도 있습니다. 그리고 강의와 같이 여러 json으로 나누어 사용했습니다. { "quote_number": "1200", "quote_title": "로스트아크 풀옵션, 작업 병행용 컴퓨터(5700X, RX 6700XT)", "date_create": "2023.10.10", "cpu_gpu_combinations": "라이젠7 5700X + RX 6700 XT 조합", "quotation_summary": " 1. 라데온 그래픽카드에 거부감이 없는 분2. 가성비를 극대화 하시려는 분3. 게임과 작업을 병행하시는 분# 영상편집# 게임# 롤# 배그# 가성비# 로아", "quote_person_introduction": "안녕하세요. 견적왕에서 견적맨으로 활동하고 있는 coke-bear 입니다.퀘이사존에서 주로 활동하며 그 외 커뮤니티에서도 간간히 활동하고 있습니다.하드웨어에 관심이 많아 제품을 직접 사용해보기도 하고 주변 지인들 PC 견적부터 조립도 해주다보니PC 구매를 어려워하거나 용도에 맞지 않게 구매하여 불필요한 지출을 하는 경우를 보게 되었습니다.그런 분들께 조금이라도 도움이 되고자 PC 구매자분들께 합리적인 구매를 할 수 있게 견적맨으로 활동하게 되었습니다.", "quote_feedback": "게임을 하면서 영상 편집 또한 취미 수준으로 한다거나 다른 다중 작업을 하는 경우라면 8코어 cpu 이상을 사용해주어야 하는데 이 때 가장 가성비로 구성할 수 있는 cpu라 5700x 입니다.좀 더 전문적이라면 더 좋은 cpu를 구성하여 멀티작업 성능을 늘릴 수 있지만 한정된 예산으로 구성해야하고 이제 배우는 단계라면 8코어 제품 중 가성비가 가장 뛰어난 5700x 구성을 추천드립니다.RX 6700 XT의 가격이 내려온 관계로 매우 가성비가 좋아져서 현재로서는 성능 대비해서 가격이 가성비가 좋아 구성하였습니다.", "computer_estimate_data": "[CPU]AMD 라이젠7-4세대 5700X (버미어) (멀티팩(정품))상세보기[메인보드]ASUS PRIME B550M-A 대원CTS상세보기[메모리]마이크론 Crucial DDR4-3200 CL22 (16GB) x 2 개상세보기[그래픽카드]PowerColor 라데온 RX 6700 XT Fighter D6 12GB상세보기[SSD]마이크론 Crucial P5 Plus M.2 NVMe 대원CTS (1TB)상세보기[케이스]DARKFLASH DK260 Air MESH RGB 강화유리 블랙 (미들타워)상세보기[파워서플라이]맥스엘리트 MAXELITE MAXWELL BARON 800W 80PLUS BRONZE 플랫상세보기[CPU쿨러]DARKFLASH Ellsworth S21 ARGB (블랙)상세보기[조립PC관련][견적왕] 조립 서비스 + 1년 출장 A/S상세보기", "quote_description": "CPU는 라이젠 5000번대 8코어 제품으로 8코어 cpu 이상을 요구하는 작업용 pc에서 저렴하게 구성 가능한 cpu입니다.메인보드는 am4 소켓을 지원하는 b550 칩셋 중 5600x나 5700x를 사용하기에 준수한 성능을 가진 메인보드 입니다.메모리는 삼성 메모리와 동일한 3200 클럭에 라이프워런티를 가지고 있어 AS 부분에서는 더 상위 호환의 제품입니다.그래픽카드는 6700 XT 중 가장 저렴한 가격대의 파워컬러 제품입니다.SSD는 pcie4.0 제품이며 가격대는 pcie3.0 의 p31 보다 저렴한 제품입니다.케이스는 다크 플래쉬의 DK 260 AIR 미들타워 제품입니다. 가격 대비 강판 두께나 기본팬 성능이 출중한 편입니다.파워서플라이는 국내 파워 회사 중 as 부분에서 상위 퀄리티를 가진 맥스엘리트의 800w 파워 입니다.CPU쿨러는 다크플래쉬의 s21 쿨러입니다.\n기본 무뽑방지가 적용되어 있고 더 높은 가격대의 팔라딘이나 rc400 이랑 쿨링 성능이 동일하고 소음 부분에서는 더 정숙하여 가성비가 좋습니다.", "CPU": { "제품명": "AMD 라이젠7-4세대 5700X)", "가격": "238,010원", "수량": "1" }, "메인보드": { "제품명": "ASUS PRIME B550M-A 대원CTS", "가격": "121,960원", "수량": "1" }, "메모리": { "제품명": "마이크론 Crucial DDR4-3200 CL22 16GB", "가격": "41,840원", "수량": "2" }, "그래픽카드": { "제품명": "PowerColor 라데온 RX 6700 XT Fighter D6 12GB", "가격": "402,400원", "수량": "1" }, "SSD": { "제품명": "마이크론 Crucial P5 Plus M.2 NVMe 대원CTS 1TB", "가격": "127,000원", "수량": "1" }, "케이스": { "제품명": "DARKFLASH DK260 Air MESH RGB 강화유리 블랙", "가격": "50,500원", "수량": "1" }, "파워서플라이": { "제품명": "맥스엘리트 MAXELITE MAXWELL BARON 800W 80PLUS BRONZE 플랫", "가격": "84,160원", "수량": "1" }, "CPU쿨러": { "제품명": "DARKFLASH Ellsworth S21 ARGB", "가격": "27,380원", "수량": "1" }, "total_price": "1700000원" }