메뉴
HN
Hacker News • 25일 전

RTX 5090로 1.5시간 만에 학습한 소형 트랜스포머가 다수 LLM 능가

IMP
7/10
핵심 요약

한 연구자가 RTX 5090 하나로 1.5시간 만에 소형 트랜스포머를 처음부터 학습시켜 ARC-AGI 벤치마크에서 많은 대형 LLM과 동등하거나 그 이상의 성적(44%)을 달성했습니다. 테스트 시점에 퍼즐별로 모델을 직접 학습하는 메타러닝 접근법으로, 샘플 효율성(sample efficiency) 한계를 탐구하는 연구입니다. 코드는 오픈소스로 공개되어 저비용으로 누구나 재현·후속 연구가 가능하다는 점이 의미 있습니다.

번역된 본문

저는 RTX 5090 하나로 1.5시간 만에 소형 트랜스포머를 처음부터 학습시켰습니다. 이 모델은 많은 LLM을 능가하며, TRM/HRM과 동등한 점수를 기록합니다. 이전 모델의 업그레이드 버전으로, 더 빠르고 더 좋고 더 저렴하며 여전히 오픈소스입니다. 또한 ARC-2에서 7%를 기록했습니다. 트위터에서의 토론과 깃허브 코드가 공개되어 있습니다. 이것은 ARC-AGI에 관한 시리즈 중 세 번째 블로그이며, 이전 글(블로그 2, 블로그 1)이 있습니다.

많은 사람들이 이전 결과를 불가능하다고 생각했습니다. 그 결과는 최고급 연구자들의 주목을 받았고 X에서 바이럴이 되었으며, Lucas Beyer, Jeremy Howard, Rohan Anil 등의 토론과 많은 다른 사람들의 댓글이 달렸습니다.

왜 이 작업을 하는가? 저는 샘플 효율성(sample efficiency)이 현재 AI의 가장 중요한 문제라고 생각하며, 이를 해결하고 싶습니다. 이 연구의 의도는 (1) 트랜스포머/오늘날의 딥러닝 방법으로 제한했을 때 샘플 효율성의 한계를 찾는 것과 (2) 비용을 줄여 반복 작업을 훨씬 빠르고 저렴하게 만드는 것입니다.

ARC는 이를 테스트하기에 훌륭한 벤치마크입니다. 고차원 공간에서 매우 적은 샘플(퍼즐 1000개만 존재), 각 퍼즐이 서로 다른 규칙을 사용하지만 일부 공통 개념을 공유하는 메타러닝 벤치마크, 사전 지식(prior)이 거의 필요하지 않음(평가 세트에 필요한 모든 개념이 학습 세트에 존재), 인간에게는 믿을 수 없을 만큼 쉽고 형편없는 AI 연구자도 접근 가능, 벤치마크가 아직 포화 상태(데이터 효율성 기준으로, 대량의 합성 데이터나 인간의 유도 편향을 사용하는 LLM 및 접근법은 제외).

다음으로 이러한 한계를 깨기 위한 새로운 연구 아이디어를 진행할 예정입니다. 비용을 낮게 유지하여 전 세계 누구나 이 작업을 할 수 있도록 하겠습니다.

기술적 세부 사항 어떻게 작동하는가? 전체적인 접근법은 이전과 비슷하지만(전체 기술 세부사항은 여기) 여러 업그레이지를 추가했습니다. 접근법 요약: 각 입력-출력 쌍을 토큰 시퀀스로 변환합니다. 이 시퀀스들은 소형 트랜스포머로 자기회귀(autoregressive) 방식으로 학습됩니다. 이 작업은 테스트 시점에 학습 세트와 평가 세트 퍼즐(테스트 라벨은 숨김) 모두에 대해 처음부터 수행됩니다. 태크 간 학습(cross-task learning)을 가능하게 하기 위해 각 퍼즐에 별도의 가산 임베딩(additive embedding, 학습됨)을 부여합니다. 각 시퀀스에 2D 격자 두 개가 있으므로, 3D RoPE 임베딩으로 위치 정보를 학습합니다. 시퀀스는 색상 및 이면체(dihedral) 순열로 증강됩니다. 추론 시 테스트 입력을 증강하고, 생성된 출력에 역증강(inverse aug)을 적용합니다. 가장 흔한 출력 두 개를 제출합니다(AAIVR).

