Reflections on training a 1B LLM on 100B tokens from scratch An independent developer trained Malama, a 1B-parameter language model, from scratch on 100B tokens using Modal credits, then ran supervised fine-tuning and reinforcement learning on coding problems; the model is published on Hugging Face as malama-v0.0.1. Malama uses the GLM tokenizer and Kimi Delta Attention alongside full attention, and the developer reports it is competitive on HumanEval and MBPP for its size but trails recent models on LiveCodeBench despite coding being its training niche. The developer concluded that high-quality, information-dense data matters more than novel architecture, noting that roughly 1B tokens of scraped EU documents made the model worse, and that the whole run fit on a single 8xH100 box. notes from the margins and yes, it is not very good, but SOTA for something. There are many like it, but this one is mine. I recently found myself with some time and Modal https://modal.com credits, so I decided to train an LLM from scratch. While I had the pleasure of being involved in post-training and a tiny bit of pre-training and eval of models in the past years, I wanted to see if I can do it myself end to end. The outcome is Malama https://huggingface.co/jfrick/malama-v0.0.1 , named after the beach where I was thinking through most of the decisions for it. It is a 1B parameter model that uses the GLM tokenizer and Kimi Delta Attention alongside full attention and was pretrained on 100B tokens before running SFT and RL on coding problems. This set of choices probably does not make sense for a commercial effort but it was not really the goal to build a practical model. Malama is fundamentally undertrained for its size as I spent credits on the end to end process rather than optimizing for pretraining. It was a lot of fun, especially exploring different avenues https://github.com/koogle/lm-exploration . I was able to make it competitive on the HumanEval https://github.com/openai/human-eval and MBPP https://github.com/google-research/google-research/tree/master/mbpp benchmarks for its size . On coding LiveCodeBench https://livecodebench.github.io/ it trails recent models even though this is the niche it was trained on. The training mostly relied on existing datasets, especially from NVIDIA https://huggingface.co/nvidia . I admit, I was looking at some distillation by proxy in the form of incorporating open source repositories that had signs of recent contribution by frontier models. Especially for the SFT stage I used larger open source models Qwen3-30B-A3B, DeepSeek V4 Flash, and public DeepSeek-R1 datasets to provide reasoning trajectories, and Qwen3-30B-A3B to filter problems for the RL stage, where rewards came from running unit tests in a sandbox. The exercise really emphasized the importance of good high quality data, especially ones that contain a lot of information per token. I tried myself to add to the public collection of datasets and scraped together about 1B tokens of EU published documents, but I found that they make the model actually worse not better. Most of the documents are semi-autogenerated and have a lot of low information boilerplate. In hindsight this is not very surprising. It updated my bias that critical breakthroughs in the next years will not come from novel architecture or techniques but from finding high quality pools of data that are information dense or increasing sample efficiency on existing data. Doing some initial size and training token estimates and then seeing it come through in the training run felt like training models is a lot more science than art. It was a delight how agents were able to help me formulate experiments and side quests, and run them quickly on Modal. For example, I was able to play around with making an earlier version a looped model - there was no benefit, as the problems are currently still in the pretraining phase rather than in the reasoning changes. Models are also insanely good at writing custom kernels given a verification function to improve speed in all parts of the process. Besides the choice of data, architecture and training regimes, a decent part of the time was spent on fixing various problems with resuming and parallelizing training runs. I consider myself lucky that everything fit on an 8xH100 box and I did not worry about training across multiple hosts. Maintaining and fixing the training runs felt very similar to large scale data processing pipelines that I spent a lot of my early career dealing with. I deliberately wanted training to be defined as workflows of the form: as to be able to explore the space of ideas, which meant taking on a bunch of complexity enabling the work to fit together. Seeing the model go from gibberish to slowly forming sentences and more complex answers as the parameter and pretraining token count increased felt like noise coalescing into a beautiful picture. Both attention and state space models feel like very pure articulations of reasoning https://alexwang.ai/posts/associative-memory/ . Especially state space models to me are one of the most clear mathematical definitions of memory / state and I was delighted to find how KDA https://github.com/koogle/lm-exploration/blob/main/training/references/kda.md is a descendant of SSMs and attention. To me, training an LLM was unexpectedly beautiful. Thank you to Modal https://modal.com for providing credits and more importantly easy to use infrastructure and for the many people working on open source LLMs that have contributed to the shared understanding https://github.com/koogle/lm-exploration/tree/main/training/references of how to create these models, especially the new crop of open source neo labs Thinking Machines https://thinkingmachines.ai , Mirendil https://mirendil.com , Recursive https://recursive.com , Ricursive https://www.ricursive.com , Flapping Airplanes https://flappingairplanes.com , and Open Athena https://openathena.ai / Marin https://github.com/marin-community/marin . Here are two unedited passing generations from Malama v0.0.1 taken from the evaluation logs in jfrick/lm-exploration-results https://huggingface.co/datasets/jfrick/lm-exploration-results . You can also try prompting Malama v0.0.1 and earlier checkpoints in the playground https://huggingface.co/spaces/jfrick/malama-versions . abc387 b — easy Prompt: Given an integer X , find the sum of all integers in the 9×9 multiplication table that are not equal to X .