LLM Developer DocsLLM Docs

Loading the search index ...

↑ ↓ move, Enter open, Esc close

GitHub

Code Explorer

Every Python file in the repository at the pinned commit, with its functions, its mathematics, what uses it, and its full source.

This list is read from data/generated/code-index.json, so it holds every Python file the extractor found and nothing else. Files in tests/ are labelled as tests.

FileKindLinesFunctionsPurpose
checkpoint.pySource462Save and load weights, model shape and tokenizer
config.pySource440Hyperparameters as module-level constants, plus two import-time assertions
data.pySource435Corpus loading, encoding, split, windows, batches
generate.pySource352Sampling and the generation loop
gradcheck.pySource333Finite-difference gradient checker, used only by tests
ops.pySource6012Differentiable operations with hand-written backward functions
optim.pySource505Adam with decoupled weight decay, learning-rate schedule, gradient clipping
talk.pySource301Interactive inference entry point
tokenizer.pySource11910Byte-pair-encoding (BPE) tokenizer, working on characters
train.pySource853Training entry point
transformer.pySource19015Parameters, forward pass, backward pass
tests/
test_checkpoint.pyTest768Checkpoint tests
test_data.pyTest8311Data pipeline tests
test_generate.pyTest8213Sampling tests
test_gradcheck.pyTest394Gradient-check tests
test_ops.pyTest8810Operation tests
test_optim.pyTest496Optimizer, schedule and clipping tests
test_tokenizer.pyTest509Tokenizer tests
test_transformer.pyTest11011Model tests

Each file's page shows where the file fits in the pipeline, what it imports, what uses it according to the call graph, the concepts that link to it, and its source with real line numbers.

A link to a function scrolls to it and highlights it, for example ops.softmax_forward. A link to one line works the same way, for example the line that saves the weights.

The call graph is static. It follows calls by name and by known types, so a call on a value of unknown type, such as a callback parameter, creates no "used by" entry.