본문 바로가기
openai - GPT4의 한계:hallucination GPT-4의 한계 GPT-4의 성능을 보면 아주 놀랍지만, 이런 GPT-4 모델에도 한계는 존재합니다. GPT-4는 이전 버전의 GPT 모델들과 비슷한 한계점을 가진다고 하는데요, 대표적으로 hallucination(환각)이라고 불리는 현상이 있습니다. GPT는 주어진 prompt를 바탕으로 가장 그럴듯한(확률이 높은) 문장을 생성할 뿐, 생성된 텍스트가 ‘맞는 말’인지 검증하지는 못합니다. 그래서 틀린 사실을 이야기하는 경우가 자주 있는데, 이런 현상이 바로 hallucination입니다. 다음 사진처럼 ChatGPT의 엉뚱한 답변을 담은 이미지들이 인터넷에서 많이 돌기도 했죠. 본문출처-https://modulabs.co.kr/blog/gpt4-technical-report/ GPT-4 Technic.. 2023. 7. 13.
openai - backend생성 백앤드 - 프론트앤드에서 요청을 받아 openai에 요청 후 리턴된 응답 값을 프론트앤드에 전달 - 개발 방안 : 파이썬의 fastapi 라이브러리를 사용 app실행 명령어 : uvicorn [파일명]:[app] --reload ex. backend.py인 경우 uvicorn backend:app --reload from typing import List from fastapi import FastAPI from pydantic import BaseModel import openai openai.api_key = "openai_api_key" def chat(messages): response = openai.Completion.create(model="davinci:ft-personal:ratertea.. 2023. 7. 13.
openai - frontend 생성 프론트앤드 - 사용자에게 입력을 받아 백앤드에 요청사항을 보내고 리턴된 응답값을 사용자에게 보여줌 - 개발방안 : 파이썬의 streamlit 라이브러리를 사용 app실행 명령어 : streamlit run [파일명] import streamlit as st from streamlit_chat import message import requests if 'messages' not in st.session_state: st.session_state['messages'] = [] # [{"role": "user", "content": "blahblahblah"}, # {"role": "assistant", "content": "blahblahblah"}, ...] chat_url = "http://localh.. 2023. 7. 13.
openai - 프롬프트엔지니어 프롬프트란? - 챗봇에서 보내는 질문이나 요청을 사용자가 답변을 유도(prompt)하는 것 인공지능(AI) 챗봇 '챗GPT' 등 생성형 AI 열풍이 불면서 연봉 33만5천 달러(약 4억4천만원)를 받을 수 있는 새 직업 '프롬프트 엔지니어'(prompt engineers)가 주목을 받고 있다고 블룸버그통신이 29일(현지시간) 소개 프롬프트 엔지니어 : AI가 더 좋은 답변을 할 수 있도록 다양한 목적의 프롬프트(명령어)를 제작하고 테스트하는 직종, '프롬프트 엔지니어'는 AI가 최고의 결과물을 도출하는 데 필요한 명령어, 즉 '프롬프트'(prompts)를 작성하는 한편 AI 관련 인력을 훈련하는 일을 하는 직역을 말한다. 오픈AI 개발자들이 설립한 챗봇 개발사 앤트로픽(Anthropic)은 17만5000.. 2023. 7. 13.
openai - 파인튜닝:튜닝자료(jsonl) {"prompt": "Context: The sun is a star.\nQuestion: What is the sun?", "completion": "The sun is a star."} {"prompt": "Context: The Earth is the third planet from the sun.\nQuestion: What is the position of Earth in the solar system?", "completion": "The Earth is the third planet from the sun."} {"prompt": "Context: Mount Everest is the highest mountain on Earth.\nQuestion: What is the highest mo.. 2023. 7. 13.
openai - 파인튜닝:모델명확인 import openai import datetime # OpenAI API 키 설정 openai.api_key = "[openai_api_key]" # 모든 모델 불러오기 response = openai.Model.list() def get_owner(model): if "owned_by" in model: # 만약 "owned_by" 필드가 존재하고 현재 사용자의 것일 경우 소유자로 반환 if model["owned_by"] == "user-5hpbi6qihf8tgrefddg9ok7f": return "Your Model" return f"owned_by" def convert_unix_timestamp(timestamp): dt = datetime.datetime.fromtimestamp(times.. 2023. 7. 13.
반응형