diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index c6522c5..dc13bb7 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -53,6 +53,10 @@ jobs: # Before the build: these plugins decide every page's description, order # and read time. run: bundle exec ruby test/run_all.rb + - name: Unit-test the search script + # js/search.js's matching and ranking, in node's own test runner: no + # packages to install. The runner image ships Node. + run: node --test 'test/js/*.test.js' - name: Lint the post sources # Front matter against _data/post_conventions.yml, plus table, math and # heading rules the built HTML no longer shows. diff --git a/_data/post_conventions.yml b/_data/post_conventions.yml index a6d860f..f0a0151 100644 --- a/_data/post_conventions.yml +++ b/_data/post_conventions.yml @@ -38,6 +38,10 @@ topics: # (_plugins/posted_date.rb). forbidden_keys: [author, last_modified_at] +# A title longer than this needs a shorter `seo_title` for (search +# results cut it); `seo_title` is held to it too. +seo_title_max_length: 70 + # `lang` values. A translation is one post in each, sharing a translation_id; # the language switcher (_includes/language_switcher.html) knows these two. languages: [ko, en] diff --git a/_posts/2025-01-17-from-local-to-global-a-graph-rag-approach-to-query-focused-summarization.md b/_posts/2025-01-17-from-local-to-global-a-graph-rag-approach-to-query-focused-summarization.md index aff5687..8b1e936 100644 --- a/_posts/2025-01-17-from-local-to-global-a-graph-rag-approach-to-query-focused-summarization.md +++ b/_posts/2025-01-17-from-local-to-global-a-graph-rag-approach-to-query-focused-summarization.md @@ -1,6 +1,7 @@ --- layout: post title: "From Local to Global: A Graph RAG Approach to Query-Focused Summarization" +seo_title: "From Local to Global: A Graph RAG Approach" subtitle: "로컬에서 글로벌로: 질의 중심 요약을 위한 Graph RAG 접근법" date: 2024-04-24 18:38:11 paper_author: "Microsoft Research" diff --git a/_posts/2025-01-27-llama-2-open-foundation-and-fine-tuned-chat-models.md b/_posts/2025-01-27-llama-2-open-foundation-and-fine-tuned-chat-models.md index 826b835..e906b19 100644 --- a/_posts/2025-01-27-llama-2-open-foundation-and-fine-tuned-chat-models.md +++ b/_posts/2025-01-27-llama-2-open-foundation-and-fine-tuned-chat-models.md @@ -62,7 +62,7 @@ BLOOM, LLaMA-1, Falcon과 같은 공개된 사전학습 모델들은 GPT-3나 Ch 인간 평가를 보완하기 위해 GPT-4 모델을 사용하여 상용 라이선스 파운데이션 모델들과 Llama 2-Chat 모델의 유용성과 안전성을 비교 평가했습니다. 평가의 공정성을 위해 모델 응답의 제시 순서를 무작위로 바꾸었으며, 동점을 제거하기 위해 승률을 $$\text{win}/(\text{win}+\text{loss})$$ 공식으로 계산했습니다. ### 안전성 평가 결과 -![안전성 평가 결과](https://arxiv.org/html/2307.09288v1/img/safety_overall_human_temp.png) +![안전성 평가 결과](/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-1.png) 약 2,000개의 적대적 프롬프트에 대한 안전성 평가에서 Llama 2-Chat 모델은 다른 오픈소스 및 비공개 모델들과 비교하여 우수한 성능을 보여주었습니다. 특히 70b-chat 변형 모델이 가장 낮은 안전성 위반율을 기록했습니다. 하지만 이러한 안전성 평가 결과는 프롬프트 세트의 한계, 평가 가이드라인의 주관성, 그리고 개별 평가자의 주관성으로 인한 편향이 있을 수 있습니다. 또한 이러한 안전성 평가는 Llama 2-Chat 모델에 최적화된 콘텐츠 기준을 사용했을 가능성이 있다는 점을 고려해야 합니다. @@ -304,7 +304,7 @@ Llama 2의 안전성 평가와 완화 방법은 크게 네 가지 주요 영역 HolisticBias 데이터셋의 인구통계학적 정체성 용어를 사용하여 다양한 집단의 대표성을 분석했습니다. 종교, 성별과 성, 국적, 인종과 민족, 성적 지향이라는 5개 축으로 구분하여 각 축의 상위 5개 용어 빈도를 측정했습니다. 성별과 성의 경우, 'She' 대명사는 적게 등장하지만 'female'이라는 용어는 더 많은 문서에서 발견되었습니다. 성적 지향의 상위 5개 용어는 모두 LGBTQ+ 정체성과 관련되어 있었으며, 국적, 인종과 민족, 종교에서는 서구적 편향이 관찰되었습니다. -![데이터 유해성](https://arxiv.org/html/2307.09288v1/img/data_toxicity.png) +![데이터 유해성](/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-2.png) #### 데이터 유해성 평가 @@ -412,11 +412,11 @@ Llama 2-Chat의 안전성을 평가하기 위해 연구진은 안전성 카테 1점이나 2점은 위반으로 간주되며, 각 샘플은 세 명의 주석자가 평가하여 다수결로 위반 여부를 결정했습니다. 평가자 간 신뢰도(IRR)는 Gwet의 AC1/2 통계를 사용하여 측정했으며, 주석 배치에 따라 0.70에서 0.95 사이의 점수를 보였습니다. Llama 2-Chat 주석에 대한 평균 IRR은 Gwet의 AC2 측정에서 0.92를 기록했습니다. -![전반적인 안전성 측정](https://arxiv.org/html/2307.09288v1/img/safety_human_eval/overall_violation.png) +![전반적인 안전성 측정](/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-3.png) Llama 2-Chat은 모든 모델 크기에서 낮은 위반율을 보여주었습니다. 다만 이러한 결과는 프롬프트 세트의 한계, 검토 가이드라인의 주관성, 콘텐츠 기준, 그리고 개별 평가자의 주관성을 고려하여 신중하게 해석해야 합니다. -![위험 카테고리별 위반율](https://arxiv.org/html/2307.09288v1/img/safety_human_eval/category.png) +![위험 카테고리별 위반율](/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-4.png) 위험 카테고리별 안전성 위반율을 분석한 결과, Llama 2-Chat은 비전문가 조언 카테고리에서 상대적으로 더 많은 위반을 보였습니다. 이는 때때로 적절한 면책 조항(예: "저는 전문가가 아닙니다")을 포함하지 않는 등의 이유 때문입니다. 다른 두 카테고리에서는 모델 크기와 관계없이 일관되게 낮은 위반율을 달성했습니다. diff --git a/_posts/2025-02-03-deepseek-llm-scaling-open-source-language-models-with-longtermism.md b/_posts/2025-02-03-deepseek-llm-scaling-open-source-language-models-with-longtermism.md index 34d5993..a8323b9 100644 --- a/_posts/2025-02-03-deepseek-llm-scaling-open-source-language-models-with-longtermism.md +++ b/_posts/2025-02-03-deepseek-llm-scaling-open-source-language-models-with-longtermism.md @@ -81,11 +81,11 @@ DeepSeek LLM은 0.006의 표준편차로 초기화되었으며, AdamW 옵티마 사전 학습 과정에서는 일반적으로 사용되는 코사인 스케줄러 대신 다단계 학습률 스케줄러를 채택했습니다. 구체적으로, 모델의 학습률은 2000 웜업 스텝 이후 최대값에 도달하며, 전체 학습 토큰의 80%를 처리한 후에는 최대값의 31.6%로 감소합니다. 이어서 90%의 토큰을 처리한 후에는 최대값의 10%로 더욱 감소합니다. 학습 과정에서의 그래디언트 클리핑은 1.0으로 설정되었습니다. -![학습률 스케줄러 비교](https://arxiv.org/html/2401.02954v1/figures/loss_step_cosine.png) +![학습률 스케줄러 비교](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-1.png) 위 그래프는 다단계 학습률 스케줄러와 코사인 스케줄러의 성능을 비교한 것입니다. 실험 결과에 따르면, 학습 중 손실 감소 추세에는 차이가 있지만, 최종 성능은 두 스케줄러가 실질적으로 동일한 수준을 보여주었습니다. 다단계 학습률 스케줄러를 선택한 주된 이유는 모델 크기를 고정한 상태에서 학습 규모를 조정할 때, 첫 번째 단계의 학습을 재사용할 수 있다는 독특한 이점 때문이었습니다. -![다단계 비율 비교](https://arxiv.org/html/2401.02954v1/figures/loss_diff_step.png) +![다단계 비율 비교](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-2.png) 위 그래프는 다단계 학습률 스케줄러의 각 단계 비율을 조정했을 때의 영향을 보여줍니다. 실험 결과, 각 단계의 비율을 조정하면 약간 더 나은 성능을 얻을 수 있었습니다. 그러나 연속 학습에서의 재사용 비율과 모델 성능 사이의 균형을 고려하여, 최종적으로 세 단계의 비율을 80%, 10%, 10%로 설정했습니다. @@ -130,18 +130,18 @@ GPU 메모리 사용을 더욱 최적화하기 위해 인플레이스 크로스 1e17의 컴퓨트 예산에서 작은 규모의 실험으로 배치 크기와 학습률에 대한 그리드 서치를 수행했으며, 특정 모델 크기(177M FLOPs/토큰)에 대한 결과는 아래 그래프와 같습니다. -![배치 크기와 학습률 관계](https://arxiv.org/html/2401.02954v1/figures/loss_bs_lr_1e17.png) +![배치 크기와 학습률 관계](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-3.png) 실험 결과는 일반화 오차가 배치 크기와 학습률의 선택에 있어 넓은 범위에서 안정적으로 유지된다는 것을 보여줍니다. 이는 상대적으로 넓은 파라미터 공간 내에서 최적에 가까운 성능을 달성할 수 있다는 것을 의미합니다. -![1e20 FLOPs에서의 최적 하이퍼파라미터](https://arxiv.org/html/2401.02954v1/figures/loss_bs_lr_1e20.png) +![1e20 FLOPs에서의 최적 하이퍼파라미터](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-4.png) 앞서 언급한 다단계 학습률 스케줄러를 활용하여 첫 번째 단계를 재사용함으로써 1e17에서 2e19까지의 다양한 컴퓨트 예산에서 서로 다른 배치 크기와 학습률로 여러 모델을 효과적으로 학습했습니다. 파라미터 공간의 중복성을 고려하여, 일반화 오차가 최소값보다 0.25% 이상 초과하지 않는 모델들의 파라미터를 최적에 가까운 하이퍼파라미터로 간주했습니다. 이어서 배치 크기 $$B$$와 학습률 $$\eta$$를 컴퓨트 예산 $$C$$에 대해 피팅했습니다. 피팅 결과는 아래 그래프와 같이 나타났습니다. -![배치 크기 스케일링 곡선](https://arxiv.org/html/2401.02954v1/figures/flops_bsz_fitting.png) +![배치 크기 스케일링 곡선](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-5.png) -![학습률 스케일링 곡선](https://arxiv.org/html/2401.02954v1/figures/flops_lr_fitting.png) +![학습률 스케일링 곡선](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-6.png) 피팅 결과에 따르면, 최적의 배치 크기 $$B$$는 컴퓨트 예산 $$C$$가 증가함에 따라 점진적으로 증가하는 반면, 최적의 학습률 $$\eta$$는 점진적으로 감소하는 것으로 나타났습니다. 이는 모델을 스케일업할 때 배치 크기와 학습률에 대한 직관적인 경험적 설정과 일치합니다. 또한 모든 최적에 가까운 하이퍼파라미터들이 넓은 밴드 범위 내에 위치하는 것으로 나타났는데, 이는 이 구간 내에서 최적에 가까운 파라미터를 선택하는 것이 상대적으로 용이하다는 것을 의미합니다. @@ -219,7 +219,7 @@ DeepSeek LLM의 성능을 평가하기 위해 영어와 중국어 공개 벤치 셋째, 언어 모델링 기반 평가는 Pile-test에 적용되었으며, 테스트 코퍼스에서 바이트당 비트(bits-per-byte)를 계산하는 방식으로 진행되었습니다. 평가 시 최대 시퀀스 길이는 벤치마크에 따라 2048 또는 4096을 사용했습니다. -![벤치마크 평가 결과](https://arxiv.org/html/2401.02954v1/figures/pretrain_metric.png) +![벤치마크 평가 결과](/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-7.png) 위 그래프는 DeepSeek LLM Base 모델의 벤치마크 평가 결과를 보여줍니다. ChineseQA는 TriviaQA와 유사한 방식으로 구성된 내부 테스트 세트입니다. 학습이 진행됨에 따라 모든 벤치마크에서 지속적인 성능 향상이 관찰되었으며, 이는 학습이 더 진행된다면 성능이 더욱 개선될 수 있음을 시사합니다. ### DeepSeek LLM의 기본 모델 성능 분석 diff --git a/_posts/2025-02-05-deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models.md b/_posts/2025-02-05-deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models.md index 7660860..664612a 100644 --- a/_posts/2025-02-05-deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models.md +++ b/_posts/2025-02-05-deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models.md @@ -40,7 +40,7 @@ DeepSeek-AI에서 개발된 DeepSeekMoE는 대규모 언어 모델의 새로운 대규모 언어 모델의 시대에서 혼합 전문가(Mixture-of-Experts, MoE) 아키텍처는 모델 파라미터를 확장하면서도 계산 비용을 효율적으로 관리할 수 있는 유망한 접근 방식으로 주목받고 있습니다. 그러나 GShard와 같은 기존의 MoE 아키텍처는 전체 $$N$$개의 전문가 중 상위 $$K$$개를 활성화하는 방식을 사용하면서, 전문가 특화(expert specialization)를 달성하는 데 어려움을 겪어왔습니다. 여기서 전문가 특화란 각 전문가가 서로 중복되지 않는 집중된 지식을 획득하는 것을 의미합니다. -![DeepSeekMoE와 오픈소스 모델 비교](https://arxiv.org/html/2401.06066v1/x1.png) +![DeepSeekMoE와 오픈소스 모델 비교](/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-1.png) 이러한 문제를 해결하기 위해 연구진은 궁극적인 전문가 특화를 목표로 하는 DeepSeekMoE 아키텍처를 제안했습니다. 이 아키텍처는 두 가지 핵심 전략을 도입합니다. 첫째, 전문가들을 $$mN$$개로 세분화하고 이 중 $$mK$$개를 활성화함으로써 활성화된 전문가들의 더욱 유연한 조합을 가능하게 합니다. 둘째, $$K_s$$개의 전문가를 공유 전문가로 분리하여 공통 지식을 포착하고 라우팅된 전문가들 간의 중복성을 줄이는 것을 목표로 합니다. @@ -89,7 +89,7 @@ $$\mathbf{h}_{t}^{l} = \operatorname{FFN}(\mathbf{u}_{t}^{l}) + \mathbf{u}_{t}^{ 여기서 $$T$$는 시퀀스 길이를 나타내며, $$\operatorname{Self-Att}(\cdot)$$은 셀프 어텐션 모듈을, $$\operatorname{FFN}(\cdot)$$은 피드포워드 네트워크를 의미합니다. $$\mathbf{u}_{1:T}^{l} \in \mathbb{R}^{T \times d}$$는 $$l$$번째 어텐션 모듈 이후의 모든 토큰에 대한 은닉 상태를 나타내고, $$\mathbf{h}_{t}^{l} \in \mathbb{R}^{d}$$는 $$l$$번째 트랜스포머 블록 이후 $$t$$번째 토큰의 출력 은닉 상태를 나타냅니다. -![DeepSeekMoE 아키텍처](https://arxiv.org/html/2401.06066v1/x2.png) +![DeepSeekMoE 아키텍처](/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-2.png) MoE 언어 모델을 구성할 때는 일반적으로 트랜스포머의 FFN을 특정 간격으로 MoE 층으로 대체합니다. MoE 층은 여러 전문가로 구성되며, 각 전문가는 구조적으로 표준 FFN과 동일합니다. 각 토큰은 하나 또는 두 개의 전문가에 할당되어 처리됩니다. $$l$$번째 FFN이 MoE 층으로 대체될 때, 출력 은닉 상태 $$\mathbf{h}_{t}^{l}$$는 다음과 같이 계산됩니다. @@ -226,15 +226,15 @@ DeepSeekMoE의 성능 평가는 다양한 유형의 작업을 포괄하는 광 DeepSeekMoE 2B 모델의 전문가 특화 현상을 실증적으로 분석한 결과를 살펴보겠습니다. 여기서 언급하는 DeepSeekMoE 2B는 총 2.0B 파라미터를 가지며, 1개의 공유 전문가와 63개의 라우팅된 전문가 중 7개가 활성화되는 모델을 의미합니다. -![전문가 비활성화 실험 결과](https://arxiv.org/html/2401.06066v1/x4.png) +![전문가 비활성화 실험 결과](/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-3.png) 상위 라우팅된 전문가들을 비활성화했을 때의 영향을 분석한 결과, DeepSeekMoE는 GShard×1.5 모델과 비교하여 전문가 비활성화에 더 민감한 반응을 보였습니다. 이는 DeepSeekMoE의 라우팅된 전문가들 간의 중복성이 더 낮다는 것을 의미합니다. 구체적으로, 각 토큰에 대해 라우팅 확률이 가장 높은 전문가들의 특정 비율을 마스킹하고, 남은 전문가들 중에서 상위 K개를 선택하는 방식으로 실험을 진행했습니다. -![활성화된 전문가 수에 따른 성능](https://arxiv.org/html/2401.06066v1/x5.png) +![활성화된 전문가 수에 따른 성능](/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-4.png) 공유 전문가의 역할을 조사하기 위해, 공유 전문가를 비활성화하고 대신 하나의 라우팅된 전문가를 추가로 활성화하는 실험을 수행했습니다. 그 결과 Pile 손실이 1.808에서 2.414로 크게 증가했는데, 이는 동일한 계산 비용을 유지했음에도 불구하고 성능이 현저히 저하되었음을 보여줍니다. 이러한 결과는 공유 전문가가 라우팅된 전문가들과 공유되지 않는 기본적이고 필수적인 지식을 포착하고 있어 라우팅된 전문가로 대체될 수 없다는 것을 입증합니다. -![GShard와 DeepSeekMoE 비교](https://arxiv.org/html/2401.06066v1/x6.png) +![GShard와 DeepSeekMoE 비교](/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-5.png) DeepSeekMoE가 더 정확하고 효율적으로 지식을 획득한다는 주장을 검증하기 위해, 활성화되는 라우팅된 전문가의 수를 3개에서 7개까지 변화시키면서 Pile 손실을 평가했습니다. 실험 결과, 단 4개의 라우팅된 전문가만으로도 GShard와 비슷한 수준의 Pile 손실을 달성할 수 있었습니다. 이는 DeepSeekMoE가 필요한 지식을 더 정확하고 효율적으로 획득할 수 있다는 것을 보여줍니다. diff --git a/_posts/2025-02-14-deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence.md b/_posts/2025-02-14-deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence.md index 8489759..c9115d5 100644 --- a/_posts/2025-02-14-deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence.md +++ b/_posts/2025-02-14-deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence.md @@ -44,7 +44,7 @@ DeepSeek-AI와 북경대학교 연구진이 공동으로 개발한 DeepSeek-Code DeepSeek-Coder는 1.3B부터 33B 파라미터에 이르는 다양한 규모의 오픈소스 코드 모델을 제공합니다. 이 모델들은 2조 개의 토큰으로 구성된 방대한 데이터셋에서 처음부터 학습되었으며, 프로젝트 수준의 고품질 코드 코퍼스를 기반으로 합니다. 특히 16K 윈도우 크기를 활용한 fill-in-the-blank 태스크를 통해 코드 생성과 채우기 능력을 향상시켰습니다. -![DeepSeek-Coder의 성능](https://arxiv.org/html/2401.14196v1/figures/PLT.png) +![DeepSeek-Coder의 성능](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-1.png) 위 그래프는 LeetCode 주간 코딩 대회에서 DeepSeek-Coder를 포함한 다양한 AI/ML 모델들의 성능을 보여줍니다. Python, Java, JavaScript, C# 등 여러 프로그래밍 언어에서의 성능을 비교한 결과, DeepSeek-Coder가 GPT-4-Turbo와 GPT-3.5-Turbo를 포함한 다른 모델들을 능가하는 우수한 성능을 보여주었습니다. @@ -79,7 +79,7 @@ DeepSeek-Coder의 성능 평가는 다양한 공개 코드 관련 벤치마크 DeepSeek-Coder의 학습 데이터셋은 소스 코드 87%, 영어 코드 관련 자연어 코퍼스 10%, 중국어 자연어 코퍼스 3%로 구성되어 있습니다. 영어 코퍼스는 GitHub의 마크다운 문서와 StackExchange에서 수집된 자료로, 모델이 코드 관련 개념을 이해하고 라이브러리 사용법이나 버그 수정과 같은 작업을 수행하는 능력을 향상시키는 데 활용됩니다. 중국어 코퍼스는 고품질 기술 문서들로 구성되어 중국어 이해 능력을 향상시키는 데 사용됩니다. -![데이터셋 생성 절차](https://arxiv.org/html/2401.14196v1/x1.png) +![데이터셋 생성 절차](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-2.png) 데이터셋 구축 과정은 위 그림과 같이 데이터 크롤링, 규칙 기반 필터링, 의존성 분석, 저장소 수준의 중복 제거, 품질 검사 단계로 이루어집니다. 이러한 체계적인 접근을 통해 고품질의 학습 데이터를 확보할 수 있습니다. @@ -131,7 +131,7 @@ DeepSeek-Coder의 학습은 두 가지 핵심적인 목표를 중심으로 이 두 번째는 중간 채우기(Fill-in-the-Middle, FIM) 방식입니다. 코드 사전 학습 과정에서는 주어진 컨텍스트와 이후 텍스트를 기반으로 중간에 들어갈 내용을 생성해야 하는 경우가 많습니다. [Bavarian과 연구진](https://arxiv.org/abs/2207.14255)이 제안한 FIM 방식은 텍스트를 세 부분으로 무작위로 나누고, 이 부분들의 순서를 섞은 후 특수 문자로 연결하는 방식을 사용합니다. -![FIM 목표의 효과성](https://arxiv.org/html/2401.14196v1/x2.png) +![FIM 목표의 효과성](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-3.png) FIM 방식에는 PSM(Prefix-Suffix-Middle)과 SPM(Suffix-Prefix-Middle)이라는 두 가지 모드가 있습니다. PSM 모드에서는 텍스트가 $$ \text{Prefix}, \text{Suffix}, \text{Middle} $$ 순서로 구성되며, SPM 모드에서는 $$ \text{Suffix}, \text{Prefix}, \text{Middle} $$ 순서로 구성됩니다. @@ -235,7 +235,7 @@ DeepSeek-Coder-Instruct 모델의 실제 활용 사례를 통해 모델의 실 #### 데이터베이스 구축 및 분석 사례 -![데이터베이스 구축 및 분석 예시](https://arxiv.org/html/2401.14196v1/x4.png) +![데이터베이스 구축 및 분석 예시](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-4.png) 첫 번째 사례는 Python을 사용한 학생 데이터베이스 구축과 데이터 분석 과정을 보여줍니다. 이 사례에서는 SQLite 데이터베이스를 생성하고 학생 정보를 관리하는 전체 과정이 구현되었습니다. 특히 주목할 만한 점은 모델이 데이터베이스 생성, 데이터 삽입, 그리고 데이터 분석까지 이어지는 복잡한 작업을 버그 없이 수행했다는 것입니다. @@ -243,7 +243,7 @@ DeepSeek-Coder-Instruct 모델의 실제 활용 사례를 통해 모델의 실 #### 알고리즘 문제 해결 사례 -![LeetCode 문제 해결 예시](https://arxiv.org/html/2401.14196v1/x5.png) +![LeetCode 문제 해결 예시](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-5.png) 두 번째 사례는 모델의 알고리즘 문제 해결 능력을 보여줍니다. 특히 2023년 11월에 출제된 LeetCode 대회 문제를 활용했는데, 이는 모델의 학습 데이터에 포함되지 않은 시점의 문제입니다. 이를 통해 모델이 학습 데이터의 분포를 넘어서는 문제도 효과적으로 해결할 수 있음을 입증했습니다. @@ -255,7 +255,7 @@ DeepSeek-Coder-Instruct 모델의 실제 활용 사례를 통해 모델의 실 DeepSeek-Coder-Base 모델의 학습 과정에서 성능 변화를 추적하기 위해 연구진은 체계적인 검증 프레임워크를 구축했습니다. 이 프레임워크는 학습 코퍼스에서 신중하게 선별된 8,000개의 코드 파일로 구성된 검증 데이터셋을 활용합니다. 이 데이터셋은 모델의 성능을 정확하게 평가하기 위해 다양한 프로그래밍 언어와 코딩 패턴을 포함하도록 설계되었습니다. -![DeepSeek-Coder-Base 학습 과정 벤치마크](https://arxiv.org/html/2401.14196v1/x6.png) +![DeepSeek-Coder-Base 학습 과정 벤치마크](/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-6.png) 위 그래프는 DeepSeek-Coder-Base 모델의 학습 과정에서 다양한 평가 지표의 변화를 보여줍니다. 주요 평가 지표들은 다음과 같습니다. diff --git a/_posts/2025-02-14-raptor-recursive-abstractive-processing-for-tree-organized-retrieval.md b/_posts/2025-02-14-raptor-recursive-abstractive-processing-for-tree-organized-retrieval.md index b3ac46b..91cf9c4 100644 --- a/_posts/2025-02-14-raptor-recursive-abstractive-processing-for-tree-organized-retrieval.md +++ b/_posts/2025-02-14-raptor-recursive-abstractive-processing-for-tree-organized-retrieval.md @@ -73,7 +73,7 @@ LlamaIndex는 인접한 텍스트 청크를 요약하면서도 중간 노드를 RAPTOR는 긴 텍스트가 일반적으로 하위 주제와 계층적 구조를 가진다는 통찰을 바탕으로, 의미적 깊이와 연결성을 효과적으로 처리하는 재귀적 트리 구조를 구축합니다. 이 트리 구조는 문서의 전체적인 주제 이해와 세부적인 내용을 균형있게 다루며, 텍스트 내의 순서가 아닌 의미적 유사성을 기반으로 노드들을 그룹화합니다. -![RAPTOR 트리 구조](https://arxiv.org/html/2401.18059v1/x1.png) +![RAPTOR 트리 구조](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-1.png) RAPTOR 트리의 구축은 기존의 검색 증강 기법과 유사하게 검색 코퍼스를 100 토큰 길이의 연속적인 텍스트 청크로 분할하는 것으로 시작됩니다. 이때 문장의 문맥적, 의미적 일관성을 유지하기 위해 한 문장이 100 토큰을 초과하는 경우에는 해당 문장을 중간에 자르지 않고 다음 청크로 이동시킵니다. @@ -121,7 +121,7 @@ BIC에 의해 최적의 클러스터 수가 결정되면, 기대값 최대화(Ex RAPTOR는 트리 순회(tree traversal)와 축소된 트리(collapsed tree)라는 두 가지 쿼리 메커니즘을 제공합니다. 이 두 방식은 다계층 RAPTOR 트리를 탐색하여 관련 정보를 검색하는 고유한 방법을 제공하며, 각각의 장단점이 있습니다. -![쿼리 메커니즘 비교](https://arxiv.org/html/2401.18059v1/images/querying.jpg) +![쿼리 메커니즘 비교](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-2.jpg) 트리 순회 방식은 먼저 루트 노드 계층에서 시작하여 쿼리 임베딩과의 코사인 유사도를 기반으로 상위 $$k$$개의 가장 관련성 높은 루트 노드를 선택합니다. 선택된 노드들의 자식 노드들이 다음 계층에서 고려되며, 이들 중에서 다시 쿼리 벡터와의 코사인 유사도를 기반으로 상위 $$k$$개의 노드를 선택합니다. 이 과정은 리프 노드에 도달할 때까지 반복됩니다. 최종적으로 선택된 모든 노드의 텍스트가 연결되어 검색된 문맥을 형성합니다. @@ -153,7 +153,7 @@ UnifiedQA 모델을 사용한 실험에서는 UnifiedQA가 512 토큰의 최대 RAPTOR의 검색 프로세스가 기존의 Dense Passage Retrieval (DPR) 방식과 비교하여 어떤 이점을 제공하는지 이해하기 위해 정성적 분석을 수행했습니다. 이 연구는 주제적이고 다단계적인 질문들을 중심으로 1500단어 분량의 신데렐라 동화를 사용하여 진행되었습니다. -![검색 메커니즘 비교](https://arxiv.org/html/2401.18059v1/images/beam_and_collapsed.png) +![검색 메커니즘 비교](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3.png) RAPTOR의 트리 기반 검색은 질문의 세부 수준에 맞춰 트리의 서로 다른 계층에서 노드를 선택할 수 있게 해줍니다. 이러한 접근 방식은 DPR보다 더 관련성 높고 포괄적인 정보를 하위 과제에 제공할 수 있습니다. 예를 들어, "신데렐라가 무도회에서 왕자를 만나기 전에 어떤 일이 있었나요?"와 같은 질문에 대해 RAPTOR는 무도회 준비 과정에 대한 상위 수준의 요약과 함께 구체적인 사건들의 세부 사항을 모두 포함하는 문맥을 제공할 수 있습니다. @@ -167,7 +167,7 @@ RAPTOR의 계층적 검색 방식은 다음과 같은 장점을 제공합니다. 이러한 정성적 분석 결과는 RAPTOR가 단순한 텍스트 청크 검색을 넘어서, 문서의 계층적 구조를 활용하여 더 지능적이고 맥락에 맞는 정보 검색을 가능하게 한다는 것을 보여줍니다. 특히 복잡한 추론이 필요한 질문에서 RAPTOR의 장점이 더욱 분명하게 드러납니다. -![쿼리 프로세스 시각화](https://arxiv.org/html/2401.18059v1/images/qualitative_querying.png) +![쿼리 프로세스 시각화](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-4.jpg) 위 그림은 RAPTOR 시스템의 쿼리 프로세스를 보여주며, 신데렐라 이야기에 대한 두 가지 질문("이야기의 중심 주제는 무엇인가요?"와 "신데렐라는 어떻게 행복한 결말을 맺게 되었나요?")에 대한 정보를 검색하는 과정을 설명합니다. 강조 표시된 노드는 RAPTOR가 선택한 부분을 나타내고, 화살표는 DPR 모델이 검색한 리프 노드를 가리킵니다. RAPTOR의 문맥은 DPR이 검색한 정보를 직접적으로 또는 상위 계층의 요약을 통해 포함하고 있어, 검색과 추론 능력을 모두 활용하여 더 포괄적인 답변을 제공할 수 있음을 보여줍니다. @@ -205,11 +205,11 @@ RAPTOR의 소스 코드는 [GitHub](https://github.com/parthsarthi03/raptor)를 RAPTOR의 트리 구축 프로세스의 계산 효율성과 비용 효과성을 평가하기 위해 16GB RAM을 탑재한 Apple M1 Mac 노트북에서 실험을 진행했습니다. 이 실험은 일반적인 하드웨어에서 RAPTOR의 확장성과 실현 가능성을 입증하기 위한 것이었습니다. 문맥 길이를 12,500에서 78,000 토큰까지 다양하게 변화시키면서 트리 구축 프로세스에 필요한 토큰 사용량과 소요 시간을 측정했습니다. -![토큰 비용 분석](https://arxiv.org/html/2401.18059v1/images/build_construction.png) +![토큰 비용 분석](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-5.jpg) 위 그래프는 QASPER, NarrativeQA, QuALITY 세 데이터셋에 대해 문서 길이와 토큰 비용 간의 관계를 보여줍니다. RAPTOR 트리 구축 비용이 모든 데이터셋에서 문서 길이에 대해 선형적으로 증가하는 것을 확인할 수 있습니다. 이는 RAPTOR의 접근 방식이 다양한 길이의 문서를 처리하는 데 있어 계산적으로 효율적임을 보여줍니다. -![구축 시간 분석](https://arxiv.org/html/2401.18059v1/images/build_time.png) +![구축 시간 분석](/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-6.png) 구축 시간 측면에서도 RAPTOR는 문서 길이에 대해 선형적인 확장성을 보여줍니다. 이는 RAPTOR가 대규모 코퍼스를 효율적으로 처리할 수 있는 실용적인 솔루션임을 입증합니다. ### 부록 B: RAPTOR의 클러스터링 메커니즘 분석 diff --git a/_posts/2025-02-27-mistral-7b.md b/_posts/2025-02-27-mistral-7b.md index 11d64db..3b67a64 100644 --- a/_posts/2025-02-27-mistral-7b.md +++ b/_posts/2025-02-27-mistral-7b.md @@ -135,7 +135,7 @@ Mistral 7B는 다음과 같은 다양한 카테고리의 작업에서 평가되 - **코드**: Humaneval(0-샷), MBPP(3-샷) - **종합 결과**: MMLU(5-샷), BBH(3-샷), AGI Eval(3-5-샷, 영어 객관식 문제만) -![Mistral 7B와 다양한 Llama 모델의 성능 비교](https://arxiv.org/html/2310.06825v1/images/230927_bars.png) +![Mistral 7B와 다양한 Llama 모델의 성능 비교](/assets/images/mistral-7b-1.png) 위 그림은 Mistral 7B와 다양한 Llama 모델의 성능을 광범위한 벤치마크에서 비교한 결과입니다. 모든 모델은 정확한 비교를 위해 저자들의 평가 파이프라인으로 재평가되었습니다. 그림에서 볼 수 있듯이, Mistral 7B는 모든 벤치마크에서 Llama 2 7B와 Llama 2 13B를 크게 능가합니다. 또한 수학, 코드 생성, 추론 벤치마크에서는 Llama 1 34B보다도 월등히 우수한 성능을 보여줍니다. @@ -152,7 +152,7 @@ Mistral 7B는 다음과 같은 다양한 카테고리의 작업에서 평가되 ### 크기와 효율성 -![Mistral 7B와 Llama 2의 성능 비교](https://arxiv.org/html/2310.06825v1/images/230927_effective_sizes.png) +![Mistral 7B와 Llama 2의 성능 비교](/assets/images/mistral-7b-2.png) 위 그림은 Mistral 7B와 Llama 2(7B/13B/70B) 모델의 MMLU, 상식 추론, 세계 지식, 독해 이해 벤치마크에서의 결과를 보여줍니다. 이 그림은 두 대규모 언어 모델인 Mistral과 LLaMA 2의 성능을 다양한 벤치마크에서 비교 분석한 것입니다. 주요 시각화 유형은 두 모델의 성능(MMLU 점수로 측정)을 매개변수 수(십억 단위)의 함수로 보여주는 선 그래프입니다. 주요 발견은 Mistral 7B가 지식 벤치마크를 제외한 모든 평가에서 LLaMA 2 13B를 크게 능가한다는 것입니다. 지식 벤치마크에서는 두 모델이 비슷한 성능을 보이는데, 이는 Mistral의 제한된 매개변수 수 때문일 가능성이 높습니다. 이 연구의 중요성은 이러한 대규모 언어 모델의 스케일링 동작과 상대적 강점에 대한 통찰력에 있습니다. @@ -273,7 +273,7 @@ Mistral 7B의 이러한 가드레일 기능은 실제 애플리케이션에서 A Mistral 7B에 관한 우리의 연구는 언어 모델이 이전에 생각했던 것보다 지식을 더 효율적으로 압축할 수 있다는 점을 보여줍니다. 이는 흥미로운 관점을 제시합니다. 지금까지 이 분야는 2차원적 스케일링 법칙(모델 성능을 훈련 비용과 직접 연관시키는 방식, Hoffmann과 연구진이 제안한 바와 같이)에 중점을 두었습니다. 그러나 실제 문제는 3차원적(모델 성능, 훈련 비용, 추론 비용)이며, 가능한 한 작은 모델로 최고의 성능을 얻기 위해 아직 많은 부분이 탐구되어야 합니다. -![Mistral 7B-Instruct와 Llama 2 13B-Chat의 인간 평가 비교](https://arxiv.org/html/2310.06825v1/images/llama_vs_mistral_example.png) +![Mistral 7B-Instruct와 Llama 2 13B-Chat의 인간 평가 비교](/assets/images/mistral-7b-3.png) 위 그림은 Mistral 7B-Instruct와 Llama 2 13B-Chat 두 언어 모델의 인간 평가를 보여줍니다. 이 평가에서는 양자 물리학에 관한 기초적이고 접근하기 쉬운 책을 추천해달라는 질문에 대한 응답을 비교했습니다. 주요 기술적 요소는 모델 출력과 그에 대한 인간 평가로, Mistral 7B-Instruct가 Llama 2 13B-Chat에 비해 더 관련성 높고 상세한 책 추천을 제공했음을 보여줍니다. Llama 2 13B-Chat은 일반적인 물리학 책을 추천한 반면, Mistral 7B-Instruct는 양자 물리학에 더 특화된 적절한 책을 추천하고 그 내용을 더 자세히 설명했습니다. 이 결과는 Mistral 7B-Instruct가 사용자에게 더 적절하고 유익한 정보를 제공하는 데 있어 우수한 성능을 보여주며, 고급 언어 모델이 고품질의 관련 정보를 전달하는 잠재력을 입증합니다. diff --git a/_posts/2025-02-28-deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models.md b/_posts/2025-02-28-deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models.md index b00ee4b..00f4a5c 100644 --- a/_posts/2025-02-28-deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models.md +++ b/_posts/2025-02-28-deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models.md @@ -1,6 +1,7 @@ --- layout: post title: "DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models" +seo_title: "DeepSeekMath: Mathematical Reasoning in Open LLMs" subtitle: "DeepSeekMath: 오픈 언어 모델의 수학 추론 한계를 넓히다" date: 2024-02-05 18:55:32 paper_author: "DeepSeek AI" @@ -56,7 +57,7 @@ DeepSeekMath-RL 7B는 경쟁 수준의 MATH 벤치마크에서 51.7%의 정확 DeepSeekMath의 수학적 추론 능력은 두 가지 핵심 요소에 기인합니다. 첫째, 세심하게 설계된 데이터 선택 파이프라인을 통해 공개적으로 사용 가능한 웹 데이터의 잠재력을 활용합니다. 둘째, 근접 정책 최적화(Proximal Policy Optimization, PPO)의 변형인 그룹 상대 정책 최적화(Group Relative Policy Optimization, GRPO)를 도입하여 수학적 추론 능력을 향상시키는 동시에 PPO의 메모리 사용량을 최적화합니다. -![MATH 벤치마크에서 오픈소스 모델의 Top1 정확도](https://arxiv.org/html/2402.03300v1/figures/Math.png) +![MATH 벤치마크에서 오픈소스 모델의 Top1 정확도](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-1.png) 그림 1: 외부 도구와 투표 기법을 사용하지 않고 경쟁 수준의 MATH 벤치마크(Hendrycks 등, 2021)에서 오픈소스 모델의 Top1 정확도. @@ -124,7 +125,7 @@ DeepSeekMath-Base는 DeepSeek-Coder-Base-v1.5 7B(Guo 등, 2024)로 초기화되 이 섹션에서는 Common Crawl에서 DeepSeekMath 코퍼스를 구축하는 과정을 설명합니다. 그림 2에서 볼 수 있듯이, 시드 코퍼스(예: 고품질의 소규모 수학 관련 데이터셋 모음)에서 시작하여 Common Crawl에서 대규모 수학 코퍼스를 체계적으로 수집하는 반복적인 파이프라인을 제시합니다. 이 접근 방식은 코딩과 같은 다른 도메인에도 적용할 수 있습니다. -![Common Crawl 데이터셋에서 수학적 웹 페이지를 수집하는 반복적인 파이프라인](https://arxiv.org/html/2402.03300v1/x1.png) +![Common Crawl 데이터셋에서 수학적 웹 페이지를 수집하는 반복적인 파이프라인](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-2.png) 그림 2: Common Crawl에서 수학적 웹 페이지를 수집하는 반복적인 파이프라인. @@ -174,7 +175,7 @@ DeepSeekMath 코퍼스는 고품질이며, 다국어 수학적 콘텐츠를 포 표 1: 다양한 수학적 코퍼스에서 학습된 DeepSeek-LLM 1.3B의 성능, 퓨 샷 체인 오브 소트 프롬프팅을 사용하여 평가됨. 코퍼스 크기는 100K 어휘 크기의 토크나이저를 사용하여 계산됨. -![다양한 수학적 코퍼스에서 학습된 DeepSeek-LLM 1.3B의 벤치마크 곡선](https://arxiv.org/html/2402.03300v1/figures/corpus_comparisons.png) +![다양한 수학적 코퍼스에서 학습된 DeepSeek-LLM 1.3B의 벤치마크 곡선](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-3.png) 그림 3: 다양한 수학적 코퍼스에서 학습된 DeepSeek-LLM 1.3B의 벤치마크 곡선. @@ -339,7 +340,7 @@ $$ r_{t}=r_{\varphi}(q,o_{\leq t})-\beta\log\frac{\pi_{\theta}(o_{t}|q,o_{<t})}{ 여기서 $$r_{\varphi}$$는 보상 모델, $$\pi_{ref}$$는 참조 모델(일반적으로 초기 SFT 모델)이며, $$\beta$$는 KL 페널티의 계수입니다. -![PPO와 GRPO의 비교](https://arxiv.org/html/2402.03300v1/x2.png) +![PPO와 GRPO의 비교](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-4.png) 그림 4: PPO와 GRPO의 비교. GRPO는 가치 모델을 사용하지 않고 대신 그룹 점수에서 기준선을 추정하여 학습 리소스를 크게 줄입니다. @@ -468,11 +469,11 @@ $$ \nabla_\theta \mathcal{J}_\mathcal{A}(\theta) = \mathbb{E}_{(q, o) \sim \math * 온라인 거부 샘플링 미세 조정(Online RFT): RFT와 달리, Online RFT는 SFT 모델을 사용하여 정책 모델을 초기화하고 실시간 정책 모델에서 샘플링된 증강 출력으로 미세 조정합니다. * PPO/GRPO: PPO/GRPO는 SFT 모델을 사용하여 정책 모델을 초기화하고 실시간 정책 모델에서 샘플링된 출력으로 강화합니다. -![이 그림은 두 벤치마크에서 다양한 방법으로 추가 학습된 DeepSeekMath-Instruct 1.3B 모델의 성능을 보여줍니다. 라인 플롯은 RFT, Online RFT, GRPO+OS, GRPO+PS와 같은 다양한 메트릭의 추세와 변동을 보여주어 모델 성능에 대한 비교 분석을 가능하게 합니다.](https://arxiv.org/html/2402.03300v1/x3.png) +![이 그림은 두 벤치마크에서 다양한 방법으로 추가 학습된 DeepSeekMath-Instruct 1.3B 모델의 성능을 보여줍니다. 라인 플롯은 RFT, Online RFT, GRPO+OS, GRPO+PS와 같은 다양한 메트릭의 추세와 변동을 보여주어 모델 성능에 대한 비교 분석을 가능하게 합니다.](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-5.png) 그림 5: 다양한 방법으로 추가 학습된 DeepSeekMath-Instruct 1.3B 모델의 두 벤치마크에서의 성능. -![이 그림은 DeepSeekMath-Instruct 7B 모델을 사용한 반복적 강화 학습의 두 벤치마크에서의 성능을 보여줍니다. 주요 시각화는 학습 과정의 세 가지 다른 반복에 대한 성능 메트릭(정확도 또는 보상)을 표시하는 라인 플롯입니다. 핵심 기술적 구성 요소는 모델 성능이 연속적인 개선 단계를 통해 어떻게 발전하는지 보여주는 세 가지 반복으로, 다른 색상의 선으로 표시됩니다.](https://arxiv.org/html/2402.03300v1/x4.png) +![이 그림은 DeepSeekMath-Instruct 7B 모델을 사용한 반복적 강화 학습의 두 벤치마크에서의 성능을 보여줍니다. 주요 시각화는 학습 과정의 세 가지 다른 반복에 대한 성능 메트릭(정확도 또는 보상)을 표시하는 라인 플롯입니다. 핵심 기술적 구성 요소는 모델 성능이 연속적인 개선 단계를 통해 어떻게 발전하는지 보여주는 세 가지 반복으로, 다른 색상의 선으로 표시됩니다.](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-6.png) 그림 6: DeepSeekMath-Instruct 7B를 사용한 반복적 강화 학습의 두 벤치마크에서의 성능. @@ -492,7 +493,7 @@ $$ \nabla_\theta \mathcal{J}_\mathcal{A}(\theta) = \mathbb{E}_{(q, o) \sim \math 또한 반복적 RL을 탐색하며, 실험에서는 두 라운드의 반복을 수행합니다. 그림 6에서 볼 수 있듯이, 반복적 RL은 특히 첫 번째 반복에서 성능을 크게 향상시키는 것을 알 수 있습니다. -![GSM8K와 MATH에서 SFT와 RL DeepSeekMath 7B의 Maj@K와 Pass@K(온도 0.7). RL은 Pass@K가 아닌 Maj@K를 향상시키는 것으로 나타났습니다.](https://arxiv.org/html/2402.03300v1/x5.png) +![GSM8K와 MATH에서 SFT와 RL DeepSeekMath 7B의 Maj@K와 Pass@K(온도 0.7). RL은 Pass@K가 아닌 Maj@K를 향상시키는 것으로 나타났습니다.](/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-7.png) 그림 7: GSM8K와 MATH에서 SFT와 RL DeepSeekMath 7B의 Maj@K와 Pass@K(온도 0.7). RL은 Pass@K가 아닌 Maj@K를 향상시키는 것으로 나타났습니다. diff --git a/_posts/2025-04-04-mixtral-of-experts.md b/_posts/2025-04-04-mixtral-of-experts.md index e9c06d2..6ae7fd0 100644 --- a/_posts/2025-04-04-mixtral-of-experts.md +++ b/_posts/2025-04-04-mixtral-of-experts.md @@ -80,7 +80,7 @@ Mixtral은 트랜스포머 아키텍처를 기반으로 하며, [Vaswani와 연 ### 희소 전문가 혼합(Sparse Mixture of Experts) -![전문가 혼합 층. 각 입력 벡터는 라우터에 의해 8개의 전문가 중 2개에 할당됩니다. 층의 출력은 선택된 두 전문가의 출력의 가중합입니다. Mixtral에서 전문가는 바닐라 트랜스포머 아키텍처의 표준 피드포워드 블록입니다.](https://arxiv.org/html/2401.04088v1/images/smoe.png) +![전문가 혼합 층. 각 입력 벡터는 라우터에 의해 8개의 전문가 중 2개에 할당됩니다. 층의 출력은 선택된 두 전문가의 출력의 가중합입니다. Mixtral에서 전문가는 바닐라 트랜스포머 아키텍처의 표준 피드포워드 블록입니다.](/assets/images/mixtral-of-experts-1.png) 전문가 혼합 층(Mixture of Experts, MoE)에 대해 간략히 살펴보겠습니다. 더 자세한 내용은 [Fedus와 연구진](https://arxiv.org/pdf/2209.01667)의 논문을 참조하시기 바랍니다. @@ -124,7 +124,7 @@ $$ y = \sum_{i=0}^{n-1} \text{Softmax}(\text{Top2}(x \cdot W_g))_i \cdot \text{S Mixtral 모델을 Llama와 비교하기 위해 다양한 벤치마크에서 자체 평가 파이프라인을 통해 모든 벤치마크를 재실행했습니다. 성능은 다음과 같은 카테고리로 분류된 다양한 작업에서 측정되었습니다. -![그림 2: 다양한 벤치마크에서 Mixtral과 여러 Llama 모델의 성능 비교. 모든 모델은 정확한 비교를 위해 동일한 평가 파이프라인으로 재평가되었습니다. Mixtral은 모든 벤치마크에서 Llama 2 70B와 비슷하거나 더 나은 성능을 보여주며, 특히 수학과 코드 생성 분야에서 월등히 우수합니다.](https://arxiv.org/html/2401.04088v1/images/231209_bench_combined.png) +![그림 2: 다양한 벤치마크에서 Mixtral과 여러 Llama 모델의 성능 비교. 모든 모델은 정확한 비교를 위해 동일한 평가 파이프라인으로 재평가되었습니다. Mixtral은 모든 벤치마크에서 Llama 2 70B와 비슷하거나 더 나은 성능을 보여주며, 특히 수학과 코드 생성 분야에서 월등히 우수합니다.](/assets/images/mixtral-of-experts-2.png) 아래 표는 Mixtral과 Llama 모델 간의 상세한 성능 비교를 보여줍니다. Mixtral 8x7B는 추론 과정에서 5배 적은 활성 매개변수를 사용하면서도 거의 모든 인기 벤치마크에서 Llama 2 70B의 성능을 능가하거나 일치시킵니다. @@ -148,7 +148,7 @@ Mixtral 모델을 Llama와 비교하기 위해 다양한 벤치마크에서 자 아래 그림은 다양한 카테고리에서 Mixtral과 Llama 모델들의 성능을 비교합니다. Mixtral은 대부분의 지표에서 Llama 2 70B를 능가합니다. 특히 코드와 수학 벤치마크에서 우수한 성능을 보여줍니다. -![그림 3: Mistral(7B/8x7B)과 Llama 2(7B/13B/70B)의 MMLU, 상식 추론, 세계 지식, 독해 이해, 수학, 코드 벤치마크 결과 비교. Mixtral은 독해 이해 벤치마크를 제외한 모든 벤치마크에서 5배 적은 활성 매개변수를 사용하면서도 Llama 2 70B를 크게 능가합니다. 특히 코드와 수학 분야에서 Llama 2 70B보다 월등히 우수합니다.](https://arxiv.org/html/2401.04088v1/images/231209_scaling.png) +![그림 3: Mistral(7B/8x7B)과 Llama 2(7B/13B/70B)의 MMLU, 상식 추론, 세계 지식, 독해 이해, 수학, 코드 벤치마크 결과 비교. Mixtral은 독해 이해 벤치마크를 제외한 모든 벤치마크에서 5배 적은 활성 매개변수를 사용하면서도 Llama 2 70B를 크게 능가합니다. 특히 코드와 수학 분야에서 Llama 2 70B보다 월등히 우수합니다.](/assets/images/mixtral-of-experts-3.png) ### 크기와 효율성 @@ -210,7 +210,7 @@ Mixtral 모델의 장거리 컨텍스트 처리 능력을 평가하기 위해, [ 또한 아래 그림(오른쪽)은 [Azerbayev와 연구진](https://arxiv.org/pdf/2310.10631)이 개발한 proof-pile 데이터셋의 일부에 대한 Mixtral의 퍼플렉시티(perplexity)가 컨텍스트 크기가 증가함에 따라 단조롭게 감소함을 보여줍니다. 퍼플렉시티는 언어 모델의 성능을 평가하는 지표로, 값이 낮을수록 모델이 텍스트를 더 정확하게 예측한다는 것을 의미합니다. 이 결과는 Mixtral이 더 많은 컨텍스트를 활용할수록 더 정확한 예측을 할 수 있음을 보여주는 중요한 지표입니다. -![그림 4: Mixtral의 장거리 성능. (왼쪽) Mixtral은 패스키의 위치와 입력 시퀀스의 길이에 관계없이 패스키 작업에서 100% 검색 정확도를 보여줍니다.](https://arxiv.org/html/2401.04088v1/images/passkey.png) ![(오른쪽) proof-pile 데이터셋에 대한 Mixtral의 퍼플렉시티는 컨텍스트 길이가 증가함에 따라 단조롭게 감소합니다.](https://arxiv.org/html/2401.04088v1/images/perplexity.png) +![그림 4: Mixtral의 장거리 성능. (왼쪽) Mixtral은 패스키의 위치와 입력 시퀀스의 길이에 관계없이 패스키 작업에서 100% 검색 정확도를 보여줍니다.](/assets/images/mixtral-of-experts-4.png) ![(오른쪽) proof-pile 데이터셋에 대한 Mixtral의 퍼플렉시티는 컨텍스트 길이가 증가함에 따라 단조롭게 감소합니다.](/assets/images/mixtral-of-experts-5.png) ### 편향성 벤치마크 @@ -252,7 +252,7 @@ DPO는 [Rafailov와 연구진](https://arxiv.org/pdf/2305.18290)이 제안한 이러한 훈련 과정을 통해 개발된 Mixtral-Instruct는 MT-Bench에서 8.30점을 기록했습니다. MT-Bench는 [Zheng과 연구진](https://arxiv.org/pdf/2306.05685)이 개발한 벤치마크로, 대화형 AI 모델의 성능을 평가하기 위한 다양한 카테고리의 다중 턴 질문으로 구성되어 있습니다. 이 점수는 2023년 12월 기준으로 공개 가중치 모델 중 가장 높은 성적입니다. -![LMSys 리더보드. (2023년 12월 22일 스크린샷) Mixtral 8x7B Instruct v0.1은 Arena Elo 평점 1121을 달성하여 Claude-2.1(1117), 모든 버전의 GPT-3.5-Turbo(최고 1117), Gemini Pro(1111), Llama-2-70b-chat(1077)를 능가했습니다. Mixtral은 현재 공개 가중치 모델 중 큰 차이로 가장 우수한 성능을 보여줍니다.](https://arxiv.org/html/2401.04088v1/images/lmsys_231222.png) +![LMSys 리더보드. (2023년 12월 22일 스크린샷) Mixtral 8x7B Instruct v0.1은 Arena Elo 평점 1121을 달성하여 Claude-2.1(1117), 모든 버전의 GPT-3.5-Turbo(최고 1117), Gemini Pro(1111), Llama-2-70b-chat(1077)를 능가했습니다. Mixtral은 현재 공개 가중치 모델 중 큰 차이로 가장 우수한 성능을 보여줍니다.](/assets/images/mixtral-of-experts-6.png) 위 그림은 LMSys 리더보드의 스크린샷으로, 2023년 12월 22일 기준 Mixtral 8x7B Instruct v0.1의 성능을 보여줍니다. 이 모델은 Arena Elo 평점 1121을 기록하여 Claude-2.1(1117), 모든 버전의 GPT-3.5-Turbo(최고 점수 1117), Gemini Pro(1111), 그리고 Llama-2-70b-chat(1077)을 모두 능가했습니다. 이는 Mixtral이 현재 공개된 가중치 모델 중에서 상당한 차이로 가장 우수한 성능을 보여준다는 것을 의미합니다. @@ -276,7 +276,7 @@ MT-Bench에서의 높은 점수와 LMSys 평가에서의 우수한 성능은 Mix 또한 아래 그림에서 연속된 토큰들이 종종 동일한 전문가에 할당되는 것을 관찰할 수 있습니다. 실제로 The Pile 데이터셋에서 일정 수준의 위치적 지역성(positional locality)이 관찰됩니다. -![그림 8: 각 토큰이 첫 번째 전문가 선택으로 색상 처리된 텍스트 샘플. 전문가 선택은 특히 초기 및 최종 층에서 도메인보다는 구문과 더 일치하는 것으로 나타납니다.](https://arxiv.org/html/2401.04088v1/images/routing-sample.png) +![그림 8: 각 토큰이 첫 번째 전문가 선택으로 색상 처리된 텍스트 샘플. 전문가 선택은 특히 초기 및 최종 층에서 도메인보다는 구문과 더 일치하는 것으로 나타납니다.](/assets/images/mixtral-of-experts-7.png) | 데이터셋 | 첫 번째 선택 층 0 | 첫 번째 선택 층 15 | 첫 번째 선택 층 31 | 첫 번째 또는 두 번째 선택 층 0 | 첫 번째 또는 두 번째 선택 층 15 | 첫 번째 또는 두 번째 선택 층 31 | | --- | --- | --- | --- | --- | --- | --- | diff --git a/_posts/2025-10-03-kimi-k2--open-agentic-intelligence.md b/_posts/2025-10-03-kimi-k2--open-agentic-intelligence.md index 90e7246..b9ab393 100644 --- a/_posts/2025-10-03-kimi-k2--open-agentic-intelligence.md +++ b/_posts/2025-10-03-kimi-k2--open-agentic-intelligence.md @@ -41,7 +41,7 @@ Kimi K2는 에이전틱 인텔리전스 분야에서 새로운 최첨단 성능 Kimi K2는 320억 개의 활성화된 파라미터와 1조 개의 총 파라미터를 가진 Mixture-of-Experts(MoE) 대규모 언어 모델입니다. 이 모델은 혁신적인 MuonClip 옵티마이저를 도입하여 기존 Muon 알고리즘의 뛰어난 토큰 효율성을 유지하면서도 새로운 QK-clip 기법을 통해 훈련 불안정성 문제를 해결했습니다. -![Kimi K2 주요 결과](https://arxiv.org/html/2507.20534/x2.png) +![Kimi K2 주요 결과](/assets/images/kimi-k2--open-agentic-intelligence-1.png) MuonClip을 기반으로 K2는 15.5조 개의 토큰으로 사전 훈련되었으며, 단 한 번의 손실 스파이크도 발생하지 않았습니다. 후훈련 과정에서 K2는 대규모 에이전틱 데이터 합성 파이프라인과 결합된 강화학습 단계를 포함한 다단계 후훈련 프로세스를 거쳤습니다. 이 과정에서 모델은 실제 환경과 합성 환경에서의 상호작용을 통해 능력을 향상시켰습니다. @@ -116,9 +116,9 @@ $$\mathbf{W}_{q}^{h}\leftarrow\gamma^{\alpha}\mathbf{W}_{q}^{h}\qquad\mathbf{W}_ - $$\textbf{q}^{R}$$ (헤드별 회전): $$\gamma_{h}$$로 스케일링 - $$\textbf{k}^{R}$$ (공유 회전): 헤드 간 영향을 피하기 위해 그대로 유지 -![훈련 중 최대 로짓 변화](https://arxiv.org/html/2507.20534/x3.png) +![훈련 중 최대 로짓 변화](/assets/images/kimi-k2--open-agentic-intelligence-2.png) -![Kimi K2의 최대 로짓 추이](https://arxiv.org/html/2507.20534/x4.png) +![Kimi K2의 최대 로짓 추이](/assets/images/kimi-k2--open-agentic-intelligence-3.png) 위 그림들은 QK-Clip의 효과를 보여줍니다. 왼쪽 그림에서는 중간 규모 훈련 실행 중 어텐션 로짓이 빠르게 1000을 초과하여 잠재적인 수치적 불안정성과 훈련 발산을 초래할 수 있음을 보여줍니다. 반면 오른쪽 그림에서는 MuonClip과 $$\tau = 100$$을 사용한 Kimi K2의 최대 로짓이 빠르게 100의 캡핑된 값까지 증가하고, 훈련 단계의 약 30% 후에만 안정적인 범위로 감소하여 QK-Clip의 효과적인 조절 효과를 보여줍니다. @@ -132,7 +132,7 @@ $$\mathbf{W}_{q}^{h}\leftarrow\gamma^{\alpha}\mathbf{W}_{q}^{h}\qquad\mathbf{W}_ 마지막으로 $$\tau = 100$$으로 MuonClip을 사용하여 대규모 MoE 모델인 Kimi K2를 훈련하고 전체 훈련 실행에서 최대 어텐션 로짓을 모니터링했습니다. 처음에는 QK-Clip으로 인해 로짓이 100에서 캡핑됩니다. 훈련 과정에서 최대 로짓은 $$\tau$$에 대한 조정 없이 점진적으로 일반적인 작동 범위로 감소합니다. 중요한 것은 훈련 손실이 부드럽고 안정적으로 유지되며 관찰 가능한 스파이크가 없다는 점입니다. -![Kimi K2의 훈련 손실 곡선](https://arxiv.org/html/2507.20534/x5.png) +![Kimi K2의 훈련 손실 곡선](/assets/images/kimi-k2--open-agentic-intelligence-4.png) 위 그림은 Kimi K2의 단계별 훈련 손실 곡선을 보여주며, 전체 훈련 과정에서 스파이크가 없음을 확인할 수 있습니다. 이는 MuonClip이 대규모 언어 모델 훈련에서 어텐션 역학에 대한 견고하고 확장 가능한 제어를 제공함을 검증합니다. @@ -150,7 +150,7 @@ $$\mathbf{W}_{q}^{h}\leftarrow\gamma^{\alpha}\mathbf{W}_{q}^{h}\qquad\mathbf{W}_ **청크별 자기회귀 생성**: 긴 문서에서 전역 일관성을 보존하고 정보 손실을 피하기 위해 청크 기반 자기회귀 재작성 전략을 채택합니다. 텍스트를 세그먼트로 나누고, 개별적으로 재구성한 다음, 다시 연결하여 완전한 구절을 형성합니다. 이 방법은 LLM에 일반적으로 존재하는 암시적 출력 길이 제한을 완화합니다. -![자기회귀 청크별 재구성 파이프라인](https://arxiv.org/html/2507.20534/x6.png) +![자기회귀 청크별 재구성 파이프라인](/assets/images/kimi-k2--open-agentic-intelligence-5.png) 위 그림은 긴 입력 발췌문에 대한 자기회귀 청크별 재구성 파이프라인을 보여줍니다. 입력이 컨텍스트가 보존된 작은 청크로 분할되고, 순차적으로 재작성된 후 완전한 재작성된 구절로 연결됩니다. @@ -199,7 +199,7 @@ Kimi K2는 320억 개의 활성화된 파라미터와 1.04조 개의 총 파라 Muon을 사용하여 Mixture-of-Experts(MoE) 모델 패밀리에 맞춘 희소성 스케일링 법칙을 개발했습니다. 희소성은 총 전문가 수와 활성화된 전문가 수의 비율로 정의됩니다. 신중하게 제어된 소규모 실험을 통해 고정된 활성화된 파라미터 수(즉, 일정한 FLOP) 하에서 총 전문가 수를 증가시키는 것(즉, 희소성 증가)이 훈련 및 검증 손실을 일관되게 낮추어 전체 모델 성능을 향상시킨다는 것을 관찰했습니다. -![희소성 스케일링 법칙](https://arxiv.org/html/2507.20534/x7.png) +![희소성 스케일링 법칙](/assets/images/kimi-k2--open-agentic-intelligence-6.png) 위 그림은 희소성 스케일링 법칙을 보여줍니다. 활성화된 전문가 수를 8개로, 공유 전문가 수를 1개로 고정하고 총 전문가 수를 변화시켜 서로 다른 희소성 수준을 가진 모델들을 만들었습니다. 그래프에서 확인할 수 있듯이 희소성이 증가할수록 모델 성능이 향상됩니다. @@ -211,7 +211,7 @@ DeepSeek-V3는 메모리 대역폭을 더 잘 활용하고 계산 효율성을 예를 들어, 시퀀스 길이가 128k일 때 총 전문가 수를 384개로 고정한 상태에서 어텐션 헤드 수를 64개에서 128개로 증가시키면 추론 FLOP이 83% 증가합니다. 이러한 설계의 영향을 평가하기 위해 어텐션 헤드 수가 레이어 수와 같은 구성과 헤드 수가 두 배인 구성을 다양한 훈련 FLOP 하에서 비교하는 제어된 실험을 수행했습니다. -![어텐션 헤드 수에 따른 스케일링 곡선](https://arxiv.org/html/2507.20534/x8.png) +![어텐션 헤드 수에 따른 스케일링 곡선](/assets/images/kimi-k2--open-agentic-intelligence-7.png) 위 그림은 어텐션 헤드 수가 레이어 수와 같은 모델과 헤드 수가 두 배인 모델의 스케일링 곡선을 보여줍니다. 동일 토큰 훈련 조건 하에서 어텐션 헤드를 두 배로 늘리는 것이 서로 다른 계산 예산에서 검증 손실에서 0.5%에서 1.2% 범위의 미미한 개선만을 가져다준다는 것을 관찰했습니다. @@ -249,7 +249,7 @@ Kimi K2는 NVIDIA H800 GPU가 장착된 클러스터에서 훈련되었습니다 **활성화 CPU 오프로드**: 나머지 모든 활성화는 CPU RAM으로 오프로드됩니다. 복사 엔진이 오프로드와 온로드 스트리밍을 담당하며, 계산 및 통신 커널과 오버랩됩니다. 1F1B 단계에서는 이전 마이크로 배치의 순방향 활성화를 오프로드하면서 다음 마이크로 배치의 역방향 활성화를 프리페치합니다. 웜업과 쿨다운 단계도 유사하게 처리됩니다. -![PP 단계별 계산, 통신, 오프로딩 오버랩](https://arxiv.org/html/2507.20534/x9.png) +![PP 단계별 계산, 통신, 오프로딩 오버랩](/assets/images/kimi-k2--open-agentic-intelligence-8.png) 위 그림은 서로 다른 PP 단계에서 계산, 통신, 오프로딩이 오버랩되는 패턴을 보여줍니다. 오프로딩이 PCIe 트래픽 혼잡으로 인해 EP 트래픽에 약간 영향을 줄 수 있지만, 테스트 결과 EP 통신은 여전히 완전히 오버랩됨을 보여줍니다. @@ -278,15 +278,15 @@ ACEBench와 $$\tau$$-bench와 같은 최근 벤치마크들은 포괄적인 도 합성 데이터 생성에 관한 최근 연구들(AgentInstruct, Self-Instruct, StableToolBench, ZeroSearch)은 실세계 상호작용에 의존하지 않고 대규모 데이터를 생성하는 데 유망한 결과를 보여주었습니다. 이러한 발전을 바탕으로 하고 ACEBench의 포괄적인 데이터 합성 프레임워크에서 영감을 받아, 실세계 도구 사용 시나리오를 대규모로 시뮬레이션하는 파이프라인을 개발하여 수만 개의 다양하고 고품질의 훈련 예제를 생성할 수 있게 했습니다. -![도구 사용을 위한 데이터 합성 파이프라인](https://arxiv.org/html/2507.20534/x10.png) +![도구 사용을 위한 데이터 합성 파이프라인](/assets/images/kimi-k2--open-agentic-intelligence-9.png) -![에이전트 궤적 생성](https://arxiv.org/html/2507.20534/x11.png) +![에이전트 궤적 생성](/assets/images/kimi-k2--open-agentic-intelligence-10.png) 위 그림들은 도구 사용을 위한 데이터 합성 파이프라인을 보여줍니다. 첫 번째 그림에서는 실세계 도구와 LLM에서 도구 사양을 합성하고, 도구 저장소에서 에이전트와 작업을 생성하는 과정을 보여줍니다. 두 번째 그림에서는 사용자 에이전트가 작업과 상호작용하고, 에이전트가 사용자 에이전트의 행동과 호출을 관찰하여 궤적을 생성하며, 판정자 에이전트가 데이터를 필터링하여 고품질 데이터를 생성하는 다중 에이전트 파이프라인을 보여줍니다. -![실제 MCP 도구의 t-SNE 시각화](https://arxiv.org/html/2507.20534/x12.png) +![실제 MCP 도구의 t-SNE 시각화](/assets/images/kimi-k2--open-agentic-intelligence-11.png) -![합성 도구의 t-SNE 시각화](https://arxiv.org/html/2507.20534/x13.png) +![합성 도구의 t-SNE 시각화](/assets/images/kimi-k2--open-agentic-intelligence-12.png) 위 그림들은 도구 임베딩의 t-SNE 시각화를 보여줍니다. 첫 번째 그림에서는 실세계 MCP 도구들이 원래 소스 카테고리에 따라 자연스러운 클러스터링을 보이며, 두 번째 그림에서는 합성 도구들이 사전 정의된 도메인 카테고리로 체계적으로 조직되어 도구 공간의 포괄적인 표현을 보장함을 확인할 수 있습니다. @@ -441,7 +441,7 @@ K1.5와 유사하게, 동기화된 강화학습 훈련을 위한 하이브리드 롤아웃 중에 훈련 엔진의 파라미터는 DRAM으로 오프로드됩니다. 훈련 엔진을 가동하는 것은 따라서 H2D 전송의 간단한 단계입니다. 그러나 추론 엔진을 가동하는 것은 더 큰 도전과제입니다. 추론 엔진은 서로 다른 샤딩 패러다임을 가진 훈련 엔진으로부터 업데이트된 파라미터를 얻어야 하기 때문입니다. -![파라미터 업데이트를 위한 체크포인트 엔진 활용](https://arxiv.org/html/2507.20534/x14.png) +![파라미터 업데이트를 위한 체크포인트 엔진 활용](/assets/images/kimi-k2--open-agentic-intelligence-13.png) K2의 규모와 관련된 방대한 수의 디바이스를 고려할 때, 파라미터 재샤딩과 브로드캐스팅을 위해 네트워크 파일 시스템을 사용하는 것은 비현실적입니다. 오버헤드를 낮게 유지하는 데 필요한 총 대역폭은 초당 수 페타바이트에 달합니다. @@ -496,7 +496,7 @@ LiveCodeBench는 특히 중요한 벤치마크로, 모델의 훈련 데이터 장기 컨텍스트 작업의 경우, 평가 중 컨텍스트 윈도우 크기를 128K 토큰으로 설정하고, 이 제한을 초과하는 입력은 윈도우 내에 맞도록 잘라냅니다. SWE-bench Verified는 두 가지 모드로 평가됩니다. 테스트 없는 단일 패치를 통한 Agentless 코딩(Acc)과 내부 검증자를 사용한 best-of-N 선택을 통한 단일 시도(Acc) 및 다중 시도(Acc) 하에서 bash/editor 도구를 통한 에이전틱 코딩입니다. SWE-bench Multilingual은 단일 시도 에이전틱 설정에서만 테스트됩니다. 일부 데이터 포인트는 평가 비용이 너무 높아 생략되었습니다. -![Kimi K2의 성능 비교 결과](https://arxiv.org/html/2507.20534v1/x15.png) +![Kimi K2의 성능 비교 결과](/assets/images/kimi-k2--open-agentic-intelligence-14.png) #### 평가 결과 @@ -699,7 +699,7 @@ QK-Clip 설계는 최소 개입 원칙을 따릅니다. 즉, 필요할 때만 소규모 절제 실험에서는 0.5B 활성화 파라미터와 3B 총 파라미터를 가진 두 개의 소규모 MoE 모델을 훈련했습니다. 하나는 바닐라 Muon을, 다른 하나는 낮은 클리핑 임계값($$\tau = 30$$)을 사용하는 MuonClip을 사용했습니다. MuonClip을 적용하는 것이 손실 곡선에 무시할 수 있는 영향을 미친다는 것을 보여주며, 이는 공격적인 클리핑도 MuonClip으로 수렴과 훈련 역학을 손상시키지 않음을 나타냅니다. -![MuonClip의 소규모 설정에서의 영향](https://arxiv.org/html/2507.20534/x16.png) +![MuonClip의 소규모 설정에서의 영향](/assets/images/kimi-k2--open-agentic-intelligence-15.png) 위 그림은 공격적인 임계값($$\tau = 30$$)을 사용한 소규모 설정에서 Muon에 QK-Clip을 적용하는 것이 손실에 무시할 수 있는 영향을 미친다는 것을 보여주며, 이는 어텐션 로짓을 제약하는 안전하고 효과적인 방법임을 나타냅니다. @@ -740,7 +740,7 @@ Muon에서는 가중치와 업데이트 모두 Adam보다 높은 효과적 순 강화학습 인프라에서 체크포인트 엔진은 각 GPU에서 세 개의 동일한 크기 디바이스 버퍼를 관리합니다. 오프로드된 모델 파라미터를 로딩하기 위한 H2D 버퍼와 GPU 간 브로드캐스트를 위한 두 개의 IPC 버퍼입니다. IPC 버퍼는 추론 엔진과 공유되어 동일한 물리적 메모리에 직접 액세스할 수 있게 합니다. -![강화학습 가중치 업데이트를 위한 파이프라인](https://arxiv.org/html/2507.20534/x17.png) +![강화학습 가중치 업데이트를 위한 파이프라인](/assets/images/kimi-k2--open-agentic-intelligence-16.png) 이론적으로는 3단계 파이프라인이 가능합니다. (1) H2D - 최신 가중치의 샤드를 H2D 버퍼로 비동기적으로 복사, (2) 브로드캐스트 - 복사가 완료되면 샤드를 하나의 IPC 버퍼로 복사하고 모든 디바이스에 브로드캐스트, (3) 재로드 - 추론 엔진이 다른 IPC 버퍼에서 파라미터를 동시에 로드합니다. diff --git a/_posts/2025-10-05-deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model.md b/_posts/2025-10-05-deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model.md index eb0a5d1..1d94d8c 100644 --- a/_posts/2025-10-05-deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model.md +++ b/_posts/2025-10-05-deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model.md @@ -1,6 +1,7 @@ --- layout: post title: "DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model" +seo_title: "DeepSeek-V2: A Strong, Economical, Efficient MoE Model" subtitle: "DeepSeek-V2: 강력하고 경제적이며 효율적인 Mixture-of-Experts 언어 모델" date: 2024-05-07 15:56:43 paper_author: "DeepSeek AI" @@ -43,11 +44,11 @@ DeepSeek-V2는 경제적인 훈련과 효율적인 추론을 특징으로 하는 DeepSeek-V2의 핵심 혁신은 두 가지 새로운 아키텍처에 있습니다. 첫째, Multi-head Latent Attention(MLA)은 Key-Value(KV) 캐시를 잠재 벡터로 크게 압축하여 효율적인 추론을 보장합니다. 둘째, DeepSeekMoE는 희소 계산을 통해 경제적인 비용으로 강력한 모델을 훈련할 수 있게 합니다. -![성능 비교 그래프](https://arxiv.org/html/2405.04434/x1.png) +![성능 비교 그래프](/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-1.png) 위 그래프는 다양한 오픈소스 언어 모델들의 활성화된 파라미터 수와 MMLU(Massive Multitask Language Understanding) 정확도 간의 관계를 보여줍니다. DeepSeek-V2는 단 21B개의 활성화된 파라미터로도 최고 수준의 성능을 달성하고 있음을 확인할 수 있습니다. -![효율성 비교](https://arxiv.org/html/2405.04434/x2.png) +![효율성 비교](/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-2.png) 성능 개선 지표를 보면, DeepSeek-V2는 이전 모델인 DeepSeek 67B와 비교하여 훈련 비용을 42.5% 절감하고, KV 캐시를 93.3% 감소시키며, 최대 생성 처리량을 5.76배 향상시켰습니다. @@ -73,7 +74,7 @@ MLA는 이러한 문제를 해결하기 위해 저랭크 키-값 공동 압축 Feed-Forward Networks의 경우, DeepSeekMoE 아키텍처를 따릅니다. 이는 전문가 특화의 더 높은 잠재력을 위해 세밀한 전문가 분할과 공유 전문가 격리를 채택합니다. DeepSeekMoE 아키텍처는 GShard와 같은 기존 MoE 아키텍처와 비교하여 큰 장점을 보여주며, 경제적인 비용으로 강력한 모델을 훈련할 수 있게 합니다. -![DeepSeek-V2 아키텍처](https://arxiv.org/html/2405.04434/x3.png) +![DeepSeek-V2 아키텍처](/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-3.png) 위 그림은 DeepSeek-V2의 전체 아키텍처를 보여줍니다. MLA는 생성을 위한 KV 캐시를 크게 줄여 효율적인 추론을 보장하고, DeepSeekMoE는 희소 아키텍처를 통해 경제적인 비용으로 강력한 모델 훈련을 가능하게 합니다. @@ -106,7 +107,7 @@ DeepSeek-V2는 두 가지 핵심 기술을 결합하여 강력한 성능, 경제 DeepSeek-V2는 기본적으로 트랜스포머 아키텍처를 따르고 있으며, 각 트랜스포머 블록은 어텐션 모듈과 Feed-Forward Network(FFN)으로 구성됩니다. 하지만 어텐션 모듈과 FFN 모두에서 혁신적인 아키텍처를 설계하고 채택했습니다. 어텐션의 경우 MLA(Multi-head Latent Attention)를 설계했으며, 이는 저랭크 키-값 공동 압축을 활용하여 추론 시 키-값 캐시의 병목 현상을 제거하고 효율적인 추론을 지원합니다. FFN의 경우 DeepSeekMoE 아키텍처를 채택했으며, 이는 경제적인 비용으로 강력한 모델을 훈련할 수 있게 하는 고성능 MoE 아키텍처입니다. -![MHA, GQA, MQA, MLA 어텐션 비교](https://arxiv.org/html/2405.04434/x4.png) +![MHA, GQA, MQA, MLA 어텐션 비교](/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-4.png) 위 그림은 Multi-Head Attention(MHA), Grouped-Query Attention(GQA), Multi-Query Attention(MQA), 그리고 Multi-head Latent Attention(MLA)의 서로 다른 어텐션 메커니즘을 보여주는 아키텍처 다이어그램입니다. 이 다이어그램은 입력 쿼리, 키, 값과 같은 핵심 구성 요소와 관계를 보여주며, MLA의 경우 키와 값을 잠재 벡터로 압축하는 과정을 나타냅니다. 이 그림의 연구적 의의는 MLA가 키와 값을 잠재 벡터로 공동 압축함으로써 추론 중 키-값(KV) 캐시를 크게 줄일 수 있다는 핵심 기여를 보여주는 것입니다. @@ -378,7 +379,7 @@ YaRN 설정에서는 스케일 $$s$$를 40, $$\alpha$$를 1, $$\beta$$를 32로 추가로 시퀀스 길이 32K, 배치 크기 576 시퀀스로 1000 스텝 동안 모델을 훈련했습니다. 훈련이 32K의 시퀀스 길이에서만 수행되었음에도 불구하고, 모델은 128K의 컨텍스트 길이에서 평가될 때도 강건한 성능을 보여줍니다. -![Needle In A Haystack 테스트 결과](https://arxiv.org/html/2405.04434/x5.png) +![Needle In A Haystack 테스트 결과](/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-5.png) 위 그림은 "Needle In A Haystack"(NIAH) 테스트에서 DeepSeek-V2 모델의 성능을 보여주는 선 그래프입니다. 이 그래프는 1K에서 128K 토큰까지의 다양한 컨텍스트 윈도우 길이에 대해 DeepSeek-V2 모델이 달성한 문서 깊이 백분율을 나타냅니다. 이 그림의 연구적 의의는 DeepSeek-V2 모델이 128K 토큰까지의 큰 컨텍스트 윈도우 크기에서도 높은 정확도를 유지한다는 것을 보여주어, "Needle In A Haystack" 작업에서 장거리 의존성을 처리하는 효과를 입증한다는 것입니다. diff --git a/_posts/2025-10-07-deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning.md b/_posts/2025-10-07-deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning.md index 4ad24c0..526726b 100644 --- a/_posts/2025-10-07-deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning.md +++ b/_posts/2025-10-07-deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning.md @@ -1,6 +1,7 @@ --- layout: post title: "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning" +seo_title: "DeepSeek-R1: Incentivizing Reasoning in LLMs via RL" subtitle: "DeepSeek-R1: 강화학습을 통한 대규모 언어 모델의 추론 능력 향상" date: 2025-01-22 15:19:35 paper_author: "DeepSeek AI" @@ -43,7 +44,7 @@ DeepSeek-AI 연구팀은 강화학습을 통해 추론 능력을 획기적으로 이러한 문제들을 해결하고 추론 성능을 더욱 향상시키기 위해 연구팀은 다단계 훈련과 콜드 스타트 데이터를 포함하는 DeepSeek-R1을 개발했습니다. DeepSeek-R1은 추론 과제에서 OpenAI-o1-1217과 비교할 만한 성능을 달성했습니다. 연구 커뮤니티를 지원하기 위해 DeepSeek-R1-Zero, DeepSeek-R1, 그리고 DeepSeek-R1에서 증류된 6개의 밀집 모델들(1.5B, 7B, 8B, 14B, 32B, 70B)을 Qwen과 Llama 기반으로 오픈소스로 공개합니다. -![벤치마크 성능 비교](https://arxiv.org/html/2501.12948v1/x1.png) +![벤치마크 성능 비교](/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-1.png) 위 그림은 다양한 AI 모델들의 벤치마크 성능을 비교한 막대 그래프입니다. AIME 2024, Codeforces, GPQA Diamond, MATH-500, MMLU, SWE-bench Verified 등의 데이터셋에서 DeepSeek-R1, OpenAI-01-1217, DeepSeek-R1-32B, OpenAI-01-mini, DeepSeek-V3 모델들의 정확도나 성능 지표(Pass@1, Percentile, Resolved)를 보여줍니다. 이 비교는 다양한 응용 분야에서 이러한 모델들의 능력을 평가하고 이해하는 데 중요한 의미를 가집니다. @@ -161,7 +162,7 @@ DeepSeek-R1-Zero의 훈련을 위해 연구팀은 기본 모델이 지정된 지 #### DeepSeek-R1-Zero의 성능 -![AIME 정확도 변화](https://arxiv.org/html/2501.12948v1/extracted/6147501/figures/plot_aime_with_maj.png) +![AIME 정확도 변화](/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-2.png) 위 그래프는 강화학습 훈련 과정에서 DeepSeek-R1-Zero의 AIME 정확도 변화를 보여줍니다. 각 질문에 대해 16개의 응답을 샘플링하고 전체 평균 정확도를 계산하여 안정적인 평가를 보장했습니다. 그래프에서 볼 수 있듯이 DeepSeek-R1-Zero는 강화학습 훈련이 진행됨에 따라 꾸준하고 일관된 성능 향상을 보여줍니다. @@ -179,7 +180,7 @@ DeepSeek-R1-Zero의 훈련을 위해 연구팀은 기본 모델이 지정된 지 #### 자기 진화 과정 -![평균 응답 길이 변화](https://arxiv.org/html/2501.12948v1/extracted/6147501/figures/plot_length.png) +![평균 응답 길이 변화](/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-3.png) DeepSeek-R1-Zero의 자기 진화 과정은 강화학습이 어떻게 모델의 추론 능력을 자율적으로 향상시킬 수 있는지를 보여주는 매혹적인 사례입니다. 기본 모델에서 직접 강화학습을 시작함으로써, 연구팀은 지도 미세 조정 단계의 영향 없이 모델의 진행 과정을 면밀히 관찰할 수 있었습니다. diff --git a/_posts/2025-10-07-deepseek-v3-technical-report.md b/_posts/2025-10-07-deepseek-v3-technical-report.md index 853279a..2ae79cb 100644 --- a/_posts/2025-10-07-deepseek-v3-technical-report.md +++ b/_posts/2025-10-07-deepseek-v3-technical-report.md @@ -41,7 +41,7 @@ DeepSeek-V3는 오픈소스 대규모 언어 모델 분야에서 획기적인 DeepSeek-V3는 총 671B개의 파라미터를 가지며 각 토큰당 37B개의 파라미터가 활성화되는 강력한 Mixture-of-Experts (MoE) 언어 모델입니다. 효율적인 추론과 비용 효과적인 훈련을 달성하기 위해 DeepSeek-V3는 DeepSeek-V2에서 철저히 검증된 Multi-head Latent Attention (MLA)와 DeepSeekMoE 아키텍처를 채택했습니다. -![벤치마크 성능 비교](https://arxiv.org/html/2412.19437/x1.png) +![벤치마크 성능 비교](/assets/images/deepseek-v3-technical-report-1.png) 위 그림에서 보듯이 DeepSeek-V3는 다양한 벤치마크 과제에서 뛰어난 성능을 보여줍니다. MMLU-Pro, GPQA-Diamond, MATH 500, AIME 2024, Codeforces, SWE-bench Verified 등의 평가에서 경쟁 모델들을 크게 앞서는 결과를 달성했습니다. 이는 DeepSeek-V3의 우수한 성능을 입증하는 핵심적인 연구 기여를 보여줍니다. @@ -118,7 +118,7 @@ DeepSeek-V3는 총 671B개의 파라미터를 가지며 각 토큰당 37B개의 DeepSeek-V3는 효율적인 추론을 위한 Multi-head Latent Attention (MLA)와 경제적인 훈련을 위한 DeepSeekMoE를 특징으로 하는 기본 아키텍처를 먼저 소개합니다. 이후 전체 성능을 향상시키는 것으로 관찰된 Multi-Token Prediction (MTP) 훈련 목표를 제시합니다. 명시적으로 언급되지 않은 다른 세부 사항들에 대해서는 DeepSeek-V3가 DeepSeek-V2의 설정을 따릅니다. -![DeepSeek-V3 기본 아키텍처](https://arxiv.org/html/2412.19437/x2.png) +![DeepSeek-V3 기본 아키텍처](/assets/images/deepseek-v3-technical-report-2.png) 위 그림은 DeepSeek-V3의 기본 아키텍처를 보여줍니다. DeepSeek-V2를 따라 효율적인 추론과 경제적인 훈련을 위해 MLA와 DeepSeekMoE를 채택했습니다. 아키텍처는 Feed-Forward Network, RMSNorm, Attention, RMSNorm 구성 요소들로 이루어져 있으며, multi-head latent attention (MLA) 메커니즘과 Routed Expert 및 Shared Expert 구성 요소를 가진 DeepSeekMoE 아키텍처를 핵심으로 합니다. @@ -256,7 +256,7 @@ DeepSeek-V2에서 사용된 디바이스 제한 라우팅과 마찬가지로, De Gloeckle et al. (2024)에서 영감을 받아, 연구진은 각 위치에서 여러 미래 토큰으로 예측 범위를 확장하는 Multi-Token Prediction (MTP) 목표를 조사하고 DeepSeek-V3에 설정했습니다. 한편으로는 MTP 목표가 훈련 신호를 밀집화하고 데이터 효율성을 향상시킬 수 있습니다. 다른 한편으로는 MTP가 모델이 미래 토큰의 더 나은 예측을 위해 표현을 미리 계획할 수 있게 할 수 있습니다. -![Multi-Token Prediction 구현](https://arxiv.org/html/2412.19437/x3.png) +![Multi-Token Prediction 구현](/assets/images/deepseek-v3-technical-report-3.png) 위 그림은 MTP 구현을 보여줍니다. 각 깊이에서 각 토큰의 예측에 대한 완전한 인과 체인을 유지합니다. 독립적인 출력 헤드를 사용하여 $$D$$개의 추가 토큰을 병렬로 예측하는 Gloeckle et al. (2024)와 달리, 연구진은 순차적으로 추가 토큰을 예측하고 각 예측 깊이에서 완전한 인과 체인을 유지합니다. @@ -321,7 +321,7 @@ DeepSeek-V3의 훈련은 연구진이 처음부터 개발한 효율적이고 경 #### DualPipe와 계산-통신 오버랩 -![DualPipe 오버랩 전략](https://arxiv.org/html/2412.19437/x4.png) +![DualPipe 오버랩 전략](/assets/images/deepseek-v3-technical-report-4.png) 위 그림은 트랜스포머 모델에서 개별 순방향 및 역방향 청크 쌍에 대한 오버랩 전략을 보여주는 아키텍처 다이어그램입니다. 이 다이어그램은 순방향 및 역방향 패스에 관련된 다양한 구성 요소와 통신 패턴을 보여주며, 계산(MLP), 통신(DISPATCH, COMBINE, PP), 그리고 시간 의존성을 포함합니다. 이 그림의 중요성은 순방향과 역방향 계산을 동시에 수행할 수 있도록 하여 트랜스포머 모델의 효율성을 향상시키는 오버랩 전략의 상세한 시각화를 제공한다는 점입니다. @@ -333,7 +333,7 @@ DualPipe의 핵심 아이디어는 개별 순방향 및 역방향 청크 쌍 내 효율적인 오버랩 전략이 주어지면, 전체 DualPipe 스케줄링이 다음 그림에 나타나 있습니다. -![DualPipe 스케줄링](https://arxiv.org/html/2412.19437/x5.png) +![DualPipe 스케줄링](/assets/images/deepseek-v3-technical-report-5.png) 이 그림은 DualPipe 시스템에서 마이크로 배치의 스케줄링을 보여주는 스케줄링 다이어그램입니다. 이 다이어그램은 시간에 따른 8개의 병렬 처리(PP) 랭크와 20개의 마이크로 배치를 순방향과 역방향 모두에서 스케줄링하는 것을 보여줍니다. 이 그림의 핵심 연구 의의는 공유된 검은색 테두리로 표시된 셀들이 상호 오버랩된 계산과 통신을 나타내는 것처럼, 효율성을 향상시키기 위해 계산과 통신이 오버랩되는 DualPipe 스케줄링 접근법을 보여준다는 것입니다. @@ -379,7 +379,7 @@ DualPipe에 충분한 계산 성능을 보장하기 위해, 연구진은 통신 ### FP8 훈련 -![FP8 혼합 정밀도 프레임워크](https://arxiv.org/html/2412.19437/x6.png) +![FP8 혼합 정밀도 프레임워크](/assets/images/deepseek-v3-technical-report-6.png) 위 그림은 FP8 데이터 형식을 사용한 전체 혼합 정밀도 프레임워크를 보여주는 아키텍처 다이어그램입니다. 명확성을 위해 Linear 연산자만 설명되어 있습니다. 이 다이어그램은 Input, Fprop, Σ(합계), Wgrad, Output, Weight, Input Gradient, Master Weight, Optimizer States 및 이들의 연결을 포함한 혼합 정밀도 프레임워크의 주요 구성 요소와 데이터 흐름을 보여줍니다. 이 그림의 연구적 의의는 딥러닝 모델의 효율성과 성능을 향상시키기 위해 모델의 다른 부분에 대해 서로 다른 수치 표현(예: FP8, FP16, FP32)을 사용하는 기법인 혼합 정밀도 프레임워크의 고수준 개요를 제공한다는 것입니다. @@ -402,7 +402,7 @@ DualPipe에 충분한 계산 성능을 보장하기 위해, 연구진은 통신 #### 양자화와 곱셈을 통한 정밀도 향상 -![세밀한 양자화와 누적 정밀도 향상](https://arxiv.org/html/2412.19437/x7.png) +![세밀한 양자화와 누적 정밀도 향상](/assets/images/deepseek-v3-technical-report-7.png) 위 그림은 제안된 방법의 두 가지 핵심 구성 요소를 보여주는 아키텍처 다이어그램입니다. (a) 세밀한 양자화와 (b) 누적 정밀도 증가입니다. 이 다이어그램은 입력 스케일링 팩터, 텐서 코어, CUDA 코어, 그리고 양자화 및 누적 과정에 관련된 기타 구성 요소들을 보여줍니다. NC(요소 수)와 스케일링 팩터를 사용하여 양자화를 관리하고 GEMM 정밀도를 향상시키는 것을 강조합니다. 이 그림의 연구적 의의는 저자들이 제안한 세밀한 양자화 기법과 NC=128 요소 간격으로 CUDA 코어로 승격하여 고정밀도 누적을 위한 FP8 GEMM 정밀도를 향상시키는 전략을 시각적으로 설명한다는 것입니다. @@ -579,7 +579,7 @@ YaRN 구성은 DeepSeek-V2에서 사용된 것과 일치하며, 분리된 공유 이 2단계 확장 훈련을 통해 DeepSeek-V3는 강력한 성능을 유지하면서 최대 128K 길이의 입력을 처리할 수 있습니다. -![Needle In A Haystack 테스트 결과](https://arxiv.org/html/2412.19437/x8.png) +![Needle In A Haystack 테스트 결과](/assets/images/deepseek-v3-technical-report-8.png) 위 그림은 DeepSeek-V3 모델의 "Needle In A Haystack" (NIAH) 테스트 평가 결과를 보여주는 선 그래프입니다. 이 그래프는 128K 토큰까지의 서로 다른 컨텍스트 윈도우 길이(x축)에 걸쳐 DeepSeek-V3 모델이 달성한 문서 깊이 백분율(y축)을 나타냅니다. 이 그림의 연구적 의의는 대규모 문서 컬렉션 내에서 관련 콘텐츠를 찾는 정보 검색 시스템의 효과를 평가하는 중요한 벤치마크인 NIAH 테스트에서 DeepSeek-V3 모델의 강력한 성능을 보여준다는 것입니다. @@ -725,7 +725,7 @@ DeepSeek-V3의 베이스 모델은 영어와 중국어가 대부분을 차지하 이를 검증하기 위해 Pile 테스트 세트의 서로 다른 도메인에서 16B 보조 손실 기반 베이스라인과 16B 보조 손실 없는 모델의 전문가 로드를 기록하고 분석합니다. -![전문가 로드 분석](https://arxiv.org/html/2412.19437/x9.png) +![전문가 로드 분석](/assets/images/deepseek-v3-technical-report-9.png) 위 그림은 Pile 테스트 세트의 세 도메인(Wikipedia (en), Github, DM Mathematics)과 두 개의 서로 다른 레이어(레이어 9와 레이어 18)에 걸쳐 두 개의 서로 다른 모델(보조 손실 기반 및 보조 손실 없는)에 대한 상대적 전문가 로드의 히트맵 시각화를 보여줍니다. 그림에서 제시된 핵심 정보는 실제 전문가 로드와 이론적으로 균형 잡힌 전문가 로드 간의 비율을 나타내는 상대적 전문가 로드입니다. 히트맵은 서로 다른 도메인과 레이어에 걸쳐 두 모델 간의 전문가 전문화 패턴의 차이를 보여줍니다. 이 그림의 연구적 의의는 보조 손실 없는 모델이 보조 손실 기반 모델에 비해 더 큰 전문가 전문화 패턴을 보인다는 것을 입증하는 것으로, 이는 이러한 유형의 모델의 행동과 성능을 이해하는 데 관련된 발견입니다. @@ -984,7 +984,7 @@ DeepSeek-V3의 FP8 혼합 정밀도 훈련 프레임워크의 효과를 검증 #### FP8 대 BF16 훈련 비교 -![FP8와 BF16 훈련 손실 곡선 비교](https://arxiv.org/html/2412.19437/x10.png) +![FP8와 BF16 훈련 손실 곡선 비교](/assets/images/deepseek-v3-technical-report-10.png) 위 그림은 DeepSeek-V2 데이터셋의 두 가지 버전(16B 토큰과 230B 토큰)에서 BF16과 FP8 훈련 간의 손실 곡선을 비교한 결과를 보여줍니다. 손실 값들은 계수 0.9를 가진 지수 이동 평균(EMA)으로 평활화되었습니다. 이 그래프는 대규모 언어 모델 훈련에서 효율적인 모델 배포를 위한 중요한 고려사항인 BF16과 FP8 정밀도 형식 간의 성능 비교를 보여주는 연구적 의의를 가집니다. @@ -1012,7 +1012,7 @@ DeepSeek-V3의 FP8 혼합 정밀도 훈련 프레임워크의 효과를 검증 연구진은 Pile 테스트 세트에서 16B 보조 손실 기반 베이스라인과 보조 손실 없는 모델의 전문가 로드를 기록하고 분석했습니다. 이 분석은 서로 다른 로드 밸런싱 전략이 전문가들의 전문화 패턴에 미치는 영향을 이해하는 데 중요한 통찰을 제공합니다. -![전문가 로드 히트맵 시각화](https://arxiv.org/html/2412.19437/x11.png) +![전문가 로드 히트맵 시각화](/assets/images/deepseek-v3-technical-report-11.png) 위 그림들은 Pile 테스트 세트의 세 도메인(Wikipedia (en), Github, DM Mathematics)에 걸쳐 보조 손실 기반 모델과 보조 손실 없는 모델의 상대적 전문가 로드를 보여주는 포괄적인 히트맵 시각화입니다. 각 히트맵은 신경망 아키텍처의 서로 다른 레이어를 나타내며, 보조 손실 없는 모델이 보조 손실 기반 모델에 비해 모든 레이어에서 더 큰 전문가 전문화 패턴을 보인다는 것을 보여줍니다. diff --git a/_posts/2025-10-07-gemma-2--improving-open-language-models-at-a-practical-size.md b/_posts/2025-10-07-gemma-2--improving-open-language-models-at-a-practical-size.md index 1963bbc..342a2bd 100644 --- a/_posts/2025-10-07-gemma-2--improving-open-language-models-at-a-practical-size.md +++ b/_posts/2025-10-07-gemma-2--improving-open-language-models-at-a-practical-size.md @@ -433,7 +433,7 @@ Gemma 2B 모델들은 더 큰 모델들에 비해 형식 견고성이 약간 떨 ### 축자적 암송 결과 -![암송률 비교](https://arxiv.org/html/2408.00118/x1.png) +![암송률 비교](/assets/images/gemma-2--improving-open-language-models-at-a-practical-size-1.png) 위 그림의 결과를 보면, 먼저 암송 평가를 포함한 문헌의 최신 모델들과 비교했습니다. Gemma 2는 유사한 크기의 이전 모델들에 비해 현저히 적게 암송하며, 암송률이 0.1% 미만으로 나타났습니다(로그 y축에 주목). 이는 [Nasr et al.의 연구](https://arxiv.org/pdf/2311.17035)에서 제안된 확장 가능한 추출 방법론으로 측정했을 때도 상당한 개선을 보여줍니다. diff --git a/_posts/2025-10-08-qwen3-technical-report.md b/_posts/2025-10-08-qwen3-technical-report.md index fb27a0c..23528bf 100644 --- a/_posts/2025-10-08-qwen3-technical-report.md +++ b/_posts/2025-10-08-qwen3-technical-report.md @@ -345,7 +345,7 @@ Qwen3-14B-Base와 Qwen3-30B-A3B-Base의 평가는 유사한 크기의 베이스 Qwen3 시리즈의 후훈련 파이프라인은 두 가지 핵심 목표를 달성하기 위해 전략적으로 설계되었습니다. 첫 번째는 **사고 제어(Thinking Control)**로, 이는 "비사고" 모드와 "사고" 모드라는 두 가지 서로 다른 모드를 통합하여 사용자가 모델의 추론 참여 여부를 선택할 수 있는 유연성을 제공하고, 사고 과정에 대한 토큰 예산을 지정하여 사고의 깊이를 제어할 수 있게 합니다. 두 번째는 **강한 모델에서 약한 모델로의 증류(Strong-to-Weak Distillation)**로, 이는 경량 모델의 후훈련 과정을 간소화하고 최적화하는 것을 목표로 합니다. -![후훈련 파이프라인](https://arxiv.org/html/2505.09388v1/x1.png) +![후훈련 파이프라인](/assets/images/qwen3-technical-report-1.png) 위 그림에서 보듯이, Qwen3 시리즈의 플래그십 모델들은 정교한 4단계 훈련 과정을 따릅니다. 처음 두 단계는 모델의 "사고" 능력 개발에 중점을 두며, 다음 두 단계는 강력한 "비사고" 기능을 모델에 통합하는 것을 목표로 합니다. diff --git a/_posts/2025-10-10-pixtral-12b.md b/_posts/2025-10-10-pixtral-12b.md index 32df762..90ade5f 100644 --- a/_posts/2025-10-10-pixtral-12b.md +++ b/_posts/2025-10-10-pixtral-12b.md @@ -57,9 +57,9 @@ Pixtral 12B는 Apache 2.0 라이선스 하에 공개되어, 연구자들과 개 ## 서론 -![Pixtral 성능 비교](https://arxiv.org/html/2410.07073/extracted/5915552/images/pareto_mm_mt_bench_oct.png) +![Pixtral 성능 비교](/assets/images/pixtral-12b-1.png) -![LMSys 리더보드 성능](https://arxiv.org/html/2410.07073/extracted/5915552/images/pareto_lmsys_oct.png) +![LMSys 리더보드 성능](/assets/images/pixtral-12b-2.png) Pixtral 12B는 이미지와 텍스트를 모두 이해할 수 있는 멀티모달 언어 모델로, Apache 2.0 라이선스 하에 오픈 웨이트로 공개되었습니다. 이 모델은 대규모 이미지-텍스트 인터리브 문서로 사전 훈련된 후 인스트럭션 튜닝을 거쳐, 멀티턴, 멀티이미지 대화가 가능한 시스템으로 발전했습니다. @@ -110,7 +110,7 @@ Pixtral 12B는 Mistral Nemo 12B를 기반으로 구축되었습니다. Mistral N ### 비전 인코더 -![Pixtral 비전 인코더](https://arxiv.org/html/2410.07073/extracted/5915552/images/pixtral_vit.png) +![Pixtral 비전 인코더](/assets/images/pixtral-12b-3.png) Pixtral 12B가 이미지를 처리할 수 있도록 하기 위해, 연구진은 Pixtral-ViT라는 새로운 비전 인코더를 처음부터 훈련시켰습니다. 이 비전 인코더의 목표는 광범위한 해상도와 종횡비의 이미지를 처리할 수 있는 간단한 아키텍처를 구현하는 것입니다. @@ -146,7 +146,7 @@ $$M^{(i,j)}_{\Theta} = \begin{pmatrix} ### 완전한 아키텍처 -![완전한 Pixtral 아키텍처](https://arxiv.org/html/2410.07073/extracted/5915552/images/full_arch.png) +![완전한 Pixtral 아키텍처](/assets/images/pixtral-12b-4.png) Pixtral 비전 인코더는 2층 완전 연결 네트워크를 통해 멀티모달 디코더와 연결됩니다. 이 네트워크는 비전 인코더의 출력을 디코더가 요구하는 입력 임베딩 크기로 변환하며, 동일한 크기의 중간 은닉층을 거쳐 GeLU 활성화 함수를 사용합니다. @@ -169,7 +169,7 @@ MM-MT-Bench는 총 92개의 대화로 구성되어 있으며, 다섯 가지 이 모델을 평가할 때는 대화의 모든 턴에 대해 병렬로 쿼리를 수행하며, 과거 턴에 대한 참조 답변을 히스토리로 제공합니다. 각 턴은 전체 대화 히스토리가 제공된 상태에서 판정자에 의해 독립적으로 평가됩니다. 판정자는 정확성(추출된 정보가 올바른가)과 완전성(모델의 답변이 참조에서 제기된 모든 요점을 다루는가)을 기준으로 1점에서 10점 척도로 대화를 평가하도록 지시받습니다. -![MM-MT-Bench 평가 과정](https://arxiv.org/html/2410.07073/x1.png) +![MM-MT-Bench 평가 과정](/assets/images/pixtral-12b-5.png) 평가 과정은 위 그림에서 보듯이 체계적으로 구성되어 있습니다. 입력 이미지, 참조 답변, 그리고 모델 응답이 주어지면, 독립적인 LLM 판정자가 1점부터 10점까지의 척도로 모델의 응답을 평가합니다. 이러한 평가 방식은 인간의 주관적 판단을 모방하면서도 일관성 있는 평가 기준을 제공합니다. @@ -240,7 +240,7 @@ MM-MT-Bench의 도입은 멀티모달 AI 모델 평가에 있어서 중요한 연구진은 일반적으로 사용되는 프롬프트들이 출력 형식을 제대로 지정하지 않는다는 중요한 발견을 했습니다. 예를 들어, 객관식 질문에 대해 오픈소스 프롬프트들은 "위 옵션에서 정답을 선택하세요"와 같은 모호한 지시사항을 포함합니다. 이 경우 모델들은 답변이 인덱스("Option A", "Option B" 등)로 제시되어야 하는지 자연어 응답으로 제시되어야 하는지 알 수 없습니다. 그 결과 모델들은 잘못된 형식으로 인해 불이익을 받게 됩니다. -![프롬프트 효과 비교](https://arxiv.org/html/2410.07073/x2.png) +![프롬프트 효과 비교](/assets/images/pixtral-12b-6.png) 위 그림은 MMMU의 실제 예시를 통해 '순진한(Naive)' 프롬프트와 '명시적(Explicit)' 프롬프트의 효과를 보여줍니다. 최고 수준의 모델들은 출력 형식에 대한 세부사항을 제공하는 '명시적' 프롬프트로부터 큰 이익을 얻습니다. 이는 실질적으로 정확한 응답이 평가 중에 부정확한 것으로 표시되는 것을 방지하기 때문입니다. @@ -285,7 +285,7 @@ MM-MT-Bench의 도입은 멀티모달 AI 모델 평가에 있어서 중요한 ### 비전 인코더 절제 실험 -![비전 인코더 성능 비교](https://arxiv.org/html/2410.07073/extracted/5915552/images/vit_ablation.png) +![비전 인코더 성능 비교](/assets/images/pixtral-12b-7.png) 비전 인코더의 설계 선택을 검증하기 위해, 연구진은 [Visual Instruction Tuning](https://arxiv.org/pdf/2304.08485)을 통한 소규모 절제 실험을 수행했습니다. Pixtral-ViT와 [CLIPA](https://arxiv.org/pdf/2209.14169) 백본을 기준선으로 하여 단기간 멀티모달 인스트럭션 튜닝을 실행했습니다. 두 비전 인코더 모두에 대해 [Mistral-Nemo 12B-Instruct](https://arxiv.org/pdf/2407.21783)를 사용하여 멀티모달 디코더를 초기화했습니다. @@ -302,9 +302,9 @@ MM-MT-Bench의 도입은 멀티모달 AI 모델 평가에 있어서 중요한 ### 복잡한 도표에 대한 추론 -![GDP 세계 지도](https://arxiv.org/html/2410.07073/extracted/5915552/images/gdp.png) +![GDP 세계 지도](/assets/images/pixtral-12b-8.png) -![유럽 GDP 파이 차트](https://arxiv.org/html/2410.07073/extracted/5915552/images/lechat_gdp.png) +![유럽 GDP 파이 차트](/assets/images/pixtral-12b-9.png) Pixtral의 복잡한 도표 이해 능력을 보여주는 대표적인 예시입니다. 이 예시에서 Pixtral은 녹색 박스가 유럽 국가들을 나타낸다는 것을 정확히 식별하고, 모든 유럽 국가들의 GDP를 읽어서 정렬한 후 상위 5개국을 정확한 GDP 수치와 함께 나열했습니다. @@ -312,7 +312,7 @@ Pixtral의 복잡한 도표 이해 능력을 보여주는 대표적인 예시입 ### 멀티이미지 인스트럭션 팔로잉 -![멀티이미지 테이블 통합](https://arxiv.org/html/2410.07073/extracted/5915552/images/lechat_multi_image_oct.png) +![멀티이미지 테이블 통합](/assets/images/pixtral-12b-10.png) Pixtral은 128K 토큰의 컨텍스트 윈도우 내에서 임의의 개수의 이미지를 처리할 수 있는 능력을 보유하고 있습니다. 이 예시는 Pixtral이 여러 이미지의 정보를 성공적으로 결합하여 하나의 마크다운 테이블로 통합할 수 있음을 보여줍니다. @@ -320,7 +320,7 @@ Pixtral은 128K 토큰의 컨텍스트 윈도우 내에서 임의의 개수의 ### 차트 이해 및 분석 -![훈련 손실 차트](https://arxiv.org/html/2410.07073/extracted/5915552/images/lechat_chart.png) +![훈련 손실 차트](/assets/images/pixtral-12b-11.png) Pixtral은 복잡한 차트를 해석하고 분석하는 뛰어난 능력을 보여줍니다. 이 예시에서 Pixtral은 "dark-dragon"이 빨간색 선에 해당한다는 것을 정확히 식별했습니다. 더 나아가, 훈련 손실이 부드럽게 감소해야 한다는 일반적인 기대와 달리, 10K 스텝 지점에서 손실이 급격히 증가하여 훈련이 불안정해졌다는 중요한 패턴을 인식했습니다. @@ -328,7 +328,7 @@ Pixtral은 복잡한 차트를 해석하고 분석하는 뛰어난 능력을 보 ### 이미지를 코드로 변환 -![웹사이트 인터페이스 스케치](https://arxiv.org/html/2410.07073/extracted/5915552/images/lechat_website.png) +![웹사이트 인터페이스 스케치](/assets/images/pixtral-12b-12.png) Pixtral의 가장 인상적인 기능 중 하나는 손으로 그린 웹사이트 인터페이스를 실행 가능한 HTML 코드로 변환하는 능력입니다. 이 예시는 아이스크림 맛을 선택하는 간단한 웹 인터페이스 스케치를 완전히 기능하는 웹사이트로 변환하는 과정을 보여줍니다. @@ -336,7 +336,7 @@ Pixtral의 가장 인상적인 기능 중 하나는 손으로 그린 웹사이 ### 모델 간 성능 비교 -![모델 응답 비교](https://arxiv.org/html/2410.07073/x3.png) +![모델 응답 비교](/assets/images/pixtral-12b-13.png) MM-MT-Bench의 실제 예시를 통해 Pixtral 12B, QwenVL-7B, Gemini-1.5 Flash-8B 간의 성능을 비교한 결과입니다. 이 예시는 미국 내 세대별 직업 안정성에 대한 우려를 보여주는 복잡한 차트를 분석하는 작업으로, 정확한 이해, 추론, 그리고 분석이 요구됩니다. diff --git a/_posts/2025-10-19-direct-preference-optimization--your-language-model-is-secretly-a-reward-model.md b/_posts/2025-10-19-direct-preference-optimization--your-language-model-is-secretly-a-reward-model.md index 8aedd30..89ae67b 100644 --- a/_posts/2025-10-19-direct-preference-optimization--your-language-model-is-secretly-a-reward-model.md +++ b/_posts/2025-10-19-direct-preference-optimization--your-language-model-is-secretly-a-reward-model.md @@ -1,6 +1,7 @@ --- layout: post title: "Direct Preference Optimization: Your Language Model is Secretly a Reward Model" +seo_title: "Direct Preference Optimization (DPO)" subtitle: "직접 선호 최적화: 언어 모델은 사실 보상 모델이다" date: 2023-05-29 17:57:46 paper_author: "Stanford University" @@ -55,7 +56,7 @@ DPO는 모든 실험 설정에서 기존 방법들과 비교하여 우수한 성 기존의 방법들은 일반적으로 강화학습을 사용하여 언어 모델이 인간의 선호도와 일치하도록 조정하는데, 이 논문에서는 기존 방법들이 사용하는 강화학습 기반 목적 함수를 단순한 이진 교차 엔트로피 목적 함수로 정확하게 최적화할 수 있음을 보여줍니다. 이를 통해 선호도 학습 파이프라인을 크게 단순화할 수 있습니다. -![RLHF와 DPO 비교](https://arxiv.org/html/2305.18290/figures/diagrams/teaser.png) +![RLHF와 DPO 비교](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-1.png) 위 그림은 인간 피드백을 활용한 언어 모델 파인튜닝의 두 가지 접근법을 비교합니다. 기존의 인간 피드백 기반 강화학습(RLHF) 방법은 먼저 프롬프트와 응답 쌍에 대한 인간 선호도 데이터셋에 보상 모델을 학습시킨 후, 강화학습을 사용하여 학습된 보상을 최대화하는 정책을 찾습니다. 반면 Direct Preference Optimization(DPO)은 단순한 분류 목적 함수로 선호도를 가장 잘 만족하는 정책을 직접 최적화하며, 암묵적 보상 모델을 학습시켜 해당하는 최적 정책을 닫힌 형태로 추출할 수 있습니다. @@ -328,9 +329,9 @@ DPO 외에도 인간 선호도를 준수하도록 언어 모델을 훈련시키 ### DPO의 RLHF 목적 함수 최적화 능력 -![보상-KL 프론티어와 요약 승률](https://arxiv.org/html/2305.18290/x1.png) +![보상-KL 프론티어와 요약 승률](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-2.png) -![대화 승률](https://arxiv.org/html/2305.18290/x2.png) +![대화 승률](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-3.png) 위 그림들은 DPO와 다른 방법들의 성능을 비교합니다. 왼쪽 그림은 다양한 알고리즘의 기대 보상 대 참조 정책과의 KL 발산 프론티어를 보여줍니다. DPO는 모든 KL 값에 대해 가장 높은 기대 보상을 제공하여 최적화의 품질을 입증합니다. 오른쪽 그림은 GPT-4를 평가자로 사용한 TL;DR 요약 작업에서 인간이 작성한 요약에 대한 승률을 샘플링 온도별로 보여줍니다. DPO는 PPO의 최상의 성능을 초과하면서도 샘플링 온도 변화에 더 강건합니다. @@ -356,9 +357,9 @@ TL;DR 요약 데이터셋의 테스트 분할에서 완성을 샘플링하고 이 작업에 대한 표준 SFT 모델이 없으므로 사전학습된 Pythia-2.8B로 시작하여 Preferred-FT를 사용하여 선택된 완성에 대해 참조 모델을 훈련시켜 완성이 모델의 분포 내에 있도록 한 다음 DPO를 사용하여 훈련합니다. 또한 128개의 Preferred-FT 완성 중 최선(Best of 128)과 Pythia-2.8B 기본 모델의 2샷 프롬프트 버전과 비교하여, DPO가 각 방법의 최상 성능 온도에서 비슷하거나 더 나은 성능을 보임을 발견합니다. -![대화 작업 승률](https://arxiv.org/html/2305.18290/x3.png) +![대화 작업 승률](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-4.png) -![훈련 과정의 승률 변화](https://arxiv.org/html/2305.18290/x4.png) +![훈련 과정의 승률 변화](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-5.png) 위 그림들은 Anthropic-HH 단일 턴 대화에 대한 GPT-4가 계산한 승률을 보여줍니다. 왼쪽 그림에서 DPO는 Anthropic-HH 테스트 세트의 선택된 요약을 개선하는 유일한 방법입니다. 오른쪽 그림은 훈련 과정에서 다양한 샘플링 온도에 대한 승률을 보여주며, DPO의 개선이 다양한 샘플링 온도에 대해 훈련 과정 전반에 걸쳐 상당히 안정적임을 보여줍니다. @@ -680,9 +681,9 @@ Unlikelihood 베이스라인은 감정 실험에 포함했지만, 요약이나 Best of $$N$$ 베이스라인은 실험에서 강력하지만 계산적으로 비용이 많이 드는 베이스라인입니다. Anthropic-HH 대화와 TL;DR 요약에 대해 다양한 $$N$$ 값의 Best of $$N$$ 베이스라인을 평가한 결과를 제시합니다. -![Best of N 성능 곡선](https://arxiv.org/html/2305.18290/x5.png) +![Best of N 성능 곡선](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-6.png) -![TL;DR Best of N](https://arxiv.org/html/2305.18290/x6.png) +![TL;DR Best of N](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-7.png) 위 그림들은 $$N = \{1, 4, 16, 64, 128\}$$에 대한 Best of $$N$$ 베이스라인의 성능을 보여줍니다. 성능은 대략 64-128개의 샘플 이후에 정체됩니다. 첫 번째 그림은 Anthropic-HH 대화에서 선택된 샘플링 온도에 대한 승률을 보여주며, 두 번째 그림은 TL;DR 요약에서의 결과를 나타냅니다. @@ -738,7 +739,7 @@ GPT-4 판단: Response B [GT]가 질문에 대한 직접적이고 정확한 답 ### 인간 연구 세부사항 -![인간 연구 설문 레이아웃](https://arxiv.org/html/2305.18290/figures/results/survey.png) +![인간 연구 설문 레이아웃](/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-8.png) 위 그림은 SurveyMonkey에서의 설문 레이아웃을 보여줍니다. 각 응답자는 유사하게 형식화된 25개의 판단을 완료했습니다. diff --git a/_posts/2026-01-12-deepseek-v3.2--pushing-the-frontier-of-open-large-language-models.md b/_posts/2026-01-12-deepseek-v3.2--pushing-the-frontier-of-open-large-language-models.md index 64aec89..972867e 100644 --- a/_posts/2026-01-12-deepseek-v3.2--pushing-the-frontier-of-open-large-language-models.md +++ b/_posts/2026-01-12-deepseek-v3.2--pushing-the-frontier-of-open-large-language-models.md @@ -51,7 +51,7 @@ DeepSeek-V3.2는 높은 계산 효율성과 뛰어난 추론 및 에이전트 세 번째 혁신은 대규모 에이전트 작업 합성 파이프라인입니다. 추론 능력을 도구 사용 시나리오에 통합하기 위해, 체계적으로 훈련 데이터를 대규모로 생성하는 새로운 합성 파이프라인이 개발되었습니다. 이 방법론은 1,800개 이상의 서로 다른 환경과 85,000개의 복잡한 프롬프트를 생성하여 확장 가능한 에이전트 사후 훈련을 가능하게 합니다. 그 결과 복잡한 상호작용 환경에서의 일반화 능력과 지시 준수 견고성이 상당히 향상되었습니다. -![DeepSeek-V3.2와 경쟁 모델들의 벤치마크 비교](https://arxiv.org/html/2512.02556/x1.png) +![DeepSeek-V3.2와 경쟁 모델들의 벤치마크 비교](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-1.png) 위 그림은 DeepSeek-V3.2와 주요 경쟁 모델들의 성능을 다양한 추론 및 에이전트 능력 벤치마크에서 비교한 것입니다. AIME 2025, HMMT 2023 February 대회, HLE의 텍스트 전용 부분집합, Codeforces, SWE, Terminal Bench 2.0, Tool Decathlon 등 여러 과제에서 DeepSeek-V3.2-Speciale, DeepSeek-V3.2-Thinking, GPT-5-High, Claude-4.5-Sonnet, Gemini-3.0-Pro의 점수가 제시되어 있습니다. 이 비교는 다양한 추론 및 에이전트 작업에서 각 모델의 능력을 평가하고 이해하는 데 유용한 통찰을 제공합니다. @@ -94,7 +94,7 @@ $$\mathbf{u}_{t}=\text{Attn}\left(\mathbf{h}_{t},\left\{\mathbf{c}_{s}\mid I_{t, DeepSeek-V3.1-Terminus로부터의 지속적 훈련을 고려하여, DeepSeek-V3.2는 [Multi-Head Latent Attention (MLA)](https://arxiv.org/pdf/2405.04434v5)를 기반으로 DSA를 구현합니다. 커널 수준에서 각 키-값 엔트리는 계산 효율성을 위해 여러 쿼리에 걸쳐 공유되어야 합니다. 이는 [Native Sparsity](https://arxiv.org/abs/2502.11089)에서 논의된 바와 같이 메모리 접근 패턴을 최적화하고 GPU 활용도를 높이는 데 필수적입니다. 따라서 DSA는 MLA의 [Multi-Query Attention (MQA)](https://arxiv.org/pdf/1911.02150v1) 모드를 기반으로 구현되며, 여기서 각 잠재 벡터(MLA의 키-값 엔트리)는 쿼리 토큰의 모든 쿼리 헤드에 걸쳐 공유됩니다. -![DeepSeek-V3.2의 어텐션 아키텍처](https://arxiv.org/html/2512.02556/x2.png) +![DeepSeek-V3.2의 어텐션 아키텍처](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-2.png) MLA 기반 DSA 아키텍처는 위 다이어그램에 나타나 있습니다. 녹색 부분은 DSA가 인덱서에 따라 상위 k개의 키-값 엔트리를 선택하는 방식을 보여줍니다. 이 구조에서 라이트닝 인덱서는 먼저 모든 토큰에 대한 인덱스 점수를 계산하고, Top-k Selector가 가장 높은 점수를 가진 k개의 토큰을 선택합니다. 선택된 토큰들의 키-값 정보만이 Multi-Query Attention 모듈로 전달되어 최종 어텐션 출력을 생성합니다. 이러한 설계는 MLA의 효율적인 메모리 사용과 DSA의 희소 선택을 결합하여 긴 문맥 처리에서 최적의 성능을 달성합니다. @@ -130,9 +130,9 @@ DeepSeek-V3.2-Exp 출시 이후, 이전에 보지 못한 테스트 세트를 사 DSA는 주 모델의 핵심 어텐션 복잡도를 $$O(L^2)$$에서 $$O(Lk)$$로 감소시킵니다. 여기서 $$k$$는 선택된 토큰의 수이며 $$k \ll L$$입니다. 라이트닝 인덱서는 여전히 $$O(L^2)$$의 복잡도를 가지지만, DeepSeek-V3.1-Terminus의 MLA에 비해 훨씬 적은 계산을 필요로 합니다. 최적화된 구현과 결합하여, DSA는 긴 문맥 시나리오에서 상당한 종단 간 속도 향상을 달성합니다. -![프리필링 단계의 추론 비용](https://arxiv.org/html/2512.02556/x3.png) +![프리필링 단계의 추론 비용](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-3.png) -![디코딩 단계의 추론 비용](https://arxiv.org/html/2512.02556/x4.png) +![디코딩 단계의 추론 비용](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-4.png) 프리필링과 디코딩 단계의 비용 분석 그래프는 DeepSeek-V3.1-Terminus와 DeepSeek-V3.2의 토큰 비용이 시퀀스 내 토큰 위치에 따라 어떻게 변화하는지를 보여줍니다. 이러한 비용은 시간당 2 USD의 임대 가격으로 H800 GPU에 배포된 실제 서비스를 벤치마킹하여 추정되었습니다. 짧은 시퀀스 프리필링의 경우, 짧은 문맥 조건에서 더 높은 효율성을 달성할 수 있는 마스크된 MHA 모드를 특별히 구현하여 DSA를 시뮬레이션합니다. @@ -400,7 +400,7 @@ DeepSeek-R1은 사고 과정을 통합하는 것이 복잡한 문제를 해결 이를 완화하기 위해 도구 호출 시나리오에 엄격하게 맞춤화된 컨텍스트 관리를 개발했습니다. 이 전략의 핵심 원칙은 다음과 같습니다. 과거 추론 내용은 대화에 새로운 사용자 메시지가 도입될 때만 삭제됩니다. 도구 관련 메시지(예: 도구 출력)만 추가되는 경우 추론 내용은 상호작용 전반에 걸쳐 유지됩니다. 추론 흔적이 제거될 때 도구 호출의 히스토리와 그 결과는 컨텍스트에 보존됩니다. -![도구 호출 시나리오에서의 사고 유지 메커니즘](https://arxiv.org/html/2512.02556/x5.jpeg) +![도구 호출 시나리오에서의 사고 유지 메커니즘](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-5.jpg) 위 그림은 도구 호출 시나리오에서 사고 유지 메커니즘의 아키텍처를 보여줍니다. 다이어그램은 사용자 입력, Thinking 구성 요소, 도구 호출, 도구 결과를 포함한 도구 호출 프로세스의 일련의 단계를 나타냅니다. 이 메커니즘은 연구의 핵심 기여 중 하나로, 효율적인 추론 지속성을 통해 반복적인 재계산을 방지합니다. @@ -604,7 +604,7 @@ DeepSeek-V3.2-Exp는 12%의 정확도만 달성했으며, 최전선 비공개 강화학습이 합성 데이터에서 다른 작업이나 실제 환경으로 일반화될 수 있는지 조사하기 위해, DeepSeek-V3.2의 지도 학습 체크포인트(DeepSeek-V3.2-SFT로 표시)에 강화학습을 적용했습니다. 긴 체인 오브 소트와 다른 강화학습 데이터의 영향을 배제하기 위해 비사고 모드에서 합성 에이전트 작업에만 강화학습을 수행했습니다. 그런 다음 모델을 DeepSeek-V3.2-SFT 및 DeepSeek-V3.2-Exp와 비교했으며, DeepSeek-V3.2-Exp는 검색 및 코드 환경에서만 강화학습으로 훈련되었습니다. -![합성 일반 에이전트 데이터만을 사용한 DeepSeek-V3.2-SFT의 강화학습 훈련](https://arxiv.org/html/2512.02556/figures/synthesis-rl-plot.png) +![합성 일반 에이전트 데이터만을 사용한 DeepSeek-V3.2-SFT의 강화학습 훈련](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-6.png) 위 그림은 여러 라인 플롯을 보여주며, Tau2Bench의 Airline, Retail, Telecom 카테고리와 MCP-Mark의 Filesystem, PostgreSQL, Financial-Analysis, Location-Navigation, 3D-Designing 작업에서 DeepSeek-V3.2 모델의 성능을 나타냅니다. 합성 데이터에 대한 대규모 강화학습은 Tau2Bench, MCP-Mark, MCP-Universe 벤치마크에서 DeepSeek-V3.2-SFT에 비해 상당한 개선을 가져왔습니다. 반면 코드 및 검색 시나리오로 강화학습을 제한하면 이러한 벤치마크에서 성능이 향상되지 않아 합성 데이터의 잠재력을 더욱 강조합니다. @@ -614,7 +614,7 @@ DeepSeek-V3.2-Exp는 12%의 정확도만 달성했으며, 최전선 비공개 이러한 전략에는 (1) Summary: 오버플로우된 궤적을 요약하고 롤아웃을 재시작, (2) Discard-75%: 궤적의 처음 75% 도구 호출 히스토리를 삭제하여 공간 확보, (3) Discard-all: 이전 도구 호출 히스토리를 모두 삭제하여 컨텍스트 재설정(Opus 4.5의 새 컨텍스트 도구와 유사)이 포함됩니다. 비교를 위해 N개의 독립적인 궤적을 샘플링하고 가장 적은 단계를 가진 궤적을 선택하는 병렬 확장 기준선인 Parallel-fewest-step도 구현했습니다. -![다양한 테스트 시간 계산 확장 전략에 따른 Browsecomp의 정확도](https://arxiv.org/html/2512.02556/x6.png) +![다양한 테스트 시간 계산 확장 전략에 따른 Browsecomp의 정확도](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-7.png) 위 그림은 BrowseComp 벤치마크에서 다양한 테스트 시간 계산 확장 전략의 정확도를 보여줍니다. 다양한 계산 예산 하에서 컨텍스트 관리는 모델이 테스트 시간 계산을 확장하여 추가 실행 단계를 수행할 수 있는 공간을 제공함으로써 상당한 성능 향상을 가져왔습니다. 예를 들어 Summary는 평균 단계를 364로 확장하여 최대 60.2의 성능 향상을 달성했지만 전체 효율성은 상대적으로 낮았습니다. 단순함에도 불구하고 Discard-all은 효율성과 확장성 모두에서 우수한 성능을 보였으며, 67.6점을 달성하여 병렬 확장과 비슷하면서도 훨씬 적은 단계를 사용했습니다. @@ -638,11 +638,11 @@ DeepSeek-V3.2의 개발 과정은 오픈소스 대규모 언어 모델이 적절 앞서 본문에서 소개한 Multi-Head Latent Attention (MLA) 아키텍처는 훈련과 추론의 서로 다른 단계에서 두 가지 작동 모드를 사용합니다. DeepSeek-V3.1-Terminus의 경우 훈련과 프리필링 단계에서는 Multi-Head Attention (MHA) 모드를 사용하고, 디코딩 단계에서는 Multi-Query Attention (MQA) 모드를 사용합니다. -![MLA의 MHA 모드](https://arxiv.org/html/2512.02556/x7.png) +![MLA의 MHA 모드](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-8.png) 위 다이어그램은 MLA의 MHA 모드를 보여줍니다. 이 모드에서는 각 어텐션 헤드가 독립적인 쿼리, 키, 값 표현을 사용하여 풍부한 표현력을 제공합니다. -![MLA의 MQA 모드](https://arxiv.org/html/2512.02556/x8.png) +![MLA의 MQA 모드](/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-9.png) MQA 모드에서는 모든 쿼리 헤드가 공유된 키-값 쌍을 사용하여 메모리 효율성을 극대화합니다. 이러한 두 모드 간의 전환은 저차원 잠재 공간에서의 압축을 통해 구현되며, MHA 모드에서 학습된 표현 능력을 유지하면서도 디코딩 단계에서 메모리 사용량을 크게 줄일 수 있습니다. diff --git a/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph-en.md b/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph-en.md index 2d1a559..7aeaf15 100644 --- a/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph-en.md +++ b/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph-en.md @@ -1,6 +1,7 @@ --- layout: post title: "Writing Context Into Your Data — AI-Ready Data, Semantic Layers, Knowledge Graphs, Ontologies" +seo_title: "Writing Context Into Your Data: Semantic Layers and Knowledge Graphs" description: >- "AI-ready data" isn't clean data — it's context written in machine-executable form. Why the same schema takes text-to-SQL accuracy from 16.7% to 54.2%. @@ -271,8 +272,8 @@ One algorithm name is worth pinning down, at the fourth stage. Microsoft GraphRA A figure from Peng et al.'s survey maps the same skeleton in academic vocabulary, and it adds one axis between indexing, retrieval, and generation: whether to pull retrieval results as nodes, triples, paths, or subgraphs. The difference between LightRAG and PathRAG in §4.4 is exactly this axis. -<a href="https://arxiv.org/html/2408.08921v2/x2.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: The academic map of the GraphRAG pipeline — from G-Indexing through G-Retrieval and graph representation formats to G-Generation (source: Peng et al., Graph Retrieval-Augmented Generation: A Survey, 2024, Figure 2)"> - <img src="https://arxiv.org/html/2408.08921v2/x2.png" alt="GraphRAG pipeline diagram. Starting from Graph Database and G-Indexing at lower left, flowing up into G-Retrieval (query expansion and decomposition, retrievers, merging and pruning). The middle Retrieval Results column lists nodes, triples, paths, subgraphs, and hybrids, while the Graph Format column converts to one of adjacency tables, natural language, code form, syntax trees, node sequences, or graph embeddings, feeding into G-Generation's pre-, mid-, and post-generation augmentation stages on the right to produce the final response." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: The academic map of the GraphRAG pipeline — from G-Indexing through G-Retrieval and graph representation formats to G-Generation (source: Peng et al., Graph Retrieval-Augmented Generation: A Survey, 2024, Figure 2)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png" alt="GraphRAG pipeline diagram. Starting from Graph Database and G-Indexing at lower left, flowing up into G-Retrieval (query expansion and decomposition, retrievers, merging and pruning). The middle Retrieval Results column lists nodes, triples, paths, subgraphs, and hybrids, while the Graph Format column converts to one of adjacency tables, natural language, code form, syntax trees, node sequences, or graph embeddings, feeding into G-Generation's pre-, mid-, and post-generation augmentation stages on the right to produce the final response." /> </a> Of the three options, start with the one requiring the least work: managed. [Amazon Bedrock Knowledge Bases GraphRAG](https://aws.amazon.com/blogs/machine-learning/announcing-general-availability-of-amazon-bedrock-knowledge-bases-graphrag-with-amazon-neptune-analytics/) reached general availability in March 2025 and runs on Amazon Neptune Analytics. Drop documents in and it generates embeddings and an entity-relationship graph automatically, no graph modeling expertise required. The [AWS ML blog's build guide](https://aws.amazon.com/blogs/machine-learning/build-graphrag-applications-using-amazon-bedrock-knowledge-bases/) unpacks the internals: an `ExtractChunkEntity` step uses an LLM to pull entities from each chunk and stores them as **three node types** ("The system creates three types of nodes: chunk, document, and entity"), and at query time it finds top-k chunks by vector search and then traverses their neighboring graph. The post states they chose Titan Text Embeddings v2 as the embedding model. @@ -315,8 +316,8 @@ One [independent measurement](https://arxiv.org/abs/2502.11371) found constructi The first prescription came from KET-RAG itself, the same paper that produced the $33,000 estimate, and it's captured in their indexing diagram. Instead of sweeping the whole corpus with an LLM, extract only the key chunks with conventional GraphRAG to build a **KG skeleton**, and lay down a text-keyword bipartite graph over the rest using word tokenization with no LLM at all — a two-tier structure. At query time, a ratio $$\theta$$ splits how much gets retrieved from each tier: the expensive tier thin, the cheap tier thick. -<a href="https://arxiv.org/html/2502.09304v2/x1.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: Expensive tier thin, cheap tier thick — overlaying an LLM-extracted KG skeleton with an LLM-free text-keyword bipartite graph to cut indexing cost (source: Huang, Zhang, Xiao, KET-RAG, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.09304v2/x1.png" alt="KET-RAG architecture diagram. In the indexing stage below, input text is (1) grouped into a KNN graph, then (2) only part of it becomes a KG Skeleton via conventional GraphRAG, while (3) word and sentence tokenization builds a Text-Keyword bipartite graph linking keywords like Juliet, Romeo, and Hamlet to text chunks. In the retrieval and generation stage above, a query, a length budget, and the retrieval ratio theta feed (4) retrieval from both tiers, then (5) the merged context goes to the LLM to produce the final answer." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: Expensive tier thin, cheap tier thick — overlaying an LLM-extracted KG skeleton with an LLM-free text-keyword bipartite graph to cut indexing cost (source: Huang, Zhang, Xiao, KET-RAG, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png" alt="KET-RAG architecture diagram. In the indexing stage below, input text is (1) grouped into a KNN graph, then (2) only part of it becomes a KG Skeleton via conventional GraphRAG, while (3) word and sentence tokenization builds a Text-Keyword bipartite graph linking keywords like Juliet, Romeo, and Hamlet to text chunks. In the retrieval and generation stage above, a query, a length budget, and the retrieval ratio theta feed (4) retrieval from both tiers, then (5) the merged context goes to the LLM to produce the final answer." /> </a> How thick the cheap tier can get is ultimately an empirical question, but the direction is clear: spreading the LLM uniformly across all of indexing was waste. The second prescription pushes the same observation to its limit — not using the LLM sparingly in indexing but removing it entirely. That's Microsoft's [**LazyGraphRAG**](https://www.microsoft.com/en-us/research/blog/lazygraphrag-setting-a-new-standard-for-quality-and-cost/) from November 2024. The inversion: don't use an LLM at indexing time. Capture structure cheaply with NLP noun phrase extraction and **defer LLM use to query time.** The numbers Microsoft published: @@ -343,8 +344,8 @@ The third prescription comes from academic follow-ups. Where the first two touch What original GraphRAG and the two follow-ups just described pick up from the same graph is compressed into one figure from the PathRAG paper. Red marks what actually enters the prompt. -<a href="https://arxiv.org/html/2502.14902v1/x1.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: Same graph, different retrieval scope — (a) GraphRAG takes whole communities, (b) LightRAG takes all neighbors of the query nodes, (c) PathRAG takes only the relational paths connecting them (source: Chen et al., PathRAG, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.14902v1/x1.png" alt="Graph diagram comparing retrieval scope across three methods. In (a) GraphRAG, entire community ellipses are shaded red, pulling information at community granularity. In (b) LightRAG, nearly all neighbor nodes attached to query-relevant nodes like plants, aphids, and device are selected in red. In (c) PathRAG, only the thick red paths connecting those same query nodes remain, while surrounding nodes like sun, water, and oak stay blue and excluded." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: Same graph, different retrieval scope — (a) GraphRAG takes whole communities, (b) LightRAG takes all neighbors of the query nodes, (c) PathRAG takes only the relational paths connecting them (source: Chen et al., PathRAG, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png" alt="Graph diagram comparing retrieval scope across three methods. In (a) GraphRAG, entire community ellipses are shaded red, pulling information at community granularity. In (b) LightRAG, nearly all neighbor nodes attached to query-relevant nodes like plants, aphids, and device are selected in red. In (c) PathRAG, only the thick red paths connecting those same query nodes remain, while surrounding nodes like sun, water, and oak stay blue and excluded." /> </a> Whole communities in (a), whole neighborhoods in (b), only paths in (c) — moving left to right, the tokens entering the prompt shrink, and this lineage's finding is that the shrunken side answers better. Once you've laid down a graph, the next fight isn't "what should we put in" but **"what can we leave out."** That said, cost coming down doesn't mean quality follows, and a bill that shifted from upfront to metered isn't always favorable — §7.5 revisits both calculations with independent numbers. @@ -619,8 +620,8 @@ More uncomfortable is the variance between models. Same corpus, same procedure, The paper patches this fragmentation with post-processing: splitting compound nodes that swallowed whole sentences, then grouping scattered fragments under higher-level concepts. How one sentence changes through that process is captured in the paper's first figure. Take a sentence reporting that TV viewing at 12 months is negatively associated with cognitive ability at 4.5 years. Initial extraction produces one compound node lumping the whole sentence together (association between … and …). Splitting decomposes it into individual entities, and abstraction groups them under higher concepts like infant media exposure to connect the scattered islands. The color coding marks what entity deduplication, pronoun resolution, and provenance tracking each contribute at every stage. -<a href="https://arxiv.org/html/2510.11297v1/x1.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: From compound nodes to splitting to higher-concept abstraction — how one sentence's triples change across three stages (source: Chen et al., Are Large Language Models Effective Knowledge Graph Constructors?, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2510.11297v1/x1.png" alt="Diagram of triple changes as one sentence passes through three stages. From the example sentence at the bottom, Initial Extraction produces an 'association between …' compound node lumping the whole sentence together; Splitting decomposes it into reference triples pointing at individual entities; and Abstraction produces is_an_instance_of triples grouping them under higher concepts like 'infant media exposure' and 'child cognitive development'. The legend at right marks green as entity deduplication, purple as pronoun resolution, and orange as provenance tracking." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: From compound nodes to splitting to higher-concept abstraction — how one sentence's triples change across three stages (source: Chen et al., Are Large Language Models Effective Knowledge Graph Constructors?, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png" alt="Diagram of triple changes as one sentence passes through three stages. From the example sentence at the bottom, Initial Extraction produces an 'association between …' compound node lumping the whole sentence together; Splitting decomposes it into reference triples pointing at individual entities; and Abstraction produces is_an_instance_of triples grouping them under higher concepts like 'infant media exposure' and 'child cognitive development'. The legend at right marks green as entity deduplication, purple as pronoun resolution, and orange as provenance tracking." /> </a> Here are the numbers after all three stages. Post-processing lifts every model's $$F_{GC}$$. But the gaps between models remain nearly intact. Initial extraction's 0.249–0.794 merely shifts to 0.441–0.927. @@ -660,8 +661,8 @@ The paper prescribes two remedies: route by query type, or integrate both result These outcomes mostly survive adding retrieval post-processing. The same evaluation crossed in two techniques. **Reranking** rescores retrieved chunks to change their order. **IRCoT** alternates retrieval and reasoning, asking after each round what else to look for given the evidence gathered so far, rather than answering in one shot. Both were applied, and the per-query-type advantages held. -<a href="https://arxiv.org/html/2502.11371v3/x1.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: QA performance by reasoning strategy (Rerank, Vanilla, IRCoT) — vector RAG leads on single-hop (NQ) and graph-based HippoRAG2 leads on multi-hop (MultiHop-RAG), regardless of strategy (source: Han et al., RAG vs. GraphRAG: A Systematic Evaluation and Key Insights, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.11371v3/x1.png" alt="Two line charts comparing QA performance by reasoning strategy. On the left, NQ (single-hop), vector RAG maintains the highest F1 across all three strategies (Rerank, Vanilla, IRCoT). On the right, MultiHop-RAG (multi-hop), graph-based HippoRAG2 is highest across all three. Changing strategy preserves the ordering among methods, except that MultiHop-RAG's Community-GraphRAG (Local) drops below Vanilla under IRCoT." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png" class="glightbox" data-gallery="ai-ready-data-en" data-glightbox="title: QA performance by reasoning strategy (Rerank, Vanilla, IRCoT) — vector RAG leads on single-hop (NQ) and graph-based HippoRAG2 leads on multi-hop (MultiHop-RAG), regardless of strategy (source: Han et al., RAG vs. GraphRAG: A Systematic Evaluation and Key Insights, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png" alt="Two line charts comparing QA performance by reasoning strategy. On the left, NQ (single-hop), vector RAG maintains the highest F1 across all three strategies (Rerank, Vanilla, IRCoT). On the right, MultiHop-RAG (multi-hop), graph-based HippoRAG2 is highest across all three. Changing strategy preserves the ordering among methods, except that MultiHop-RAG's Community-GraphRAG (Local) drops below Vanilla under IRCoT." /> </a> This figure shows one thing: the ordering flips between the two panels. On single-hop (NQ), vector RAG stays on top across all three strategies; on multi-hop (MultiHop-RAG), graph-based HippoRAG2 stays on top across all three. Post-processing can't change the ordering among methods. It merely lifts everyone's scores together, which means it won't substitute for choosing a method. diff --git a/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph.md b/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph.md index 5ab896b..4bbe937 100644 --- a/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph.md +++ b/_posts/2026-07-27-ai-ready-data-semantic-layer-knowledge-graph.md @@ -1,6 +1,7 @@ --- layout: post title: "데이터에 맥락을 새겨 넣는 법 — AI Ready Data, Semantic Layer, Knowledge Graph, Ontology" +seo_title: "데이터에 맥락을 새겨 넣는 법 — 시맨틱 레이어와 지식 그래프" description: >- 'AI-ready 데이터'는 깨끗한 데이터가 아니라 맥락을 기계가 실행할 수 있는 형태로 새겨 넣은 데이터입니다. 같은 스키마에서 text-to-SQL 정확도가 16.7%에서 54.2%로 오른 이유를 짚습니다. @@ -271,8 +272,8 @@ LLM으로 그래프를 자동 구축하는 파이프라인은 다섯 단계로 같은 뼈대를 학계 쪽 어휘로 그린 지도가 Peng et al. 서베이의 그림입니다. 인덱싱·검색·생성 사이에 축이 하나 더 놓여 있다는 게 요점입니다 — 검색 결과를 노드·트리플·경로·부분그래프 중 무엇으로 뽑을 것인가. §4.4에서 볼 LightRAG·PathRAG의 차이가 정확히 이 축에서 갈립니다. -<a href="https://arxiv.org/html/2408.08921v2/x2.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: GraphRAG 파이프라인의 학계 지도 — G-Indexing에서 G-Retrieval, 그리고 그래프 표현 형식을 거쳐 G-Generation으로 (출처: Peng et al., Graph Retrieval-Augmented Generation: A Survey, 2024, Figure 2)"> - <img src="https://arxiv.org/html/2408.08921v2/x2.png" alt="GraphRAG 파이프라인 도식. 왼쪽 아래 Graph Database와 G-Indexing에서 시작해 위쪽 G-Retrieval(질의 확장·분해, 검색기, 병합·가지치기)로 올라가고, 가운데 Retrieval Results 열에 노드·트리플·경로·부분그래프·혼합이 나열되며, Graph Format 열은 인접 테이블·자연어·코드 형태·구문 트리·노드 시퀀스·그래프 임베딩 중 하나로 변환한 뒤 오른쪽 G-Generation의 생성 전·중·후 보강 단계로 이어져 최종 응답을 만든다." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: GraphRAG 파이프라인의 학계 지도 — G-Indexing에서 G-Retrieval, 그리고 그래프 표현 형식을 거쳐 G-Generation으로 (출처: Peng et al., Graph Retrieval-Augmented Generation: A Survey, 2024, Figure 2)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png" alt="GraphRAG 파이프라인 도식. 왼쪽 아래 Graph Database와 G-Indexing에서 시작해 위쪽 G-Retrieval(질의 확장·분해, 검색기, 병합·가지치기)로 올라가고, 가운데 Retrieval Results 열에 노드·트리플·경로·부분그래프·혼합이 나열되며, Graph Format 열은 인접 테이블·자연어·코드 형태·구문 트리·노드 시퀀스·그래프 임베딩 중 하나로 변환한 뒤 오른쪽 G-Generation의 생성 전·중·후 보강 단계로 이어져 최종 응답을 만든다." /> </a> @@ -317,8 +318,8 @@ AWS 블로그에 실린 구성도가 이 관리형의 경계를 그대로 보여 첫째 처방은 $33,000을 추정한 KET-RAG 연구진이 내놨고, 그 구조가 논문의 인덱싱 그림에 담겨 있습니다. 코퍼스 전체를 LLM으로 훑는 대신 핵심 조각들만 기존 GraphRAG로 뽑아 **KG Skeleton**(골격 그래프)을 만듭니다. 나머지는 LLM 없이 단어를 토큰화해 텍스트-키워드 이분 그래프로 구성합니다. 질의 시점에는 두 층에서 각각 얼마씩 회수할지를 비율 $$\theta$$로 나눠 씁니다. 비싼 층은 얇게, 값싼 층은 두껍게 긁는 셈입니다. -<a href="https://arxiv.org/html/2502.09304v2/x1.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 비싼 층은 얇게, 값싼 층은 두껍게 — LLM으로 뽑은 KG 골격과 LLM 없이 깐 텍스트-키워드 이분 그래프를 겹쳐 인덱싱 비용을 낮춘다 (출처: Huang, Zhang, Xiao, KET-RAG, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.09304v2/x1.png" alt="KET-RAG 구조도. 아래 인덱싱 단계에서 입력 텍스트가 ① KNN 그래프로 묶인 뒤 ② 기존 GraphRAG로 일부만 KG Skeleton이 되고, ③ 단어·문장 토큰화로 Juliet·Romeo·Hamlet 같은 키워드와 텍스트 조각을 잇는 Text-Keyword 이분 그래프가 만들어진다. 위 검색·생성 단계에서는 질의와 길이 한도, 회수 비율 세타를 입력받아 ④ 두 층에서 각각 회수한 뒤 ⑤ 맥락을 합쳐 LLM에 넣고 최종 답을 만든다." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 비싼 층은 얇게, 값싼 층은 두껍게 — LLM으로 뽑은 KG 골격과 LLM 없이 깐 텍스트-키워드 이분 그래프를 겹쳐 인덱싱 비용을 낮춘다 (출처: Huang, Zhang, Xiao, KET-RAG, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png" alt="KET-RAG 구조도. 아래 인덱싱 단계에서 입력 텍스트가 ① KNN 그래프로 묶인 뒤 ② 기존 GraphRAG로 일부만 KG Skeleton이 되고, ③ 단어·문장 토큰화로 Juliet·Romeo·Hamlet 같은 키워드와 텍스트 조각을 잇는 Text-Keyword 이분 그래프가 만들어진다. 위 검색·생성 단계에서는 질의와 길이 한도, 회수 비율 세타를 입력받아 ④ 두 층에서 각각 회수한 뒤 ⑤ 맥락을 합쳐 LLM에 넣고 최종 답을 만든다." /> </a> 값싼 층을 어디까지 두껍게 해도 되는지는 결국 실측 문제지만, 방향은 분명합니다. LLM을 인덱싱 전 구간에 균일하게 뿌린 것이 낭비였습니다. 둘째 처방은 같은 관찰을 끝까지 밀어붙입니다. 인덱싱에서 LLM을 적게 쓰는 데 그치지 않고 아예 뺍니다. 2024년 11월 Microsoft의 [**LazyGraphRAG**](https://www.microsoft.com/en-us/research/blog/lazygraphrag-setting-a-new-standard-for-quality-and-cost/)입니다. 발상의 전환은 이렇습니다 — 인덱싱 시점에 LLM을 쓰지 말고, NLP 명사구 추출로 값싸게 구조만 잡은 뒤 **LLM 사용을 쿼리 시점으로 미룬다.** Microsoft가 공개한 결과는 다음과 같습니다. @@ -345,8 +346,8 @@ LazyGraphRAG의 발상을 조금 더 풀어 보면 왜 이게 통하는지 보 원조 GraphRAG와 방금 본 두 후속(LightRAG·PathRAG)이 같은 그래프에서 무엇을 집어 오는지를 PathRAG 논문의 그림 하나가 압축해 보여 줍니다. 빨간색이 프롬프트에 실제로 들어가는 부분입니다. -<a href="https://arxiv.org/html/2502.14902v1/x1.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 같은 그래프, 다른 회수 범위 — (a) GraphRAG는 커뮤니티 전체를, (b) LightRAG는 질의 노드의 이웃 전부를, (c) PathRAG는 질의 노드를 잇는 관계 경로만 프롬프트에 넣는다 (출처: Chen et al., PathRAG, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.14902v1/x1.png" alt="세 방식의 회수 범위를 비교한 그래프 도식. (a) GraphRAG는 커뮤니티 타원 전체가 빨갛게 칠해져 커뮤니티 단위로 정보를 가져오고, (b) LightRAG는 plants·aphids·device 같은 질의 관련 노드에 붙은 이웃 노드가 거의 다 빨갛게 선택되며, (c) PathRAG는 같은 질의 노드들을 잇는 굵은 빨간 경로만 남고 sun·water·oak 같은 주변 노드는 파란색으로 제외된다." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 같은 그래프, 다른 회수 범위 — (a) GraphRAG는 커뮤니티 전체를, (b) LightRAG는 질의 노드의 이웃 전부를, (c) PathRAG는 질의 노드를 잇는 관계 경로만 프롬프트에 넣는다 (출처: Chen et al., PathRAG, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png" alt="세 방식의 회수 범위를 비교한 그래프 도식. (a) GraphRAG는 커뮤니티 타원 전체가 빨갛게 칠해져 커뮤니티 단위로 정보를 가져오고, (b) LightRAG는 plants·aphids·device 같은 질의 관련 노드에 붙은 이웃 노드가 거의 다 빨갛게 선택되며, (c) PathRAG는 같은 질의 노드들을 잇는 굵은 빨간 경로만 남고 sun·water·oak 같은 주변 노드는 파란색으로 제외된다." /> </a> (a)는 커뮤니티 전체를, (b)는 이웃 전체를, (c)는 경로만 사용합니다. 왼쪽에서 오른쪽으로 갈수록 프롬프트에 들어가는 토큰이 줄어듭니다. 두 연구 모두 토큰을 적게 넣은 쪽이 답을 더 잘 맞혔다고 보고합니다. 그래프를 놓고 나면 다음 싸움은 "무엇을 넣을까"가 아니라 **"무엇을 빼도 되는가"**가 됩니다. 다만 비용이 내렸다는 게 품질까지 따라온다는 뜻은 아니고, 선불에서 종량으로 바뀐 청구서가 늘 유리하다는 뜻도 아닙니다 — 두 셈 모두 §7.5에서 독립 평가 수치로 다시 따집니다. @@ -624,8 +625,8 @@ $$\mathrm{score}(d) = \sum_{r} \frac{w_r}{60 + \mathrm{rank}_r(d)}$$ 논문은 이 흩어짐을 후처리로 메웁니다. 문장을 통째로 삼킨 덩어리(compound) 노드를 쪼개고, 흩어진 조각들을 상위 개념으로 묶는 두 단계입니다. 한 문장이 그 과정을 거치며 어떻게 달라지는지가 논문의 첫 그림에 그대로 담겨 있습니다. 생후 12개월 TV 시청이 4.5세 인지능력과 음의 상관을 보인다는 문장을 놓고, 초기 추출은 문장 전체를 뭉친 덩어리 노드(association between … and …) 하나를 만들어 버립니다. 쪼개기(splitting)가 그걸 개별 엔티티로 분해하고, 추상화(abstraction)가 유아 미디어 노출 같은 상위 개념으로 묶어 흩어진 섬들을 잇습니다. 색으로 표시된 엔티티 중복 제거·대명사 해소·출처 추적이 각 단계에서 하는 일입니다. -<a href="https://arxiv.org/html/2510.11297v1/x1.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 덩어리 노드에서 쪼개기, 그리고 상위 개념 추상화까지 — 한 문장이 세 단계를 거치며 트리플이 달라진다 (출처: Chen et al., Are Large Language Models Effective Knowledge Graph Constructors?, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2510.11297v1/x1.png" alt="한 문장이 세 단계를 거치는 트리플 변화 도식. 맨 아래 예시 문장에서 초기 추출(Initial Extraction)은 문장 전체를 뭉친 'association between …' 덩어리 노드를 만들고, 쪼개기(Splitting)는 그것을 개별 엔티티를 가리키는 reference 트리플들로 분해하며, 추상화(Abstraction)는 'infant media exposure'·'child cognitive development' 같은 상위 개념으로 묶는 is_an_instance_of 트리플을 만든다. 오른쪽 범례는 초록이 엔티티 중복 제거, 보라가 대명사 해소, 주황이 출처 추적임을 표시한다." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 덩어리 노드에서 쪼개기, 그리고 상위 개념 추상화까지 — 한 문장이 세 단계를 거치며 트리플이 달라진다 (출처: Chen et al., Are Large Language Models Effective Knowledge Graph Constructors?, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png" alt="한 문장이 세 단계를 거치는 트리플 변화 도식. 맨 아래 예시 문장에서 초기 추출(Initial Extraction)은 문장 전체를 뭉친 'association between …' 덩어리 노드를 만들고, 쪼개기(Splitting)는 그것을 개별 엔티티를 가리키는 reference 트리플들로 분해하며, 추상화(Abstraction)는 'infant media exposure'·'child cognitive development' 같은 상위 개념으로 묶는 is_an_instance_of 트리플을 만든다. 오른쪽 범례는 초록이 엔티티 중복 제거, 보라가 대명사 해소, 주황이 출처 추적임을 표시한다." /> </a> 세 단계를 다 거친 뒤의 숫자는 이렇습니다. 후처리는 모든 모델의 $$F_{GC}$$를 끌어올립니다. 그런데 모델 사이의 격차는 거의 그대로 남습니다. 초기 추출의 0.249~0.794가 후처리 후 0.441~0.927로 옮겨 갈 뿐입니다. @@ -665,8 +666,8 @@ $$\mathrm{score}(d) = \sum_{r} \frac{w_r}{60 + \mathrm{rank}_r(d)}$$ 이 승패는 검색 후처리를 얹어도 대체로 뒤집히지 않습니다. 같은 평가가 후처리 두 가지까지 교차해 봤습니다. **재순위화(reranking)**는 회수한 조각을 다시 점수 매겨 순서를 바꿉니다. **IRCoT**는 한 번에 답하지 않고, 지금까지 모은 근거로 다음에 무엇을 더 찾아야 하는지를 되물으며 검색과 추론을 번갈아 돌립니다. 둘 다 얹어 봤지만 질의 유형별 우위 관계는 그대로였습니다. -<a href="https://arxiv.org/html/2502.11371v3/x1.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 추론 전략(Rerank · Vanilla · IRCoT)별 QA 성능 — 단일 홉(NQ)에서는 벡터 RAG가, 멀티홉(MultiHop-RAG)에서는 그래프 기반 HippoRAG2가 전략과 무관하게 앞선다 (출처: Han et al., RAG vs. GraphRAG: A Systematic Evaluation and Key Insights, 2025, Figure 1)"> - <img src="https://arxiv.org/html/2502.11371v3/x1.png" alt="추론 전략별 QA 성능을 비교한 두 개의 꺾은선 그래프. 왼쪽 NQ(단일 홉)에서는 Rerank·Vanilla·IRCoT 세 전략 모두에서 벡터 RAG가 가장 높은 F1을 유지하고, 오른쪽 MultiHop-RAG(멀티홉)에서는 그래프 기반 HippoRAG2가 세 전략 모두에서 가장 높다. 전략을 바꿔도 방법 사이의 순서는 유지되지만, MultiHop-RAG의 Community-GraphRAG(Local)만 IRCoT에서 Vanilla보다 낮게 떨어진다." /> +<a href="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png" class="glightbox" data-gallery="ai-ready-data" data-glightbox="title: 추론 전략(Rerank · Vanilla · IRCoT)별 QA 성능 — 단일 홉(NQ)에서는 벡터 RAG가, 멀티홉(MultiHop-RAG)에서는 그래프 기반 HippoRAG2가 전략과 무관하게 앞선다 (출처: Han et al., RAG vs. GraphRAG: A Systematic Evaluation and Key Insights, 2025, Figure 1)"> + <img src="/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png" alt="추론 전략별 QA 성능을 비교한 두 개의 꺾은선 그래프. 왼쪽 NQ(단일 홉)에서는 Rerank·Vanilla·IRCoT 세 전략 모두에서 벡터 RAG가 가장 높은 F1을 유지하고, 오른쪽 MultiHop-RAG(멀티홉)에서는 그래프 기반 HippoRAG2가 세 전략 모두에서 가장 높다. 전략을 바꿔도 방법 사이의 순서는 유지되지만, MultiHop-RAG의 Community-GraphRAG(Local)만 IRCoT에서 Vanilla보다 낮게 떨어진다." /> </a> 이 그림이 보여 주는 건 하나입니다. 두 패널의 순서가 서로 뒤집혀 있습니다. 단일 홉(NQ)에서는 벡터 RAG가 세 전략 내내 맨 위에 있고, 멀티홉(MultiHop-RAG)에서는 그래프를 쓰는 HippoRAG2가 세 전략 내내 맨 위에 있습니다. 후처리는 방법 사이의 순서를 바꾸지 못하고 각자의 점수를 함께 밀어 올리는 데 그칩니다. 방법 선택을 대신해 주지는 못한다는 뜻입니다. diff --git a/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png new file mode 100644 index 0000000..753119c Binary files /dev/null and b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-1.png differ diff --git a/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png new file mode 100644 index 0000000..851d2ed Binary files /dev/null and b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-2.png differ diff --git a/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png new file mode 100644 index 0000000..66c0b31 Binary files /dev/null and b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-3.png differ diff --git a/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png new file mode 100644 index 0000000..e864ded Binary files /dev/null and b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-4.png differ diff --git a/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png new file mode 100644 index 0000000..a7d9a2f Binary files /dev/null and b/assets/images/ai-ready-data-semantic-layer-knowledge-graph-5.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-1.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-1.png new file mode 100644 index 0000000..6eb133a Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-1.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-2.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-2.png new file mode 100644 index 0000000..8fc7a97 Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-2.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-3.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-3.png new file mode 100644 index 0000000..d4983a1 Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-3.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-4.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-4.png new file mode 100644 index 0000000..55d8771 Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-4.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-5.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-5.png new file mode 100644 index 0000000..b3d2e31 Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-5.png differ diff --git a/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-6.png b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-6.png new file mode 100644 index 0000000..6ac546c Binary files /dev/null and b/assets/images/deepseek-coder-when-the-large-language-model-meets-programming-the-rise-of-code-intelligence-6.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-1.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-1.png new file mode 100644 index 0000000..cdb2852 Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-1.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-2.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-2.png new file mode 100644 index 0000000..b64711c Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-2.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-3.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-3.png new file mode 100644 index 0000000..7007bbd Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-3.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-4.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-4.png new file mode 100644 index 0000000..3b33b0f Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-4.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-5.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-5.png new file mode 100644 index 0000000..3bb88d5 Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-5.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-6.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-6.png new file mode 100644 index 0000000..709b0cc Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-6.png differ diff --git a/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-7.png b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-7.png new file mode 100644 index 0000000..4e3e377 Binary files /dev/null and b/assets/images/deepseek-llm-scaling-open-source-language-models-with-longtermism-7.png differ diff --git a/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-1.png b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-1.png new file mode 100644 index 0000000..1a88856 Binary files /dev/null and b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-1.png differ diff --git a/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-2.png b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-2.png new file mode 100644 index 0000000..964a7a4 Binary files /dev/null and b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-2.png differ diff --git a/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-3.png b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-3.png new file mode 100644 index 0000000..0f23557 Binary files /dev/null and b/assets/images/deepseek-r1--incentivizing-reasoning-capability-in-llms-via-reinforcement-learning-3.png differ diff --git a/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-1.png b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-1.png new file mode 100644 index 0000000..c16716b Binary files /dev/null and b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-1.png differ diff --git a/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-2.png b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-2.png new file mode 100644 index 0000000..56f59db Binary files /dev/null and b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-2.png differ diff --git a/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-3.png b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-3.png new file mode 100644 index 0000000..bc64486 Binary files /dev/null and b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-3.png differ diff --git a/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-4.png b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-4.png new file mode 100644 index 0000000..e92b31c Binary files /dev/null and b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-4.png differ diff --git a/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-5.png b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-5.png new file mode 100644 index 0000000..1127c4b Binary files /dev/null and b/assets/images/deepseek-v2--a-strong--economical--and-efficient-mixture-of-experts-language-model-5.png differ diff --git a/assets/images/deepseek-v3-technical-report-1.png b/assets/images/deepseek-v3-technical-report-1.png new file mode 100644 index 0000000..87f2f99 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-1.png differ diff --git a/assets/images/deepseek-v3-technical-report-10.png b/assets/images/deepseek-v3-technical-report-10.png new file mode 100644 index 0000000..6ceef87 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-10.png differ diff --git a/assets/images/deepseek-v3-technical-report-11.png b/assets/images/deepseek-v3-technical-report-11.png new file mode 100644 index 0000000..e6eb8ac Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-11.png differ diff --git a/assets/images/deepseek-v3-technical-report-2.png b/assets/images/deepseek-v3-technical-report-2.png new file mode 100644 index 0000000..2aa8894 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-2.png differ diff --git a/assets/images/deepseek-v3-technical-report-3.png b/assets/images/deepseek-v3-technical-report-3.png new file mode 100644 index 0000000..4477671 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-3.png differ diff --git a/assets/images/deepseek-v3-technical-report-4.png b/assets/images/deepseek-v3-technical-report-4.png new file mode 100644 index 0000000..ee73fdd Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-4.png differ diff --git a/assets/images/deepseek-v3-technical-report-5.png b/assets/images/deepseek-v3-technical-report-5.png new file mode 100644 index 0000000..3db496e Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-5.png differ diff --git a/assets/images/deepseek-v3-technical-report-6.png b/assets/images/deepseek-v3-technical-report-6.png new file mode 100644 index 0000000..68ae053 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-6.png differ diff --git a/assets/images/deepseek-v3-technical-report-7.png b/assets/images/deepseek-v3-technical-report-7.png new file mode 100644 index 0000000..a3d0d42 Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-7.png differ diff --git a/assets/images/deepseek-v3-technical-report-8.png b/assets/images/deepseek-v3-technical-report-8.png new file mode 100644 index 0000000..9be76eb Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-8.png differ diff --git a/assets/images/deepseek-v3-technical-report-9.png b/assets/images/deepseek-v3-technical-report-9.png new file mode 100644 index 0000000..2cf21cc Binary files /dev/null and b/assets/images/deepseek-v3-technical-report-9.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-1.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-1.png new file mode 100644 index 0000000..4d051f8 Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-1.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-2.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-2.png new file mode 100644 index 0000000..42183de Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-2.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-3.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-3.png new file mode 100644 index 0000000..02a8b6e Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-3.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-4.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-4.png new file mode 100644 index 0000000..f434b17 Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-4.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-5.jpg b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-5.jpg new file mode 100644 index 0000000..17a52cc Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-5.jpg differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-6.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-6.png new file mode 100644 index 0000000..325b345 Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-6.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-7.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-7.png new file mode 100644 index 0000000..aeef98a Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-7.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-8.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-8.png new file mode 100644 index 0000000..bd6feea Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-8.png differ diff --git a/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-9.png b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-9.png new file mode 100644 index 0000000..bc2d0b5 Binary files /dev/null and b/assets/images/deepseek-v3.2--pushing-the-frontier-of-open-large-language-models-9.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-1.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-1.png new file mode 100644 index 0000000..8ec410a Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-1.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-2.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-2.png new file mode 100644 index 0000000..eef45b6 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-2.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-3.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-3.png new file mode 100644 index 0000000..8433477 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-3.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-4.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-4.png new file mode 100644 index 0000000..2efcfe7 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-4.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-5.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-5.png new file mode 100644 index 0000000..ff1de46 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-5.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-6.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-6.png new file mode 100644 index 0000000..ae73568 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-6.png differ diff --git a/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-7.png b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-7.png new file mode 100644 index 0000000..1fe22f2 Binary files /dev/null and b/assets/images/deepseekmath-pushing-the-limits-of-mathematical-reasoning-in-open-language-models-7.png differ diff --git a/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-1.png b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-1.png new file mode 100644 index 0000000..8e3e34d Binary files /dev/null and b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-1.png differ diff --git a/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-2.png b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-2.png new file mode 100644 index 0000000..7fdb9ba Binary files /dev/null and b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-2.png differ diff --git a/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-3.png b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-3.png new file mode 100644 index 0000000..199e40f Binary files /dev/null and b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-3.png differ diff --git a/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-4.png b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-4.png new file mode 100644 index 0000000..07b1f08 Binary files /dev/null and b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-4.png differ diff --git a/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-5.png b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-5.png new file mode 100644 index 0000000..220d7b4 Binary files /dev/null and b/assets/images/deepseekmoe-towards-ultimate-expert-specialization-in-mixture-of-experts-language-models-5.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-1.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-1.png new file mode 100644 index 0000000..c83a0a5 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-1.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-2.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-2.png new file mode 100644 index 0000000..d78acd4 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-2.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-3.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-3.png new file mode 100644 index 0000000..58dd529 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-3.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-4.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-4.png new file mode 100644 index 0000000..cfcee7f Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-4.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-5.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-5.png new file mode 100644 index 0000000..0590d66 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-5.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-6.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-6.png new file mode 100644 index 0000000..dd461d7 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-6.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-7.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-7.png new file mode 100644 index 0000000..887ff09 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-7.png differ diff --git a/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-8.png b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-8.png new file mode 100644 index 0000000..b5398a6 Binary files /dev/null and b/assets/images/direct-preference-optimization--your-language-model-is-secretly-a-reward-model-8.png differ diff --git a/assets/images/gemma-2--improving-open-language-models-at-a-practical-size-1.png b/assets/images/gemma-2--improving-open-language-models-at-a-practical-size-1.png new file mode 100644 index 0000000..03b7292 Binary files /dev/null and b/assets/images/gemma-2--improving-open-language-models-at-a-practical-size-1.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-1.png b/assets/images/kimi-k2--open-agentic-intelligence-1.png new file mode 100644 index 0000000..4f91652 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-1.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-10.png b/assets/images/kimi-k2--open-agentic-intelligence-10.png new file mode 100644 index 0000000..8e6c30c Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-10.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-11.png b/assets/images/kimi-k2--open-agentic-intelligence-11.png new file mode 100644 index 0000000..ed8a864 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-11.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-12.png b/assets/images/kimi-k2--open-agentic-intelligence-12.png new file mode 100644 index 0000000..d33f821 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-12.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-13.png b/assets/images/kimi-k2--open-agentic-intelligence-13.png new file mode 100644 index 0000000..9967246 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-13.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-14.png b/assets/images/kimi-k2--open-agentic-intelligence-14.png new file mode 100644 index 0000000..11a702e Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-14.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-15.png b/assets/images/kimi-k2--open-agentic-intelligence-15.png new file mode 100644 index 0000000..2309ccc Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-15.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-16.png b/assets/images/kimi-k2--open-agentic-intelligence-16.png new file mode 100644 index 0000000..db5edd5 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-16.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-2.png b/assets/images/kimi-k2--open-agentic-intelligence-2.png new file mode 100644 index 0000000..5fb4699 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-2.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-3.png b/assets/images/kimi-k2--open-agentic-intelligence-3.png new file mode 100644 index 0000000..fba5774 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-3.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-4.png b/assets/images/kimi-k2--open-agentic-intelligence-4.png new file mode 100644 index 0000000..65fe5a0 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-4.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-5.png b/assets/images/kimi-k2--open-agentic-intelligence-5.png new file mode 100644 index 0000000..4670329 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-5.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-6.png b/assets/images/kimi-k2--open-agentic-intelligence-6.png new file mode 100644 index 0000000..c4d9f52 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-6.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-7.png b/assets/images/kimi-k2--open-agentic-intelligence-7.png new file mode 100644 index 0000000..e070c47 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-7.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-8.png b/assets/images/kimi-k2--open-agentic-intelligence-8.png new file mode 100644 index 0000000..ba943a9 Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-8.png differ diff --git a/assets/images/kimi-k2--open-agentic-intelligence-9.png b/assets/images/kimi-k2--open-agentic-intelligence-9.png new file mode 100644 index 0000000..9e8425a Binary files /dev/null and b/assets/images/kimi-k2--open-agentic-intelligence-9.png differ diff --git a/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-1.png b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-1.png new file mode 100644 index 0000000..7e02051 Binary files /dev/null and b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-1.png differ diff --git a/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-2.png b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-2.png new file mode 100644 index 0000000..da58af2 Binary files /dev/null and b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-2.png differ diff --git a/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-3.png b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-3.png new file mode 100644 index 0000000..7e02051 Binary files /dev/null and b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-3.png differ diff --git a/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-4.png b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-4.png new file mode 100644 index 0000000..9b8183a Binary files /dev/null and b/assets/images/llama-2-open-foundation-and-fine-tuned-chat-models-4.png differ diff --git a/assets/images/mistral-7b-1.png b/assets/images/mistral-7b-1.png new file mode 100644 index 0000000..1f57691 Binary files /dev/null and b/assets/images/mistral-7b-1.png differ diff --git a/assets/images/mistral-7b-2.png b/assets/images/mistral-7b-2.png new file mode 100644 index 0000000..be63206 Binary files /dev/null and b/assets/images/mistral-7b-2.png differ diff --git a/assets/images/mistral-7b-3.png b/assets/images/mistral-7b-3.png new file mode 100644 index 0000000..fe1df3d Binary files /dev/null and b/assets/images/mistral-7b-3.png differ diff --git a/assets/images/mixtral-of-experts-1.png b/assets/images/mixtral-of-experts-1.png new file mode 100644 index 0000000..8f0ebf6 Binary files /dev/null and b/assets/images/mixtral-of-experts-1.png differ diff --git a/assets/images/mixtral-of-experts-2.png b/assets/images/mixtral-of-experts-2.png new file mode 100644 index 0000000..f13b438 Binary files /dev/null and b/assets/images/mixtral-of-experts-2.png differ diff --git a/assets/images/mixtral-of-experts-3.png b/assets/images/mixtral-of-experts-3.png new file mode 100644 index 0000000..9e29fe0 Binary files /dev/null and b/assets/images/mixtral-of-experts-3.png differ diff --git a/assets/images/mixtral-of-experts-4.png b/assets/images/mixtral-of-experts-4.png new file mode 100644 index 0000000..6494e2d Binary files /dev/null and b/assets/images/mixtral-of-experts-4.png differ diff --git a/assets/images/mixtral-of-experts-5.png b/assets/images/mixtral-of-experts-5.png new file mode 100644 index 0000000..d4fa78a Binary files /dev/null and b/assets/images/mixtral-of-experts-5.png differ diff --git a/assets/images/mixtral-of-experts-6.png b/assets/images/mixtral-of-experts-6.png new file mode 100644 index 0000000..b1b1ac9 Binary files /dev/null and b/assets/images/mixtral-of-experts-6.png differ diff --git a/assets/images/mixtral-of-experts-7.png b/assets/images/mixtral-of-experts-7.png new file mode 100644 index 0000000..f95270c Binary files /dev/null and b/assets/images/mixtral-of-experts-7.png differ diff --git a/assets/images/pixtral-12b-1.png b/assets/images/pixtral-12b-1.png new file mode 100644 index 0000000..ae8b790 Binary files /dev/null and b/assets/images/pixtral-12b-1.png differ diff --git a/assets/images/pixtral-12b-10.png b/assets/images/pixtral-12b-10.png new file mode 100644 index 0000000..6bf54ea Binary files /dev/null and b/assets/images/pixtral-12b-10.png differ diff --git a/assets/images/pixtral-12b-11.png b/assets/images/pixtral-12b-11.png new file mode 100644 index 0000000..a762e5d Binary files /dev/null and b/assets/images/pixtral-12b-11.png differ diff --git a/assets/images/pixtral-12b-12.png b/assets/images/pixtral-12b-12.png new file mode 100644 index 0000000..56c2463 Binary files /dev/null and b/assets/images/pixtral-12b-12.png differ diff --git a/assets/images/pixtral-12b-13.png b/assets/images/pixtral-12b-13.png new file mode 100644 index 0000000..578bfce Binary files /dev/null and b/assets/images/pixtral-12b-13.png differ diff --git a/assets/images/pixtral-12b-2.png b/assets/images/pixtral-12b-2.png new file mode 100644 index 0000000..7d0fc93 Binary files /dev/null and b/assets/images/pixtral-12b-2.png differ diff --git a/assets/images/pixtral-12b-3.png b/assets/images/pixtral-12b-3.png new file mode 100644 index 0000000..c3a4cc2 Binary files /dev/null and b/assets/images/pixtral-12b-3.png differ diff --git a/assets/images/pixtral-12b-4.png b/assets/images/pixtral-12b-4.png new file mode 100644 index 0000000..fbccf9d Binary files /dev/null and b/assets/images/pixtral-12b-4.png differ diff --git a/assets/images/pixtral-12b-5.png b/assets/images/pixtral-12b-5.png new file mode 100644 index 0000000..b604a39 Binary files /dev/null and b/assets/images/pixtral-12b-5.png differ diff --git a/assets/images/pixtral-12b-6.png b/assets/images/pixtral-12b-6.png new file mode 100644 index 0000000..16e7ada Binary files /dev/null and b/assets/images/pixtral-12b-6.png differ diff --git a/assets/images/pixtral-12b-7.png b/assets/images/pixtral-12b-7.png new file mode 100644 index 0000000..98efe1e Binary files /dev/null and b/assets/images/pixtral-12b-7.png differ diff --git a/assets/images/pixtral-12b-8.png b/assets/images/pixtral-12b-8.png new file mode 100644 index 0000000..b698242 Binary files /dev/null and b/assets/images/pixtral-12b-8.png differ diff --git a/assets/images/pixtral-12b-9.png b/assets/images/pixtral-12b-9.png new file mode 100644 index 0000000..908b7f2 Binary files /dev/null and b/assets/images/pixtral-12b-9.png differ diff --git a/assets/images/qwen3-technical-report-1.png b/assets/images/qwen3-technical-report-1.png new file mode 100644 index 0000000..ba782c2 Binary files /dev/null and b/assets/images/qwen3-technical-report-1.png differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-1.png b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-1.png new file mode 100644 index 0000000..e7f148a Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-1.png differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-2.jpg b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-2.jpg new file mode 100644 index 0000000..0fad5ae Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-2.jpg differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3.png b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3.png new file mode 100644 index 0000000..2c22b62 Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3.png differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-4.jpg b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-4.jpg new file mode 100644 index 0000000..109bc24 Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-4.jpg differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-5.jpg b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-5.jpg new file mode 100644 index 0000000..e1cdd6e Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-5.jpg differ diff --git a/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-6.png b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-6.png new file mode 100644 index 0000000..f00d908 Binary files /dev/null and b/assets/images/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-6.png differ diff --git a/docs/architecture.md b/docs/architecture.md index 533948f..6df5656 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -302,7 +302,9 @@ checks. Five layers, each catching what the others cannot: -1. **Unit tests** (`test/`): plugin functions and the lint, without a site. +1. **Unit tests** (`test/`): plugin functions and the lint, without a site; + `test/js/` tests the search script's matching and ranking in node + (`node --test 'test/js/*.test.js'`, no packages). 2. **Source lint** (`script/lint-posts.rb`): front matter against `_data/post_conventions.yml`, plus Markdown defects the built HTML no longer shows (broken tables, unsafe math, text read as Liquid or HTML, bad fences). diff --git a/docs/writing.md b/docs/writing.md index 51d8979..388a95b 100644 --- a/docs/writing.md +++ b/docs/writing.md @@ -55,7 +55,7 @@ subtitle: "<one-line pitch>" # paper posts: required, not the title; else date: YYYY-MM-DD HH:MM:SS # paper posts: the paper's date; else the posting date paper_author: "<Org>" # the paper's org, not people; paper posts only paper_doi: "10.48550/arXiv.<id>" # optional, paper posts only: the citation count in the meta panel (docs/architecture.md) -seo_title: "<shorter title>" # optional: for <title> when the title is too long +seo_title: "<shorter title>" # required when the title is over seo_title_max_length (70); for <title> description: >- # optional, plain text; see below <search snippet, ~150 chars> categories: ["<Type>", "<Topic>"] @@ -76,7 +76,10 @@ translation_id: <shared-slug> # on both posts of a ko/en pair "Paper by …". - **`<title>`.** A paper post's `<title>` is its title (or `seo_title`) plus "논문 리뷰" / "논문 요약", the words a Korean reader searches with. English - twins and social cards keep the plain title. + twins and social cards keep the plain title. A title over + `seo_title_max_length` (70 characters, in the conventions) needs a shorter + `seo_title`, which the lint holds to the same limit: search results cut a + longer one. - **`cover`** is not free: see [covers](#categories-urls-and-covers). ## Dates @@ -205,9 +208,12 @@ Write `$$…$$` for inline and display math alike, and set `use_math: true`. license and a link when the license asks for one (CC BY does), as an italic line right under the image: `*Figure: Yao et al., [Tree of Thoughts](https://arxiv.org/abs/2305.10601) (2023), Figure 1. [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).*` - For your own drawing after someone else's, say so (`*Redrawn after Yao et al., 2022.*`). When - hotlinking an arXiv figure, prefer a pinned version (`arxiv.org/html/<id>v1/…`): - a revision can renumber the figures. + For your own drawing after someone else's, say so (`*Redrawn after Yao et al., 2022.*`). +- A paper's figure from arXiv is stored, not hotlinked: save it as + `/assets/images/<slug>-<n>.<ext>`, the name scholar-lens gives it (the lint + rejects an arXiv image URL). An arXiv link rots when a revision renumbers the + figures, and a remote image gets no width/height, so the page jumps as it + loads. Any other site's image is its owner's and stays a link to it. - Diagrams are drawn in Excalidraw (`.excalidraw` beside the PNG; the sources are excluded from the site). `assets/images/render-diagrams.sh` renders them. Write ASCII arrows (`->`) in diagram text: Excalifont has no `→`, and one such diff --git a/js/search.js b/js/search.js index 32d5f36..ef3353b 100644 --- a/js/search.js +++ b/js/search.js @@ -17,11 +17,6 @@ (function () { 'use strict'; - var searchInput = document.getElementById('search-input'); - var resultsContainer = document.getElementById('results-container'); - var statusEl = document.getElementById('search-status'); - if (!searchInput || !resultsContainer || !statusEl) return; - var LIMIT = 10; // results shown at first, and added by "Show more" var WINDOW_CHARS = 220; // length of the excerpt shown var LEAD_CHARS = 60; // run-up kept before the first match, for context @@ -32,11 +27,6 @@ var WEIGHTS = { title: 8, tags: 4, category: 2, body: 1 }; var BODY_CAP = 20; - function queryWords() { - // Every word must appear; the highlight marks the same words. - return searchInput.value.trim().toLowerCase().split(/\s+/).filter(Boolean); - } - var ESCAPES = { '&': '&', '<': '<', '>': '>', '"': '"' }; function escapeHtml(text) { return text.replace(/[&<>"]/g, function (c) { return ESCAPES[c]; }); @@ -151,26 +141,6 @@ (bounds.end < text.length ? '…' : ''); } - // The query in the address bar (?q=), so a search can be shared and survives - // going back to it. - // Debounced: Safari throws after 100 replaceState calls in 30 seconds. - var syncTimer = null; - function writeUrl() { - clearTimeout(syncTimer); - syncTimer = null; - var url = new URL(window.location.href); - var query = searchInput.value.trim(); - if (query) url.searchParams.set('q', query); else url.searchParams.delete('q'); - try { history.replaceState(null, '', url); } catch (e) {} - } - function syncUrl() { - clearTimeout(syncTimer); - syncTimer = setTimeout(writeUrl, 400); - } - // Leaving before the wait is over (a result clicked straight after typing) - // still records the query, so Back returns to it. - window.addEventListener('pagehide', function () { if (syncTimer !== null) writeUrl(); }); - // Up to BODY_CAP occurrences of `word` in `text` (both lowercase). function occurrences(text, word) { var n = 0; @@ -199,23 +169,20 @@ return total; } - var docs = []; // The index lowercased once, in its order (newest first), for matching. function prepare(index) { - docs = index.map(function (post, order) { + return index.map(function (post, order) { var lower = function (v) { return String(v == null ? '' : v).toLowerCase(); }; return { post: post, order: order, title: lower(post.title), tags: lower(post.tags), category: lower(post.category), content: lower(post.content) }; }); } - // The site's language (site.lang): of a translation pair that both match, the - // post in it is shown, at the better score of the two; the twin only when it - // alone matches (an English query the Korean original lacks). - var SITE_LANG = searchInput.getAttribute('data-site-lang'); - - // Matching posts, best first, newest first on a tie; a pair counts once. - function rank(words) { + // Matching posts, best first, newest first on a tie. A translation pair + // counts once: of a pair that both match, the post in `siteLang` is shown, at + // the better score of the two; the twin only when it alone matches (an + // English query the Korean original lacks). + function rank(docs, words, siteLang) { var matched = docs .map(function (doc) { return { doc: doc, score: score(doc, words) }; }) .filter(function (r) { return r.score > 0; }); @@ -225,7 +192,7 @@ if (!pair) return; var kept = pairs[pair]; if (!kept) { pairs[pair] = r; return; } - var mine = r.doc.post.lang === SITE_LANG; + var mine = r.doc.post.lang === siteLang; var best = Math.max(kept.score, r.score); if (mine) { r.score = best; pairs[pair] = r; } else { kept.score = best; } }); @@ -247,6 +214,46 @@ '</div>'; } + // test/js/search.test.js loads the functions above in node. + if (typeof module === 'object' && module.exports) { + module.exports = { prepare: prepare, rank: rank, score: score, excerpt: excerpt, mark: mark, + resultHtml: resultHtml, WEIGHTS: WEIGHTS }; + return; + } + + var searchInput = document.getElementById('search-input'); + var resultsContainer = document.getElementById('results-container'); + var statusEl = document.getElementById('search-status'); + if (!searchInput || !resultsContainer || !statusEl) return; + + function queryWords() { + // Every word must appear; the highlight marks the same words. + return searchInput.value.trim().toLowerCase().split(/\s+/).filter(Boolean); + } + + // The query in the address bar (?q=), so a search can be shared and survives + // going back to it. + // Debounced: Safari throws after 100 replaceState calls in 30 seconds. + var syncTimer = null; + function writeUrl() { + clearTimeout(syncTimer); + syncTimer = null; + var url = new URL(window.location.href); + var query = searchInput.value.trim(); + if (query) url.searchParams.set('q', query); else url.searchParams.delete('q'); + try { history.replaceState(null, '', url); } catch (e) {} + } + function syncUrl() { + clearTimeout(syncTimer); + syncTimer = setTimeout(writeUrl, 400); + } + // Leaving before the wait is over (a result clicked straight after typing) + // still records the query, so Back returns to it. + window.addEventListener('pagehide', function () { if (syncTimer !== null) writeUrl(); }); + + var SITE_LANG = searchInput.getAttribute('data-site-lang'); // site.lang + var docs = []; + var results = []; var shown = LIMIT; @@ -286,7 +293,7 @@ statusEl.textContent = ''; return; } - results = rank(words); + results = rank(docs, words, SITE_LANG); draw(words); } @@ -316,7 +323,7 @@ return response.json(); }) .then(function (index) { - prepare(index); + docs = prepare(index); ready = true; statusEl.textContent = ''; if (searchInput.value.trim()) run(); diff --git a/script/lint-posts.rb b/script/lint-posts.rb index 5d00075..46ebce8 100644 --- a/script/lint-posts.rb +++ b/script/lint-posts.rb @@ -40,7 +40,22 @@ def self.slug(post) # Returns findings as "line: message" strings; empty when the post passes. def self.check(post, spec) - front_matter(post, spec) + tags(post, spec) + translation(post, spec) + body(post) + liquid(post) + lightbox(post) + front_matter(post, spec) + tags(post, spec) + translation(post, spec) + body(post) + liquid(post) + lightbox(post) + figures(post) + end + + # A paper's figure hotlinked from arXiv: links rot when versions change, and + # a remote image gets no width/height (_plugins/image_dimensions.rb), so the + # page jumps as it loads. scholar-lens stores them (its ImageLocalizer); any + # other remote image is its owner's and stays a link. + ARXIV_FIGURE = %r{(?:!\[[^\]]*\]\(\s*|<img\b[^>]*?\ssrc=["'])https?://(?:[a-z0-9-]+\.)*arxiv\.org/}i + + def self.figures(post) + lines = post.body.split("\n", -1) + fences(lines).zip(lines).each_with_index.filter_map do |(fenced, line), i| + next if fenced || !line.match?(ARXIV_FIGURE) + + "#{post.body_line + i}: an arXiv figure is linked, not stored; save it as /assets/images/#{slug(post)}-<n>.<ext>" + end end # A hand-written zoomable figure opens its href in the lightbox. A page there @@ -120,6 +135,14 @@ def self.front_matter(post, spec) if data["description"].to_s.match?(/\$\$|\*\S[^*]*\*|`|\]\(|<[a-zA-Z\/]|\{[{%]/) found << "1: description is plain text; no $$, *emphasis*, backticks, links or tags" end + # The <title> is cut in a results list past this; scholar-lens checks the same. + limit = spec["seo_title_max_length"] + if limit && data["title"].to_s.length > limit && !data["seo_title"] + found << "1: title is over #{limit} characters; add a shorter seo_title for <title>" + end + if limit && data["seo_title"].to_s.length > limit + found << "1: seo_title is over #{limit} characters" + end # Text the reader sees: a tag in it (<think>, <!-- …) is read as HTML. %w[title subtitle paper_author].each do |key| found << "1: #{key} has a tag; the page reads it as HTML" if data[key].to_s.match?(/<[a-zA-Z\/!]/) @@ -342,7 +365,7 @@ def self.body(post) in_references = line.match?(REFERENCES) if line.start_with?("#") # ar5iv answers a figure it lost with a "NO IMAGE AVAILABLE" PNG and HTTP # 200, so no link check notices: 59 figures went blank that way. - found << "#{n}: ar5iv link; use arxiv.org/html or a copy in assets/images" if bare.include?("ar5iv.") + found << "#{n}: ar5iv link; link arxiv.org, and store a figure in assets/images" if bare.include?("ar5iv.") # A whole tag, outside code and math: `i<j` and `$$a<b$$` are text. text = bare.gsub(/\$\$.*?\$\$/, "") tags = text.scan(%r{(?<!\\)<(/?)([a-zA-Z][\w-]*)(\s[^<>]*)?/?>}) diff --git a/test/js/search.test.js b/test/js/search.test.js new file mode 100644 index 0000000..122da20 --- /dev/null +++ b/test/js/search.test.js @@ -0,0 +1,80 @@ +// Unit tests for js/search.js's matching, ranking and markup, in node: +// node --test 'test/js/*.test.js' +// The cases are the ones a review found broken: a title match ranked below +// passing mentions, a translation pair taking two slots, markup in a result. +'use strict'; +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { prepare, rank, excerpt, mark, resultHtml } = require('../../js/search.js'); + +const post = (title, extra = {}) => ({ title, url: '/' + title.toLowerCase().replace(/\W+/g, '-') + '.html', + date: 'January 1, 2026', lang: 'ko', translation: null, category: 'Paper Reviews, Language Models', + tags: '', content: '', ...extra }); + +const titles = (results) => results.map((r) => r.doc.post.title); + +test('a title match outranks newer posts that only mention the word', () => { + const docs = prepare([ + post('DSPy', { content: 'compared with Llama once' }), + post('ReWOO', { content: 'llama llama' }), + post('The Llama 3 Herd of Models', { content: 'Llama 3 is …' }), + ]); + assert.deepEqual(titles(rank(docs, ['llama'], 'ko')).slice(0, 1), ['The Llama 3 Herd of Models']); +}); + +test('every word must be in the post, in any field', () => { + const docs = prepare([post('Mixtral', { tags: 'Mixture of Experts', content: '라우팅' }), post('Other', { content: '라우팅' })]); + assert.deepEqual(titles(rank(docs, ['experts', '라우팅'], 'ko')), ['Mixtral']); + assert.deepEqual(rank(docs, ['absent'], 'ko'), []); +}); + +test('ties go to the newer post (index order)', () => { + const docs = prepare([post('Newer', { content: 'rag' }), post('Older', { content: 'rag' })]); + assert.deepEqual(titles(rank(docs, ['rag'], 'ko')), ['Newer', 'Older']); +}); + +test('a translation pair counts once, as the post in the site language', () => { + const docs = prepare([ + post('데이터에 맥락을', { translation: 'ai-ready', content: 'semantic layer' }), + post('Writing Context', { lang: 'en', translation: 'ai-ready', content: 'semantic layer semantic layer' }), + ]); + const results = rank(docs, ['semantic', 'layer'], 'ko'); + assert.deepEqual(titles(results), ['데이터에 맥락을']); + // At the better score of the two (the twin's here), so the pair is not ranked down. + const twinAlone = rank(prepare([docs[1].post]), ['semantic', 'layer'], 'ko')[0].score; + assert.equal(results[0].score, twinAlone); +}); + +test('the site-language post wins its pair whichever comes first in the index', () => { + const docs = prepare([ + post('English twin', { lang: 'en', translation: 'p', content: 'agent' }), + post('한국어 원문', { translation: 'p', content: 'agent' }), + ]); + assert.deepEqual(titles(rank(docs, ['agent'], 'ko')), ['한국어 원문']); +}); + +test('the twin shows when only it matches', () => { + const docs = prepare([ + post('한국어 원문', { translation: 'p' }), + post('English twin', { lang: 'en', translation: 'p', content: 'harness' }), + ]); + assert.deepEqual(titles(rank(docs, ['harness'], 'ko')), ['English twin']); +}); + +test('the date is not searched', () => { + assert.deepEqual(rank(prepare([post('A', { date: 'October 7, 2025' })]), ['2025'], 'ko'), []); +}); + +test('marks are escaped, merged, and the only tags added', () => { + assert.equal(mark('<think> & gpt-4', ['<think>', 'gpt', 'gpt-4']), '<mark><think></mark> & <mark>gpt-4</mark>'); + const html = resultHtml(post('<img src=x onerror=alert(1)>', { url: '/a".html', lang: 'ko"' }), ['img']); + assert.ok(!/<img/.test(html)); + assert.ok(html.includes('href="/a".html"') && html.includes('lang="ko""')); +}); + +test('the excerpt is cut around the match, not at the top', () => { + const text = 'x '.repeat(400) + 'the needle is here ' + 'y '.repeat(400); + const cut = excerpt(text, ['needle']); + assert.ok(cut.startsWith('…') && cut.endsWith('…')); + assert.ok(cut.includes('<mark>needle</mark>')); +}); diff --git a/test/test_lint_posts.rb b/test/test_lint_posts.rb index d10ae16..e74f2f6 100644 --- a/test/test_lint_posts.rb +++ b/test/test_lint_posts.rb @@ -152,7 +152,7 @@ def test_paper_author_has_no_tags def test_no_ar5iv_links assert_finding(/ar5iv link/, lint("![그림](https://ar5iv.labs.arxiv.org//html/2310.06825/assets/x1.png)\n")) - assert_equal [], lint("![그림](https://arxiv.org/html/2401.04088v1/x1.png)\n") + assert_equal [], lint("[논문](https://arxiv.org/html/2401.04088v1)\n") end def test_a_body_h1_outside_code @@ -381,5 +381,22 @@ def test_paper_doi_is_a_bare_doi_on_paper_posts_only survey = FRONT.sub('"Paper Reviews"', '"Paper Surveys"').sub("paper_author: \"Mistral AI\"\n", "") assert_equal [], lint(front: survey) end -end + def test_an_arxiv_figure_must_be_stored + assert_finding(%r{3: an arXiv figure is linked, not stored; save it as /assets/images/mistral-7b-<n>}, + lint("Text.\n\n![Fig](https://arxiv.org/html/2310.06825v1/x1.png)\n")) + assert_finding(/arXiv figure/, lint(%(<img src="https://www.arxiv.org/x.png" alt="a">\n))) + assert_equal [], lint("![Fig](/assets/images/mistral-7b-1.png)\n") + assert_equal [], lint("![Diagram](https://d2908q01vomqb2.cloudfront.net/x.png)\n") # its owner's + assert_equal [], lint("See [the paper](https://arxiv.org/abs/2310.06825).\n") # a link, not an image + assert_equal [], lint("```markdown\n![Fig](https://arxiv.org/html/x.png)\n```\n") # an example + end + + def test_a_long_title_needs_a_short_seo_title + long = "A" * (SPEC["seo_title_max_length"] + 1) + assert_finding(/title is over \d+ characters; add a shorter seo_title/, + lint(front: FRONT.sub('title: "Mistral 7B"', %(title: "#{long}")))) + assert_equal [], lint(front: FRONT.sub('title: "Mistral 7B"', %(title: "#{long}"\nseo_title: "Short"))) + assert_finding(/seo_title is over/, lint(front: "#{FRONT}seo_title: \"#{long}\"\n")) + end +end