<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kingsley Nworie on Medium]]></title>
        <description><![CDATA[Stories by Kingsley Nworie on Medium]]></description>
        <link>https://medium.com/@obizzkingsley?source=rss-2cd9407ae1f1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bu_WdZHmvuJpql-qj3MFBw.jpeg</url>
            <title>Stories by Kingsley Nworie on Medium</title>
            <link>https://medium.com/@obizzkingsley?source=rss-2cd9407ae1f1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 09:43:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@obizzkingsley/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Lies Beneath the Prompt: Evaluating What a 30M-Parameter GPT-1-Style Transformer Actually…]]></title>
            <link>https://medium.com/@obizzkingsley/what-lies-beneath-the-prompt-evaluating-what-a-30m-parameter-gpt-1-style-transformer-actually-f8229e89833b?source=rss-2cd9407ae1f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8229e89833b</guid>
            <category><![CDATA[llm-benchmarks]]></category>
            <category><![CDATA[ai-research]]></category>
            <category><![CDATA[african-llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Kingsley Nworie]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 22:33:28 GMT</pubDate>
            <atom:updated>2026-08-09T22:37:09.057Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What Lies Beneath the Prompt: Evaluating What a 30M-Parameter GPT-1-Style Transformer Actually Learns</strong></h3><p><strong>Authors:</strong> Kingsley Nworie, Ayeni Oluwatosin Olawale, Abdullahi Mujaheed Aliyu, Kosi Ashara<br><strong>Mentor:</strong>Ayo Odumakinde <br><strong>Code:</strong><a href="https://github.com/thekingslee/build-an-llm"> github.com/thekingslee/build-an-llm</a> <br><strong>Dataset:</strong><a href="https://huggingface.co/datasets/theKingslee/9ja-bookcorpus"> 9ja-bookcorpus</a></p><h3>Abstract</h3><p>We present a systematic evaluation of a 30-million-parameter, GPT-1-style causal transformer trained from scratch on a mixture of Nigerian-context text and high-quality educational text drawn from FineWeb. Rather than evaluating the model solely through generated outputs, we investigate whether task-relevant knowledge is encoded in its internal representations even when it is not readily accessible through prompting or generation.</p><p>We evaluate two checkpoints of the same 30M-parameter architecture, trained under different data and infrastructure conditions (v2 and v3), using the Stanford Natural Language Inference (SNLI) benchmark and the Massive Multitask Language Understanding (MMLU) benchmark. For SNLI, we employ three complementary evaluation strategies: zero-shot perplexity scoring, few-shot perplexity scoring, and linear probing of frozen intermediate representations. Across both checkpoints, generation-independent perplexity-based evaluation produces performance close to chance-level classification baselines, while probing intermediate representations reveals a consistent and non-trivial NLI signal, with the best-performing layer reaching 47.00% accuracy compared with a 34.80% majority-class baseline.</p><p>On MMLU, the more recent checkpoint achieves 23.28% overall accuracy, below the 25% random baseline for four-choice questions. However, performance is heterogeneous across subjects, with several computing-adjacent STEM and humanities domains exceeding the aggregate chance baseline. Together, these findings suggest that even at 30M parameters, a model trained from scratch can develop task-relevant structure in its internal representations before that structure becomes reliably accessible through conventional prompting or generation-based evaluation.</p><p>Our results highlight the importance of evaluating small language models at multiple levels of abstraction. Generation-based benchmarks alone may underestimate partially learned structure that is detectable in intermediate representations, motivating a more nuanced evaluation framework for models trained under constrained data and compute regimes.</p><h3>1. Introduction</h3><p>Training a language model from scratch, without the benefit of a large industrial compute budget, is a common exercise for researchers seeking to build practical intuition for the pretraining process, or to produce models tailored to underrepresented languages and cultural contexts not well served by mainstream pretraining corpora. In this work, we construct and evaluate a small causal transformer following the architectural design of GPT-1 (Radford et al., 2018), but at approximately 30 million parameters rather than the 110 million parameters of the original model. The training corpus combines Nigerian-context text with high-quality educational text, allowing us to investigate both the behavior of a compact language model and the extent to which its learned representations capture task-relevant structure.</p><p>The completion of a pretraining run produces a set of learned parameters, but the checkpoint alone provides limited evidence about what the model has actually acquired. Low training loss or fluent-looking generations can indicate that the model has learned statistical regularities without necessarily demonstrating that it can reliably apply those regularities to downstream tasks. That is why we treat evaluation as a central component of the training process rather than as a final reporting step. This report documents our attempt to answer that question rigorously, using two established benchmarks — Natural Language Inference (NLI), evaluated with the Stanford Natural Language Inference (SNLI) dataset, and Massive Multitask Language Understanding (MMLU). Rather than relying solely on qualitative checks (informally termed ‘vibe checking’) of generated text, we use multiple evaluation strategies designed to probe different aspects of the model’s learned capabilities.</p><p>A central methodological question we address is: <strong>how should a model of this scale be evaluated?</strong> Standard language-model evaluation often emphasizes zero-shot or few-shot prompting, where the model is expected to interpret a natural-language instruction and produce an appropriate answer. These kinds of evaluations measure an important form of usable capability, but they conflate several factors: knowledge encoded during pretraining, the ability to retrieve that knowledge from the model’s representations, and the ability to express the retrieved information through the model’s output distribution.</p><p>To separate these factors, we evaluate the model at multiple levels. We first use zero-shot and few-shot perplexity-based evaluation to measure whether the model’s output distribution can distinguish between competing NLI hypotheses. We then examine the model’s internal representations using linear probing of frozen intermediate layers. We ask: “even when the model cannot reliably express the correct answer through generation, do its internal representations contain information that is useful for solving the task?”</p><p>The distinction is consequential. If generation-based evaluation and representation-level evaluation produce substantially different results, then a single benchmark score may provide an incomplete picture of the learning taking place inside a small model. Our experiments reveal precisely such a divergence at 30 million parameters: while conventional generation-based evaluation remains close to chance-level performance, intermediate representations contain a consistent and measurable NLI signal.</p><h3>2. Background and Related Work</h3><h4><strong>2.1 Natural Language Inference</strong></h4><p><strong>Natural Language Inference (NLI)</strong> is a three-way classification task in which a model is given a premise and a hypothesis and must determine whether the hypothesis is <strong>entailed by</strong>, <strong>contradicts</strong>, or is <strong>neutral with respect to</strong> the premise. NLI has been widely used as a benchmark for evaluating semantic understanding and has been incorporated into broader natural language understanding suites, including GLUE and SuperGLUE.</p><p>We use the <strong>Stanford Natural Language Inference (SNLI)</strong> dataset (Bowman et al., 2015), which contains human-written premise–hypothesis pairs annotated with the three NLI labels. In our experiments, SNLI serves not only as a downstream classification benchmark but also as a controlled setting in which to compare different ways of extracting information from a small pretrained language model.</p><h4>2.2 Massive Multitask Language Understanding</h4><p><strong>MMLU (Massive Multitask Language Understanding)</strong> (Hendrycks et al., 2021) is a broad multiple-choice benchmark spanning 57 subjects across STEM, humanities, social sciences, and other domains. Each question presents four answer choices, making 25% the uniform random baseline when all choices are equally likely.</p><p>MMLU is designed to evaluate knowledge and reasoning across a diverse collection of academic and professional subjects. Its breadth makes it useful for examining whether a pretrained model develops capabilities that extend beyond the specific distribution of its training corpus.</p><p>In this study, MMLU provides a complementary evaluation to SNLI. While SNLI focuses on a relatively narrow form of semantic reasoning, MMLU tests a much broader collection of knowledge and reasoning tasks.</p><h4>2.3 In-Context Learning</h4><p><strong>In-context learning (ICL)</strong> refers to the ability of a language model to condition its predictions on examples or demonstrations supplied directly within the input prompt, without updating its parameters through gradient-based training. Few-shot prompting is now a standard evaluation paradigm for large language models.</p><p>However, the ability to perform effectively under in-context demonstrations is not guaranteed by the causal language-modeling objective alone. Its relationship with model scale, training data, and other properties of the pretraining process remains an important area of study. This distinction is particularly relevant to our experiments because our 30M-parameter model operates at a substantially smaller scale than contemporary instruction-tuned and few-shot-capable language models.</p><p>We therefore treat prompting performance as <strong>one observable form of model capability rather than a complete measure of what the model has learned</strong>.</p><h4>2.4 Representation Probing</h4><p><strong>Probing</strong> is a family of techniques used to investigate what information is encoded in a model’s internal representations. A typical probing experiment freezes the pretrained model and trains a lightweight classifier on hidden-state representations extracted from one or more layers. The classifier therefore cannot modify the underlying language model; its performance measures whether information relevant to the target task is <strong>linearly recoverable</strong> from the existing representations.</p><p>In this study, we use logistic regression as the probing classifier. We extract hidden representations from intermediate layers of the frozen transformer and train the classifier to predict NLI labels. This provides a complementary perspective to generation-based evaluation: rather than asking whether the language model can directly produce the correct answer, probing asks whether its internal representations contain information from which the correct answer can be recovered by a simple downstream classifier.</p><p>A distinction is therefore important throughout this work:</p><blockquote><strong><em>Generation-based evaluation asks what the model can express directly; representation probing asks what information is recoverable from the model’s internal states.</em></strong></blockquote><p>This distinction forms the basis for our central comparison between behavioral performance and representational structure.</p><h3>3. Model and Training Setup</h3><h4>3.1 Architecture</h4><p>The model follows the GPT-1 architecture(Radford et al., 2018) at reduced scale: approximately 30 million parameters, 256-dimensional embeddings, and 4 transformer decoder layers operating over a sequence length of 512 tokens. This reduced-scale configuration was originally adopted for an ablation study (described in Section 3.3) and was subsequently retained as a fixed architecture across later training runs, so that changes in downstream evaluation could be attributed to training data and setup rather than model capacity.</p><p>The model is trained autoregressively using the causal language-modeling objective, predicting each token conditioned on the preceding context.</p><h4>3.2 Data</h4><p>Training data combined two sources:</p><ul><li><strong>BookCorpus</strong>, accessed through the <em>rojagtap/bookcorpus</em> release on Hugging Face (books_large_p1.txt and books_large_p2.txt, approximately 4.6 GB combined). BookCorpus was also used in the original GPT-1 training setup. This dataset was used in <strong>v1</strong> and <strong>v2</strong>, paired with the 9ja corpus.</li><li><strong>9ja-bookcorpus</strong>, a project-curated dataset of rich Nigerian-context text that was collected, cleaned, and processed by the research team (Hugging Face: <a href="https://huggingface.co/datasets/theKingslee/9ja-bookcorpus"><em>theKingslee/9ja-bookcorpus</em></a>). The dataset was introduced to increase representation of Nigerian literary and cultural contexts within the training distribution. It was used in <strong>v1</strong> and <strong>v2</strong> alongside BookCorpus, and also retained in <strong>v3</strong>.</li><li><strong>FineWeb-Edu (~600M token split)</strong>, a high-quality educational subset of the FineWeb dataset (Hugging Face: <a href="https://huggingface.co/datasets/theKingslee/fineweb-600m-tokens"><em>theKingslee/fineweb-600m-tokens</em></a>). This dataset was introduced in <strong>v3</strong> as a replacement for BookCorpus to improve data quality and domain diversity while maintaining the 9ja corpus as a core component.</li></ul><h4>3.3 Training History and Dataset Ablation</h4><p>The project began with a <strong>v1</strong> training run using the original GPT-1-scale architecture of approximately 110 million parameters and a mixture of the two data sources (BookCorpus and 9ja-bookcorpus). During training, the run exhibited behavior that we diagnosed as <strong>catastrophic forgetting</strong>. Training loss initially decreased from approximately 11 to 3.6 over the first several thousand steps, indicating substantial learning during the early phase of training. However, the loss subsequently increased sharply to above 7 within approximately 500 steps and remained elevated for the remainder of the run. This degradation was accompanied by a marked deterioration in generation quality: outputs that had previously exhibited coherent and increasingly fluent language became substantially less grammatical and less coherent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbaLFeDKp5CIkiYC82nWnw.png" /><figcaption>Figure 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qL2OFxRvUJyCvRw0TvKWQ.png" /><figcaption>Figure 2</figcaption></figure><p>To identify the cause, we conducted an <strong>ablation study</strong>, isolating each data source individually at reduced model scale (~30M parameters, the architecture described in Section 3.1) to control for compute cost. This isolation traced the instability specifically to the BookCorpus component: retrained at reduced scale on the combined data, loss plateaued in a narrow band (approximately 3.9–4.0) for tens of thousands of steps without further improvement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h1PGWLKDokfHsuMTsZoiAQ.png" /><figcaption>Figure 3</figcaption></figure><p>A subsequent data-quality investigation of BookCorpus corroborated this: a widely cited audit found substantial duplication (over 2,900 of ~7,185 unique books appearing more than once) , rows with non-words and truncated files within the corpus, consistent with our observation that it was the destabilizing factor.</p><p>This 30M-parameter checkpoint from the ablation study is referred to as <strong>v2</strong> throughout this report.</p><h4>3.4 Infrastructure and Training Configuration (v3)</h4><p>Following the ablation, training was migrated from Google Colab to a dedicated <strong>RunPod NVIDIA A100 instance with 80 GB of VRAM</strong>. Persistent tmux sessions were used to prevent local connection loss from terminating training processes, while a mounted network volume was used for checkpoint storage. This resolved session-drop issues that had previously interrupted training.</p><p>Using the same 30M-parameter architecture as v2, a new training run (designated <strong>v3</strong>) was conducted from scratch on the <strong>FineWeb-Edu and 9ja-corpus</strong> dataset with the following changes to training configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVB3_9TaqA_6HEymCcDq3A.png" /><figcaption>Table 1</figcaption></figure><p><strong>v1</strong> used the original ~110M-parameter configuration; <strong>v2 </strong>and<strong> v3</strong> used the reduced ~30M-parameter configuration.</p><p>The batch size was doubled for <strong>v3</strong>, while the learning rate was increased from 3 × 10⁻⁴ to 4.2 × 10⁻⁴. The learning-rate change was chosen as a conservative adjustment alongside the increase in effective batch size rather than as a strict application of linear scaling.</p><h4>Training Token Budget</h4><p>The principal 30M-parameter training configuration was designed around a target of approximately <strong>600 million training tokens</strong>, corresponding to roughly <strong>20 training tokens per parameter</strong>. This places the experiment near the token-to-parameter regime associated with compute-optimal scaling reported by Hoffmann et al. (2022), while keeping the model itself small enough to permit controlled experimentation under limited compute.</p><p>This distinction is important for interpreting the subsequent results: the experiments do not evaluate a 30M-parameter model simply under severe data scarcity. Instead, they investigate what a model of this capacity learns when exposed to a relatively substantial pretraining token budget.</p><h4>3.5 Qualitative Output Comparison</h4><p>Before formal benchmarking, all checkpoints were subjected to an exploratory qualitative analysis(“vibe check”) from the available checkpoints: A fixed set of five prompts was evaluated at each sampled checkpoint. Generated text was analyzed using two simple surface-level measures:</p><p><strong>Type-token ratio (TTR):</strong> the number of unique generated token types divided by the total number of generated tokens, used as a coarse measure of lexical diversity.</p><p><strong>Real-word ratio:</strong> the proportion of generated tokens corresponding to valid English words.</p><p>These measures are not intended to establish semantic competence or language understanding. Instead, they provide lightweight diagnostics for detecting obvious degeneration, repetition, and changes in surface-level generation quality during training.</p><p>The three training trajectories exhibited distinct behaviors.</p><ul><li><strong>v1</strong> underwent a persistent generation collapse between approximately steps 4,000 and 66,000. Outputs became increasingly ungrammatical and did not recover during the sampled checkpoints.</li><li><strong>v2</strong> remained comparatively stable across 74 sampled checkpoints spanning steps 2,000 to 146,000. Its TTR ranged from approximately 0.66 to 0.79, while the real-word ratio ranged from approximately 0.86 to 0.97.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zl-IXeopmgjzBOKFKM3DTQ.png" /><figcaption>Figure 4</figcaption></figure><ul><li><strong>v3</strong> avoided the severe collapse observed in v1 and maintained a comparable real-word ratio of approximately 0.88 to 0.96. However, it exhibited a different failure mode: substantially lower lexical diversity, with TTR ranging from approximately 0.35 to 0.51 across 12 sampled checkpoints. Generated text frequently repeated or looped over a relatively narrow set of phrases, and the TTR showed no clear improvement over the sampled training trajectory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2iIEksBjXIdJUtNfgkzbrQ.png" /><figcaption>Figure 5</figcaption></figure><p>These observations motivated the transition from qualitative generation analysis to formal evaluation. In particular, the contrast between <strong>grammatical or superficially coherent output and repetitive or semantically limited behavior</strong> raised a central question for the study: whether the model had learned task-relevant structure that was not reliably observable through direct generation.</p><p>The remainder of this report therefore evaluates the checkpoints using controlled NLI and MMLU experiments, including both output-level and representation-level measurements.</p><h3>4. NLI Evaluation</h3><h4>4.1 Method</h4><p>We evaluated the best available checkpoints of <strong>v2</strong> and <strong>v3</strong> on the Stanford Natural Language Inference (SNLI HuggingFace: <a href="https://huggingface.co/datasets/stanfordnlp/snli"><em>stanfordnlp</em>/<em>snli</em></a>) benchmark using three complementary evaluation strategies. None of which involved task-specific fine-tuning:</p><h4><strong>4.1.1 Zero-Shot Perplexity Scoring</strong></h4><p>For each SNLI premise–hypothesis pair, we constructed a natural-language prompt containing the premise and hypothesis, followed by a question requesting one of three possible labels. A representative template was:</p><blockquote><em>“{premise} Question: {hypothesis} True, False, or Neither? Answer:”</em></blockquote><p>For each candidate label, the model’s conditional log-likelihood was computed for the corresponding continuation. The candidate with the highest likelihood was selected as the model’s prediction.</p><p>This formulation converts NLI classification into a language-modeling problem: rather than requiring the model to generate an arbitrary response, we ask whether its learned probability distribution assigns greater likelihood to the correct label than to the alternatives.</p><h4><strong>4.1.2 Few-Shot Perplexity Scoring</strong></h4><p>We repeated the same likelihood-based procedure after prepending labeled demonstration examples to the prompt. Two settings were evaluated: <strong>one demonstration per class</strong> and <strong>two demonstrations per class</strong>.</p><p>The purpose of this experiment was to test whether the model could use examples provided in context to alter the relative likelihood assigned to competing NLI labels, without updating its parameters.</p><h4><strong>4.1.3 Representation Probing</strong></h4><p>The language model was frozen throughout the experiment. For each SNLI example, mean-pooled hidden-state representations were extracted separately from the premise and hypothesis at each transformer layer. Given premise representation (p) and hypothesis representation (h), we constructed the feature vector:</p><blockquote>[p; h; |p−h|; p*h]</blockquote><p>where (;) denotes concatenation, (|p-h|) is the element-wise absolute difference, and (p*h) is the element-wise product.</p><p>A logistic regression classifier was then trained on these features to predict the three SNLI labels. Evaluation was performed on a held-out split. Because the underlying language-model parameters remained frozen, the probing experiment measures whether NLI-relevant information is <strong>linearly recoverable</strong> from the pretrained representations rather than whether the model can directly perform NLI through generation.</p><h4><strong>4.1.4 Baselines</strong></h4><p>Results were compared against two simple classification baselines:</p><ul><li><strong>Random chance:</strong> 33.33%, corresponding to uniform prediction across the three classes.</li><li><strong>Majority class:</strong> 34.80%, corresponding to always predicting the most frequent class in the evaluation set.</li></ul><p>The majority-class baseline is particularly important because the SNLI evaluation distribution is not perfectly balanced. Consequently, performance only slightly above 33.33% does not necessarily indicate that the model has learned useful NLI behavior.</p><h4>4.2 Results</h4><h4><strong>4.2.1 Perplexity-based scoring (v3)</strong></h4><p>The results provide little evidence of reliable NLI classification through the model’s output distribution. Zero-shot performance reached 33.80%, only marginally above the random baseline and below the majority-class baseline. Adding demonstrations increased accuracy to 35.00% with one example per class, but this improvement was not sustained when two examples per class were provided, where accuracy returned to 34.80%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_HQCKdoveb1XamdT9wY9_g.png" /><figcaption>Table 2</figcaption></figure><p>The corresponding <strong>v2</strong> and <strong>v3</strong> evaluations similarly remained close to the majority-class baseline, with no consistent improvement attributable to the addition of in-context demonstrations.</p><p>These results suggest that neither checkpoint reliably maps an NLI premise–hypothesis pair to the correct label through direct likelihood-based classification.</p><h4><strong>4.2.2 Probing accuracy by layer:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VHUAFqpjQNzcwL0rUTuOfw.png" /><figcaption>Table 3</figcaption></figure><p>The strongest result was obtained from <strong>v3 Layer 2</strong>, where the probing classifier achieved <strong>47.00% accuracy</strong>, 12.20 percentage points above the majority-class baseline and 13.67 percentage points above random chance.</p><p>The <strong>v2</strong> checkpoint also exceeded the majority baseline, reaching 42.00% at its best-performing layer. Thus, the presence of a measurable NLI signal was not unique to the newer training run.</p><p>The <strong>v3</strong> layer-wise results show a non-monotonic pattern. Performance increased from 39.00% at Layer 0 to 46.00% at Layer 1 and 47.00% at Layer 2, before declining to 43.00% at the final layer.</p><p>Because <strong>v2</strong> and <strong>v3</strong> use the same model architecture, the difference in probing performance cannot be attributed to an increase in parameter count. The stronger <strong>v3</strong> representations are instead associated with differences in training data, data processing, optimization configuration, infrastructure, or some combination of these factors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASkfVmAQ3xFQxPkBvqxyjg.png" /><figcaption>Figure 6</figcaption></figure><h4>4.3 Discussion</h4><p>Two findings stand out. First, neither version demonstrates strong NLI performance under zero-shot or few-shot perplexity scoring. Accuracy remains close to the majority-class baseline, and providing one or two labeled demonstrations does not produce a consistent improvement. The result indicates that the models do not reliably use their output probability distribution to solve the NLI classification task.</p><p>Second, <strong>probing reveals that task-relevant information is present in both models’ internal representations, well above baseline</strong>, and that this signal is <strong>stronger in v3 than in v2</strong>. The best v3 representation reaches 47.00% accuracy, while the best v2 representation reaches 42.00%. This demonstrates that the hidden states contain information that is predictive of NLI labels even though the language model itself does not reliably express that information through the evaluated output formulation.</p><p>The difference between <strong>v2</strong> and <strong>v3</strong> is also informative. Since the architecture and parameter count are held constant, the higher probing performance in <strong>v3</strong> indicates that changes in training conditions can substantially affect the information encoded in the model’s representations without changing model capacity. However, the present experiments cannot determine which individual change is responsible. The <strong>v3</strong> configuration simultaneously differs in training data, batch size, learning rate, stride, and infrastructure, and only one run of each configuration was evaluated. The observed difference should therefore be interpreted as an association with the <strong>overall v3 training configuration</strong>, not as evidence for a specific causal factor.</p><p>Finally, the layer-wise v3 results suggest that NLI-relevant information is not distributed uniformly throughout the network. The strongest probing performance occurs at an intermediate layer rather than at the final layer. This is consistent with a commonly observed pattern in representation learning, in which intermediate layers encode more abstract, semantically general features, while final layers become increasingly specialized toward the immediate pretraining objective (next-token prediction).</p><h3>5. MMLU Evaluation</h3><h4>5.1 Method</h4><p>We evaluated the <strong>v3</strong> checkpoint on the full Massive Multitask Language Understanding (MMLU) benchmark, comprising <strong>57 subjects and 5,700 questions</strong>. Each subject contains 100 four-choice multiple-choice questions, yielding a uniform random-choice baseline of <strong>25.00% accuracy</strong>.</p><p>The evaluation was conducted without task-specific fine-tuning. For each question, the model was prompted with the question and its four answer choices, and the model’s predicted answer was determined from the relative likelihood assigned to the candidate answer tokens.</p><p>We report performance at three levels:</p><ol><li><strong>Overall accuracy</strong> across all 5,700 questions.</li><li><strong>Category-level accuracy</strong> across the four MMLU categories: STEM, Humanities, Social Sciences, and Other.</li><li><strong>Subject-level accuracy</strong> for each of the 57 individual subjects.</li></ol><h4>5.2 Results</h4><h4><strong>5.2.1 Overall and category-level performance:</strong></h4><p>Random-chance baseline for a four-choice question: 25.00%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjCXDQTVRdk63sPlkhg_EQ.png" /><figcaption>Table 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XxSc4Z4qEIPHOxF6ByQSFQ.png" /><figcaption>Figure 7</figcaption></figure><p><strong>Subjects performing above the random-chance baseline (20 of 57):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FaBzjSuzpLRg5XdgyiUzOA.png" /><figcaption>Table 5</figcaption></figure><p><strong>Weakest subjects:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CGIznBSTA39csPLnY4AeCg.png" /><figcaption>Table 6</figcaption></figure><h4>5.3 Discussion</h4><p>Overall MMLU accuracy (23.28%) sits marginally below the 25% random-chance baseline for four-choice questions, an expected outcome for a 30-million-parameter model trained on a comparatively small dataset, well outside the range of model scale at which MMLU is typically used to differentiate model quality.</p><p>However, aggregate near-chance performance does not imply the complete absence of signal. Twenty of the fifty-seven subjects scored above the random-chance baseline, with the strongest cluster concentrated in <strong>computing-adjacent STEM fields</strong>: Machine Learning (32.0%), Computer Security (29.0%), Electrical Engineering (26.0%), and both High School and College Computer Science (25–26%). Each outperforming the STEM category average (22.63%) by a meaningful margin. This is a notable pattern given that STEM as a whole was the weakest category overall, driven down by lab-science subjects such as High School Biology (12.0%), High School Statistics (16.0%), and Anatomy (17.0%).</p><p>Humanities was the strongest category overall (25.00%), led by World Religions (40.0%), the single best-performing subject in the benchmark.</p><p>We treat these subject-level patterns as suggestive rather than conclusive. At 100 samples per subject, individual subject accuracies carry a standard error of approximately ±4%, meaning a single subject at 30% is not strong evidence of genuine subject-specific competence in isolation. The pattern is more compelling in aggregate: a cluster of 20 subjects above baseline, concentrated specifically around computing-related STEM content, is unlikely to be pure sampling noise, though confirming this would require either a larger per-subject sample or repeated evaluation runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwhvNiQc9qyoU1n0fdBIWA.png" /><figcaption>Figure 8</figcaption></figure><p>Taken together with the NLI probing results in Section 4, the picture that emerges is consistent: <strong>v3</strong> has not acquired broad, generation-accessible knowledge or reasoning capability at this scale, but it has acquired <em>some</em> structure, concentrated in specific subject areas and recoverable from specific internal layers, that a purely prompting-based evaluation would fail to detect.</p><h3>6. General Discussion</h3><p>Taken together, the NLI and MMLU experiments provide a consistent picture of a model whose internal representations contain measurable task-relevant structure despite weak direct task performance.</p><p>The contrast is clearest in the NLI experiments. Zero-shot and few-shot perplexity-based evaluation remained close to the majority-class and random baselines, indicating that the model could not reliably express NLI decisions through its output distribution. In contrast, a lightweight classifier trained on frozen intermediate representations achieved substantially higher performance, reaching <strong>47.00% accuracy</strong> at the strongest v3 layer compared with a <strong>34.80% majority-class baseline</strong>. The result does not demonstrate that the language model itself can perform NLI, but it does demonstrate that information predictive of NLI labels is encoded in its internal states and can be recovered without modifying the pretrained parameters.</p><p>MMLU provides a complementary perspective. The model’s overall accuracy of <strong>23.28%</strong> remained below the 25.00% four-choice baseline, providing no evidence of broad benchmark competence. However, performance varied substantially across subjects, with several domains producing considerably higher scores than the aggregate result. These subject-level differences are exploratory rather than definitive evidence of domain-specific knowledge, but they suggest that the information acquired during pretraining is not necessarily distributed uniformly across tasks.</p><p>Together, these findings suggest an important distinction between <strong>learned structure and observable task performance</strong>. A benchmark score measures whether a model can successfully execute a task under a particular evaluation interface. It does not necessarily reveal whether task-relevant statistical structure exists anywhere within the model. For small pretrained models, particularly those trained from scratch under constrained compute budgets, these two quantities may diverge substantially.</p><p>This distinction has methodological implications for evaluating small language models. Evaluating such models exclusively through natural-language prompting may lead to an overly binary interpretation of pretraining outcomes: a model either produces useful answers or it does not. Our results suggest a more graduated evaluation framework. Output-level benchmarks should remain important because they measure directly usable capability, but representation-level probing can provide complementary evidence about what information has been encoded before that information becomes reliably accessible through generation.</p><p>The <strong>v2</strong>-versus-<strong>v3</strong> comparison further suggests that, at fixed model capacity, <strong>training data and configuration meaningfully affect representational quality</strong>. v3’s probing accuracy exceeded v2’s by roughly 5 to 10 points at the strongest layers, despite identical architecture. This is a preliminary finding based on a single run of each configuration and does not isolate which specific factor (updated data, batch size, stride, or learning rate) is responsible, but it does rule out model size as an explanation, narrowing the space of variables worth testing further.</p><h3>7. Limitations</h3><h4><strong>7.1 Evaluation Sample size</strong></h4><p>The NLI experiments were conducted across all available NLI datasets, rather than a single benchmark, providing broader coverage of entailment phenomena and improving the robustness of the reported accuracy estimates. In contrast, MMLU provides 100 questions per subject, resulting in relatively high uncertainty at the individual-subject level. Near the 25% baseline, a subject-level accuracy estimate has a standard error of approximately four percentage points.</p><h4>7.2 Single Training Runs</h4><p>Each major training configuration, <strong>v1</strong>, <strong>v2</strong>, and <strong>v3</strong>represents a single training run. The experiments therefore do not characterize variance arising from random initialization, data ordering, optimizer stochasticity, or other sources of training randomness. However, the probing and few-shot evaluations were repeated across multiple random seeds and demonstration selections, and the results remained consistent across runs.</p><h4>7.3 Confounded v2–v3 Comparison</h4><p>Although v2 and v3 share the same architecture and parameter count, multiple training variables changed simultaneously between the two configurations, including training data, batch size, stride, learning rate, and infrastructure.</p><p>The improvement in probing accuracy therefore cannot be attributed to any individual factor. The comparison establishes an association between the overall v3 configuration and stronger representational performance, but not a causal explanation for that improvement.</p><h3>8. Conclusion and Future Work</h3><p>We evaluated a <strong>30-million-parameter causal transformer trained from scratch</strong> using complementary behavioral and representation-level evaluation methods across NLI and MMLU. The results reveal a consistent distinction between the information that can be recovered from the model’s internal representations and the capabilities that can be demonstrated through direct generation.</p><p>Prompting-based scores remained uninformative, statistically indistinguishable from baseline across every configuration tested, consistent with in-context learning not having emerged at this scale. Probing, by contrast, revealed genuine, non-trivial structure in the model’s internal representations, improved measurably between two training configurations of an otherwise identical architecture, and was corroborated by a subject-level pattern in MMLU results that a purely aggregate score would have obscured.</p><h3>Future Work</h3><p>Planned next steps include:</p><ol><li><strong>Architecture-controlled MMLU comparison.</strong> Evaluate v2 on the full MMLU benchmark to determine whether the subject-level patterns observed in v3 are specific to the revised training configuration.</li><li><strong>Representation analysis across checkpoints.</strong> Repeat the probing evaluation across multiple checkpoints rather than only the selected best checkpoint to determine whether the observed representational signal emerges gradually, peaks at a particular stage of training, or is transient.</li><li><strong>Scaling and SFT experiments.</strong> Extend training across additional parameter and token scales, and introduce supervised fine-tuning (SFT) stages to evaluate how instruction tuning affects the gap between representation-level signal and generation-based performance, and whether scaling laws differ before and after SFT.</li></ol><h3>Acknowledgments</h3><p>This work was carried out by Kingsley Nworie, Ayeni Oluwatosin Olawale, Abdullahi Mujaheed Aliyu, and Kosi Ashara, with training methodology guidance from Ayo Odumakinde. Code and further documentation are available at<a href="https://github.com/thekingslee/build-an-llm"> <em>github.com/thekingslee/build-an-llm</em></a>.</p><h3>References</h3><p>[1] A. Radford, K. Narasimhan, T. Salimans, and I. Sutskever, <strong>“Improving Language Understanding by Generative Pre-Training,”</strong> OpenAI, 2018.</p><p>[2] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, <strong>“Attention Is All You Need,”</strong> <em>Advances in Neural Information Processing Systems</em>, vol. 30, 2017.</p><p>[3] S. R. Bowman, G. Angeli, C. Potts, and C. D. Manning, <strong>“A Large Annotated Corpus for Learning Natural Language Inference,”</strong> in <em>Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP)</em>, 2015.</p><p>[5] A. Wang, Y. Pruksachatkun, N. Nangia, A. Singh, J. Michael, F. Hill, O. Levy, and S. R. Bowman, <strong>“SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems,”</strong> in <em>Advances in Neural Information Processing Systems</em>, 2019.</p><p>[6] D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt, <strong>“Measuring Massive Multitask Language Understanding,”</strong> in <em>International Conference on Learning Representations (ICLR)</em>, 2021.</p><p>[7] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei, <strong>“Language Models are Few-Shot Learners,”</strong> in <em>Advances in Neural Information Processing Systems</em>, vol. 33, 2020.</p><p>[8] Y. Belinkov, <strong>“Probing Classifiers: Promises, Shortcomings, and Advances,”</strong> <em>Computational Linguistics</em>, vol. 48, no. 1, pp. 207–219, 2022.</p><p>[9] J. Hoffmann, S. Borgeaud, A. Mensch, E. Buchatskaya, T. Cai, E. Rutherford, D. de Las Casas, L. A. Hendricks, J. Welbl, A. Clark, T. Hennigan, E. Noland, K. Millican, G. van den Driessche, B. Damoc, A. Guy, S. Osindero, K. Simonyan, E. Elsen, J. W. Rae, O. Vinyals, and L. Sifre, <strong>“Training Compute-Optimal Large Language Models,”</strong> arXiv:2203.15556, 2022.</p><p>[10] J. Bandy and N. Vincent, <strong>“Addressing ‘Documentation Debt’ in Machine Learning Research: A Retrospective Datasheet for BookCorpus,”</strong> arXiv:2105.05241, 2021.</p><p>[11] K. Lee, D. Ippolito, A. Nystrom, C. Zhang, D. Eck, C. Callison-Burch, and N. Carlini, <strong>“Deduplicating Training Data Makes Language Models Better,”</strong> in <em>Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (ACL)</em>, pp. 8424–8445, 2022.</p><p>[12] G. Penedo, H. Kydlíček, L. Ben Allal, A. Lozhkov, M. Mitchell, C. Raffel, L. von Werra, and T. Wolf, <strong>“The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale,”</strong> arXiv:2406.17557, 2024.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8229e89833b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI and The African Perspective]]></title>
            <link>https://medium.com/@obizzkingsley/ai-and-the-african-perspective-720556550293?source=rss-2cd9407ae1f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/720556550293</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[dystopia]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[africa]]></category>
            <dc:creator><![CDATA[Kingsley Nworie]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 10:06:34 GMT</pubDate>
            <atom:updated>2026-08-05T10:06:34.737Z</atom:updated>
            <content:encoded><![CDATA[<p>A conversation about the hidden cost of staying at the application layer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3FxzQ23LJUc0feHsVufNA.jpeg" /></figure><p>Africans today largely occupy the application layer, building with AI systems we do not control or influence. Across the continent, there’s been a very fast adoption of AI like ChatGPT, Copilot, Cursor and AI automation tools. In fact, reports from TechCabal and PwC’s Workforce Hopes &amp; Fears Survey show that 64% of employees across Africa used AI at work in the past year, well above the global average of 54%.</p><p>Most of this usage is limited to productivity, analytics, and decision support using AI to work faster, not to shape what AI becomes. And that distinction matters more than it seems. On the surface, fast adoption is something to celebrate. It signals that we are not being left behind. But adoption is not the same as influence.</p><p>When people imagine a bad AI future, “what happens if we get AI wrong?”, they think of robots taking over. They picture Ultron from the Marvel Cinematic universe, or Skynet from the Terminator franchise. But a quieter, more realistic dystopia is already forming: the gradual loss of the texture of humanity.</p><p>Over time, this has consequences that are easy to miss at first. It shows up as the same answers repeated everywhere, until a single, unified perspective starts to feel like the only one. It shows up as local context flattened into global generalizations. Nuance gets stripped away, everyone getting the same version of a story regardless of where they are or what they know. It shows up in how history is told: from a single dominant perspective, while others slowly fade out of relevance.</p><p>AI is the single most consequential technology to the future of humanity, not just because of what it can do, but because of how deeply it is becoming embedded in how we learn, decide, and define what is true.</p><p>Understanding the gravity of this technology should keep anyone thinking deeply about it awake at night, given that it is currently being largely spearheaded by Western institutions. It is very important to note this early that the intention of this article is in no way to make an anti-Western argument. Rather, it is to highlight a potential danger in the path we are collectively taking as a global society, and to serve as a wake-up call for intentional action.</p><p>A technology this powerful cannot be shaped by a single region, perspective, or worldview. It must be a collective effort, diverse in thought, and participation. In the following paragraphs, I explore what happens when that balance is missing, how it affects truth, culture, and knowledge, and why Africa’s role in this moment cannot remain limited to adoption alone.</p><h3>The Sole Arbiter of Truth</h3><p>In the past two decades, up until the early 2020s, the world turned to search engines to find information. By 2026, we have crossed a more intimate threshold — we no longer just search for information, we ask AI to tell us what is true.</p><p>For most of the internet era, people verified information by comparing multiple websites and manually checking sources. Truth was constructed through cross-referencing, context, and human judgment. The internet provided access to context, but people still relied on behavioral habits of verification, opening multiple tabs, comparing perspectives, and making sense of inconsistencies.</p><p>AI has disrupted this pattern. And in doing so, it has gradually weakened those truth-seeking behaviors. Increasingly, people no longer verify beyond the first answer they receive. The pattern is shifting from “let me verify” to “let me ask AI” and then accepting the response as final.</p><p>You can already see this shift in everyday language and behavior. Phrases like “ChatGPT said” or “ask ChatGPT” are increasingly used as authority markers. People go ahead to use AI chat screenshots as proofs to win arguments. In some cases, AI is now used in political podcasts to fact-check guests in real time. I’ve also seen this dynamic play out in conversations online, where people ask, “@Grok, is this true?” not to another human, but to an AI system.</p><p>All of this points to one thing: a growing trust in AI as an authority on truth.</p><p>We are entering a cycle where information is increasingly treated as true only if an AI system validates it. In the same way search engines reshaped access to information and made traditional libraries less central, AI systems are now reshaping how truth itself is determined.</p><p>As large language models and generative AI systems become the primary interface for search, learning, and historical inquiry, they will no longer function as simple tools. They will become the de facto arbiters of truth. And that reality should force us to ask a difficult question: who gets to shape what these systems learn, and therefore, what the world comes to accept as true?</p><h3>Cultural Compression</h3><p>When a user asks questions like “What were the primary causes of the Nigerian Civil War?” or “Who are the most influential philosophers in history?”, large language models respond by generating an answer based on patterns in the data they were trained on.</p><p>These responses are not neutral in origin. They reflect the distribution of information available during training, as well as the ways those systems are fine-tuned to prioritize certain kinds of explanations over others.</p><p>If the majority of high-quality digital knowledge these systems are trained on is Western-centric academic archives, publications, and digitized records — then the perspectives most likely to be reflected in their answers will also lean in that direction. This is not necessarily intentional bias. It is a structural outcome of what is available, documented, and prioritized in global datasets.</p><p>If companies like OpenAI, Google DeepMind, and Anthropic continue to define the direction of these systems without meaningful global balance, long-term effects will begin to emerge. One of those effects is homogenization of thought. When billions of people rely on the same few models as their primary interface for knowledge, interpretation of history, culture, and philosophy begins to converge. Not because diversity disappears entirely, but because it is increasingly filtered through a small number of shared systems.</p><p>The result is a subtle form of cultural compression. Local nuance, oral histories, and region-specific context are gradually translated into generalized explanations that fit dominant global patterns. African history, philosophy, and political context risk being reframed through external lenses, because they are underrepresented in the data that shapes these systems.</p><p>Over time, this will not just affect what is known. It affects how things are understood. In such a future, history is no longer only written by the victors. It becomes what is present in the datasets that train the systems we rely on to interpret reality.</p><h3>The erasure of Indigenous Knowledge</h3><p>AI models are trained on what is digitally available. This means their understanding of history, culture, and knowledge is shaped largely by what has been documented, digitized, and made accessible online.</p><p>Much of African history and cultural knowledge, however, exists in oral traditions, physical archives, and fragmented records that are not yet fully digitized or integrated into global datasets. As a result, large portions of this knowledge are underrepresented in the systems that increasingly define how information is accessed and interpreted. Without deliberate effort to change this, a gap begins to form.</p><p>In many cases, efforts to digitize and structure local knowledge are still limited, fragmented, or not coordinated at the level required to influence global AI systems. The consequence is silent disappearance, a gradual invisibility within dominant digital narratives.</p><p>Over time, this shapes how African history and culture are represented. Instead of being interpreted from within, they risk being reframed through external academic and cultural lenses. When AI systems become the primary interface for learning about the world, they also become global narrators of that world.</p><p>Most people, when imagining a dystopian AI future, think of dramatic scenarios — machines taking control or science-fiction style collapse. But there is another, quieter version of that future that is easier to miss.</p><p>A future where the “texture” of human diversity is gradually reduced. Where culture, history, and perspective are smoothed out into standardized interpretations. This means losing complexity in how humanity is represented back to itself.</p><p>And if there is a possibility of this happening, then protecting the future of AI is not only about preventing dystopia in the traditional sense. It is also about preventing a world where humanity becomes less varied and less human in its expression.</p><h3>Final Remark</h3><p>This article would be incomplete without moving beyond diagnosis. If the risks outlined here are real, then the question becomes: what can be done now?</p><p>At a high level, the answer is simple but difficult to execute. AI must not remain concentrated within a single region or perspective. A technology this powerful requires global participation. More regions, including Africa, need to move from consumers to contributors in the development of AI systems.</p><p>But beyond that, there are practical steps that can begin immediately.</p><ol><li><strong>Data Sovereignty</strong><br>AI systems learn from what is available. If our data is absent, our perspective is absent. There is an urgent need to create and digitize high-quality datasets that reflect local realities, languages, histories, cultural context, and lived experiences. This includes moving knowledge from oral traditions and physical archives into accessible digital formats. Institutions like the National Archives of Nigeria, the Arewa House, and major academic repositories such as the University of Ibadan Library hold decades of historical records, colonial documents, and indigenous narratives. These collections are rich, but only partially digitized and not yet fully integrated into global knowledge systems. Beyond Nigeria, similar repositories exist across Africa such as the National Archives of Kenya, the South African National Archives, and the Timbuktu Manuscripts, which preserve centuries of African scholarship and intellectual history. Yet much of this knowledge remains digitally inaccessible. This responsibility is not reserved for the governments or large institutions. It is a distributed effort. Individuals, communities, and organizations all have a role to play in documenting, preserving, and publishing knowledge in ways that can be used by future systems. If it is not digitized, it will not be learned. And if it is not learned, it will not be represented.</li><li><strong>Get involved — Build, Not Just Use</strong><br>Beyond data, there is the question of how AI systems are designed. The rules that guide these systems, how they evaluate answers, what they prioritize, what they consider correct are defined by people. Increasing diversity among the engineers, researchers, and contributors shaping these systems is critical. This includes participation in building datasets, designing evaluation benchmarks, and contributing to alignment and reward systems. Without this, even diverse data can still be interpreted through a narrow lens.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fP0_ivGp1AzgUWmq3wn2w.png" /></figure><p><strong>3. Compute Independence</strong><br>This is the most ambitious, but also the most strategic.<br>AI development at scale depends on infrastructure compute, funding, and access to resources. Investing in local AI infrastructure is not just an economic decision; it is a matter of long-term autonomy. Nations and regions that lack the ability to build and run their own systems will always depend on those who can.</p><p>It is difficult to predict the future. And when we try, it is easy to fall into extremes, either optimism that overlooks risk, or pessimism that assumes collapse. The reality is more subtle. Subtle dangers can carry great consequences as well. The future of AI will not arrive all at once. It is being shaped gradually through decisions. The question is not simply where we will end up. It is how consciously we choose to get there.</p><p>I remain cautiously optimistic about the future of humanity and AI. But optimism alone is not enough, it must be matched with participation. There’s a need to take action and get involved because in a world where a system increasingly shape what is known and what is accepted as true, absence is not neutral, it’s forfeiture.</p><blockquote><em>Originally written in May, 2026</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=720556550293" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Architecture: File Structure for Scalable projects]]></title>
            <link>https://medium.com/@obizzkingsley/react-architecture-file-structure-for-scalable-projects-af84a66b19c1?source=rss-2cd9407ae1f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/af84a66b19c1</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Kingsley Nworie]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 10:46:28 GMT</pubDate>
            <atom:updated>2026-06-18T10:46:28.530Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4HPhBsQwTE_6bFoLwZTKg.jpeg" /></figure><h3>Introduction</h3><p>Organising a React app is one of those things that don’t have an absolute right or wrong way of doing it, but depending on the structure, you could make your life slightly or way less painful. Some of us, never think about how we want our React project structured at the beginning of the project because it is non-opinionated. It works no matter how we decide to structure it, provided the imports check out. It’s as the project grows that you might start to regret your file structure and be forced to reorganize the whole thing which, to be honest, is not a lot of fun to do.</p><p>In this article I’m going to show you what I consider to be a “just-right” and scalable file structure for intermediate and large-scale production React Applications which I have come to develop from research and some experience working on several large-scale React apps.</p><h3>Architecture by File-Type</h3><p>In a typical React application i.e after running npx create-react-app, the file structure is organized based on the component paradigm, where each component has its folder and files and each folder, has its files and sometimes folders too and so on. Here&#39;s a typical structure:</p><pre>my-react-app/<br>├── node_modules/<br>├── public/<br>│   ├── index.html<br>│   └── favicon.ico<br>│  <br>├── src/<br>│   ├── components/<br>│   │   ├── Navbar.js<br>│   │   ├── Footer.js<br>│   │   └── ...<br>│   ├── styles/<br>│   │   ├── Navbar.css<br>│   │   ├── Footer.css<br>│   │   ├── Home.css<br>│   │   ├── Register.css<br>│   │   └── ...<br>│   ├── pages/<br>│   │   ├── Home/<br>│   │   │   └── Home.js<br>│   │   ├── Register/<br>│   │   │   └──  Register.js<br>│   │   └── ...<br>│   ├── App.js<br>│   ├── index.js<br>│   └── index.css<br>│  <br>├── package.json<br>└── README.md</pre><p>Well, technically, Create-react-app doesn’t come with the <em>pages</em>, <em>styles</em> or <em>components</em> folder. It’s common sense and an instinct to want to have that folder. This architecture is focused on file type as opposed to a feature. Notice how all CSS files are in the styles folder, and all modularized reusable JS code are together in the component folder. This structure works, it’s simple and great for small-size projects but this could develop into a monolithic application as the project gets bigger, making it messy and more difficult to work with. Imagine having about a hundred different CSS files or a few hundred more reusable components. See? Not great for large-scale projects.</p><h3>Architecture by Feature</h3><p>This is what I like to call a “just-right” and scalable file structure. Structuring a React app by feature means organizing the codebase of the app around specific features or user stories. This approach groups together all files related to a particular feature together in one place, making it easier to understand, test and modify the feature in the future without affecting other parts of the app. This will prove very helpful when the project grows.</p><p>If you’re structuring your React app this way, it means that code related to a feature (sometimes referred to as a module) in the app is organized into a directory named after that feature. For example, if the app has a register feature, all the code related to the register feature, including the React components, CSS styles, helper functions, custom hooks, API requests, and tests, will be located in the directory named ‘register’.</p><p>It doesn’t end there, within a feature directory, the code can be further organized into subdirectories based on the file type. For example, the ‘register’ feature might contain subfolders for components, assets, styles, helpers, hooks, API, and tests. Please don’t just create all these folders within the feature directory, do so only when the feature needs it. i.e you could have a feature with a test, components and styles folder without the hooks or API folder and another feature with the API, helper and no styles or component folder. You just have to create these subdirectories based on the feature requirements.</p><pre>/src<br>├── common/<br>│   ├── components/<br>│   ├── helpers/<br>│   ├── styles/<br>│   ├── tests/<br>│   └── utils/<br>│<br>├── dashboard/<br>│   ├── components/<br>│   │   ├── Dashboard.jsx<br>│   │   ├── DashboardChart.jsx<br>│   │   ├── DashboardTable.jsx<br>│   │   └── DashboardWidgets.jsx<br>│   ├── styles/<br>│   ├── helpers/<br>│   ├── tests/<br>│   └── api.js<br>│<br>├── authentication/<br>│   ├── components/<br>│   │   ├── /LoginForm.jsx<br>│   │   ├── /SignupForm.jsx<br>│   │   ├── /ResetPassword.jsx<br>│   │   └── /VerificationEmail.jsx<br>│   ├── pages/<br>│   │   ├── Login/<br>│   │   └── Signup.jsx/<br>│   ├── styles/<br>│   ├── helper/<br>│   ├── tests/<br>│   └── api.js<br>│<br>├── settings/<br>│   ├── components/<br>│   │   ├── UserProfile.jsx<br>│   │   ├── UserSettings.jsx<br>│   │   ├── ChangePassword.jsx<br>│   │   └── NotificationSettings.jsx<br>│   ├── pages/<br>│   ├── styles/<br>│   ├── helpers/<br>│   └── api.js<br>│<br>├── landing-page/<br>│   ├── components/<br>│   │   ├── HeroSection.jsx<br>│   │   ├── FeaturesSection.jsx<br>│   │   ├── PricingSection.jsx<br>│   │   └── ContactSection.jsx<br>│   ├── styles/<br>│   ├── helpers/<br>│   └── api.js<br>│<br>├── routes/<br>│   ├── .../<br>│   └── index.js<br>│<br>├── app.js<br>├── index.js<br>└── ...</pre><p>In this example, the app is organized into four feature directories: dashboard, authentication, settings, and landing page. Each feature directory contains subdirectories for components, styles, pages, helpers, tests, and whatever else the feature needs.</p><p>It is also important to notice that the common directory contains code that is used across multiple features, such as common components, styles, tests, and functions.</p><p>Now imagine the app grows to have a few hundred CSS files among these 4 features. All these css files won’t be in one place, they’d be split between the features based on which feature uses it and CSS files shared among several features would be in the common directory. You can start to see how easy it would be to find the styles you’d need depending on what feature you’re currently working on.</p><p>Overall, structuring a React app by feature can help keep the codebase organized and modular, making it easier to maintain and scale as the application grows.</p><h3>Bonus</h3><p>As a “thank you” for reading this lengthy article, I have a bonus for you.</p><p>We have taken a look at two architectures and even though the latter is a more efficient approach and has been given the developer’s choice award on several occasions (<em>This is a joke by the way</em>), there are certainly other ways to structure your code that can help make your React project more organized, maintainable and scalable.</p><p>I developed a structure template that I tend to use more often with intermediate-size projects. It is a modification of the first architecture I shared with us in this article. It’s like an architecture by file type but on architecture by feature steroids.</p><pre>│<br>├── src/<br>│   ├── assets/<br>│   ├── data/<br>│   ├── hooks/<br>│   ├── styles/<br>│   │   └── components/<br>│   │       ├── form/<br>│   │       └── interface/<br>│   │    <br>│   ├── tests/<br>│   │   └── components/<br>│   │       ├── form/<br>│   │       └── interface/<br>│   │    <br>│   ├── components/<br>│   │   ├── form/<br>│   │   │   ├── Search.js<br>│   │   │   ├── Select.js<br>│   │   │   └──  Select.js<br>│   │   ├── interface/<br>│   │   │   └──  LoadingPage.js<br>│   │   └── ...<br>│   │   <br>│   ├── pages/<br>│   │   ├── Home/<br>│   │   │   ├── components/<br>│   │   │   │   ├── Header.js/<br>│   │   │   │   └── Footer.js/<br>│   │   │   ├── tests/<br>│   │   │   ├── styles/<br>│   │   │   └── index.js<br>│   │   │  <br>│   │   ├── Login/<br>│   │   │   ├── components/<br>│   │   │   │   ├── LoginForm.js/<br>│   │   │   │   └── ForgotPasswordForm.js/<br>│   │   │   ├── tests/<br>│   │   │   ├── styles/<br>│   │   │   └── index.js<br>│   │   └── ...<br>│   ├── App.js<br>│   ├── index.js<br>│   └── index.css<br>│<br>├── package.json<br>└── README.md</pre><p>In this example, there are a couple of things that are worth noticing.</p><ul><li>Notice how the “components” folder on the root directory now has subdirectories with descriptive names representing the type of components it contains.</li><li>The “pages” subdirectories are treated as a feature(module) and it houses all files related to that page. Including styles, tests, helper functions, React components and more.</li><li>Now that all pages have it’s own files grouped, we can now use the components folder in the root directory for common components: components used across more than one page. Same for other folders in the root directory as well like the hooks, styles, tests, helper and API folders</li></ul><p>Just like I said in the opening of this article there’s no right or wrong way. React file stucture is totally flexible and you have full power to decide how you want to do it. I only advice that you take an approach that creates lesser pain.</p><blockquote><em>Originally written in 2023 — some tooling details may differ, but the core approach holds.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af84a66b19c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set up Git on your Computer]]></title>
            <link>https://medium.com/@obizzkingsley/how-to-set-up-git-on-your-computer-02e54151650c?source=rss-2cd9407ae1f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/02e54151650c</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[thekingslee]]></category>
            <dc:creator><![CDATA[Kingsley Nworie]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 10:34:02 GMT</pubDate>
            <atom:updated>2026-06-18T10:34:02.848Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Git?</h3><p>Git is unarguably one of the best inventions of the 21st century. Git is the most popular version control system. A version control system tracks and records changes made in our code over time in a special hidden folder created in the project directory called a repository and when something breaks <em>which happens</em>, the developers can turn back time and compare older versions of the code to help fix the problems. With the help of git, we can check project history to know what changed, when and by who. This helps developers to scale, collaborate and work together seamlessly. One of the reasons git is so popular is because it is free and open-source, which means that anyone can use it, build on top of it, and even add to it.</p><p>Git has a decentralized nature known as Distributed Version Control System. This means there’re centralized version control systems. The problem with the centralized version control systems (VCS) is the single point of failure. More about the types of version control systems (VCS) in another article someday, it’s not in the scope of this article.</p><p>In addition, it is important to be aware that before git can be used on your local machine, it has to be installed.</p><h3>What this tutorial covers</h3><ul><li>Installing git</li><li>Setting a configuration for git</li></ul><h3>Installing git</h3><p>Now we have some knowledge about what git is. Let’s have it set up and ready to use on our PC. There’re various ways to use git</p><ul><li>The command line</li><li>Code editors &amp; IDEs( Integrated Development Environment )</li><li>GUIs (Graphical User Interfaces)</li></ul><p>Throughout this tutorial, I will mostly use the command line and in some cases use Git Bash.</p><p>If you already have git installed, I recommend you follow this tutorial to install the latest version, let’s see if you have git on your machine. If yes, which version you have installed?</p><p>To do this, open the command prompt and run this code.</p><pre>git --version</pre><p>If you don’t have git installed, this is what you’ll see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*gEvl_2s5gwG7yTUP.png" /></figure><p>On the other hand, this is what you see if you have git installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*lAvWjkSARKImj2Wh.png" /></figure><p>Good. Let’s download an installer for git. Head over to https://git-scm.com/downloads by clicking <a href="https://git-scm.com/downloads">here</a> and download the installer for git.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jvAZkzyH9IOL0ZkN.png" /></figure><p>At the time of writing this, the latest version of Git is version 2.35.1 and that is exactly what we will install. Make sure to download an installer depending on the operating system you&#39;re using. In my case, Windows.</p><p>After downloading the installer, go to the local directory where it is stored and double click to run the .exe file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/0*JC6bvLcT7Px1WVV8.png" /></figure><p>Follow all instructions, and click next until it’s done installing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*99QBQabCB7FYOhlx.png" /></figure><p>Congratulations. You now have git installed on your computer. Need to confirm if it’s installed? you can run git --version as explained earlier in this article.</p><h3>Setting a configuration for git</h3><p>Once you follow the instruction above to install git, you’re going to get this application called Git Bash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*J1dZ63pNc1LCYM8W.png" /></figure><p>Git Bash is basically a command prompt window but it emulates Linux environment. moving forward, we will be using git Bash to finish up the configuration for git. I encourage you to use Git Bash for the rest of the tutorial rather than the built-in command prompt. If you feel more comfortable using the command prompt, windows Powershell, or VS Code terminal, go ahead, we will get the same result.</p><p>The first time we use git in a machine, we have to specify some configuration settings. We have to specify our name, email, default editor, and line endings.</p><p>There are three different levels where we can specify these configuration settings;</p><ul><li>System (for all users)</li><li>Global (for all repositories of the current user)</li><li>Local (the repository in the current folder)</li></ul><p>We are going to be specifying these configurations for the global level. To do this we type git config, then --global to specify the level at we which we want to define these settings and the settings we want to configure user.name into the command prompt window. The full command should look like this.</p><pre>git config --global user.name &quot;Nworie Kingsley&quot;</pre><p>Notice that I wrap my full name with double-quotes. This is because of the space in between the names. If there’s no space, there will be no need for quotes.</p><p>Let’s define the configuration for the email.</p><pre>git config --global user.email obi******sley@gmail.com</pre><p>Notice that we didn’t need to wrap the email in quotes that’s because there’s no space(s). By the way, you should use your own email and your name in these configurations and not the email and names used in these examples.</p><p>Next, we specify the default editor.</p><pre>git config --global core.editor &quot;code --wait&quot;</pre><p>And finally, we specify the configuration for line endings.</p><p>If you’re on windows, run this command</p><pre>git config --global core.autocrlf true</pre><p>If you’re on mac run this</p><pre>git config --global core.autocrlf input</pre><p>crlf here means carriage return, line feed.</p><p>Line ending is a very technical topic. There are basically two kinds of line endings,</p><ul><li>Carriage return(\r)</li><li>Line feed(\n)</li></ul><p>Configuring line endings help us avoid errors associated with <em>end of line</em> while collaborating with other developers using git. One case that can cause line-ending errors is a situation where several developers contributing to the same source code uses different operation system(OS). This is beyond the scope of this article.</p><p>Thanks to the command we wrote earlier to configure line endings we won’t have to worry about line-ending related errors in the future.</p><p>Awesome. we are all set up and ready to start using git. Don’t forget to subscribe, so you can be notified when I finally write an article on line-endings and types of version control systems.</p><p>Oops almost forgot. To have a peek into the git configurations on your machine at the global level, run this command</p><pre>git config --global -e</pre><p>This opens up your default editor to reveal all specified git configurations on the global level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Bz6TundZ3nH68RFh.png" /></figure><h3>Conclusion</h3><p>For git to be used on your local machine, it has to be installed. Click <a href="https://git-scm.com/downloads">here</a> to download the installer.</p><p>To understand more about git configurations, click <a href="https://git-scm.com/docs/git-config">here</a>.</p><p>If for any reason it didn’t work for you as explained in this article, reach out to me <a href="https://www.x.com/thekingslee">here</a>.</p><p>Happy Easter, I had a swell time working on this article. 🤍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02e54151650c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrap and Miller Time Base Generator — Academic work]]></title>
            <link>https://medium.com/@obizzkingsley/ece-328-assignment-f35aa28eb133?source=rss-2cd9407ae1f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f35aa28eb133</guid>
            <dc:creator><![CDATA[Kingsley Nworie]]></dc:creator>
            <pubDate>Wed, 24 Nov 2021 22:56:35 GMT</pubDate>
            <atom:updated>2026-08-05T09:57:59.509Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bootstrap and Miller Time Base Generator</h3><h4><strong>Bootstrap Time Base Generator</strong></h4><p>In the field of <a href="https://en.wikipedia.org/wiki/Electronics">electronics</a>, <strong>bootstrapping </strong>is a technique where some part of the output of a system is used at startup.</p><p>A <strong>bootstrap</strong> <strong>circuit </strong>is one where part of the output of an amplifier stage is applied to the input, so as to alter the input <a href="https://en.wikipedia.org/wiki/Electrical_impedance">impedance</a> of the amplifier. When applied deliberately, the intention is usually to increase rather than decrease the impedance.</p><p>A <strong>bootstrap time base</strong> <strong>generator </strong>is a time base generator circuit whose output is fed back to the input through the feedback. This will increase or decrease the input impedance of the circuit. This process of <strong>bootstrapping</strong> is used to achieve constant charging current.</p><h4><strong>Construction of a Bootstrap Time Base Generator</strong></h4><p>The boot strap time base generator circuit consists of two transistors, Q1 which acts as a switch and Q2 which acts as an emitter follower. The transistor Q1 is connected using an input capacitor CB at its base and a resistor RB through VCC. The collector of the transistor Q1 is connected to the base of the transistor Q2. The collector of Q2 is connected to VCC while its emitter is provided with a resistor RE across which the output is taken.</p><p>A diode D is taken whose anode is connected to VCC while cathode is connected to the capacitor C2 which is connected to the output. The cathode of diode D is also connected to a resistor R which is in turn connected to a capacitor C1. This C1 and R are connected through the base of Q2 and collector of Q1. The voltage that appears across the capacitor C1 provides the output voltage Vo.</p><p>The following figure explains the construction of the boot strap time base generator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*rNPvU7jmSdGHVTuRsr7fhg.jpeg" /></figure><h4>Advantage</h4><p>The main advantage of this boot strap ramp generator is that the output voltage ramp is very linear and the ramp amplitude reaches the supply voltage level.</p><p>It is used to raise the input impedance of an amplifier stage. It utilizes a small amount of positive feedback, so that the output adds to the input rather than subtracts from it.</p><h4>Miller Sweep Generator</h4><p>The transistor Miller time base generator circuit is the popular <strong>Miller integrator</strong> circuit that produces a sweep waveform. This is mostly used in horizontal deflection circuits. Miller theorem helps reduce the complexity in some circuits particularly with feedback by converting them to simpler equivalent circuits. Miller sweep circuits are the most commonly used integrator circuit in many devices. It is a widely used saw tooth generator. The introduction of an impedance that connects amplifier input and output ports adds a great deal of complexity in the analysis process.</p><h4>Construction of Miller Sweep Generator</h4><p>The Miller time base generator circuit consists of a switch and a timing circuit in the initial stage, whose input is taken from the Schmitt gate generator circuit. The amplifier section is the following one which has three stages, first being an <strong>emitter follower</strong>, second an <strong>amplifier</strong> and the third one is also an <strong>emitter follower</strong>.</p><p>An emitter follower circuit usually acts as a <strong>Buffer amplifier</strong>. It has a <strong>low output impedance</strong> and a <strong>high input impedance</strong>. The low output impedance lets the circuit drive a heavy load. The high input impedance keeps the circuit from not loading its previous circuit. The last emitter follower section will not load the previous amplifier section. Because of this, the amplifier gain will be high.</p><p>The capacitor C placed between the base of Q1 and the emitter of Q3 is the timing capacitor. The values of R and C and the variation in the voltage level of VBB changes the sweep speed. The figure below shows the circuit of a Miller time base generator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*DBslfGnp4ftdvHfkUrsPdw.jpeg" /><figcaption>Construction of the Miller Sweep Generator</figcaption></figure><h4>Advantage</h4><p>Miller sweep circuits are the most commonly used integrator circuit in many devices. It is a widely used saw tooth generator.</p><h3>Creation Astable Multi-vibrator Using 555Timer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*CVq0e80uvvpDeIl6nU6OfA.png" /><figcaption>Schematics for an Astable Multi-vibrator using 555-timer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yX8GE6Qr-U6pMAyY666CgQ.png" /><figcaption>Simulation of an Astable Multi-vibrator using 555-timer on Fritzing</figcaption></figure><h3>Construction of a Transistor Acting as a Switch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*Rc2D3ekIU0TCRrWewqJNhw.png" /><figcaption>Schematics for Transistor acting as a switch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*82pbR66Rrfa1iSva6-npDw.png" /><figcaption>Simulation on Fritzing</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f35aa28eb133" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>