Model

Training corpus

Compute

Outcome

Jhelum Labs 125M base

2.825B train tokens

1× NVIDIA H100

Pretraining completed; best validation loss 3.3804

Prepared for Jhelum Labs

Finalized 20 August 2026

Document scope and evidence

This report consolidates the recorded W-1.1 experiment lineage, final dataset preparation, custom architecture, H100 pretraining logs, saved artifacts, qualitative text-generation tests, failure recovery, and the remaining production roadmap. Numeric claims about the final run are drawn from the notebook outputs and screenshots preserved during the project conversation.

Evidence boundary The report does not invent missing checkpoints. Where only selected log lines were recorded, graphs use those observed points and connect them for readability. A connected line is not a claim that every intermediate step had the interpolated value.

Contents

  • 1. Executive summary
  • 2. Experimental lineage
  • 3. Final system design
  • 4. Dataset engineering
  • 5. H100 training run
  • 6. Results and interpretation
  • 7. Generation-quality research
  • 8. Failure recovery and reproducibility
  • 9. Artifact inventory
  • 10. Production readiness
  • 11. Benchmark and SFT plan
  • 12. Conclusions
  • Appendix A. Recorded logs
  • Appendix B. References

1. Executive summary

Outcome Jhelum Labs 125M completed next-token pretraining successfully. It contains 123,688,704 trainable parameters, uses a 32,000-token BPE vocabulary and 2,048-token context, and completed 5,389 optimizer steps over approximately one full pass of the 2.825B-token training split.

The model is a decoder-only Transformer implemented from scratch with RMSNorm, rotary positional embeddings, causal scaled dot-product attention, SwiGLU feed-forward blocks, and tied input/output embeddings. The final run used an NVIDIA H100 and stabilized near 375,000–377,000 tokens per second after startup.

The strongest recorded checkpoint occurred at step 2,750 with validation loss 3.3804, corresponding to perplexity 29.38. Later validation measurements rose, so best.safetensors—not the final-step weights—is the recommended inference and fine-tuning starting point. The behavior is consistent with a functioning base language model: it generates readable, topical paragraphs but can hallucinate institutions, studies, quotations, and citations.

Final metric

Recorded value

Interpretation

Parameters

123,688,704

Same broad size class as GPT-2 Small

Train / val / test

2.825B / 25M / 5M tokens

Exact binary split targets finalized

Optimizer steps

5,389

524,288 tokens per nominal step

Best validation loss

3.3804 at step 2,750

Selected best checkpoint

Best recorded perplexity

29.38

exp(3.3804); tokenizer/dataset specific

Sustained throughput

≈375k–377k tokens/s

Observed after warm-up on H100

Base weight size

471.8 MB

FP32 Safetensors shown in Drive

Research conclusion

The pretraining phase is technically successful, but the model is not yet production-ready. It remains a base continuation model rather than an instruction-following assistant. Production requires standardized benchmarks, test-set evaluation, Hugging Face-compatible packaging, supervised instruction tuning, safety evaluation, quantization, API serving, and monitoring.

2. Experimental lineage

W-1.1 was developed through progressively larger experiments. Each phase tested a different risk: whether the pipeline runs, whether validation behavior can be observed, whether a broader tokenizer and dataset remain stable, and whether the final architecture can train efficiently at scale.

Phase / project

Scale and data

Recorded result

Research lesson

Phase 1 — tiny prototype

≈13M parameters; very small corpus

Pipeline and generation smoke tests

Validate code before spending significant compute

Phase 2 — Project Tazi

≈15.97M; OpenWebText experiment

Validation initially fell, then rose near longer training

Track validation and stop before overfitting

Phase 3 — Project Spark

≈17M-class; TinyStories 500 MB; vocab 8,000

Near step 19,499: best val ≈1.4909; final val ≈1.5113

Clean domain data can yield strong small-model fluency

Phase 4 — Spectrum / infrastructure

20,000-step planning; Colab/Lightning transition

Drive, SSH, checkpoint, and GPU workflow research

Infrastructure reliability is part of model research

Final — Jhelum Labs 125M

123.69M; vocab 32,000; 2.825B train tokens

Best val 3.3804; coherent open-domain generation

Scale worked, but data quality and post-training now dominate

Key experimental decisions

  • Use a raw-first pipeline with deduplication, then tokenize into uint16 binary files.
  • Reserve exact validation and test targets instead of relying on approximate file percentages.
  • Use a modern decoder-only design rather than copying GPT-2 exactly.
  • Train the full final model on H100 while keeping local 4 GB GPU inference as a deployment constraint.
  • Preserve both best and final checkpoints, plus a resumable latest.pt training checkpoint.