이전과 달라진 점 주요 목표는 모델의 샘플 효율성을 높이는 아키텍처/알고리즘 개선을 찾는 것이었습니다. 점수 상승의 가장 큰 요인은: 모던 아키텍처(GELU 대신 SwiGlu, layernorm 대신 RMSnorm 등), 더 많은 데이터 다양성과 더 나은 데이터 셔플링, 스케일 업(4층 대신 8층). 비용 감소의 가장 큰 요인은: 훨씬 적은 증강(더 효율적인 샘플링!), AdamW → Normuon, 가변 길이 학습(varlen training)을 지원하는 flash attention과 추론용 flex attention 커널.

가장 큰 변화는 입력 토큰을 더 이상 학습하지 않는다는 것입니다. 즉, 손실 함수에 출력 토큰만 포함되어(접근법이 지도학습 방식이 됨) 성능이 약간 좋아졌습니다(40% → 44%). 다만 그 이유는 명확히 이해하지 못합니다. 아마도 유한한 모델 용량 때문일 것입니다. 또한 ARC-2에서 겹치지 않는 태스크를 추가해 학습 데이터를 늘렸습니다. 데이터 누수(leakage)가 없도록 매우 신중하게 수행했습니다. 추가 데이터가 마음에 들지 않으면 제거해도 여전히 약 40%의 점수를 얻지만, 약 두 배의 컴퓨팅이 필요합니다. 참고로 ARC-2는 ARC-1 퍼즐 773개와 새 퍼즐 347개를 포함합니다. ARC-1의 평가 퍼즐 대부분이 반복되므로, ARC-2를 무심코 학습하면 데이터 누수가 발생해 100%를 기록하게 됩니다. 저는 이 773개의 반복 퍼즐을 신중히 필터링하여 이를 피했습니다(누수 없음!). 성능이나 속도를 점진적으로 개선한 다른 많은 변경 사항들이 있으며, 전체 변경 목록은 여기서 확인할 수 있습니다.

흥미로운 동작 이제 입력을 학습하지 않으므로 이 접근법은 지도학습이 되었습니다. 이상한 점은 테스트 손실(loss)은 오히려 나빠졌는데 점수는 더 좋아졌다는 것입니다! 또한 더 안정적이고 점수의 분산도 줄었습니다. 오늘날 많은 사람들이 샘플 효율성 연구를 진행하고 있습니다.

