GPT Code Interpreter의 10가지 멋진 Use Cases 공유드립니다. WOW 입니다.
Code Interpreter의 의미는 여러분들이 말로 하면 이걸 코드로 해석해서 짜서 실행해주겠다는 것 같습니다. 그래서 코드로/프로그래밍으로 할수 있는 거의 모든일을 할수 있습니다.
(트윗 링크가 너무 많이 달려서 Thread를 좋아 하는 FB에서 이 글은 거의 노출이 안될것 같습니다.)
1. 모든 종류의 그래프를 쉽게 생성할 수 있습니다
https://twitter.com/gdb/status/1677023789807292420
2. 어떤 GIF든 MP4로 변환할 수 있습니다.
https://twitter.com/goodside/status/1652540643212767234
3. 이미지에서 색상을 추출하여 간단한 PNG 팔레트를 생성할 수 있습니다.
https://twitter.com/skirano/status/1653085442047369217
4. 데이터를 정리한 후에는 통찰력 있는 데이터 시각화를 생성할 수 있습니다.
https://twitter.com/Saboo.../status/1677016588233367568
5. CSV 파일을 GIF로 변환할 수 있습니다.
https://twitter.com/emollick/status/1653451648826757121
6. 플레이리스트를 분석하여 음악 취향을 요약할 수 있습니다.
https://twitter.com/SHL0MS/status/1652842277788692480
7. 데이터셋에서 완전히 기능하는 HTML 사이트를 생성하세요. 이건 정말 놀랍습니다!
https://twitter.com/PatrickJBlum/status/1652365030535598081
8. 쉽게 다운로드할 수 있는 주식 데이터셋을 생성하세요.
https://twitter.com/TechMemeKing/status/1653258652055138304
9. 이미지를 텍스트 파일로 변환하세요.
https://twitter.com/Saboo.../status/1654323164187377665
10. 심지어 비정형 데이터의 상세한 데이터 분석도 수행할 수 있습니다.
https://twitter.com/emollick/status/1676441469979185157
facebook.com/hunkims/posts/pfbid0apvm9LRvj52RaFN7JNLsTpHV9oYnBG6xaTFrkkPKFdVn6tVs6hd2cqXjSJ6oYeXml
Code Interpreter의 의미는 여러분들이 말로 하면 이걸 코드로 해석해서 짜서 실행해주겠다는 것 같습니다. 그래서 코드로/프로그래밍으로 할수 있는 거의 모든일을 할수 있습니다.
(트윗 링크가 너무 많이 달려서 Thread를 좋아 하는 FB에서 이 글은 거의 노출이 안될것 같습니다.)
1. 모든 종류의 그래프를 쉽게 생성할 수 있습니다
https://twitter.com/gdb/status/1677023789807292420
2. 어떤 GIF든 MP4로 변환할 수 있습니다.
https://twitter.com/goodside/status/1652540643212767234
3. 이미지에서 색상을 추출하여 간단한 PNG 팔레트를 생성할 수 있습니다.
https://twitter.com/skirano/status/1653085442047369217
4. 데이터를 정리한 후에는 통찰력 있는 데이터 시각화를 생성할 수 있습니다.
https://twitter.com/Saboo.../status/1677016588233367568
5. CSV 파일을 GIF로 변환할 수 있습니다.
https://twitter.com/emollick/status/1653451648826757121
6. 플레이리스트를 분석하여 음악 취향을 요약할 수 있습니다.
https://twitter.com/SHL0MS/status/1652842277788692480
7. 데이터셋에서 완전히 기능하는 HTML 사이트를 생성하세요. 이건 정말 놀랍습니다!
https://twitter.com/PatrickJBlum/status/1652365030535598081
8. 쉽게 다운로드할 수 있는 주식 데이터셋을 생성하세요.
https://twitter.com/TechMemeKing/status/1653258652055138304
9. 이미지를 텍스트 파일로 변환하세요.
https://twitter.com/Saboo.../status/1654323164187377665
10. 심지어 비정형 데이터의 상세한 데이터 분석도 수행할 수 있습니다.
https://twitter.com/emollick/status/1676441469979185157
facebook.com/hunkims/posts/pfbid0apvm9LRvj52RaFN7JNLsTpHV9oYnBG6xaTFrkkPKFdVn6tVs6hd2cqXjSJ6oYeXml
Wanted to share that Med-PaLM, our medical large language model, was published in Nature this week!
When we started this work, we set out to better understand the potential of building useful, safe foundation models for medicine. We started with a focus on evaluation and put together MultiMedQA, a benchmark of seven medical question answering tasks spanning medical exams, medical research, and consumer queries.
When we observed limitations in existing models, we worked with physicians to train Med-PaLM, a state-of-the-art large language model aligned to the medical setting. We showed that these models could surpass the passing score on US medical licensing exam-style questions for the first time. Most importantly, through 'instruction prompt tuning', Med-PaLM had greatly improved long-form answers to consumer queries, often comparing similarly to physicians. 92.6% of Med-PaLM answers were aligned with scientific consensus, compared to 92.9% for clinicians (baseline model 61.9%).
Now our paper for Med-PaLM 2 is on arxiv. We see a 19% improvement on the USMLE-style task, and model answers to consumer queries are preferred over physician answers across eight of nine axes studied (factuality, harm, bias, ...). We're now working with trusted testers through Google Cloud to iterate on safe and beneficial use cases for this technology.
We started our team to catalyze the medical AI community towards the potential of these models, and (especially for me personally) to work on building more steerable, safe systems in a context where safety matters, in partnership with researchers, physicians, patients, policymakers, and others. As we continue our journey, looking forward to a future where these models can assist physicians to increase quality and access to care for billions.
Excited to share this milestone on our journey!
Nature paper: https://lnkd.in/eb_DJcgM
Med-PaLM 2 paper: https://lnkd.in/ebshBBJB
Med-PaLM website: https://lnkd.in/e6bPXD4F
When we started this work, we set out to better understand the potential of building useful, safe foundation models for medicine. We started with a focus on evaluation and put together MultiMedQA, a benchmark of seven medical question answering tasks spanning medical exams, medical research, and consumer queries.
When we observed limitations in existing models, we worked with physicians to train Med-PaLM, a state-of-the-art large language model aligned to the medical setting. We showed that these models could surpass the passing score on US medical licensing exam-style questions for the first time. Most importantly, through 'instruction prompt tuning', Med-PaLM had greatly improved long-form answers to consumer queries, often comparing similarly to physicians. 92.6% of Med-PaLM answers were aligned with scientific consensus, compared to 92.9% for clinicians (baseline model 61.9%).
Now our paper for Med-PaLM 2 is on arxiv. We see a 19% improvement on the USMLE-style task, and model answers to consumer queries are preferred over physician answers across eight of nine axes studied (factuality, harm, bias, ...). We're now working with trusted testers through Google Cloud to iterate on safe and beneficial use cases for this technology.
We started our team to catalyze the medical AI community towards the potential of these models, and (especially for me personally) to work on building more steerable, safe systems in a context where safety matters, in partnership with researchers, physicians, patients, policymakers, and others. As we continue our journey, looking forward to a future where these models can assist physicians to increase quality and access to care for billions.
Excited to share this milestone on our journey!
Nature paper: https://lnkd.in/eb_DJcgM
Med-PaLM 2 paper: https://lnkd.in/ebshBBJB
Med-PaLM website: https://lnkd.in/e6bPXD4F
Nature
Large language models encode clinical knowledge
Nature - Med-PaLM, a state-of-the-art large language model for medicine, is introduced and evaluated across several medical question answering tasks, demonstrating the promise of these models in...
도움이 되실까해서 건축가 크리스토퍼 알렉산더의 글에서 옮깁니다:
어느날 하루 CA가 디자인에 대해 감을 못잡는 학생을 불러서 말을 했다.
“Look, I am going to talk you through your design project today. Forget about what you have. Erase the whole design. Start with nothing”
Next I asked him “Now, tell me, what is the most important thing about the site and most important thing your design must do in relation to the site. Don’t worry about anything else. Just tell me the answer to that one question. He told me
“All right, so make a mark. Put in just that one thing. Forget everything else.” He did it.
“All right. Now tell me the next important thing.
(중략)
If he told me something was important, when I doubted that he really felt that, I just looked at him, and said, no, tell me really what is the next, truly the most important thing?
(중략)
At the end of an hour he had a beautiful building. It was straightforward, simple, fundamental. Above all it was beautiful. The thing he had never been able to - to make a beautiful design - he has suddenly done.
(중략)
“Finally I understand it , I understand what you have been saying. You just take one thing at a time, and do it in the right order. That`s all there is to it. Just do the most important thing. Finish it. And so on”
He was astonished. It seemed like the most important lesson of his life in architecture school. In this exercise I taught him that it was just the sequence that underlies our ability. By doing things in the right order, he was able to make a beautiful thing.
어느날 하루 CA가 디자인에 대해 감을 못잡는 학생을 불러서 말을 했다.
“Look, I am going to talk you through your design project today. Forget about what you have. Erase the whole design. Start with nothing”
Next I asked him “Now, tell me, what is the most important thing about the site and most important thing your design must do in relation to the site. Don’t worry about anything else. Just tell me the answer to that one question. He told me
“All right, so make a mark. Put in just that one thing. Forget everything else.” He did it.
“All right. Now tell me the next important thing.
(중략)
If he told me something was important, when I doubted that he really felt that, I just looked at him, and said, no, tell me really what is the next, truly the most important thing?
(중략)
At the end of an hour he had a beautiful building. It was straightforward, simple, fundamental. Above all it was beautiful. The thing he had never been able to - to make a beautiful design - he has suddenly done.
(중략)
“Finally I understand it , I understand what you have been saying. You just take one thing at a time, and do it in the right order. That`s all there is to it. Just do the most important thing. Finish it. And so on”
He was astonished. It seemed like the most important lesson of his life in architecture school. In this exercise I taught him that it was just the sequence that underlies our ability. By doing things in the right order, he was able to make a beautiful thing.
https://youtu.be/wxq1ZeAM9fc
영상에서 다룬 내용
비용 최적화: 패널리스트들은 엔지니어가 LLM 확장 비용에 주의를 기울이고 비용과 성능의 균형을 맞추는 최적의 하드웨어를 찾는 것을 목표로 삼아야 한다고 강조합니다. 품질 저하 없이 모델 크기를 줄이기 위해 구조화된 가지치기(Structured Pruning)와 지식 증류(Knowledge Distillation)를 사용하는 것이 강조됩니다. 패널리스트들은 이상적으로는 모델이 단일 A100 GPU에서 실행될 수 있어야 한다고 제안합니다.
성능 향상: 패널은 지식 증류, 압축, 더 빠른 트랜스포머 사용과 같은 기술이 성능 향상에 도움이 될 수 있다고 제안합니다. 또한 최상의 컨텍스트 표현을 위해 모델을 최적화하고, 주어진 하드웨어 대상에 가장 적합한 커널과 바이너리를 사용하며, 필요에 따라 배치 크기를 조정할 것을 제안합니다.
인하우스 모델과 기본 API: 이러한 모델을 사내로 가져오는 데는 비용이 들지만, 모델을 제어할 수 있으면 속도를 개선하고 API 속도 제한을 피할 수 있습니다. 간단한 분류기를 사용하여 LLM을 호출할 시기를 결정할 수 있으므로 비용을 관리하는 데 도움이 됩니다.
지연 시간 최적화: 패널에서는 사용 사례에 따라 서로 다른 모델 사용, 봇의 출력 스트리밍, 사용자 기대치를 관리하기 위한 타이핑 표시기 표시, 배치 크기 및 출력 크기 조정 등 지연 시간을 최적화하는 방법에 대해 논의합니다.
모니터링 및 평가: 또한 최종 사용자의 피드백, 행동 기반 평가, 합성 평가 및 비평가 모델링을 사용하여 LLM의 성능을 평가하는 것의 중요성에 대해 논의합니다.
라벨 제작 비용 관리: 라벨링 비용이 너무 높아지는 문제를 언급하고 이러한 비용을 관리하기 위해 스마트 샘플링 또는 사전 필터링과 같은 기술을 제안합니다.
이러한 인사이트를 바탕으로 비용과 성능을 최적화하기 위한 단계별 접근 방식을 권장합니다:
비용 구조를 이해합니다: 시작하기 전에 구체적인 비용 구조와 비용 절감을 위해 최적화해야 할 부분을 파악합니다.
적합한 하드웨어를 선택합니다: 성능과 비용 사이의 균형을 찾아야 합니다. 최적의 모델은 단일 A100 GPU에서 실행되어야 합니다.
모델 축소: 구조적 가지치기 및 지식 증류와 같은 기술을 사용하여 품질 저하 없이 모델 크기를 줄일 수 있습니다.
성능 최적화: 지식 증류, 압축, 더 빠른 트랜스포머 사용과 같은 기술을 사용하면 성능을 개선하는 데 도움이 될 수 있습니다.
모델 제어: 모델을 사내에 도입하여 비용과 속도를 제어할 수 있지만, 이와 관련된 비용을 고려하세요.
모니터링 및 평가: 최종 사용자의 피드백, 행동 기반 평가, 합성 평가 및 비평가 모델링을 사용하여 LLM의 성능을 평가하세요.
라벨링 비용 관리: 스마트 샘플링 또는 사전 필터링과 같은 기술을 통해 이러한 비용을 관리할 수 있습니다.
영상에서 다룬 내용
비용 최적화: 패널리스트들은 엔지니어가 LLM 확장 비용에 주의를 기울이고 비용과 성능의 균형을 맞추는 최적의 하드웨어를 찾는 것을 목표로 삼아야 한다고 강조합니다. 품질 저하 없이 모델 크기를 줄이기 위해 구조화된 가지치기(Structured Pruning)와 지식 증류(Knowledge Distillation)를 사용하는 것이 강조됩니다. 패널리스트들은 이상적으로는 모델이 단일 A100 GPU에서 실행될 수 있어야 한다고 제안합니다.
성능 향상: 패널은 지식 증류, 압축, 더 빠른 트랜스포머 사용과 같은 기술이 성능 향상에 도움이 될 수 있다고 제안합니다. 또한 최상의 컨텍스트 표현을 위해 모델을 최적화하고, 주어진 하드웨어 대상에 가장 적합한 커널과 바이너리를 사용하며, 필요에 따라 배치 크기를 조정할 것을 제안합니다.
인하우스 모델과 기본 API: 이러한 모델을 사내로 가져오는 데는 비용이 들지만, 모델을 제어할 수 있으면 속도를 개선하고 API 속도 제한을 피할 수 있습니다. 간단한 분류기를 사용하여 LLM을 호출할 시기를 결정할 수 있으므로 비용을 관리하는 데 도움이 됩니다.
지연 시간 최적화: 패널에서는 사용 사례에 따라 서로 다른 모델 사용, 봇의 출력 스트리밍, 사용자 기대치를 관리하기 위한 타이핑 표시기 표시, 배치 크기 및 출력 크기 조정 등 지연 시간을 최적화하는 방법에 대해 논의합니다.
모니터링 및 평가: 또한 최종 사용자의 피드백, 행동 기반 평가, 합성 평가 및 비평가 모델링을 사용하여 LLM의 성능을 평가하는 것의 중요성에 대해 논의합니다.
라벨 제작 비용 관리: 라벨링 비용이 너무 높아지는 문제를 언급하고 이러한 비용을 관리하기 위해 스마트 샘플링 또는 사전 필터링과 같은 기술을 제안합니다.
이러한 인사이트를 바탕으로 비용과 성능을 최적화하기 위한 단계별 접근 방식을 권장합니다:
비용 구조를 이해합니다: 시작하기 전에 구체적인 비용 구조와 비용 절감을 위해 최적화해야 할 부분을 파악합니다.
적합한 하드웨어를 선택합니다: 성능과 비용 사이의 균형을 찾아야 합니다. 최적의 모델은 단일 A100 GPU에서 실행되어야 합니다.
모델 축소: 구조적 가지치기 및 지식 증류와 같은 기술을 사용하여 품질 저하 없이 모델 크기를 줄일 수 있습니다.
성능 최적화: 지식 증류, 압축, 더 빠른 트랜스포머 사용과 같은 기술을 사용하면 성능을 개선하는 데 도움이 될 수 있습니다.
모델 제어: 모델을 사내에 도입하여 비용과 속도를 제어할 수 있지만, 이와 관련된 비용을 고려하세요.
모니터링 및 평가: 최종 사용자의 피드백, 행동 기반 평가, 합성 평가 및 비평가 모델링을 사용하여 LLM의 성능을 평가하세요.
라벨링 비용 관리: 스마트 샘플링 또는 사전 필터링과 같은 기술을 통해 이러한 비용을 관리할 수 있습니다.
YouTube
Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2
// Abstract
In this panel discussion, the topic of the cost of running large language models (LLMs) is explored, along with potential solutions. The benefits of bringing LLMs in-house, such as latency optimization and greater control, are also discussed.…
In this panel discussion, the topic of the cost of running large language models (LLMs) is explored, along with potential solutions. The benefits of bringing LLMs in-house, such as latency optimization and greater control, are also discussed.…
GPT-4 Architecture Leak 관련 내용
1. 모델 규모, 비용, 훈련의 용이성 사이의 Golden spot은 어디인가?
- GPT-4는 조 단위의 파라미터 모델을 훈련하는 데 필요한 막대한 계산 리소스를 보여줍니다. 연구자는 모델 규모, 비용, 훈련 복잡성 간의 절충점을 신중하게 평가해야 합니다. 전문가 혼합과 같은 아키텍처는 비용 관리에 도움이 되지만 복잡성을 증가시킵니다.
2. 인프라 및 시스템 최적화를 위한 다양한 엔지니어링 방법
1. 전문가 혼합(MoE) 사용
1. OpenAI의 MoE 사용은 이 접근 방식이 비용과 복잡성을 관리하는 데 유용할 수 있음을 보여주었습니다. MoE 모델을 사용하면 모델 계산의 일부를 여러 전문가에게 분산하여 각 전문가가 문제의 특정 부분에 집중할 수 있습니다. 이를 통해 계산 효율성을 높이고 잠재적으로 모델 성능을 개선할 수 있습니다. 그러나 이러한 전문가를 관리 및 동기화하고 적절한 로드 밸런싱을 보장하는 측면에서 복잡성이 증가합니다.
2. OpenAI가 GPT-4에 사용하는 간단한 라우팅 방법은 복잡성보다 효율성의 중요성을 강조합니다. 이는 각 토큰을 라우팅할 전문가를 선택하는 데 항상 고급 알고리즘이 필요한 것은 아니며, 여전히 인상적인 결과를 얻을 수 있음을 나타냅니다.
2. GPT-4의 훈련은 ZeRO, 파이프라인 병렬 처리, NVLink와 같은 고급 하드웨어와 같은 최적화에 크게 의존합니다. 훈련을 효율적으로 확장하려면 모델 혁신뿐만 아니라 시스템 수준의 엔지니어링도 필요합니다. 연구자들은 엔드투엔드 시스템 최적화에 집중해야 합니다.
3. OpenAI가 GPT-4에 사용하는 간단한 라우팅 방법은 복잡성보다 효율성의 중요성을 강조합니다. 이는 각 토큰을 라우팅할 전문가를 선택하는 데 항상 고급 알고리즘이 필요한 것은 아니며, 여전히 인상적인 결과를 얻을 수 있음을 나타냅니다.
4. GPT-4의 추측 디코딩은 확인되지 않았지만 디코딩 프로세스의 속도를 높여 효율성을 높일 수 있는 잠재적인 기술입니다.[5](https://shaankhosla.substack.com/p/gpt-4-architecture-leak-and-explanation) 하지만 예측이 틀릴 경우 배치가 폐기되어 컴퓨팅 리소스가 낭비될 수 있습니다.
3. 정확도와 추론 효율성의 균형을 어떻게 맞출 수 있는가? 앞으로는 어떻게 될 것인가?
- GPT-4와 같은 대규모 모델은 높은 정확도를 달성하지만, 계산 비용으로 인해 추론에 많은 비용이 소요될 수 있습니다. 추측 디코딩과 같은 기법은 추론 시 정확도와 속도 사이에서 균형을 유지합니다. 정확도와 효율성의 균형을 맞추려면 철저한 벤치마킹이 필요합니다.
4. 다양한 고품질 데이터 세트의 필요성
- GPT-4가 대학 교과서 데이터 세트로 학습되었다는 것은 전문 지식을 갖춘 AI 모델을 만드는 데 있어 도메인별 데이터의 역할을 암시합니다. 그러나 이러한 모델은 실제 이해력이나 지능이 아닌 학습 데이터로 인해 이해력이 '착각'을 일으킬 수 있습니다. 이는 도메인별 응답을 제공하는 모델의 능력과 도메인에 대해 진정으로 이해하거나 추론하는 능력의 차이를 강조합니다.
- 13조 개의 토큰을 사용했음에도 불구하고 GPT-4는 여전히 이상적인 훈련 데이터 분포가 부족할 수 있습니다. 연구자들은 데이터를 다양화하고 사람의 검증을 통해 품질을 향상시키기 위한 노력을 계속해야 합니다. 데이터 수집과 큐레이션은 여전히 미해결 과제로 남아 있습니다.
5. 멀티모달 기능
- GPT-4의 비전 기능을 활용하려면 모달리티를 통합하기 위한 아키텍처 혁신이 필요합니다. 멀티모달 AI는 텍스트 전용 모델에 구워진 가정을 다시 생각해야 합니다. 이는 향후 연구의 중요한 영역입니다.
개방형 연구와 생산 시스템 간의 상호 작용: GPT-4의 세부 사항은 공식적인 기술 논문이 아닌 공개 연구와 유출을 통해 드러납니다. 대형 모델의 연구부터 생산까지의 경로는 여전히 불투명합니다. 투명성이 높아지면 연구 커뮤니티에 도움이 될 것입니다.
- GPT-4는 별도의 비전 인코더와 크로스 어텐션을 통합하여 AI 시스템에서 [멀티모달 기능의 중요성을 강조](https://www.scientificamerican.com/article/what-the-new-gpt-4-ai-can-do/)합니다.
### 참고자료
1. [https://www.semianalysis.com/p/gpt-4-architecture-infrastructure](https://www.semianalysis.com/p/gpt-4-architecture-infrastructure?utm_campaign=post&utm_medium=web)
2. https://threadreaderapp.com/thread/1678545170508267522.html
3. https://mpost.io/gpt-4s-leaked-details-shed-light-on-its-massive-scale-and-impressive-architecture/
4. https://thealgorithmicbridge.substack.com/p/gpt-4s-secret-has-been-revealed
5. https://www.reddit.com/r/LocalLLaMA/comments/14wbmio/gpt4_details_leaked/
6. https://youtu.be/ODMhtPIifkQ
1. 모델 규모, 비용, 훈련의 용이성 사이의 Golden spot은 어디인가?
- GPT-4는 조 단위의 파라미터 모델을 훈련하는 데 필요한 막대한 계산 리소스를 보여줍니다. 연구자는 모델 규모, 비용, 훈련 복잡성 간의 절충점을 신중하게 평가해야 합니다. 전문가 혼합과 같은 아키텍처는 비용 관리에 도움이 되지만 복잡성을 증가시킵니다.
2. 인프라 및 시스템 최적화를 위한 다양한 엔지니어링 방법
1. 전문가 혼합(MoE) 사용
1. OpenAI의 MoE 사용은 이 접근 방식이 비용과 복잡성을 관리하는 데 유용할 수 있음을 보여주었습니다. MoE 모델을 사용하면 모델 계산의 일부를 여러 전문가에게 분산하여 각 전문가가 문제의 특정 부분에 집중할 수 있습니다. 이를 통해 계산 효율성을 높이고 잠재적으로 모델 성능을 개선할 수 있습니다. 그러나 이러한 전문가를 관리 및 동기화하고 적절한 로드 밸런싱을 보장하는 측면에서 복잡성이 증가합니다.
2. OpenAI가 GPT-4에 사용하는 간단한 라우팅 방법은 복잡성보다 효율성의 중요성을 강조합니다. 이는 각 토큰을 라우팅할 전문가를 선택하는 데 항상 고급 알고리즘이 필요한 것은 아니며, 여전히 인상적인 결과를 얻을 수 있음을 나타냅니다.
2. GPT-4의 훈련은 ZeRO, 파이프라인 병렬 처리, NVLink와 같은 고급 하드웨어와 같은 최적화에 크게 의존합니다. 훈련을 효율적으로 확장하려면 모델 혁신뿐만 아니라 시스템 수준의 엔지니어링도 필요합니다. 연구자들은 엔드투엔드 시스템 최적화에 집중해야 합니다.
3. OpenAI가 GPT-4에 사용하는 간단한 라우팅 방법은 복잡성보다 효율성의 중요성을 강조합니다. 이는 각 토큰을 라우팅할 전문가를 선택하는 데 항상 고급 알고리즘이 필요한 것은 아니며, 여전히 인상적인 결과를 얻을 수 있음을 나타냅니다.
4. GPT-4의 추측 디코딩은 확인되지 않았지만 디코딩 프로세스의 속도를 높여 효율성을 높일 수 있는 잠재적인 기술입니다.[5](https://shaankhosla.substack.com/p/gpt-4-architecture-leak-and-explanation) 하지만 예측이 틀릴 경우 배치가 폐기되어 컴퓨팅 리소스가 낭비될 수 있습니다.
3. 정확도와 추론 효율성의 균형을 어떻게 맞출 수 있는가? 앞으로는 어떻게 될 것인가?
- GPT-4와 같은 대규모 모델은 높은 정확도를 달성하지만, 계산 비용으로 인해 추론에 많은 비용이 소요될 수 있습니다. 추측 디코딩과 같은 기법은 추론 시 정확도와 속도 사이에서 균형을 유지합니다. 정확도와 효율성의 균형을 맞추려면 철저한 벤치마킹이 필요합니다.
4. 다양한 고품질 데이터 세트의 필요성
- GPT-4가 대학 교과서 데이터 세트로 학습되었다는 것은 전문 지식을 갖춘 AI 모델을 만드는 데 있어 도메인별 데이터의 역할을 암시합니다. 그러나 이러한 모델은 실제 이해력이나 지능이 아닌 학습 데이터로 인해 이해력이 '착각'을 일으킬 수 있습니다. 이는 도메인별 응답을 제공하는 모델의 능력과 도메인에 대해 진정으로 이해하거나 추론하는 능력의 차이를 강조합니다.
- 13조 개의 토큰을 사용했음에도 불구하고 GPT-4는 여전히 이상적인 훈련 데이터 분포가 부족할 수 있습니다. 연구자들은 데이터를 다양화하고 사람의 검증을 통해 품질을 향상시키기 위한 노력을 계속해야 합니다. 데이터 수집과 큐레이션은 여전히 미해결 과제로 남아 있습니다.
5. 멀티모달 기능
- GPT-4의 비전 기능을 활용하려면 모달리티를 통합하기 위한 아키텍처 혁신이 필요합니다. 멀티모달 AI는 텍스트 전용 모델에 구워진 가정을 다시 생각해야 합니다. 이는 향후 연구의 중요한 영역입니다.
개방형 연구와 생산 시스템 간의 상호 작용: GPT-4의 세부 사항은 공식적인 기술 논문이 아닌 공개 연구와 유출을 통해 드러납니다. 대형 모델의 연구부터 생산까지의 경로는 여전히 불투명합니다. 투명성이 높아지면 연구 커뮤니티에 도움이 될 것입니다.
- GPT-4는 별도의 비전 인코더와 크로스 어텐션을 통합하여 AI 시스템에서 [멀티모달 기능의 중요성을 강조](https://www.scientificamerican.com/article/what-the-new-gpt-4-ai-can-do/)합니다.
### 참고자료
1. [https://www.semianalysis.com/p/gpt-4-architecture-infrastructure](https://www.semianalysis.com/p/gpt-4-architecture-infrastructure?utm_campaign=post&utm_medium=web)
2. https://threadreaderapp.com/thread/1678545170508267522.html
3. https://mpost.io/gpt-4s-leaked-details-shed-light-on-its-massive-scale-and-impressive-architecture/
4. https://thealgorithmicbridge.substack.com/p/gpt-4s-secret-has-been-revealed
5. https://www.reddit.com/r/LocalLLaMA/comments/14wbmio/gpt4_details_leaked/
6. https://youtu.be/ODMhtPIifkQ
Let's Talk Text
GPT-4 architecture leak and explanation
July 12, 2023
LLM을 Production Level에서 학습하고 운영하면서 겪는 챌린지들
1. (Comparatively small) Large Language Model Use-cases?
1. 헬스케어:
- BioMed LM(2.7 billion parameters)
- 비교적 규모가 작은 대규모 언어 모델(LLM) 사용 사례로 잘 알려진 것 중 하나는 MosaicML과 스탠포드 기초 모델 연구 센터(CRFM)에서 개발한 생의학 텍스트를 위한 도메인 전용 LLM인 BioMedLM입니다. 이 모델은 특히 생의학 분야를 위한 산업별 LLM의 기능을 보여줍니다.
2. 금융: 금융 기관은 기술 지원, 사기 탐지, 보고, 금융 뉴스에 대한 정서 분석에 LLM을 활용할 수 있습니다.
- [BloombergGPT](https://www.bloomberg.com/company/press/bloomberggpt-50-billion-parameter-llm-tuned-finance/)
- [FinGPT(Opensource)](https://the-decoder.com/fingpt-is-an-ai-financial-framework-designed-to-learn-from-the-wisdom-of-the-market/)
3. 프로그래밍: [Replit의 7B LLM](https://huggingface.co/replit/replit-code-v1-3b)인 replit-code-v1-3b는 코드 완성에 중점을 둔 27B 인과 언어 모델로서, 여러 프로그래밍 언어가 포함된 데이터 세트에서 학습되었습니다.
2. What are the pros and cons for training own large language models?
1. 장점
1. 컨텐츠/필터 제어: 자체 LLM을 교육함으로써 특정 요구 사항과 선호도에 맞게 모델을 조정하여 회사의 목표와 가치에 부합하도록 할 수 있습니다.**[1](https://www.brookings.edu/articles/exploring-the-impact-of-language-models/)**
2. 모델 및 지적 재산에 대한 소유권: 자체 LLM을 개발하면 모델과 그 기반 기술에 대한 완전한 소유권을 보유할 수 있으며, 이는 귀사의 귀중한 자산이 될 수 있습니다.**[1](https://www.brookings.edu/articles/exploring-the-impact-of-language-models/)**
3. 설명 가능성 및 투명성 향상: 자체 LLM을 교육하면 모델 내부를 더 잘 제어할 수 있으므로 의사 결정 프로세스의 설명 가능성과 투명성을 개선하는 데 도움이 됩니다.
4. 특정 산업 또는 도메인 요구사항에 맞게 조정: 산업 또는 도메인의 고유한 과제와 요구 사항을 해결하도록 맞춤형 LLM을 설계하여 모델이 특정 사용 사례에 최적화되도록 할 수 있습니다.
2. 단점
1. 높은 컴퓨팅 리소스와 비용: 자체 LLM을 교육하고 배포하는 것은 리소스 집약적일 수 있으며, 상당한 컴퓨팅 파워와 재정적 투자가 필요합니다. [3](https://www.analyticsinsight.net/pros-and-cons-of-customising-large-language-models/)
2. 시간이 오래 걸리는 교육 과정: 데이터 수집, 정리, 전처리뿐만 아니라 특정 요구사항에 맞게 모델을 미세 조정해야 하므로 맞춤형 LLM을 개발하는 데 오랜 시간이 소요될 수 있습니다.
3. 방대한 양의 데이터 관리 LLM을 학습하려면 대량의 데이터를 처리해야 하며, 이는 저장, 처리 및 개인 정보 보호 문제 측면에서 어려울 수 있습니다.
4. 모델 편향성 및 독성 문제를 해결하는 데 있어 잠재적인 어려움: 맞춤형 LLM에 편향성 및 독성 콘텐츠가 없는지 확인하는 것은 복잡하고 지속적인 프로세스가 될 수 있으므로 지속적인 모니터링과 평가가 필요합니다.**[6](https://towardsdatascience.com/overcoming-the-limitations-of-large-language-models-9d4e92ad9823)**
1. (Comparatively small) Large Language Model Use-cases?
1. 헬스케어:
- BioMed LM(2.7 billion parameters)
- 비교적 규모가 작은 대규모 언어 모델(LLM) 사용 사례로 잘 알려진 것 중 하나는 MosaicML과 스탠포드 기초 모델 연구 센터(CRFM)에서 개발한 생의학 텍스트를 위한 도메인 전용 LLM인 BioMedLM입니다. 이 모델은 특히 생의학 분야를 위한 산업별 LLM의 기능을 보여줍니다.
2. 금융: 금융 기관은 기술 지원, 사기 탐지, 보고, 금융 뉴스에 대한 정서 분석에 LLM을 활용할 수 있습니다.
- [BloombergGPT](https://www.bloomberg.com/company/press/bloomberggpt-50-billion-parameter-llm-tuned-finance/)
- [FinGPT(Opensource)](https://the-decoder.com/fingpt-is-an-ai-financial-framework-designed-to-learn-from-the-wisdom-of-the-market/)
3. 프로그래밍: [Replit의 7B LLM](https://huggingface.co/replit/replit-code-v1-3b)인 replit-code-v1-3b는 코드 완성에 중점을 둔 27B 인과 언어 모델로서, 여러 프로그래밍 언어가 포함된 데이터 세트에서 학습되었습니다.
2. What are the pros and cons for training own large language models?
1. 장점
1. 컨텐츠/필터 제어: 자체 LLM을 교육함으로써 특정 요구 사항과 선호도에 맞게 모델을 조정하여 회사의 목표와 가치에 부합하도록 할 수 있습니다.**[1](https://www.brookings.edu/articles/exploring-the-impact-of-language-models/)**
2. 모델 및 지적 재산에 대한 소유권: 자체 LLM을 개발하면 모델과 그 기반 기술에 대한 완전한 소유권을 보유할 수 있으며, 이는 귀사의 귀중한 자산이 될 수 있습니다.**[1](https://www.brookings.edu/articles/exploring-the-impact-of-language-models/)**
3. 설명 가능성 및 투명성 향상: 자체 LLM을 교육하면 모델 내부를 더 잘 제어할 수 있으므로 의사 결정 프로세스의 설명 가능성과 투명성을 개선하는 데 도움이 됩니다.
4. 특정 산업 또는 도메인 요구사항에 맞게 조정: 산업 또는 도메인의 고유한 과제와 요구 사항을 해결하도록 맞춤형 LLM을 설계하여 모델이 특정 사용 사례에 최적화되도록 할 수 있습니다.
2. 단점
1. 높은 컴퓨팅 리소스와 비용: 자체 LLM을 교육하고 배포하는 것은 리소스 집약적일 수 있으며, 상당한 컴퓨팅 파워와 재정적 투자가 필요합니다. [3](https://www.analyticsinsight.net/pros-and-cons-of-customising-large-language-models/)
2. 시간이 오래 걸리는 교육 과정: 데이터 수집, 정리, 전처리뿐만 아니라 특정 요구사항에 맞게 모델을 미세 조정해야 하므로 맞춤형 LLM을 개발하는 데 오랜 시간이 소요될 수 있습니다.
3. 방대한 양의 데이터 관리 LLM을 학습하려면 대량의 데이터를 처리해야 하며, 이는 저장, 처리 및 개인 정보 보호 문제 측면에서 어려울 수 있습니다.
4. 모델 편향성 및 독성 문제를 해결하는 데 있어 잠재적인 어려움: 맞춤형 LLM에 편향성 및 독성 콘텐츠가 없는지 확인하는 것은 복잡하고 지속적인 프로세스가 될 수 있으므로 지속적인 모니터링과 평가가 필요합니다.**[6](https://towardsdatascience.com/overcoming-the-limitations-of-large-language-models-9d4e92ad9823)**
Bloomberg L.P.
Introducing BloombergGPT, Bloomberg’s 50-billion parameter large language model, purpose-built from scratch for finance | Press…
BloombergGPT is a 50-billion parameter large language model that was purpose-built from scratch for finance.
3. LLM을 교육, 확장 및 배포하는 데 있어 어떤 어려움이 있나요?
1. 컴퓨팅 리소스, 비용 및 인프라: LLM(대규모 언어 모델)을 학습하고 실행하는 것은 리소스 집약적이고 비용이 많이 들며, 특히 강력한 GPU 인프라가 필요합니다. 이는 초기 학습 단계부터 모델을 배포하는 추론 단계까지 확장됩니다. 이러한 리소스 관리의 복잡성은 불안정성으로 이어져 성능, 지연 시간, 심지어 비즈니스 모델에까지 영향을 미칠 수 있습니다.
- 비용 관리를 위한 엔지니어링
- 패널리스트들은 비용을 관리하기 위해 간단한 분류기와 같은 기본적인 엔지니어링 기법을 사용하여 대규모 언어 모델을 호출하는 것이 합당한지 여부를 결정할 수 있다고 제안합니다. 이들은 첫 번째 단계로 특정 모델을 사용할 수 있는지 평가한 다음 수용 가능한 결과를 제공하는 가장 낮은 수준으로 모델을 축소해야 한다고 강조합니다.
- **[Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2](https://youtu.be/wxq1ZeAM9fc)**
- Details
1. 훈련 비용: 대규모 언어 모델을 처음부터 학습하는 데 드는 비용으로, 여기에는 고급 하드웨어에서 여러 차례 반복하여 대규모 데이터 세트에 대한 계산을 실행하는 것이 포함됩니다. 여기에는 전기료와 잠재적인 데이터 저장 비용도 포함됩니다.
- 확장 비용: 모델이 더 커지고 복잡해지면 더 강력한 하드웨어, 더 많은 스토리지, 더 많은 에너지가 필요하므로 비용이 증가합니다. 더 많은 데이터나 정확도를 위해 모델을 확장하려면 추가 학습이 필요하므로 비용이 더 증가할 수 있습니다.
2. 배포 비용: 여기에는 학습된 모델을 효율적으로 실행하기 위해 최적화된 서버로 옮기는 데 드는 비용이 포함되며, 여기에는 특수 하드웨어가 필요할 수 있습니다. 지속적인 유지보수, 모니터링, 기존 시스템과의 통합 비용도 배포 비용에 영향을 미칩니다.
3. 추론/서비스 비용: 새로운 데이터에 대한 예측을 위해 모델을 사용하는 경우, 모델 실행을 위한 컴퓨팅 비용과 잠재적인 데이터 전송 비용이 발생합니다. 이러한 비용의 규모는 모델의 크기와 새로운 데이터의 양에 따라 달라집니다. 시간이 지남에 따라 사용 패턴에 따라 이러한 비용이 크게 누적될 수 있습니다.
2. 데이터 관리 및 개인정보 보호: LLM은 학습을 위해 방대한 양의 데이터를 필요로 하므로 저장, 처리, 특히 데이터 프라이버시와 관련된 문제가 발생합니다. LLM은 잠재적으로 학습 데이터에서 민감한 정보를 기억하고 유출할 수 있으므로 익명화 및 데이터 정화를 위한 엄격한 방법이 필요합니다.
3. 편향성, 독성 및 품질 관리: 인공 지능은 학습한 데이터를 통해 학습하기 때문에 내재된 편견이나 독성 콘텐츠를 흡수하고 전파할 위험이 있습니다. 또한 모호한 입력에 어려움을 겪고 문맥상 부적절하거나 부정확한 출력을 생성하거나 사실과 다르거나 허구의 텍스트를 '환각'할 수도 있습니다. 따라서 이러한 모델의 품질과 신뢰성을 보장하기 위해서는 지속적인 모니터링, 평가 및 조정이 필수적입니다.
4. 모델 적응 및 엔지니어링 엄격성: 특정 작업이나 도메인에 맞게 LLM을 조정하고 효과적인 프롬프트를 제작하는 것은 복잡하고 시간이 많이 소요되는 과정일 수 있습니다. 기존 및 향후 시스템과의 호환성을 보장하는 것도 중요한 엔지니어링 과제이므로 업데이트, 버전 관리 및 다른 구성 요소와의 통합을 위한 신중한 전략이 필요합니다.
5. 모델 설명 가능성 및 투명성: 복잡성으로 인해 LLM의 의사 결정 프로세스를 이해하는 것은 어려울 수 있습니다. 이러한 불투명성은 특히 의사 결정이 어떻게 이루어졌는지 명확하게 파악하는 것이 중요한 애플리케이션의 경우 문제가 될 수 있습니다.
6. 배포 전략: 프로덕션 환경에서 LLM을 배포하려면 하드웨어 기능, 지연 시간 요구 사항, 애플리케이션의 특정 요구 사항 간의 균형을 맞추는 신중한 전략이 필요합니다.
4. 참고자료:
1. [Unleashing LLMs in Production: Challenges & Opportunities. Chip Huyen, Amjad Masad & Michele Catasta](https://youtu.be/ByhMpN2iSbc)
2. [Real-time machine learning: challenges and solutions](https://huyenchip.com/2022/01/02/real-time-machine-learning-challenges-and-solutions.html)
3. [Building LLM applications for production](https://huyenchip.com/2023/04/11/llm-engineering.html)
4. [Efficiently Scaling and Deploying LLMs // Hanlin Tang // LLM's in Production Conference](https://youtu.be/AVccFl8-5-8)
5. **[Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2](https://youtu.be/wxq1ZeAM9fc)**
1. 컴퓨팅 리소스, 비용 및 인프라: LLM(대규모 언어 모델)을 학습하고 실행하는 것은 리소스 집약적이고 비용이 많이 들며, 특히 강력한 GPU 인프라가 필요합니다. 이는 초기 학습 단계부터 모델을 배포하는 추론 단계까지 확장됩니다. 이러한 리소스 관리의 복잡성은 불안정성으로 이어져 성능, 지연 시간, 심지어 비즈니스 모델에까지 영향을 미칠 수 있습니다.
- 비용 관리를 위한 엔지니어링
- 패널리스트들은 비용을 관리하기 위해 간단한 분류기와 같은 기본적인 엔지니어링 기법을 사용하여 대규모 언어 모델을 호출하는 것이 합당한지 여부를 결정할 수 있다고 제안합니다. 이들은 첫 번째 단계로 특정 모델을 사용할 수 있는지 평가한 다음 수용 가능한 결과를 제공하는 가장 낮은 수준으로 모델을 축소해야 한다고 강조합니다.
- **[Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2](https://youtu.be/wxq1ZeAM9fc)**
- Details
1. 훈련 비용: 대규모 언어 모델을 처음부터 학습하는 데 드는 비용으로, 여기에는 고급 하드웨어에서 여러 차례 반복하여 대규모 데이터 세트에 대한 계산을 실행하는 것이 포함됩니다. 여기에는 전기료와 잠재적인 데이터 저장 비용도 포함됩니다.
- 확장 비용: 모델이 더 커지고 복잡해지면 더 강력한 하드웨어, 더 많은 스토리지, 더 많은 에너지가 필요하므로 비용이 증가합니다. 더 많은 데이터나 정확도를 위해 모델을 확장하려면 추가 학습이 필요하므로 비용이 더 증가할 수 있습니다.
2. 배포 비용: 여기에는 학습된 모델을 효율적으로 실행하기 위해 최적화된 서버로 옮기는 데 드는 비용이 포함되며, 여기에는 특수 하드웨어가 필요할 수 있습니다. 지속적인 유지보수, 모니터링, 기존 시스템과의 통합 비용도 배포 비용에 영향을 미칩니다.
3. 추론/서비스 비용: 새로운 데이터에 대한 예측을 위해 모델을 사용하는 경우, 모델 실행을 위한 컴퓨팅 비용과 잠재적인 데이터 전송 비용이 발생합니다. 이러한 비용의 규모는 모델의 크기와 새로운 데이터의 양에 따라 달라집니다. 시간이 지남에 따라 사용 패턴에 따라 이러한 비용이 크게 누적될 수 있습니다.
2. 데이터 관리 및 개인정보 보호: LLM은 학습을 위해 방대한 양의 데이터를 필요로 하므로 저장, 처리, 특히 데이터 프라이버시와 관련된 문제가 발생합니다. LLM은 잠재적으로 학습 데이터에서 민감한 정보를 기억하고 유출할 수 있으므로 익명화 및 데이터 정화를 위한 엄격한 방법이 필요합니다.
3. 편향성, 독성 및 품질 관리: 인공 지능은 학습한 데이터를 통해 학습하기 때문에 내재된 편견이나 독성 콘텐츠를 흡수하고 전파할 위험이 있습니다. 또한 모호한 입력에 어려움을 겪고 문맥상 부적절하거나 부정확한 출력을 생성하거나 사실과 다르거나 허구의 텍스트를 '환각'할 수도 있습니다. 따라서 이러한 모델의 품질과 신뢰성을 보장하기 위해서는 지속적인 모니터링, 평가 및 조정이 필수적입니다.
4. 모델 적응 및 엔지니어링 엄격성: 특정 작업이나 도메인에 맞게 LLM을 조정하고 효과적인 프롬프트를 제작하는 것은 복잡하고 시간이 많이 소요되는 과정일 수 있습니다. 기존 및 향후 시스템과의 호환성을 보장하는 것도 중요한 엔지니어링 과제이므로 업데이트, 버전 관리 및 다른 구성 요소와의 통합을 위한 신중한 전략이 필요합니다.
5. 모델 설명 가능성 및 투명성: 복잡성으로 인해 LLM의 의사 결정 프로세스를 이해하는 것은 어려울 수 있습니다. 이러한 불투명성은 특히 의사 결정이 어떻게 이루어졌는지 명확하게 파악하는 것이 중요한 애플리케이션의 경우 문제가 될 수 있습니다.
6. 배포 전략: 프로덕션 환경에서 LLM을 배포하려면 하드웨어 기능, 지연 시간 요구 사항, 애플리케이션의 특정 요구 사항 간의 균형을 맞추는 신중한 전략이 필요합니다.
4. 참고자료:
1. [Unleashing LLMs in Production: Challenges & Opportunities. Chip Huyen, Amjad Masad & Michele Catasta](https://youtu.be/ByhMpN2iSbc)
2. [Real-time machine learning: challenges and solutions](https://huyenchip.com/2022/01/02/real-time-machine-learning-challenges-and-solutions.html)
3. [Building LLM applications for production](https://huyenchip.com/2023/04/11/llm-engineering.html)
4. [Efficiently Scaling and Deploying LLMs // Hanlin Tang // LLM's in Production Conference](https://youtu.be/AVccFl8-5-8)
5. **[Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2](https://youtu.be/wxq1ZeAM9fc)**
YouTube
Cost Optimization and Performance // LLMs in Production Conference Panel Discussion 2
// Abstract
In this panel discussion, the topic of the cost of running large language models (LLMs) is explored, along with potential solutions. The benefits of bringing LLMs in-house, such as latency optimization and greater control, are also discussed.…
In this panel discussion, the topic of the cost of running large language models (LLMs) is explored, along with potential solutions. The benefits of bringing LLMs in-house, such as latency optimization and greater control, are also discussed.…
Chip이 일하기도 했던 Snorkel이 궁금해서 찾아보니 이런 회사군요 ㅎㅎ
Solving the Last Mile Problem of Foundation Models with Data-Centric AI
Everyone will soon be using foundation models (FMs) like GPT-4.
동영상에서 Snorkel AI의 CEO인 알렉스 래트너는 기초 모델의 ‘라스트 마일’ 문제를 해결하는 데 있어 데이터 중심 AI의 역할과 맞춤형 및 도메인별 모델 개발의 중요성에 대해 설명합니다. 그는 독점적인 도메인별 데이터로 학습된 기초 모델을 나타내는 ‘GPT-You’라는 개념을 AI 애플리케이션의 미래로 소개합니다.
그는 AI 개발의 본질적이고 가장 중요한 측면은 올바른 아키텍처를 선택하거나 모델 매개변수를 미세 조정하는 것이 아니라 데이터를 조작, 큐레이팅, 레이블 지정, 슬라이싱, 샘플링 및 개발하는 것이라고 강조합니다. 이러한 데이터 중심 접근 방식을 통해 전문화된 고성능 기반 모델을 만들 수 있습니다.
또한 라트너는 ‘라스트 마일’ 문제에 대한 해결책으로서 데이터 중심 AI의 개념에 대해 자세히 설명합니다. 데이터 중심 AI는 라벨링, 샘플링, 큐레이팅, 증강 등 데이터를 반복하여 특정 작업을 위한 전문화된 모델을 만드는 데 중점을 둡니다. 그는 저렴한 쿼리 세트를 사용하여 ChatGPT를 복제하는 데 성공한 Alpaca와 같은 프로젝트의 성공과 내구성 있는 모델을 만드는 데 있어 개인 데이터 배포의 중요성에 대해 강조합니다.
데이터 중심 AI의 적용에 대해 래트너는 데이터의 고유성과 모델의 정확도라는 두 가지 차원으로 나누어 설명합니다. AI를 가장 보람 있게 사용할 수 있는 경우는 데이터가 기초 모델에 학습된 것과 매우 유사하고 오류에 대한 허용 오차가 높은 경우입니다. 그러나 비표준 데이터와 높은 정확도가 요구되는 상황에서는 레이블이 지정된 데이터에 대한 상당한 양의 작업과 미세 조정이 필요합니다.
래트너는 데이터 중심 AI를 사용하여 기초 모델을 개발하기 위한 플랫폼인 스노클 플로우를 소개합니다. 워크플로우는 기본 기초 모델에서 시작하여 특정 작업을 정의하고 기초 모델을 데이터에 적용하여 안내식 오류 분석으로 이어집니다. 이 프로세스는 기본 모델의 오류를 식별하고, 프로그래밍 방식의 라벨링을 사용하여 오류를 수정하며, 미세 조정을 위해 수정 및 증강된 라벨링 데이터로 기본 모델을 업데이트하거나 더 작은 규모의 작업별 모델로 추출합니다.
결론적으로 라트너는 데이터 중심 AI의 중요성과 이것이 기초 모델의 개발 및 미세 조정에 가져다주는 가치를 강조합니다. 그는 이러한 원칙에 대한 더 많은 탐구와 적용을 장려하며, 데이터 중심 AI와 기초 모델의 미래에 초점을 맞춘 향후 컨퍼런스에 청중을 초대합니다.
Solving the Last Mile Problem of Foundation Models with Data-Centric AI
Everyone will soon be using foundation models (FMs) like GPT-4.
동영상에서 Snorkel AI의 CEO인 알렉스 래트너는 기초 모델의 ‘라스트 마일’ 문제를 해결하는 데 있어 데이터 중심 AI의 역할과 맞춤형 및 도메인별 모델 개발의 중요성에 대해 설명합니다. 그는 독점적인 도메인별 데이터로 학습된 기초 모델을 나타내는 ‘GPT-You’라는 개념을 AI 애플리케이션의 미래로 소개합니다.
그는 AI 개발의 본질적이고 가장 중요한 측면은 올바른 아키텍처를 선택하거나 모델 매개변수를 미세 조정하는 것이 아니라 데이터를 조작, 큐레이팅, 레이블 지정, 슬라이싱, 샘플링 및 개발하는 것이라고 강조합니다. 이러한 데이터 중심 접근 방식을 통해 전문화된 고성능 기반 모델을 만들 수 있습니다.
또한 라트너는 ‘라스트 마일’ 문제에 대한 해결책으로서 데이터 중심 AI의 개념에 대해 자세히 설명합니다. 데이터 중심 AI는 라벨링, 샘플링, 큐레이팅, 증강 등 데이터를 반복하여 특정 작업을 위한 전문화된 모델을 만드는 데 중점을 둡니다. 그는 저렴한 쿼리 세트를 사용하여 ChatGPT를 복제하는 데 성공한 Alpaca와 같은 프로젝트의 성공과 내구성 있는 모델을 만드는 데 있어 개인 데이터 배포의 중요성에 대해 강조합니다.
데이터 중심 AI의 적용에 대해 래트너는 데이터의 고유성과 모델의 정확도라는 두 가지 차원으로 나누어 설명합니다. AI를 가장 보람 있게 사용할 수 있는 경우는 데이터가 기초 모델에 학습된 것과 매우 유사하고 오류에 대한 허용 오차가 높은 경우입니다. 그러나 비표준 데이터와 높은 정확도가 요구되는 상황에서는 레이블이 지정된 데이터에 대한 상당한 양의 작업과 미세 조정이 필요합니다.
래트너는 데이터 중심 AI를 사용하여 기초 모델을 개발하기 위한 플랫폼인 스노클 플로우를 소개합니다. 워크플로우는 기본 기초 모델에서 시작하여 특정 작업을 정의하고 기초 모델을 데이터에 적용하여 안내식 오류 분석으로 이어집니다. 이 프로세스는 기본 모델의 오류를 식별하고, 프로그래밍 방식의 라벨링을 사용하여 오류를 수정하며, 미세 조정을 위해 수정 및 증강된 라벨링 데이터로 기본 모델을 업데이트하거나 더 작은 규모의 작업별 모델로 추출합니다.
결론적으로 라트너는 데이터 중심 AI의 중요성과 이것이 기초 모델의 개발 및 미세 조정에 가져다주는 가치를 강조합니다. 그는 이러한 원칙에 대한 더 많은 탐구와 적용을 장려하며, 데이터 중심 AI와 기초 모델의 미래에 초점을 맞춘 향후 컨퍼런스에 청중을 초대합니다.
Our AI and ML Predictions for 2023: AI Arize
With prediction season coming to a close, here are a few hot takes on some prevailing trends and a few educated guesses on the year ahead.
1. Prompt Engineering Will Grow Into a Field: Prompt engineering doesn’t feel much like data science, but prompting is a growing area of significant importance with large language models (LLMs). In a way, finding the right prompt to get the right response turns a data science fine tuning problem into a fast and iterative prompt testing problem. There are already entire products such as Github Copilot that are built on top of prompt engineering with OpenAI, combining a well-executed product integration with GitHub and a data silo advantage. LLMs such as OpenAI will likely release pre-set prompts to help you ask the right questions. Word of caution: products built on prompts alone are not defensible.
2. A Multi-Modal LLM Will Go Mainstream: An LLM that supports both image or video and language together will be released this year to a lot of fanfare, possibly even eclipsing the fanfare around ChatGPT. The power of having both modalities in a single model is underappreciated right now and will be as groundbreaking in new use cases as ChatGPT is to conversation assistants.
3. Multiple Successful Vertical AI Assistants Will Emerge: We are seeing vertically-focused LLMs with the right prompt construction, software interface, and the right data creating focused value. The best execution to date has been GitHub Copilot. There will likely be multiple vertical AI assistants in fields like the law, medicine and biotech. These will be accomplished by connecting an LLM to unique vertical-specific datasets, fine tuning and aligning in specific verticals, prompt engineering for that vertical, and offering a user interface with workflows for that vertical. I believe these can be defensible if done right.
4. ChatGPT Will Not Threaten Google; It’s an Entirely New Large Market: It is very normal to see something new and try to think of it as a product replacement for what you already know. This is often the wrong way to look at it. I view ChatGPT as a whole new type of technology that enables a wide swath of products that have nothing to do with search. I think the network effects of search will be near impossible to dislodge in the near team, and the value replacement is just not there yet. That said, large new markets are enabled by the progress in LLMs. It’s also likely that a sizable portion of traffic distribution will occur through product integrations like CoPilot versus traffic arriving to and typing in a single home page.
5. Embedding Use for Interpretability and Content Control for Models/LLMs will Accelerate: The use of embeddings analysis for AI interpretability will grow as a field. Toolsets will launch that use these embeddings to monitor and control AI. We have already seen incredible pickup of our embedding drift solutions across a wide swath of industries. We’ve also seen embeddings used for content protection in Dall-E and other generative models. Embeddings represent the latent structure models have learned and they are the backbone of every modern deep learning model.
With prediction season coming to a close, here are a few hot takes on some prevailing trends and a few educated guesses on the year ahead.
1. Prompt Engineering Will Grow Into a Field: Prompt engineering doesn’t feel much like data science, but prompting is a growing area of significant importance with large language models (LLMs). In a way, finding the right prompt to get the right response turns a data science fine tuning problem into a fast and iterative prompt testing problem. There are already entire products such as Github Copilot that are built on top of prompt engineering with OpenAI, combining a well-executed product integration with GitHub and a data silo advantage. LLMs such as OpenAI will likely release pre-set prompts to help you ask the right questions. Word of caution: products built on prompts alone are not defensible.
2. A Multi-Modal LLM Will Go Mainstream: An LLM that supports both image or video and language together will be released this year to a lot of fanfare, possibly even eclipsing the fanfare around ChatGPT. The power of having both modalities in a single model is underappreciated right now and will be as groundbreaking in new use cases as ChatGPT is to conversation assistants.
3. Multiple Successful Vertical AI Assistants Will Emerge: We are seeing vertically-focused LLMs with the right prompt construction, software interface, and the right data creating focused value. The best execution to date has been GitHub Copilot. There will likely be multiple vertical AI assistants in fields like the law, medicine and biotech. These will be accomplished by connecting an LLM to unique vertical-specific datasets, fine tuning and aligning in specific verticals, prompt engineering for that vertical, and offering a user interface with workflows for that vertical. I believe these can be defensible if done right.
4. ChatGPT Will Not Threaten Google; It’s an Entirely New Large Market: It is very normal to see something new and try to think of it as a product replacement for what you already know. This is often the wrong way to look at it. I view ChatGPT as a whole new type of technology that enables a wide swath of products that have nothing to do with search. I think the network effects of search will be near impossible to dislodge in the near team, and the value replacement is just not there yet. That said, large new markets are enabled by the progress in LLMs. It’s also likely that a sizable portion of traffic distribution will occur through product integrations like CoPilot versus traffic arriving to and typing in a single home page.
5. Embedding Use for Interpretability and Content Control for Models/LLMs will Accelerate: The use of embeddings analysis for AI interpretability will grow as a field. Toolsets will launch that use these embeddings to monitor and control AI. We have already seen incredible pickup of our embedding drift solutions across a wide swath of industries. We’ve also seen embeddings used for content protection in Dall-E and other generative models. Embeddings represent the latent structure models have learned and they are the backbone of every modern deep learning model.
MLSys 2023 학회에 참여하고 있습니다. 눈에 보이는 논문 몇편 소개해드릴까 합니다.
https://arxiv.org/abs/2305.02538 / Cuttlefish: Low-Rank Model Training without All the Tuning
개인적으로는 별로 좋아하는 연구는 아닙니다만, Low-Rank 모델 Training에 관심이 많으신 것 같습니다. Low-rank traning과 자동화를 좀 섞은것 같고, LLM은 모르겠지만, BERT정도까지는 좋은결과를 가지고 있습니다.
https://arxiv.org/abs/2211.05102 / Efficiently Scaling Transformer Inference
구글의 유명한 논문입니다. Outstanding Paper 상을 받았구요. PaLM의 서빙 시스템을 다루고 있는 논문입니다. TPU 최적화된 내용이라서, GPU향에서는 약간 다를수 있다는 함정이지만, 배울 수 있는 내용이 많습니다. 최근 구글에서 Grouped-Query Attention이 나왔는데, 얘는 기본적으로 Multi-query attention (MQA)를 사용하고 있고, Feed forward 를 위한 파티셔닝 전략을 설명하고 있습니다.
LLM Serving에 있어서 제일 중요하다고 생각하는 것중 하나가 Latency향 최적화, throughput 최적화 의 차이를 이해하는 것이라고 생각합니다. 그 부분에 대해서 많이 배우실수 있습니다.
https://proceedings.mlsys.org/paper_files/paper/2023/file/4552cedd396a308320209f75f56a5ad5-Paper-mlsys2023.pdf / Efficient GPU Kernels for N:M-Sparse Weights in Deep Learning
요즘 N:M sparsity가 정말 가속이 잘 되는지 궁금한데.. 저도 공부해볼까 싶어서 붙여넣었습니다.
https://proceedings.mlsys.org/paper_files/paper/2023/file/de4086ad4276d895be8ef25ec03c964b-Paper-mlsys2023.pdf / Unified Convolution Framework: A compiler-based approach to support sparse convolutions
한국인 MIT 학생의 발표인데, Compiler 궁금하신 분들 보시죠 ㅎㅎ
네이버 권세중님
https://arxiv.org/abs/2305.02538 / Cuttlefish: Low-Rank Model Training without All the Tuning
개인적으로는 별로 좋아하는 연구는 아닙니다만, Low-Rank 모델 Training에 관심이 많으신 것 같습니다. Low-rank traning과 자동화를 좀 섞은것 같고, LLM은 모르겠지만, BERT정도까지는 좋은결과를 가지고 있습니다.
https://arxiv.org/abs/2211.05102 / Efficiently Scaling Transformer Inference
구글의 유명한 논문입니다. Outstanding Paper 상을 받았구요. PaLM의 서빙 시스템을 다루고 있는 논문입니다. TPU 최적화된 내용이라서, GPU향에서는 약간 다를수 있다는 함정이지만, 배울 수 있는 내용이 많습니다. 최근 구글에서 Grouped-Query Attention이 나왔는데, 얘는 기본적으로 Multi-query attention (MQA)를 사용하고 있고, Feed forward 를 위한 파티셔닝 전략을 설명하고 있습니다.
LLM Serving에 있어서 제일 중요하다고 생각하는 것중 하나가 Latency향 최적화, throughput 최적화 의 차이를 이해하는 것이라고 생각합니다. 그 부분에 대해서 많이 배우실수 있습니다.
https://proceedings.mlsys.org/paper_files/paper/2023/file/4552cedd396a308320209f75f56a5ad5-Paper-mlsys2023.pdf / Efficient GPU Kernels for N:M-Sparse Weights in Deep Learning
요즘 N:M sparsity가 정말 가속이 잘 되는지 궁금한데.. 저도 공부해볼까 싶어서 붙여넣었습니다.
https://proceedings.mlsys.org/paper_files/paper/2023/file/de4086ad4276d895be8ef25ec03c964b-Paper-mlsys2023.pdf / Unified Convolution Framework: A compiler-based approach to support sparse convolutions
한국인 MIT 학생의 발표인데, Compiler 궁금하신 분들 보시죠 ㅎㅎ
네이버 권세중님
What is great friendship? How could we cultivate this?
Reid Hoffman
1. 친구들은 내가 볼 수 없는 것을 볼 수 있도록 도와줄 수 있습니다.
2. 내가 친구들을 돕고 친구들이 나를 도와주면 우리는 더 잘하고 더 멀리 갈 수 있습니다.
3. 나에게는 수백 명의 친구, 멘토가 있습니다.
4. 친구들은 당신이 그들을 돕도록 허락합니다. 친구들은 대화를 통해 저를 전적으로 신뢰하고 믿어주어 저를 가치 있는 사람으로 만들어주었습니다.
5. 우정을 최우선 순위로 삼는다.
6. 의식적으로 좋은 우정을 만든다. 의식을 만든다. 우정이 무엇이며 어떻게 개선할 수 있는지 이야기하세요.
7. 당신이 원하는 것과 당신의 꿈을 친구들에게 공유하세요.
8. 친구들은 당신이 원하는 것이 아니라 내가 해야 할 일을 말해줍니다.
9. 인생은 가장 충만한 팀 스포츠입니다.
---
Charlie Munger and Warren Buffet
독이 되는 사람을 피하세요: 버핏과 멍거는 모두 삶에 부정적인 영향을 미칠 수 있는 독성이 있는 사람들과 멀리 떨어져 지내는 것이 중요하다고 강조합니다. 그러나 버핏은 사람을 비방하고 다리를 불태우는 것은 친구가 전혀 없을 수도 있다고 경고합니다.
공유된 가치와 신뢰: 버핏과 멍거의 오랜 우정은 공유된 가치, 신뢰, 상호 존중을 기반으로 합니다.
서로에게서 배우기: 버핏은 멍거의 지성, 유머 감각, 명쾌한 사고력 등 그가 중요하게 여기는 자질에 대해 자주 언급해 왔습니다. 또한 멍거는 버핏의 투자 능력과 지혜에 대해 존경심을 표하기도 했습니다.
---
Naval Ravikant
장기적인 우정을 소중히 여깁니다: Naval은 상호 존중과 공유된 가치에 기반한 장기적인 우정과 동료 관계의 중요성을 강조합니다.
정직: Naval에 따르면 정직은 우정과 관계의 기본 가치입니다. 친구에게 정직하고 투명하게 행동하면 신뢰를 쌓고 유대감을 강화하는 데 도움이 됩니다.
관심사 공유: Naval은 친구와 관심사와 열정을 공유하면 우정이 더욱 풍성하고 즐거워질 수 있다고 믿습니다.
독립성: Naval은 트윗에서 친구나 또래 집단의 신념에 따르지 않고 독립적인 사고를 하는 것의 중요성에 대해 언급했습니다.
양보다 질: Naval은 피상적인 우정을 많이 쌓기보다는 소수의 친한 친구와 깊고 의미 있는 관계를 형성하는 데 집중할 것을 제안합니다. .
Reid Hoffman
1. 친구들은 내가 볼 수 없는 것을 볼 수 있도록 도와줄 수 있습니다.
2. 내가 친구들을 돕고 친구들이 나를 도와주면 우리는 더 잘하고 더 멀리 갈 수 있습니다.
3. 나에게는 수백 명의 친구, 멘토가 있습니다.
4. 친구들은 당신이 그들을 돕도록 허락합니다. 친구들은 대화를 통해 저를 전적으로 신뢰하고 믿어주어 저를 가치 있는 사람으로 만들어주었습니다.
5. 우정을 최우선 순위로 삼는다.
6. 의식적으로 좋은 우정을 만든다. 의식을 만든다. 우정이 무엇이며 어떻게 개선할 수 있는지 이야기하세요.
7. 당신이 원하는 것과 당신의 꿈을 친구들에게 공유하세요.
8. 친구들은 당신이 원하는 것이 아니라 내가 해야 할 일을 말해줍니다.
9. 인생은 가장 충만한 팀 스포츠입니다.
---
Charlie Munger and Warren Buffet
독이 되는 사람을 피하세요: 버핏과 멍거는 모두 삶에 부정적인 영향을 미칠 수 있는 독성이 있는 사람들과 멀리 떨어져 지내는 것이 중요하다고 강조합니다. 그러나 버핏은 사람을 비방하고 다리를 불태우는 것은 친구가 전혀 없을 수도 있다고 경고합니다.
공유된 가치와 신뢰: 버핏과 멍거의 오랜 우정은 공유된 가치, 신뢰, 상호 존중을 기반으로 합니다.
서로에게서 배우기: 버핏은 멍거의 지성, 유머 감각, 명쾌한 사고력 등 그가 중요하게 여기는 자질에 대해 자주 언급해 왔습니다. 또한 멍거는 버핏의 투자 능력과 지혜에 대해 존경심을 표하기도 했습니다.
---
Naval Ravikant
장기적인 우정을 소중히 여깁니다: Naval은 상호 존중과 공유된 가치에 기반한 장기적인 우정과 동료 관계의 중요성을 강조합니다.
정직: Naval에 따르면 정직은 우정과 관계의 기본 가치입니다. 친구에게 정직하고 투명하게 행동하면 신뢰를 쌓고 유대감을 강화하는 데 도움이 됩니다.
관심사 공유: Naval은 친구와 관심사와 열정을 공유하면 우정이 더욱 풍성하고 즐거워질 수 있다고 믿습니다.
독립성: Naval은 트윗에서 친구나 또래 집단의 신념에 따르지 않고 독립적인 사고를 하는 것의 중요성에 대해 언급했습니다.
양보다 질: Naval은 피상적인 우정을 많이 쌓기보다는 소수의 친한 친구와 깊고 의미 있는 관계를 형성하는 데 집중할 것을 제안합니다. .
LLM을 RAG 방식으로 써보시는 시도를 많이 하실텐데요 .
관련하여 스탠포드에서 LLM에 넣는 input들의 상대적 위치와 관련해 다양한 실험을 한 흥미로운 논문이 있어 정리해봤습니다.
당연히 서비스 상황마다, 이용하는 LLM마다 상황이 다르지만
실험 범위를 좁힐 수 있는 좋은 가이드가 되겠네요
(혹시 이런 RAG 실전에 도움되는 다른 논문을 알고 계시다면 공유해주시면 감사하곘습니다! ㅎㅎ )
<짧은 (제 맘대로) 결론>
RAG 접근에서는 ranked list truncation 전략, 즉 순위가 높은 document를 앞에 넣어주고 일정 수준 이하 document는 넣어주지 않는 전략을 쓰자
만약 위 1의 접근이 쉽지 않은 경우, 즉 중요한 부분을 골라내기 어려운 경우는 GPT-3.5말고 Claude를 검토해 볼법하다.
그 이유는 단순히 max context length가 길어서라기 보다는,
중요 정보 위치에 따른 결과 편차가 GPT에 비해 적어서
decoder-only 모델을 쓰는 경우(예: gpt-3.5-turbo)에는 Query-aware contextualization 방법, 즉 프롬프트에 documents 전후에 query 텍스트를 중복해서 넣어주는 방법을 시도해보자
-------------
<논문 내용 정리>
중요한 정보가 앞 또는 뒤쪽에 있을 때 성능이 높아진다.
• [첫번째 그림] 정답을 포함한 passage의 상대적 위치를 바꿔가면서 실험했더니 앞 또는 뒤쪽에 있을때와 중간에 있을 때 (실험 상) 정확도가 많이 차이남
• 심지어 GPT-3.5의 경우는, 중요 정보가 중간에 있는 경우에, 아무런 context를 주지 않고 실행한 경우보다 더 낮은 수치가 나오기도…ㄷㄷ
• 이러한 U-shape 결과는 instcruct 넣어주든 안넣어주든 유사하게 나타나며, encoder-decoder 모델보다 decoder-only 모델에서 더 심하게 나타남.
(근데 경향성이 저렇다는거지 결국 중요한건 모델 바이 모델입니다.
예를 들어 claude의 길이에 따른 성능 편차는 gpt-3.5에 비해 훨씬 적습니다.)
• [두번째 그림] 이 현상은 supervised instruction-tuning을 한 모델뿐만 아니라 하지 않은 모델에도 유사한 현상이 나타남.
즉 instruction-tuning할 때 instruct가 앞쪽에 위치해서 이런 현상이 나타나는건 아닌것으로 보임
decoder-only 모델에서 Query-aware contextualization 방법이 효과 있다.
• Query-aware contextualization 란 프롬프트에서 Query 텍스트를 documents 전후로 넣어주는 방법
• 즉 1번 결과에서 보듯 정보의 위치가 퍼포먼스에 영향을 많이 끼치는 decoder-only 모델의 경우에는 query 위치도 중요하단 얘기임
• multi-document QA에서는 상대적으로 이 기법의 효과는 적었지만, 이 때도 중요 document의 상대적 위치에 따라 영향 정도가 달라짐
(중요 document가 앞쪽에 위치하는 경우는 multi-document QA에서도 이 방법이 유효했음)
Context를 많이 넣어줄수록 항상 좋은가? -> 당연히 아니다
• 일정 수준의 context가 이미 있는 상황에서는 관련 있는 내용이라도 더 넣어봤자 성능 향상이 미미
• [세번째 그림] 관련 없는걸 넣으면 당연하게도 떨어지는 경향을 보임
• 또한 Extended-context 모델과 원 모델 비교헀을 때 동일 인풋에 대해서는 성능 차이 거의 없다
(여기서는 GPT-3.5-Turbo and GPT-3.5-Turbo (16K) 를 비교했습니다.
16k 가격이 두배고, 많이 넣어봤자 도움이 안되니 최대한 8k 모델에 맞춰서 이용하는게 이득)
참고: 실험환경
Task: multi-document QA, key-value retrieval
Model: OpenAI’s GPT-3.5-Turbo, Anthropic’s Claud, MPT-30B-Instruct, LongChat-13B(16K)
https://www.linkedin.com/posts/philipp-schmid-a6a2bb196_are-vector-databases-here-to-stay-yes-activity-7085908435686285312-QVfB/?utm_source=share&utm_medium=member_android
관련하여 스탠포드에서 LLM에 넣는 input들의 상대적 위치와 관련해 다양한 실험을 한 흥미로운 논문이 있어 정리해봤습니다.
당연히 서비스 상황마다, 이용하는 LLM마다 상황이 다르지만
실험 범위를 좁힐 수 있는 좋은 가이드가 되겠네요
(혹시 이런 RAG 실전에 도움되는 다른 논문을 알고 계시다면 공유해주시면 감사하곘습니다! ㅎㅎ )
<짧은 (제 맘대로) 결론>
RAG 접근에서는 ranked list truncation 전략, 즉 순위가 높은 document를 앞에 넣어주고 일정 수준 이하 document는 넣어주지 않는 전략을 쓰자
만약 위 1의 접근이 쉽지 않은 경우, 즉 중요한 부분을 골라내기 어려운 경우는 GPT-3.5말고 Claude를 검토해 볼법하다.
그 이유는 단순히 max context length가 길어서라기 보다는,
중요 정보 위치에 따른 결과 편차가 GPT에 비해 적어서
decoder-only 모델을 쓰는 경우(예: gpt-3.5-turbo)에는 Query-aware contextualization 방법, 즉 프롬프트에 documents 전후에 query 텍스트를 중복해서 넣어주는 방법을 시도해보자
-------------
<논문 내용 정리>
중요한 정보가 앞 또는 뒤쪽에 있을 때 성능이 높아진다.
• [첫번째 그림] 정답을 포함한 passage의 상대적 위치를 바꿔가면서 실험했더니 앞 또는 뒤쪽에 있을때와 중간에 있을 때 (실험 상) 정확도가 많이 차이남
• 심지어 GPT-3.5의 경우는, 중요 정보가 중간에 있는 경우에, 아무런 context를 주지 않고 실행한 경우보다 더 낮은 수치가 나오기도…ㄷㄷ
• 이러한 U-shape 결과는 instcruct 넣어주든 안넣어주든 유사하게 나타나며, encoder-decoder 모델보다 decoder-only 모델에서 더 심하게 나타남.
(근데 경향성이 저렇다는거지 결국 중요한건 모델 바이 모델입니다.
예를 들어 claude의 길이에 따른 성능 편차는 gpt-3.5에 비해 훨씬 적습니다.)
• [두번째 그림] 이 현상은 supervised instruction-tuning을 한 모델뿐만 아니라 하지 않은 모델에도 유사한 현상이 나타남.
즉 instruction-tuning할 때 instruct가 앞쪽에 위치해서 이런 현상이 나타나는건 아닌것으로 보임
decoder-only 모델에서 Query-aware contextualization 방법이 효과 있다.
• Query-aware contextualization 란 프롬프트에서 Query 텍스트를 documents 전후로 넣어주는 방법
• 즉 1번 결과에서 보듯 정보의 위치가 퍼포먼스에 영향을 많이 끼치는 decoder-only 모델의 경우에는 query 위치도 중요하단 얘기임
• multi-document QA에서는 상대적으로 이 기법의 효과는 적었지만, 이 때도 중요 document의 상대적 위치에 따라 영향 정도가 달라짐
(중요 document가 앞쪽에 위치하는 경우는 multi-document QA에서도 이 방법이 유효했음)
Context를 많이 넣어줄수록 항상 좋은가? -> 당연히 아니다
• 일정 수준의 context가 이미 있는 상황에서는 관련 있는 내용이라도 더 넣어봤자 성능 향상이 미미
• [세번째 그림] 관련 없는걸 넣으면 당연하게도 떨어지는 경향을 보임
• 또한 Extended-context 모델과 원 모델 비교헀을 때 동일 인풋에 대해서는 성능 차이 거의 없다
(여기서는 GPT-3.5-Turbo and GPT-3.5-Turbo (16K) 를 비교했습니다.
16k 가격이 두배고, 많이 넣어봤자 도움이 안되니 최대한 8k 모델에 맞춰서 이용하는게 이득)
참고: 실험환경
Task: multi-document QA, key-value retrieval
Model: OpenAI’s GPT-3.5-Turbo, Anthropic’s Claud, MPT-30B-Instruct, LongChat-13B(16K)
https://www.linkedin.com/posts/philipp-schmid-a6a2bb196_are-vector-databases-here-to-stay-yes-activity-7085908435686285312-QVfB/?utm_source=share&utm_medium=member_android
Linkedin
Philipp Schmid on LinkedIn: Are Vector Databases here to stay? 🔍 Yes, it seems LLMs are lost in the… | 116 comments
Are Vector Databases here to stay? 🔍 Yes, it seems LLMs are lost in the Middle and lose focus on long inputs.🗺👁🗨
In the “Lost in the Middle: How Language… | 116 comments on LinkedIn
In the “Lost in the Middle: How Language… | 116 comments on LinkedIn
<의사결정의 순서>
전문가와 비전문가의 차이가 크게 도드라지는 부분 중 하나는 일의 순서이다. 특히 인지적 과업일 경우 의사결정의 순서가 전문가와 비전문가를 가른다. 어떤 순서로 의사결정을 하면 일을 하기가 훨씬 수월한데, 그렇지 않으면 일하면서 헤매게 되고 어려움을 겪게 된다.
해야할 의사결정들이 많을 때 자신에게 물어야할 질문은 이렇다. "어느 의사결정을 먼저 하면 다른 의사결정들을 내리기가 훨씬 수월해질까?"
이것이 바로 건축학자 크리스토퍼 알렉산더가 말하는 시퀀스(sequence)라는 개념이다.
건축학자인 크리스토퍼 알렉산더에 따르면 작은 집 하나를 짓는데에만 해야할 의사결정이 수백개에 달한다고 한다. 그러면 가능한 의사결정의 순서는 천문학적으로 늘어나게 된다. 하지만 가장 핵심적인(center) 의사결정부터 하나씩 진행하게 되면 점점 일이 정돈되고 수월하게 풀리게 된다. 했던 걸 다시 되돌려야 할 확률도 확 줄어든다.
예를 들어, 그는 부엌을 만들 때에 가장 우선적으로 할 의사결정 중 하나로 식탁의 위치 정하기를 꼽는다. 왜냐하면 결국 (서양식) 부엌의 가장 핵심이 되는 활동은 가족이 함께 식사를 하는 것이기 때문이다. 이게 정해지면 다른 모든 것들은 부차적인 의사결정이 되어 굉장히 쉽게 풀려버린다. 근데, 이걸 정하지 않은 상태에서 냉장고를 어디에 둘지 정하는 것은 기준이 명확하지 않아 어려움이 많을 것이다.
건축뿐만이 아니다. 인지적 작업을 하는 경우 모두가 해당한다. 내가 의사결정을 내려야 하는데 감도 잘 안오고 모호하다면 순서가 잘못된 거 아닌가 생각해 보는 것이 도움이 될 것이다.
전문가와 비전문가의 차이가 크게 도드라지는 부분 중 하나는 일의 순서이다. 특히 인지적 과업일 경우 의사결정의 순서가 전문가와 비전문가를 가른다. 어떤 순서로 의사결정을 하면 일을 하기가 훨씬 수월한데, 그렇지 않으면 일하면서 헤매게 되고 어려움을 겪게 된다.
해야할 의사결정들이 많을 때 자신에게 물어야할 질문은 이렇다. "어느 의사결정을 먼저 하면 다른 의사결정들을 내리기가 훨씬 수월해질까?"
이것이 바로 건축학자 크리스토퍼 알렉산더가 말하는 시퀀스(sequence)라는 개념이다.
건축학자인 크리스토퍼 알렉산더에 따르면 작은 집 하나를 짓는데에만 해야할 의사결정이 수백개에 달한다고 한다. 그러면 가능한 의사결정의 순서는 천문학적으로 늘어나게 된다. 하지만 가장 핵심적인(center) 의사결정부터 하나씩 진행하게 되면 점점 일이 정돈되고 수월하게 풀리게 된다. 했던 걸 다시 되돌려야 할 확률도 확 줄어든다.
예를 들어, 그는 부엌을 만들 때에 가장 우선적으로 할 의사결정 중 하나로 식탁의 위치 정하기를 꼽는다. 왜냐하면 결국 (서양식) 부엌의 가장 핵심이 되는 활동은 가족이 함께 식사를 하는 것이기 때문이다. 이게 정해지면 다른 모든 것들은 부차적인 의사결정이 되어 굉장히 쉽게 풀려버린다. 근데, 이걸 정하지 않은 상태에서 냉장고를 어디에 둘지 정하는 것은 기준이 명확하지 않아 어려움이 많을 것이다.
건축뿐만이 아니다. 인지적 작업을 하는 경우 모두가 해당한다. 내가 의사결정을 내려야 하는데 감도 잘 안오고 모호하다면 순서가 잘못된 거 아닌가 생각해 보는 것이 도움이 될 것이다.
2. <생성적 순서>
다음은 건축가 Christopher Alexander의 역작 Nature of Order 2권(p. 317)에 나오는 일화를 내가 번역하고(급하게 하느라 좀 거칠다) 편집한 것이다. 여기에 애자일의 오의奧義가 숨어 있다. 사실 이런 게 회고니 스크럼 미팅이니 하는 것보다 오백배 더 중요하다.
- ---
건축은 복잡하기 때문에 디자이너는 모든 걸 한번에 해야한다는 이야기가 퍼져있다. "복잡한 전체가, 부분으로 나뉘지 않는 하나로 존재하는데 어떻게 한 번에 하나씩 처리하면서 설계를 성공적으로 할 수 있겠어요?" 같은 질문을 보면 알 수 있다.
건축을 공부하는 학생 하나를 가르치려고 내가 여러달 노력을 했다. 그는 뛰어난 학생이었지만 설계에 대해 취약했다. 그러다가 그 친구가 집 하나를 설계해야 하는 디자인 수업에 같이 참여하게 되었다. 그 학생은 제대로 설계를 하려고 아무리 노력해도 잘 되지 않았다. 그의 드로잉 보드 위에는 난잡한 흔적이 가득했다.
누군가 설계를 제대로 못할 때에는 통상 잘못된 순서로 접근을 하기 때문이다. 모든 가능한 이슈들 사이를 오가면서 계속 혼돈 속에 빠지기 때문이다.
그러다가 어느날 그 학생이랑 같이 앉아서 대화를 하게 됐다.
"오늘 당신의 설계를 저랑 대화하면서 풀어보면 어떨까요. 일단 이미 갖고 있는 건 잊으세요. 전체 설계를 다 지워버리고요. 아무것도 없는 거로 시작합시다."
"그 현장(site)에서 가장 중요한 건 뭐고, 또 그 현장과 관련해 당신의 설계가 해야할 가장 중요한 것은 무엇인가요? 나머지는 걱정하지 마세요. 이 질문 하나에 대해서만 얘기해주세요."
"좋아요. 그럼 표시를 해보죠. 그거 하나만 딱 넣어봐요. 나머지는 모두 잊어먹고요."
"좋아요. 이제 다음으로 가장 중요한 게 뭔지 말해주세요."
이렇게 한시간 가량 지속했다. 학생이 뭔가가 중요하다고 했지만 내가 느끼기에 그 학생이 실제로 그걸 중요하게 느낀 건지 의심이 가면, 나는 그 학생을 쳐다보면서 아뇨, 다음으로 진짜로 가장 중요한 게 뭔가요? 라고 묻기도 했다.
그렇게 한시간이 끝나갈 때 쯤에는 그는 아름다운 건물을 완성할 수 있었다.
그 학생이 나에게 와서 이렇게 말했다. "이게 이렇게 간단하리라고는 생각도 못했어요. 전에는 한번도 이걸 이해한 적이 없었어요. 근데 이제 마침내 이해를 했어요. 선생님이 이제껏 얘기해 온 게 무슨 말인지요. 선생님은 그냥 한번에 딱 하나씩만 갖고 하시고 또 그걸 바른 순서로 하시는 거에요. 그게 전부죠. 단지 가장 중요한 걸 하라는 거. 그리고 그걸 끝내라는 거."
이게 작동하는 이유는 자연의 모든 시스템과 같이, 실제로 펼쳐지는 과정이 그 자제로 "전체"(whole)라는 것 때문이다. 인간의 모든 펼쳐지는 과정의 핵심은, 예술가 혹은 건축가가 바로 첫날부터 자기가 만드는 걸 전체로, 온전한 하나의 것으로 시각화할 수 있어야 한다는 거다. 심지어 당신이 시작하기도 전에, 그걸 선택하고 그게 바로 전체인 거처럼 봐야 한다. 그걸 전체로서 느끼고 그 전체성 속에서 그 부분을 상상해야 하며... 점진적으로 거기에서 이 전체성의 특성들을 끌어내야 한다.
김창준 님
다음은 건축가 Christopher Alexander의 역작 Nature of Order 2권(p. 317)에 나오는 일화를 내가 번역하고(급하게 하느라 좀 거칠다) 편집한 것이다. 여기에 애자일의 오의奧義가 숨어 있다. 사실 이런 게 회고니 스크럼 미팅이니 하는 것보다 오백배 더 중요하다.
- ---
건축은 복잡하기 때문에 디자이너는 모든 걸 한번에 해야한다는 이야기가 퍼져있다. "복잡한 전체가, 부분으로 나뉘지 않는 하나로 존재하는데 어떻게 한 번에 하나씩 처리하면서 설계를 성공적으로 할 수 있겠어요?" 같은 질문을 보면 알 수 있다.
건축을 공부하는 학생 하나를 가르치려고 내가 여러달 노력을 했다. 그는 뛰어난 학생이었지만 설계에 대해 취약했다. 그러다가 그 친구가 집 하나를 설계해야 하는 디자인 수업에 같이 참여하게 되었다. 그 학생은 제대로 설계를 하려고 아무리 노력해도 잘 되지 않았다. 그의 드로잉 보드 위에는 난잡한 흔적이 가득했다.
누군가 설계를 제대로 못할 때에는 통상 잘못된 순서로 접근을 하기 때문이다. 모든 가능한 이슈들 사이를 오가면서 계속 혼돈 속에 빠지기 때문이다.
그러다가 어느날 그 학생이랑 같이 앉아서 대화를 하게 됐다.
"오늘 당신의 설계를 저랑 대화하면서 풀어보면 어떨까요. 일단 이미 갖고 있는 건 잊으세요. 전체 설계를 다 지워버리고요. 아무것도 없는 거로 시작합시다."
"그 현장(site)에서 가장 중요한 건 뭐고, 또 그 현장과 관련해 당신의 설계가 해야할 가장 중요한 것은 무엇인가요? 나머지는 걱정하지 마세요. 이 질문 하나에 대해서만 얘기해주세요."
"좋아요. 그럼 표시를 해보죠. 그거 하나만 딱 넣어봐요. 나머지는 모두 잊어먹고요."
"좋아요. 이제 다음으로 가장 중요한 게 뭔지 말해주세요."
이렇게 한시간 가량 지속했다. 학생이 뭔가가 중요하다고 했지만 내가 느끼기에 그 학생이 실제로 그걸 중요하게 느낀 건지 의심이 가면, 나는 그 학생을 쳐다보면서 아뇨, 다음으로 진짜로 가장 중요한 게 뭔가요? 라고 묻기도 했다.
그렇게 한시간이 끝나갈 때 쯤에는 그는 아름다운 건물을 완성할 수 있었다.
그 학생이 나에게 와서 이렇게 말했다. "이게 이렇게 간단하리라고는 생각도 못했어요. 전에는 한번도 이걸 이해한 적이 없었어요. 근데 이제 마침내 이해를 했어요. 선생님이 이제껏 얘기해 온 게 무슨 말인지요. 선생님은 그냥 한번에 딱 하나씩만 갖고 하시고 또 그걸 바른 순서로 하시는 거에요. 그게 전부죠. 단지 가장 중요한 걸 하라는 거. 그리고 그걸 끝내라는 거."
이게 작동하는 이유는 자연의 모든 시스템과 같이, 실제로 펼쳐지는 과정이 그 자제로 "전체"(whole)라는 것 때문이다. 인간의 모든 펼쳐지는 과정의 핵심은, 예술가 혹은 건축가가 바로 첫날부터 자기가 만드는 걸 전체로, 온전한 하나의 것으로 시각화할 수 있어야 한다는 거다. 심지어 당신이 시작하기도 전에, 그걸 선택하고 그게 바로 전체인 거처럼 봐야 한다. 그걸 전체로서 느끼고 그 전체성 속에서 그 부분을 상상해야 하며... 점진적으로 거기에서 이 전체성의 특성들을 끌어내야 한다.
김창준 님
#스타트업 아이디어: LLM을 위한 QA 플랫폼
LLM을 활용한 서비스가 많아지면, LLM의 Hallucination을 잡는 게 중요하고 이를 위해서 여러 Iteration을 돌면서 엔지니어링을 해야하는데요.
예를들어, 챗봇 애플리케이션을 쇼핑몰에 도입하려고 한다면 이커머스 환경에서 챗봇의 유용성은 제품 클릭 수와 같은 지표에 연결되어야 하며, 이 지표를 기반으로 피드백 및 모델 조정이 이루어져야해요. 그런데 이런 걸 하기엔 되게 어려운 점들이 많죠. 그리고 이 챗봇 애플리케이션의 성능을 높이기 위해서는 여러가지 요소(데이터 품질, 학습 방식, 디버깅 방식, 프롬프트 등을 개선해야하는데요. 이걸 자체적으로 하기엔 좀 빡세보이네요 ㅎㅎ
https://snorkel.ai/도 이런 비즈니스 해보고 싶어하는 것 같고요.
https://dust.tt/는 ML 엔지니어가 아닌 쉬운 GUI로 봇을 만드는데에 집중하는 팀인 것 같고요 ㅎㅎ
LLM을 활용한 서비스가 많아지면, LLM의 Hallucination을 잡는 게 중요하고 이를 위해서 여러 Iteration을 돌면서 엔지니어링을 해야하는데요.
예를들어, 챗봇 애플리케이션을 쇼핑몰에 도입하려고 한다면 이커머스 환경에서 챗봇의 유용성은 제품 클릭 수와 같은 지표에 연결되어야 하며, 이 지표를 기반으로 피드백 및 모델 조정이 이루어져야해요. 그런데 이런 걸 하기엔 되게 어려운 점들이 많죠. 그리고 이 챗봇 애플리케이션의 성능을 높이기 위해서는 여러가지 요소(데이터 품질, 학습 방식, 디버깅 방식, 프롬프트 등을 개선해야하는데요. 이걸 자체적으로 하기엔 좀 빡세보이네요 ㅎㅎ
https://snorkel.ai/도 이런 비즈니스 해보고 싶어하는 것 같고요.
https://dust.tt/는 ML 엔지니어가 아닌 쉬운 GUI로 봇을 만드는데에 집중하는 팀인 것 같고요 ㅎㅎ
### What is Flash Attention?
FlashAttention is an algorithm designed to improve the performance, cost, and latency of attention mechanisms in transformer models, particularly in large language models (LLMs) and other transformer-based architectures**[1](https://www.quora.com/How-does-flash-attention-work)**. It can replace standard attention mechanisms in various applications, offering significant benefits in terms of speed, memory efficiency, and training costs**[1](https://www.quora.com/How-does-flash-attention-work)**. It has been widely adopted in large language model (LLM) libraries due to its significant speedup and memory efficiency**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)[11](https://github.com/Dao-AILab/flash-attention)**.
### Model Performance
FlashAttention-2, the latest version, is 2x faster than its predecessor, FlashAttention, and 5-9x faster than standard attention implementations**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. This speedup allows for training models with twice as long context for the same training cost as before**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. When used end-to-end to train GPT-style language models, FlashAttention-2 reaches a training speed of up to 225 TFLOPs/s**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)[5](https://twitter.com/_akhaliq/status/1680988185776607237)**.
### Cost and Latency
FlashAttention-2 addresses the inefficiencies of its predecessor by reformulating the algorithm to reduce non-matmul FLOPs, improve parallelism, and optimize work partitioning between thread blocks and warps on GPUs**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. Non-matmul FLOPs are more expensive than matmul FLOPs, so these improvements lead to significant speedup and reduced latency**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**.The algorithm also minimizes communication and synchronization between warps, further improving performance**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. FlashAttention-2 is more memory-efficient than exact attention baselines, with memory usage linear in sequence length rather than quadratic**[3](https://arxiv.org/pdf/2205.14135.pdf)[16](https://www.adept.ai/blog/flashier-attention)**. This allows it to scale to much longer sequence lengths, enabling the training of higher-quality models**[2](https://arxiv.org/abs/2205.14135)**.
### What is better?
Incumbents, or standard attention mechanisms, have quadratic memory usage and slower training times due to their computation and memory access patterns**[4](https://crfm.stanford.edu/2023/01/13/flashattention.html)**. FlashAttention, on the other hand, offers the following advantages:
1. Faster training times: FlashAttention-2, the latest version, is 2x faster than its predecessor, FlashAttention, and 5-9x faster than standard attention implementations**[1](https://www.quora.com/How-does-flash-attention-work)**. This speedup allows for faster training times and longer context lengths for the same training cost as before**[1](https://www.quora.com/How-does-flash-attention-work)**.
2. Longer context lengths(Memory efficiency): FlashAttention reduces memory usage from quadratic to linear in sequence length by leveraging tiling and recomputation techniques**[4](https://crfm.stanford.edu/2023/01/13/flashattention.html)**. This allows it to scale to much longer sequence lengths, enabling the training of higher-quality models**[2](https://github.com/HazyResearch/flash-attention)**.
3. Reduced training costs: The improvements in training speed and memory efficiency can result in reduced training costs**[1](https://www.quora.com/How-does-flash-attention-work)**.
### How is it possible?
The improvements in FlashAttention-2 were made by:
FlashAttention is an algorithm designed to improve the performance, cost, and latency of attention mechanisms in transformer models, particularly in large language models (LLMs) and other transformer-based architectures**[1](https://www.quora.com/How-does-flash-attention-work)**. It can replace standard attention mechanisms in various applications, offering significant benefits in terms of speed, memory efficiency, and training costs**[1](https://www.quora.com/How-does-flash-attention-work)**. It has been widely adopted in large language model (LLM) libraries due to its significant speedup and memory efficiency**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)[11](https://github.com/Dao-AILab/flash-attention)**.
### Model Performance
FlashAttention-2, the latest version, is 2x faster than its predecessor, FlashAttention, and 5-9x faster than standard attention implementations**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. This speedup allows for training models with twice as long context for the same training cost as before**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. When used end-to-end to train GPT-style language models, FlashAttention-2 reaches a training speed of up to 225 TFLOPs/s**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)[5](https://twitter.com/_akhaliq/status/1680988185776607237)**.
### Cost and Latency
FlashAttention-2 addresses the inefficiencies of its predecessor by reformulating the algorithm to reduce non-matmul FLOPs, improve parallelism, and optimize work partitioning between thread blocks and warps on GPUs**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. Non-matmul FLOPs are more expensive than matmul FLOPs, so these improvements lead to significant speedup and reduced latency**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**.The algorithm also minimizes communication and synchronization between warps, further improving performance**[1](https://crfm.stanford.edu/2023/07/17/flash2.html)**. FlashAttention-2 is more memory-efficient than exact attention baselines, with memory usage linear in sequence length rather than quadratic**[3](https://arxiv.org/pdf/2205.14135.pdf)[16](https://www.adept.ai/blog/flashier-attention)**. This allows it to scale to much longer sequence lengths, enabling the training of higher-quality models**[2](https://arxiv.org/abs/2205.14135)**.
### What is better?
Incumbents, or standard attention mechanisms, have quadratic memory usage and slower training times due to their computation and memory access patterns**[4](https://crfm.stanford.edu/2023/01/13/flashattention.html)**. FlashAttention, on the other hand, offers the following advantages:
1. Faster training times: FlashAttention-2, the latest version, is 2x faster than its predecessor, FlashAttention, and 5-9x faster than standard attention implementations**[1](https://www.quora.com/How-does-flash-attention-work)**. This speedup allows for faster training times and longer context lengths for the same training cost as before**[1](https://www.quora.com/How-does-flash-attention-work)**.
2. Longer context lengths(Memory efficiency): FlashAttention reduces memory usage from quadratic to linear in sequence length by leveraging tiling and recomputation techniques**[4](https://crfm.stanford.edu/2023/01/13/flashattention.html)**. This allows it to scale to much longer sequence lengths, enabling the training of higher-quality models**[2](https://github.com/HazyResearch/flash-attention)**.
3. Reduced training costs: The improvements in training speed and memory efficiency can result in reduced training costs**[1](https://www.quora.com/How-does-flash-attention-work)**.
### How is it possible?
The improvements in FlashAttention-2 were made by:
Quora
How does flash attention work?
Answer (1 of 7): Flash attention is a type of attention mechanism that is used in natural language processing (NLP) and other areas of machine learning to improve the performance of neural networks. It works by allowing a network to "pay attention" to certain…
1. Tweaking the algorithm to reduce the number of non-matmul FLOPs**[1](https://github.com/HazyResearch/flash-attention)**.
2. Parallelizing the attention computation, even for a single head, across different thread blocks to increase occupancy**[1](https://github.com/HazyResearch/flash-attention)**.
3. Distributing the work between warps within each thread block to reduce communication through shared memory**[1](https://github.com/HazyResearch/flash-attention)**.
It achieves this by exploiting the asymmetric GPU memory hierarchy, bringing significant memory savings (linear instead of quadratic) and runtime speedup**[4](https://arxiv.org/abs/2205.14135)**. Additionally, FlashAttention-2 minimizes communication and synchronization between warps, further improving performance**[1](https://github.com/HazyResearch/flash-attention)**.
### Implication for industry players
2. Parallelizing the attention computation, even for a single head, across different thread blocks to increase occupancy**[1](https://github.com/HazyResearch/flash-attention)**.
3. Distributing the work between warps within each thread block to reduce communication through shared memory**[1](https://github.com/HazyResearch/flash-attention)**.
It achieves this by exploiting the asymmetric GPU memory hierarchy, bringing significant memory savings (linear instead of quadratic) and runtime speedup**[4](https://arxiv.org/abs/2205.14135)**. Additionally, FlashAttention-2 minimizes communication and synchronization between warps, further improving performance**[1](https://github.com/HazyResearch/flash-attention)**.
### Implication for industry players
GitHub
GitHub - Dao-AILab/flash-attention: Fast and memory-efficient exact attention
Fast and memory-efficient exact attention. Contribute to Dao-AILab/flash-attention development by creating an account on GitHub.
1. Chipmakers: FlashAttention reduces the computational and memory requirements for attention mechanisms in transformer models, driving the demand for more efficient and specialized hardware to further optimize the performance of these models**[11](https://www.ft.com/content/8352e84b-284c-4ebe-a7c1-5e2093566e0d)**. This could lead to innovations in GPU architectures and the development of specialized AI accelerators.
This could lead to innovations in GPU architectures and the development of specialized AI accelerators that are better suited for handling the reduced computational and memory requirements of attention mechanisms in transformer models.Some components that could be affected include:
1. Memory hierarchy: FlashAttention exploits the asymmetric GPU memory hierarchy, which could lead to the development of new memory architectures that further optimize memory access patterns for attention mechanisms**[4](https://openreview.net/forum?id=H4DqfPSibmx)**.
2. Parallelism: FlashAttention improves parallelism in attention computation, which could influence the design of GPU architectures and AI accelerators to better support parallel processing for transformer models**[1](https://arxiv.org/pdf/2205.14135.pdf)**.
3. Communication and synchronization: FlashAttention reduces communication and synchronization between warps, which could impact the design of interconnects and synchronization mechanisms in GPU and AI accelerator architectures**[1](https://arxiv.org/pdf/2205.14135.pdf)**.
2. LLM makers: FlashAttention can help improve the efficiency of large language models (LLMs) by speeding up training times, allowing for longer context lengths, and reducing training costs**[1](https://arxiv.org/abs/2205.14135)**. This can lead to the development of more powerful LLMs and the creation of new AI services based on these models.
- By speeding up the attention mechanism and reducing memory requirements, FlashAttention allows for longer context lengths during training, which can lead to better model performance**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**. This efficiency enables LLM makers to train more powerful models without sacrificing quality, as FlashAttention computes exact attention without any approximation**[3](https://arxiv.org/pdf/2205.14135.pdf)**.
- FlashAttention can also help reduce the cost for training, scaling, deploying, or fine-tuning LLMs by offering faster training times, longer context lengths, and reduced training costs**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**. This is achieved through its improved memory efficiency, which allows it to scale to much longer sequence lengths, and its faster training times compared to standard attention mechanisms**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**.
- FlashAttention could affect the open-source ecosystem by providing an efficient alternative to standard attention mechanisms. Its open-source implementation**[11](https://aws.amazon.com/blogs/machine-learning/new-performance-improvements-in-amazon-sagemaker-model-parallel-library/)** can be integrated into various open-source libraries and frameworks, leading to wider adoption and further development of the algorithm. This can drive innovation and efficiency across various industries and players, leading to the development of more powerful AI models and services.
3. Infrastructure builders for LLMs (e.g., Mosaic ML): By integrating FlashAttention into their infrastructure offerings, these companies can enable more efficient and cost-effective training and deployment of LLMs**[15](https://www.mosaicml.com/blog/mpt-7b)**. This can lead to wider adoption of AI technologies and more advanced AI services.
This could lead to innovations in GPU architectures and the development of specialized AI accelerators that are better suited for handling the reduced computational and memory requirements of attention mechanisms in transformer models.Some components that could be affected include:
1. Memory hierarchy: FlashAttention exploits the asymmetric GPU memory hierarchy, which could lead to the development of new memory architectures that further optimize memory access patterns for attention mechanisms**[4](https://openreview.net/forum?id=H4DqfPSibmx)**.
2. Parallelism: FlashAttention improves parallelism in attention computation, which could influence the design of GPU architectures and AI accelerators to better support parallel processing for transformer models**[1](https://arxiv.org/pdf/2205.14135.pdf)**.
3. Communication and synchronization: FlashAttention reduces communication and synchronization between warps, which could impact the design of interconnects and synchronization mechanisms in GPU and AI accelerator architectures**[1](https://arxiv.org/pdf/2205.14135.pdf)**.
2. LLM makers: FlashAttention can help improve the efficiency of large language models (LLMs) by speeding up training times, allowing for longer context lengths, and reducing training costs**[1](https://arxiv.org/abs/2205.14135)**. This can lead to the development of more powerful LLMs and the creation of new AI services based on these models.
- By speeding up the attention mechanism and reducing memory requirements, FlashAttention allows for longer context lengths during training, which can lead to better model performance**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**. This efficiency enables LLM makers to train more powerful models without sacrificing quality, as FlashAttention computes exact attention without any approximation**[3](https://arxiv.org/pdf/2205.14135.pdf)**.
- FlashAttention can also help reduce the cost for training, scaling, deploying, or fine-tuning LLMs by offering faster training times, longer context lengths, and reduced training costs**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**. This is achieved through its improved memory efficiency, which allows it to scale to much longer sequence lengths, and its faster training times compared to standard attention mechanisms**[1](https://ahmdtaha.medium.com/flashattention-fast-and-memory-efficient-exact-attention-with-io-awareness-2a0aec52ed3d)**.
- FlashAttention could affect the open-source ecosystem by providing an efficient alternative to standard attention mechanisms. Its open-source implementation**[11](https://aws.amazon.com/blogs/machine-learning/new-performance-improvements-in-amazon-sagemaker-model-parallel-library/)** can be integrated into various open-source libraries and frameworks, leading to wider adoption and further development of the algorithm. This can drive innovation and efficiency across various industries and players, leading to the development of more powerful AI models and services.
3. Infrastructure builders for LLMs (e.g., Mosaic ML): By integrating FlashAttention into their infrastructure offerings, these companies can enable more efficient and cost-effective training and deployment of LLMs**[15](https://www.mosaicml.com/blog/mpt-7b)**. This can lead to wider adoption of AI technologies and more advanced AI services.
Ft
Subscribe to read | Financial Times
News, analysis and comment from the Financial Times, the worldʼs leading global business publication