3. Final system design

Jhelum Labs 125M is a causal decoder-only Transformer. Given a sequence of token IDs, it predicts the probability distribution of the next token at every position. Training minimizes token-level cross-entropy against the sequence shifted by one token.

Component

Final configuration

Purpose

Vocabulary

32,000 BPE tokens

Compact subword representation for open-domain text

Context length

2,048 tokens

Longer document continuity than early experiments

Embedding width

768

Hidden representation size

Transformer blocks

14

Depth of causal representation learning

Attention heads

12 × 64 dimensions

Parallel attention subspaces

Feed-forward width

2,048

SwiGLU nonlinear transformation

Normalization

RMSNorm, ε = 1e-6

Stable pre-normalized residual blocks

Position method

RoPE, θ = 10,000

Relative position behavior without learned position table

Attention

Causal SDPA

Efficient next-token attention

Embedding tie

lm_head.weight = embed.weight

Parameter efficiency and consistent token geometry

Biases

Disabled in linear layers

Reduced parameter overhead

Parameter accounting

The implemented architecture was checked before training. The recorded count was exactly 123,688,704 parameters, within the intended 123–125M range. Tied embeddings avoid maintaining a separate 32,000 × 768 output matrix.

Design lineage The causal Transformer follows the attention-based architecture introduced by Vaswani et al. The GPT-style objective follows decoder-only autoregressive language modeling, while RMSNorm, RoPE and SwiGLU are modernized implementation choices.

4. Dataset engineering

The final raw text file was approximately 17.005 GB. It was processed document-by-document with the custom 32,000-token tokenizer. Exact validation and test token quotas were filled while all remaining tokens were assigned to training.

Figure 1. Exact token allocation after the interrupted preprocessing run was finalized from the existing binary files.

Figure 1. Exact token allocation after the interrupted preprocessing run was finalized from the existing binary files.

Split

Tokens

Binary size

Share of all finalized tokens

Training

2,825,248,272

5.262 GiB

98.95%

Validation

25,000,000

0.047 GiB

0.88%

Test

5,000,000

0.009 GiB

0.18%

Total

2,855,248,272

≈5.318 GiB

100.00%

Preprocessing interruption and recovery

Cell 9 stopped after creating valid binary files. Instead of restarting the entire 17 GB preprocessing job, the existing train.bin, val.bin and test.bin files were inspected and finalized. The recovered counts were written to meta.json and manifest.json. This preserved 2.825B training tokens and avoided an expensive rebuild.

Integrity result Validation reached exactly 25,000,000 tokens and test reached exactly 5,000,000 tokens. The training split contained all completed remaining tokens: 2,825,248,272.

Data-quality limitation

Qualitative generations resemble web articles and occasionally invent studies, authors, journals and funding sources. This indicates that the corpus taught useful grammar and topical associations but retained noisy web-style patterns. Future corpus versions should strengthen source filtering, document quality scoring, language identification, near-duplicate removal, citation-pattern filtering, and personally identifiable information checks.

5. H100 training run

The final job used a detached Modal function with one NVIDIA H100. Dataset files were staged from Google Drive to a persistent Modal Volume, copied to local SSD, verified, and then consumed by the training loop. The notebook itself could remain on CPU because the detached training function owned the H100 container.

Training property

Recorded value

Parameter count

123,688,704

Tokens per optimizer step

524,288

Optimizer steps

5,389

Nominal scheduled tokens

2,825,388,032

Available train tokens

2,825,248,272

Precision during compute

Mixed precision on H100; FP32 saved parameters

Checkpoint behavior

Periodic validation and persistent volume commits

Best checkpoint

Step 2,750

Figure 2. Recorded learning rate and throughput. Startup was slow, then throughput stabilized around 375k–377k tokens/s.

Figure 2. Recorded learning rate and throughput. Startup was slow, then throughput stabilized around 375k–377k tokens/s.

The difference between nominal scheduled tokens and available train tokens is 139,760 tokens—less than one optimizer step. The loader’s modulo behavior means the final step can wrap to the beginning of the binary dataset, effectively completing about one epoch.

Compilation failures and repair

  1. The first H100 attempt failed because CUDA Graph outputs were overwritten across repeated compiled invocations during gradient accumulation.
  2. A subsequent torch.compile change supplied both mode and options, which PyTorch rejects.
  3. The compile configuration was repaired by disabling CUDA Graphs through a single valid compile configuration.
  4. The resumed job started correctly, reached step 1, then sustained full H100 throughput and completed training.

