Building an LLM from Scratch

In this work, the development of a basic large language model (LLM) has been presented, with a primary focus on the pre-training process and model architecture. A simplified transformer-based design has been implemented to demonstrate core LLM principles with the incorporation of reinforcement learning techniques. Key components such as tokenization, and training objectives have been discussed to provide a foundational understanding of LLM construction. Additionally, an overview of several established models—including GPT-2, LLaMA 3.1, and DeepSeek—has been provided to contextualize current advancements in the field. Through this comparative and explanatory approach, the essential building blocks of large-scale language models have been explored in a clear and accessible manner.

Authors

Publication Details

Journal
International Journal of Science and Research Archive
Published
2025-04-29
DOI
https://doi.org/10.30574/ijsra.2025.15.1.1140
Primary Topic
Artificial Intelligence in Law
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Building an LLM from Scratch

Sajan Jiv Singh Nagpal, Sunil Kumar, Anurag Ranjan Lila, R. N. Yadav et al.
International Journal of Science and Research Archive
Artificial Intelligence in Law
article

Building an LLM from Scratch

Sajan Jiv Singh Nagpal, Sunil Kumar, Anurag Ranjan Lila, R. N. Yadav, V. K. Mishra, Monika Sharma, S.B. Rai, A. P. Gandhi, Akshat Jain, R. Mittal
article en

Abstract

In this work, the development of a basic large language model (LLM) has been presented, with a primary focus on the pre-training process and model architecture. A simplified transformer-based design has been implemented to demonstrate core LLM principles with the incorporation of reinforcement learning techniques. Key components such as tokenization, and training objectives have been discussed to provide a foundational understanding of LLM construction. Additionally, an overview of several established models—including GPT-2, LLaMA 3.1, and DeepSeek—has been provided to contextualize current advancements in the field. Through this comparative and explanatory approach, the essential building blocks of large-scale language models have been explored in a clear and accessible manner.

International Journal of Science and Research ArchiveVol. 15(1)
Openalex Percentile: Top 90%
Artificial Intelligence in Law
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Building an LLM from Scratch — Sajan Jiv Singh Nagpal, Sunil Kumar, et al. · International Journal of Science and Research Archive (2025) | TGRS Research Map | TGRS