본문 바로가기
  • 컴공생의 공부 일기
  • 공부보단 일기에 가까운 것 같은
  • 블로그

🤖 AI/AI69

✍️ OpenAI Cookbook : Prompting libraries & tools & guides 구경 Related resources from around the web | OpenAI CookbookOpen-source examples and guides for building with the OpenAI API. Browse a collection of snippets, advanced techniques and walkthroughs. Share your own examples and guides.cookbook.openai.comOpenAI Cookbook : Related resources from around the webPrompting libraries & toolsPrompting guidesVideo coursesPapers on advanced prompting to improve r.. 2025. 1. 9.
✍️ OpenAI 공식 프롬프트 엔지니어링 가이드 openAI 공식 프롬프트 엔지니어링 가이드 Six strategies for getting better results1. Write clear instructions- Tactic: Include details in your query to get more relevant answers - Tactic: Ask the model to adopt a persona role 기능 쓰면 되는 ㄷㅡㅅ - Tactic: Use delimiters to clearly indicate distinct parts of the inputtriple quotation marks, XML tags, section titles, etc. - Tactic: Specify the steps required to complete.. 2025. 1. 9.
🔣 openai api 인자 : logprobs 룰랄룰루랄🔣  logprobsinteger or nullOptionalDefaults to nullInclude the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.The maximum value for logprobs is 5... 2025. 1. 9.
🔬트랜스포머 모델을 다루기 위한 허깅페이스 트랜스포머 라이브러리 3 LLM을 활용한 실전 AI 애플리케이션 개발- 허정준🔬모델 추론하기학습 시 제공하는 trainer api 처럼모델 활용을 쉽게 제공하는 파이프라인이 있다.  💧파이프라인을 활용한 추론# 예제 3.30. 학습한 모델을 불러와 pipeline을 활용해 추론하기# 실습을 새롭게 시작하는 경우 데이터셋 다시 불러오기 실행# import torch# import torch.nn.functional as F# from datasets import load_dataset# dataset = load_dataset("klue", "ynat", split="validation")from transformers import pipelinemodel_id = "본인의 아이디 입력/roberta-base-klue-ynat.. 2025. 1. 7.
🔬트랜스포머 모델을 다루기 위한 허깅페이스 트랜스포머 라이브러리 2 LLM을 활용한 실전 AI 애플리케이션 개발- 허정준🔬허깅페이스 라이브러리 사용법 익히기모델 / 토크나이저 / 데이터셋🎀 모델 활용하기모델 = 바디 + 헤드 1) 바디 불러오기from transformers import AutoModelmodel_id = 'klue/roberta-base'model = AutoModel.from_pretrained(model_id)Automodel 클래스- 모델의 바디를 불러오는 클래스Automodel.from_pretrained(모델 경로)- 모델 경로 (웹 허브/ 로컬)에서 모델 불러옴 허깅페이스 모델의 config.json- 모델의 종류, 설정 파라미터, 어휘 사전 크기, 사용하는 토크나이저 클래스 등의 정보가 저장됨- Automodel 클래스가 참고하여 모델 .. 2025. 1. 7.
🔬트랜스포머 모델을 다루기 위한 허깅페이스 트랜스포머 라이브러리 1 LLM을 활용한 실전 AI 애플리케이션 개발- 허정준 트랜스포머 아키텍처를 사용하는 여러 모델들의 구현 방식에 차이가 있어 어려움 발생=>허깅페이스가 일관된 트랜스포머 라이브러리 제공 pip install transformers==4.40.1 datasets==2.19.0 huggingface_hub==0.23.0 -qqq-qqq 없는 게 난 더 좋은 듯🔬허깅페이스 트랜스포머란 허깅페이스 기능transformers 라이브러리 - 트랜스포머 모델- 토크나이저datasets 라이브러리- 데이터셋 다양한 모델을 거의 동일한 인터페이스로 사용 가능하게 함!BERT/GPT-2 예시rom transformers import AutoTokenizer, AutoModeltext = "What is Huggingfac.. 2025. 1. 6.
🔬LLM의 중추, 트랜스포머 아키텍처 살펴보기 1 LLM을 활용한 실전 AI 애플리케이션 개발- 허정준🔬트랜스포머 아키텍처란 attention is all you need 논문에서 처음 등장RNN 모델 아키텍처보다- 성능이 우수하고 (기울기 사라짐 문제 해결)- 학습 속도도 빠른"트랜스포머" 아키텍처 RNN 모델 아키텍처- 이전 토큰의 출력을 다음 입력에 사용하기 때문에 병렬 처리 불가- 입력이 길어지면 초기 입력 토큰의 의미가 점차 희석되는 기울기 사라짐(그레디언트 소실) 문제 발생 (+그래디언트 증폭) 트랜스포머 아키텍처- "셀프 어텐션" 연산 도입- 병렬 연산 가능- 입력이 길어져도 성능이 떨어지지 않음.언어를 이해하는 인코더 + 언어를 생성하는 디코더인코더와 디코더의 초기 부분 : 임베딩을 통한 입력의 숫자 변환다음으로 위치 인코딩 층에서 문장.. 2025. 1. 6.
Prompt caching : input_cached_tokens 🪙 🪙 input_cached_tokens이전 요청에서 캐시된 텍스트 입력 토큰의 집계된 수테스트 시 응답을 찍어 보면매번 0이다.언제 캐싱되는 걸까?🪙 Prompt cachingModel prompts often contain repetitive content, like system prompts and common instructions.OpenAI routes API requests to servers that recently processed the same prompt,making it cheaper and faster than processing a prompt from scratch reducelatency by up to 80% cost by 50%속도 80퍼 / 비용 50퍼까지 절감!! .. 2025. 1. 3.
🥶 OpenAI_endpoints_chat 매개변수 탐구 TODO- LLM_newbie : temperature ✅- LLM_newbie : top_p ✅- LLM_newbie : role ✅- LLM_newbie : stream ✅- 우분투 이모지 깔기 / 단축키 설정 ✅- 모델 리마인드 ✅  LLM_practice/GPT_tutorial at main · Goldchae/LLM_practiceviuron 연습 . Contribute to Goldchae/LLM_practice development by creating an account on GitHub.github.com📥️ temperatureimport osapi_key = os.getenv("OPENAI_API_KEY")from openai import OpenAIclient = OpenAI(ap.. 2025. 1. 3.
😄 Hugging Face 탐색 멘토링의 나날😄 Hugging Facehttps://huggingface.co Hugging Face – The AI community building the future.The Home of Machine Learning Create, discover and collaborate on ML better. We provide paid Compute and Enterprise solutions. We are building the foundation of ML tooling with the community.huggingface.co트랜스포머나 데이터셋 같은 머신러닝 프레임워크를 제공하는 세계 최대의 인공지능 플랫폼 중 하나인공지능계의 깃허브 - 공개된 머신러닝 레퍼런스를 통해 최신 모델을 스스로 구축 .. 2024. 10. 25.