6. Results and interpretation

Figure 3. Selected observed loss points from the recorded console logs. The green marker is the best validation checkpoint.

Figure 3. Selected observed loss points from the recorded console logs. The green marker is the best validation checkpoint.

Figure 4. Validation perplexity computed as exp(validation loss). Values are specific to this tokenizer and validation corpus.

Figure 4. Validation perplexity computed as exp(validation loss). Values are specific to this tokenizer and validation corpus.

Recorded validation checkpoints

Step

Train loss

Validation loss

Perplexity

Status

1,000

3.7530

3.7752

43.61

New best at that time

2,750

3.1383

3.3804

29.38

Best recorded checkpoint

3,000

4.1320

3.8948

49.15

Validation degradation

4,000

3.2825

4.0864

59.53

Highest recorded validation loss

5,000

2.8154

3.6045

36.76

Recovered, still above best

What the curve suggests

  • The model learned rapidly: loss fell from 10.5419 at step 1 to below 4 by roughly step 900.
  • The best generalization point appeared around the midpoint of the one-epoch run at step 2,750.
  • A noisy instability band appeared around steps 2,790–2,880, where loss and gradient norms rose sharply.
  • Later train losses sometimes improved while validation remained worse than the best checkpoint, so final-step weights should not automatically replace best weights.
  • The validation series is sparse. More frequent, fixed-batch evaluation would separate genuine drift from validation sampling noise.

Checkpoint decision Use best.safetensors for inference, benchmarking and instruction tuning. Keep Jhelum Labs 125M-final.safetensors for research comparison and latest.pt only for resuming the optimizer state.

7. Generation-quality research

The final model generated coherent paragraphs from open-ended prompts. It maintained local topic consistency, used headings and bullet formatting, and produced mostly grammatical English. These are strong signs that next-token pretraining succeeded.

Sample A — artificial intelligence

Prompt Artificial intelligence will

The model continued with claims about learning from less data, an MIT experiment, Nature Communications, speech recognition, a named researcher and research funding. The prose was fluent and structurally plausible, but the named study, quotation and funding claims were not verified.

Dimension

Assessment

Grammar

Good

Topic continuity

Good

Structure

Good

Repetition

Moderate around speech recognition

Factual reliability

Low without retrieval or verification

Sample B — education

Prompt Education is important

The model produced sections titled “What is the future of education?” and “How do I get started?”, followed by bullets. It demonstrated formatting competence but included vague reasoning and a grammar error (“it’s needs” instead of “its needs”).

Sample C — young scientist

Prompt Once upon a time, there was a young scientist who

The continuation began as a narrative, then shifted into a fabricated biography and web-post language about homemade drugs. This shows topic drift, data-mixture artifacts and a safety risk. The model should not be publicly exposed without moderation and post-training.

Qualitative scorecard

Capability

Observed level

Evidence

Fluency

Promising

Readable paragraphs and mostly correct syntax

Local coherence

Moderate–good

Stays near the prompt topic over several sentences

Long-range coherence

Moderate

Narratives can drift into unrelated article patterns

Formatting

Good

Headings, questions and bullets appeared naturally

Factuality

Weak

Invented citations, people and institutions

Instruction following

Not trained

Base model continues text rather than reliably obeying commands

Safety

Not production-ready

Unsafe topic drift observed

8. Failure recovery and reproducibility

The project encountered infrastructure and code failures that are part of the final research record. Each failure produced a concrete engineering lesson.

Failure

Root cause

Resolution

Preventive control

Preprocessing stopped

Notebook interruption during 17 GB pass

Finalize existing valid binaries

Atomic manifests and resumable document index

RAW_INDEX NameError

Cell depended on state from earlier cells

Recreate all artifact paths in the validation cell

Make each notebook stage self-contained

Drive API missing

Authentication cell not run / token path differed

Load token.json explicitly

Credential preflight before checksum work

Modal disk bounds

Requested 16 GiB below platform minimum

Increase ephemeral disk request

Validate provider constraints before launch

CUDA Graph overwrite

torch.compile graph reuse with repeated backward

Disable CUDA Graphs

Compile smoke test with full grad accumulation

Compile option conflict

Both mode and options supplied

Use one valid configuration

Syntax and one-step remote test

Reproducibility controls now present

  • Tokenizer and tokenizer metadata stored separately from weights.
  • meta.json and manifest.json record finalized binary split information.
  • config.json records final architecture and training configuration.
  • metrics.json preserves the training/validation record.
  • best, final and resumable checkpoints serve different recovery purposes.
  • A local VS Code CUDA notebook reconstructs the exact architecture and verifies the parameter count before loading weights.