원문 보기
원문 보기 (영어)
I trained a small transformer from scratch in 1.5hrs on a 5090 Beats many LLMs, and scores the same as TRM/HRM This is an upgrade to my previous model Faster, better, cheaper and still open source. Also gets 7% on ARC-2 Discussion on Twitter , Code on github This is the 3rd blog in a series of works on ARC-AGI. Prev: Blog 2 , Blog 1 . Many ppl thought the prev result was impossible. It got attention from top researchers and went viral on X. Eg: Discussions by Lucas Beyer , Jeremy Howard , Rohan Anil , and comments by many others. Why work on this? I think sample efficiency is the most important problem in AI today and I want to solve it. The intention behind this work is to (1) find the limits of sample efficiency when restricted to transformers / today’s deep learning methods and (2) reduce costs so iteration is much faster and cheaper. ARC is a great benchmark to test this: Very few samples (only a 1000 puzzles) in a high dimensional space Its a metalearning benchmark, so each puzzle uses a different rule, with some common concepts Very few priors needed: every concept needed in the eval set is present in the train set It is incredibly easy for humans to solve, and accessible to even poor AI researchers Benchmark is still unsaturated (for data efficiency, ignore LLMs and approaches that use tons of synthetic data or human inductive biases) Next, I’ll work on new research ideas to break these limits. I’ll try to keep costs low so that anyone in the world can work on this. Tech details How does it work? The overall approach is similar to last time ( full technical details here ), but I added a bunch of upgrades. Here’s a quick summary of the approach: Each input-output pair is converted to a sequence of tokens. These sequences are autoregressively trained on by a small transformer. This is done from scratch at test time on both the train set and eval set puzzles (test labels hidden). To enable cross-task learning, each puzzle is given a separate additive embedding (learnt). Since each sequence has two 2D grids, positional are learnt using 3D RoPE embeddings. The sequences are augmented with color and dihedral permutations. During inference, the test inputs are augmented, and the inverse aug is applied on the outputs produced. The 2 most common outputs are submitted (AAIVR). Changes since last time The main goal was to find improvements to the architecture / algorithm that improve the sample efficiency of the model. The biggest increases in scores were due to Modern architecture (SwiGlu instead of GELU, RMSnorm not layernorm, etc.) More data diversity, better shuffling of data scaling up: 8 layers instead of 4, Biggest decreases in cost were due to: Way fewer augmentations (more sample efficient!) AdamW -> Normuon flash attention with varlen training + flex attention kernels for inference A major change is that I don’t train on input tokens anymore. This means the loss function only includes output tokens (which makes the approach supervised). This. performs slightly better 40% $\to$ 44% but I don’t understand why. Perhaps finite model capacity I also increased the training data by adding the non-overlapping tasks from ARC-2. I did this very carefully to ensure no leakage. You can remove the extra data if you don’t like it and it will still score ~40%, but it will need ~double the compute. Context: ARC-2 contains 773 ARC-1 puzzles and 347 new puzzles. Most eval puzzles of ARC-1 are repeated, so if you naively train on ARC-2, then its a dataleak and you will score 100%. I avoid this by carefully filtering out the 773 repeated puzzles (so no leak!) There are many other changes that gave incremental improvements in performance or speed. Find the full list of changes here . Interesting behaviour Since I am no longer training on inputs, this approach is now supervised. What’s weird is that the test loss is now worse, yet it scores better! Also it is more stable and there’s less variance in scores. Many ppl today are working on sample efficiency by aiming for the lowest val loss on a small dataset. I think that’s great, but this points out a failure mode in such an approach I do think the unsupervised style training will be better in some scenarios, and I am evaluating this. Before NorMuon, I tried vanilla Muon. Obviously it trained much faster than AdamW, but the loss (and scores) would loiter at the end instead of converging. I found that cranking down the momentum and/or LR drastically at this point helped, but I didn’t want to make manually changes like this. When I switched to NorMuon, the problem disappeared Ablations The biggest contribution to performance seems to be good representations (3D RoPE + per-task embedding). Training on inputs performs slightly worse -> ~39% Restricting training set to ARC-1+ConceptARC only performs about the same: ~40% Switching from 3D RoPE to 1D drops score to ~24% Removing the per-task embeddings drops score to ~24% Running the model CompressARC style (training from scratch on each task separately, and unsupervised), gives a drops performance down to ~18% CompressARC but supervised gets ~15% How can others contribute? The code is open source. Feel free to modify it and improve score or reduce cost. (Pls don’t increase training data) Try reaching 65% – you won’t need many modifications. Evidence: I took the union of all solved tasks from multiple runs, and got 55%. Also a bunch of other tasks are “almost” solved. Some ideas: RoPE mixes positional and content information, which probably worsens performance. PoPE should perform on par or better. Or maybe invent a new pos embedding The architecture can definitely be modernised further Costs can probably be reduced 10x with handmade GPU code. There are architectural changes that can also do this. Lastly, figure out how to remove data augmentations. (I hate that I used it, ignore everyone who thinks its okay). There are a few obvious ways to do so, but the challenge is keeping training costs low. Misc TBH, I didn’t expect to reach 45% with just the transformer, I thought this would need new ideas. I certainly didn’t expect to reach it at such low costs/flops. The ablations show that a surprising amount of perfomance is retained even without augmentations or synthetic data. Now I’m pretty sure 65% can be reached within the transformer framework I don’t understand why others didn’t figure this out. Its just a transformer with the most obvious representation. This benchmark has been open for 6 years, was high profile, and had a million dollar prize! Maybe researchers underestimate deep learning? Maybe the cost of experimentation was high enough that they couldn’t run ablations properly? Blindsided by LLMs or using harnesses? Appendix Prev criticism/validation on my approach from famous researchers My old result went viral on X and many experienced researchers debated about it, both for and against. Threads by Jeremy , Lucas , Susan , Andreas , Yoav , and many more. I’m listing all the criticisms here with my answers. Training on the eval puzzles is cheating / “training on test” No this is false . “Training on test” specifically means training on the labels of test data. The labels were not trained on. Also, ARC is a metalearning benchmark, so you’re supposed to learn from the eval puzzles. Jargon: ARC has a set of train puzzles and a set of eval puzzles. Each puzzle has example pairs and test pairs. A pair consists of an input grid + output grid. The ARC, the label is only the test pair’s output grid in an eval puzzle . These labels were not trained on. They are hidden. You can delete it beforehand if you wish Training on the inputs of eval puzzles leaks information No, this is false . Such an approach is called transductive reasoning and has been studied since the time of Vapnik. Also, this dogma of ignoring eval inputs doesn’t make sense in a world trying to solve continual learning Other approaches train a metalearning algorithm and then deploy it to learn by running a Co