2024년 3월 19일
NVIDIA Blackwell
NVIDIA B200이 등장했군요. 칩렛 두 개를 이어붙인 형태군요. 그래서 전반적인 스펙이 H100의 두 배 + 알파 정도가 되는 것 같습니다. FP16 990 -> 2250 FLOPS, 1980 -> 4500 FLOPS, VRAM 80 -> 192GB 등. TDP 1000W인데 일단 공랭도 수랭도 가능한 모양입니다. 그리고 Inference용 포맷으로 FP4와 FP6 지원이 추가됐네요.
그리고 B200 두 개를 Grace CPU 하나와 묶었군요. 그리고 72개의 GPU를 두 배 빨라진 NVLink 5로 결합. 즉 노드 당 8개라는 규칙이 72개로 바뀌었다고 생각할 수 있을 듯 하네요.
H100을 두 개 붙인 것이라고 생각하면 2 H100 vs 1 B200 같은 느낌이군요. 칩렛 하나의 성능이 대폭 향상되기는 어려운 것인가 싶습니다. (물론 가격이 H100 두 개보다는 저렴하긴 하겠지만요.) 그런 의미에서는 네트워킹의 중요성이 점점 더 커지는 것이 아닌가 하는 생각이 듭니다.
어차피 칩 하나로 추론할 수 없는 모델들이 중요해질 테니까요. VRAM의 크기가 대폭 향상된다면 좀 더 낫겠지만 그래도 쉽지 않은 상황들이 생기지 않을까 싶네요. 학습에서는 말할 것도 없죠.
(그리고 이 부분에서 TPU가 경쟁력이 있는 것이 아닌가 하는 생각을 합니다.)
여하간 이 규모의 칩이 1만 개 단위로 있다면 GPT-4 이후의 세계에서도 한동안 버틸 수 있지 않을까요? 물론 이걸 1만 개 단위로 확보할 수 있는 조직이라면 지금도 잘 경쟁하고 있을 것 같긴 합니다만...
#hardware
Grok-1
xAI에서 Grok-1의 Weight를 공개했습니다. 생각보다 큰 모델이었네요. 벤치마크는 이전 블로그 포스트를 참조해야 할 것 같습니다. (https://x.ai/blog/grok) 모델의 특징을 살펴보면,
314B, 130K Vocab, 체크포인트는 int8로 배포됨, Jax 기반 코드
6144 dim, 64 레이어, GeGLU, FFN 배수 = 8 / 3, RoPE, RMSNorm, 8 GQA
Gemma에서 언급된 (그러나 실제 모델에는 사용되지 않은) 레이어 입력과 출력 모두에 RMSNorm을 적용
8 MoE, Top-2
Embedding Multiplier sqrt(dim), Output Multiplier sqrt(3) (아마도)
Softmax Logit에 대해 Tanh를 사용해 -30 ~ 30으로 클리핑
130K Vocab이긴 하지만 다국어에 대한 고려는 딱히 없었던 것 같고 한글에 대해서는 거의 대부분 Byte Fallback이 되는군요. Gemma의 토크나이저와 비슷하게 Whitespace 토큰들이 포함되어 있습니다.
상당 부분에서 Gemma와 유사한 특징들이 나타나는 것 같습니다. xAI 멤버들 중에서 구글 출신들이 꽤 있으니 이것이 구글이 쓰고 있는 (혹은 썼던) 레시피인 것이 아닌가 하는 생각이 드네요.
#llm
Yi-9B
Yi-6B에서 Depth Upscaling으로 Yi-9B를 만든 과정이 좀 더 자세하게 나왔네요. 레이어 입출력의 Cosine Similarity로 추가 학습의 여지를 판단한 과정이 재미있네요. 입출력이 비슷할수록 더 학습할 여지가 있다는 추론이죠.
3T 학습을 했었는데 Yi-6B로 추가 학습을 하는 것으로는 성능 향상이 충분하지 않아서 Upscaling을 결정했다고 합니다. Gemma에서 7B 모델에 6T 토큰을 밀어넣을 수 있었던 배경이 궁금해지네요.
#pretraining
A Novel Paradigm Boosting Translation Capabilities of Large Language Models
(Jiaxin Guo, Hao Yang, Zongyao Li, Daimeng Wei, Hengchao Shang, Xiaoyu Chen)
This paper presents a study on strategies to enhance the translation capabilities of large language models (LLMs) in the context of machine translation (MT) tasks. The paper proposes a novel paradigm consisting of three stages: Secondary Pre-training using Extensive Monolingual Data, Continual Pre-training with Interlinear Text Format Documents, and Leveraging Source-Language Consistent Instruction for Supervised Fine-Tuning. Previous research on LLMs focused on various strategies for supervised fine-tuning (SFT), but their effectiveness has been limited. While traditional machine translation approaches rely on vast amounts of parallel bilingual data, our paradigm highlights the importance of using smaller sets of high-quality bilingual data. We argue that the focus should be on augmenting LLMs' cross-lingual alignment abilities during pre-training rather than solely relying on extensive bilingual data during SFT. Experimental results conducted using the Llama2 model, particularly on Chinese-Llama2 after monolingual augmentation, demonstrate the improved translation capabilities of LLMs. A significant contribution of our approach lies in Stage2: Continual Pre-training with Interlinear Text Format Documents, which requires less than 1B training data, making our method highly efficient. Additionally, in Stage3, we observed that setting instructions consistent with the source language benefits the supervised fine-tuning process. Experimental results demonstrate that our approach surpasses previous work and achieves superior performance compared to models such as NLLB-54B and GPT3.5-text-davinci-003, despite having a significantly smaller parameter count of only 7B or 13B. This achievement establishes our method as a pioneering strategy in the field of machine translation.
LLM의 번역 능력 강화 실험. 일단 Multilingual 코퍼스로 추가 프리트레이닝을 한 다음 병렬 코퍼스로 더 프리트레이닝하고 Instruction Tuning을 했다는 흐름입니다. 아무래도 PaLM 2에서도 등장했던 (https://arxiv.org/abs/2305.10403) 병렬 코퍼스를 사용한 프리트레이닝에 관심이 가는군요.
#nmt #pretraining
LLaVA-UHD: an LMM Perceiving Any Aspect Ratio and High-Resolution Images
(Ruyi Xu, Yuan Yao, Zonghao Guo, Junbo Cui, Zanlin Ni, Chunjiang Ge, Tat-Seng Chua, Zhiyuan Liu, Maosong Sun, Gao Huang)
Visual encoding constitutes the basis of large multimodal models (LMMs) in understanding the visual world. Conventional LMMs process images in fixed sizes and limited resolutions, while recent explorations in this direction are limited in adaptivity, efficiency, and even correctness. In this work, we first take GPT-4V and LLaVA-1.5 as representative examples and expose systematic flaws rooted in their visual encoding strategy. To address the challenges, we present LLaVA-UHD, a large multimodal model that can efficiently perceive images in any aspect ratio and high resolution. LLaVA-UHD includes three key components: (1) An image modularization strategy that divides native-resolution images into smaller variable-sized slices for efficient and extensible encoding, (2) a compression module that further condenses image tokens from visual encoders, and (3) a spatial schema to organize slice tokens for LLMs. Comprehensive experiments show that LLaVA-UHD outperforms established LMMs trained with 2-3 orders of magnitude more data on 9 benchmarks. Notably, our model built on LLaVA-1.5 336x336 supports 6 times larger (i.e., 672x1088) resolution images using only 94% inference computation, and achieves 6.4 accuracy improvement on TextVQA. Moreover, the model can be efficiently trained in academic settings, within 23 hours on 8 A100 GPUs (vs. 26 hours of LLaVA-1.5). We make the data and code publicly available at https://github.com/thunlp/LLaVA-UHD.
GPT-4V의 Overlapping Window를 사용한 이미지 크롭과 LLaVA-1.5의 패딩 사용에서 발생하는 문제에서 시작하는군요. 패딩과 Overlap 없이 이미지를 잘 자르는 전략을 제안하고 있습니다. ViT 자체를 Multiple Aspect Ratio에 대해 학습시켜놓는 것이 유용할 것 같다는 느낌이 있네요. (https://arxiv.org/abs/2307.06304)
#vision-language