9. Artifact inventory

Figure 5. Displayed Google Drive file sizes for the final model artifacts.

Figure 5. Displayed Google Drive file sizes for the final model artifacts.

Artifact

Displayed size

Purpose

Retention decision

best.safetensors

471.8 MB

Lowest recorded validation loss

Primary base model; never overwrite

Jhelum Labs 125M-final.safetensors

471.8 MB

Final-step model weights

Keep for comparison and audit

latest.pt

1.38 GB

Weights + AdamW optimizer and resume state

Keep while resume remains possible

config.json

553 bytes

Architecture/training configuration

Ship with every model package

metrics.json

4 KB

Recorded training metrics

Keep with report and model card

sample.txt

1,000 bytes shown

Latest generation sample

Replace only intentionally

Precision and deployment size

Format

Approximate weights-only size

Use

FP32

471.8 MiB displayed by Drive

Archival and exact current checkpoint

FP16/BF16

≈236 MiB

Fast GPU inference

INT8

≈118 MiB

Memory-efficient CPU/GPU inference after calibration

INT4

≈59 MiB

4 GB VRAM deployment; quality must be evaluated

Security note Safetensors is preferred for inference distribution because it stores tensors without executable pickle objects. latest.pt should be treated as a trusted internal resume checkpoint rather than a public inference artifact.

10. Production readiness

Pretraining completion is not equivalent to production readiness. The following gate separates work already completed from work still required.

Production gate

Status

Next evidence required

Base pretraining

Complete

Final report and immutable checksum manifest

Local CUDA inference

Implemented

Repeatable latency/VRAM measurements on GTX 1650

Held-out test loss

Pending

Exact loss and perplexity on test.bin

Standard benchmarks

Pending

ARC-Easy, HellaSwag, PIQA, WinoGrande, LAMBADA; then MMLU/GSM8K

HF-compatible package

Pending

Custom config/model classes and tokenizer package

Instruction tuning

Pending

Clean SFT dataset, train/val split, best instruct checkpoint

Safety evaluation

Pending

Toxicity, unsafe completion, privacy and refusal test suites

Quantization

Pending

FP16, INT8 and INT4 quality/latency comparison

API serving

Pending

Authenticated endpoint, batching, limits and observability

Monitoring

Pending

Latency, errors, unsafe outputs, feedback and rollback

Recommended production architecture

  • Immutable model registry: base, instruct, quantized and deployment versions with checksums.
  • Inference service: a single model worker with bounded context, token limits and request batching.
  • API layer: authentication, quotas, timeouts, schema validation and audit logging.
  • Safety layer: input classification, output moderation, blocked-token/pattern controls and escalation.
  • Observability: latency percentiles, GPU memory, generation length, error rate, safety flags and version tags.
  • Rollback: one-click return to the previous known-good model package.

11. Benchmark and instruction-tuning plan

11.1 Base-model evaluation

The first post-training phase should measure the frozen base model before any fine-tuning. The custom architecture must be packaged for Hugging Face Transformers or connected to EleutherAI’s lm-evaluation-harness through a custom adapter.

Benchmark

Primary capability

Recommended order

test.bin loss/perplexity

In-distribution next-token prediction

1 — mandatory baseline

LAMBADA

Long-context final-word prediction

2

HellaSwag

Commonsense completion

3

PIQA

Physical commonsense

4

ARC-Easy

School-level science reasoning

5

WinoGrande

Pronoun/coreference reasoning

6

MMLU

Broad academic knowledge

7 — expect low 125M baseline

GSM8K

Multi-step grade-school math

8 — diagnostic, not expected strength

11.2 Supervised instruction tuning

After freezing and reporting the base scores, fine-tune from best.safetensors rather than the final checkpoint. Preserve the original checkpoint permanently.

SFT choice

Initial recommendation

Dataset size

20,000–100,000 highly filtered prompt–response examples

Domains

Education, explanation, summarization, safe QA, coding and structured responses

Learning rate

1e-5 to 3e-5

Epochs

1–3, selected by validation

Context

1,024–2,048 tokens

Validation

2–5% held out; deduplicate across splits

Chat format

Fixed user/assistant special-token template

Output

Separate Jhelum Labs 125M-instruct.safetensors package

11.3 Local 4 GB GPU target

The current FP32 checkpoint is approximately 472 MB and FP16 parameters are approximately 236 MiB, so the 123.7M model comfortably fits in 4 GB VRAM for inference. The main inefficiency is generation without a key/value cache: each new token recomputes the entire prefix. A production inference rewrite should add KV caching before latency optimization or deployment claims.

12. Conclusions

W-1.1 progressed from small experimental models to a complete 123.69M-parameter open-domain base language model. The final system successfully learned next-token prediction over 2.825B training tokens, sustained high H100 throughput, produced coherent English continuations, and saved a complete set of best, final and resumable artifacts.

The strongest evidence of success is not a single attractive sample. It is the combination of a decreasing training loss, a measurable best validation checkpoint, stable high-throughput execution, exact artifact preservation, and repeatable local loading. The strongest evidence of remaining work is equally clear: hallucinated citations, topic drift, unsafe continuations, sparse evaluation and the absence of instruction tuning.

Final decision Declare the base-pretraining phase complete. Freeze best.safetensors as Jhelum Labs 125M Base v1.0. Begin the evaluation phase before changing the weights, then create a separately versioned Jhelum Labs 125M Instruct model.

Immediate next actions

  • Calculate exact test.bin loss and perplexity.
  • Create the Hugging Face-compatible Jhelum Labs 125M package and model card.
  • Run a 100-example benchmark smoke test, then full benchmark suites.
  • Build and audit the SFT dataset before starting instruction tuning.
  • Add KV-cache generation, quantize, and measure GTX 1650 latency and VRAM.

Appendix A. Recorded final-run logs

The following table transcribes representative console lines that were visible in the recorded project outputs. It is not a complete every-step log.

Step

Loss

LR

Grad

tok/s

Tokens

1

10.5419

3.00e-06

3.478

15,150

0.001B

10

9.5721

3.00e-05

2.535

382,150

0.005B

900

3.7661

5.76e-04

0.346

376,292

0.472B

950

3.8115

5.73e-04

0.238

377,247

0.498B

1,000

3.7530

5.69e-04

0.266

376,657

0.524B

1,810

3.5134

4.82e-04

0.235

377,806

0.949B

1,900

3.4175

4.69e-04

0.214

376,525

0.996B

1,990

3.4316

4.57e-04

0.194

377,178

1.043B

2,750

3.1383

3.37e-04

0.228

376,024

1.442B

2,810

5.2878

3.28e-04

3.073

376,783

1.473B

2,850

4.7710

3.21e-04

3.334

376,823

1.494B

2,950

2.8910

3.05e-04

1.032

375,495

1.547B

3,000

4.1320

2.97e-04

1.833

375,648

1.573B

3,150

1.8401

2.72e-04

1.011

376,964

1.652B

3,850

3.2246

1.69e-04

0.366

374,776

2.019B

4,000

3.2825

1.50e-04

0.319

376,301

2.097B

4,800

3.0274

7.70e-05

0.241

377,134

2.517B

4,900

3.0391

7.18e-05

0.226

376,049

2.569B

5,000

2.8154

6.75e-05

0.234

377,557

2.621B

Validation/checkpoint events

  • Step 1,000 — validation 3.7752; new best; checkpoint committed.
  • Step 2,750 — validation 3.3804; new best; checkpoint committed.
  • Step 3,000 — validation 3.8948; checkpoint committed.
  • Step 4,000 — validation 4.0864.
  • Step 5,000 — validation 3.6045.
  • Step 5,389 — training completed and final artifacts synchronized.

Appendix B. References

Ref.

Source

1

Vaswani, A. et al. (2017). Attention Is All You Need. arXiv:1706.03762. https://arxiv.org/abs/1706.03762

2

Radford, A. et al. (2019). Language Models are Unsupervised Multitask Learners. OpenAI. https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf

3

Hoffmann, J. et al. (2022). Training Compute-Optimal Large Language Models. arXiv:2203.15556. https://arxiv.org/abs/2203.15556

4

EleutherAI. Language Model Evaluation Harness. https://github.com/EleutherAI/lm-evaluation-harness

5

Hugging Face. Safetensors documentation. https://huggingface.co/docs/safetensors/en/index

6

PyTorch. Scaled dot product attention and CUDA-enabled training software used by the Jhelum Labs implementation. https://pytorch.org/

7

Project evidence: W-1.1 preprocessing, H100 training and generation notebook outputs recorded 19–20 August 2026.

Model identity

Field

Value

Canonical research name

W-1.1 / Jhelum Labs 125M

Base checkpoint

best.safetensors

Parameter count

123,688,704

Vocabulary

32,000 BPE tokens

Context

2,048 tokens

Status

Base pretraining complete; evaluation and post-training pending

← Previous Publication Project Instruct Next Publication → Final Architecture