MCPcopy Create free account

hub / github.com/rohitg00/ai-engineering-from-scratch / functions

Functions8,347 in github.com/rohitg00/ai-engineering-from-scratch

↓ 2 callersMethodlr
(self, step: int)
phases/19-capstone-projects/44-cosine-lr-warmup/code/main.py:286
↓ 2 callersFunctionlu_decompose
(A)
phases/01-math-foundations/17-linear-systems/code/linear_systems.py:26
↓ 2 callersFunctionly
(perf)
site/figures-infra.js:404
↓ 2 callersFunctionmagnitudes
(spectrum)
phases/06-speech-and-audio/01-audio-fundamentals/code/main.py:56
↓ 2 callersFunctionmahalanobis_distance
(x, y, cov_matrix)
phases/01-math-foundations/14-norms-and-distances/code/distances.py:57
↓ 2 callersFunctionmakeRng
(seed: number)
phases/17-infrastructure-and-production/16-model-routing/code/main.ts:215
↓ 2 callersFunctionmakeRng
(seed: number)
phases/17-infrastructure-and-production/14-prompt-semantic-caching/code/main.ts:163
↓ 2 callersFunctionmakeRng
(seed: number)
phases/17-infrastructure-and-production/13-llm-observability/code/main.ts:242
↓ 2 callersFunctionmake_continuous_data
(n_samples=300, seed=42)
phases/02-ml-fundamentals/14-naive-bayes/code/naive_bayes.py:130
↓ 2 callersFunctionmake_dataset
Synthetic regression dataset shared by every rank's reference loop.
phases/19-capstone-projects/77-data-parallel-ddp/code/main.py:90
↓ 2 callersFunctionmake_demo_state
Construct a representative per-rank state for the demo.
phases/19-capstone-projects/80-checkpoint-sharded-resume/code/main.py:236
↓ 2 callersFunctionmake_deterministic_critic_pair
()
phases/19-capstone-projects/55-critic-loop/code/main.py:353
↓ 2 callersMethodmake_features
(self, X)
phases/02-ml-fundamentals/02-linear-regression/code/linear_regression.py:193
↓ 2 callersFunctionmake_filler
(n_tokens, seed)
phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/code/main.py:13
↓ 2 callersFunctionmake_model
(in_dim: int, hidden: int, out_dim: int)
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:54
↓ 2 callersFunctionmake_optimizer_and_scheduler
(model: nn.Module, lr: float, total_steps: int)
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:64
↓ 2 callersFunctionmake_pair
One synthetic (image, caption_ids) pair. Image is the deterministic 224x224x3 fixture from lesson 58 with a per-pair seed. Caption is a lengt
phases/19-capstone-projects/60-projection-layer-modality-align/code/main.py:98
↓ 2 callersFunctionmake_patches
Fake 64 'patch tokens' of dim 16 from a frozen ViT.
phases/12-multimodal-ai/03-blip2-qformer-bridge/code/main.py:52
↓ 2 callersFunctionmake_patterns
Return n grayscale 8x8 patterns drawn from a tiny library.
phases/08-generative-ai/19-visual-autoregressive-var/code/main.py:40
↓ 2 callersFunctionmake_regression_data
(n_samples=300, n_features=5, noise=0.3, seed=42)
phases/02-ml-fundamentals/11-ensemble-methods/code/ensembles.py:13
↓ 2 callersFunctionmake_seasonal_series
(n=365, period=7, seed=42)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:16
↓ 2 callersFunctionmake_seed_hypotheses
Three seed hypotheses, one per research branch. Stand-in for lessons 50-53.
phases/19-capstone-projects/57-end-to-end-research-demo/code/main.py:114
↓ 2 callersFunctionmake_synthetic_sample
(size=64, rng=None)
phases/04-computer-vision/21-keypoint-pose/code/main.py:54
↓ 2 callersFunctionmake_tokens
Synthetic 'audio token' sequences by style.
phases/08-generative-ai/11-audio-generation/code/main.py:9
↓ 2 callersFunctionmargin_table
Per-triple margin report under the policy. Useful for debugging.
phases/19-capstone-projects/40-dpo-from-scratch/code/main.py:309
↓ 2 callersFunctionmastery_sum
(state: LearnerState, cmap: dict[str, Concept])
phases/19-capstone-projects/17-personal-ai-tutor/code/main.py:176
↓ 2 callersFunctionmat
(rows: int, cols: int)
phases/12-multimodal-ai/05-llava-visual-instruction-tuning/code/main.py:30
↓ 2 callersFunctionmatmul
(W, x)
phases/08-generative-ai/05-stylegan/code/main.py:13
↓ 2 callersFunctionmatvec
(M, v)
phases/05-nlp-foundations-to-advanced/10-attention-mechanism/code/main.py:36
↓ 2 callersFunctionmax_pool
(values)
phases/05-nlp-foundations-to-advanced/08-cnns-rnns-for-text/code/main.py:21
↓ 2 callersMethodmax_severity
(self)
phases/19-capstone-projects/86-constitutional-rules-engine/code/main.py:64
↓ 2 callersFunctionmaxsim
ColBERT MaxSim: sum over query tokens of max over patches.
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:35
↓ 2 callersFunctionmean
(xs)
phases/08-generative-ai/03-gans-generator-discriminator/code/main.py:153
↓ 2 callersFunctionmean_reciprocal_rank
(retrieved_per_query: list[list[str]], gold_per_query: list[set[str]])
phases/19-capstone-projects/68-rag-eval-precision-recall/code/main.py:62
↓ 2 callersFunctionmean_std
(xs)
phases/08-generative-ai/05-stylegan/code/main.py:21
↓ 2 callersFunctionmean_var
(embs)
phases/06-speech-and-audio/17-audio-evaluation-metrics/code/main.py:63
↓ 2 callersFunctionmean_vec
(vectors)
phases/08-generative-ai/14-evaluation-fid-clip-score/code/main.py:5
↓ 2 callersFunctionmeasureStage
(_stage: number, reg: Regression, seed: number)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:92
↓ 2 callersFunctionmeasure_bubble
Empirical bubble: count idle slots in the rendered schedule.
phases/19-capstone-projects/79-pipeline-parallel/code/main.py:90
↓ 2 callersFunctionmeasure_forgetting
(model, test_text, seq_len=64)
phases/10-llms-from-scratch/06-instruction-tuning-sft/code/main.py:216
↓ 2 callersFunctionmemory_table
Per-rank memory in bytes for vanilla DDP and ZeRO stage 1. Mixed precision: fp16 params + fp16 grads + fp32 master + fp32 m + fp32 v.
phases/19-capstone-projects/78-zero-parameter-sharding/code/main.py:245
↓ 2 callersMethodmessageLog
()
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/coordinator.ts:60
↓ 2 callersFunctionmessage_passing
(graph, features, weight_matrix)
phases/01-math-foundations/21-graph-theory/code/graph_theory.py:142
↓ 2 callersFunctionmetropolis_hastings
(target_log_pdf, x0, n_samples, burn_in, proposal_std=1.0)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:145
↓ 2 callersFunctionmetropolis_hastings
(target_log_prob, proposal_std, x0, n_samples, seed=None)
phases/01-math-foundations/22-stochastic-processes/code/stochastic.py:74
↓ 2 callersFunctionmigrationDone
(m: Migration)
phases/19-capstone-projects/09-code-migration-agent/code/ts/src/migrations.ts:96
↓ 2 callersFunctionmini_to_full_paper
Promote a converged MiniPaper into a full Paper for the writer. Adds one figure and one bibliography entry per used citation key. Every secti
phases/19-capstone-projects/57-end-to-end-research-demo/code/main.py:159
↓ 2 callersFunctionmock_embed
(text: str, dim: int = 96)
phases/19-capstone-projects/66-reranker-cross-encoder/code/main.py:178
↓ 2 callersFunctionmodel_backward
(grad_output, activations, params)
phases/10-llms-from-scratch/34-gradient-checkpointing/code/main.py:39
↓ 2 callersFunctionmodel_forward
(x, params)
phases/10-llms-from-scratch/34-gradient-checkpointing/code/main.py:17
↓ 2 callersFunctionmodel_to_schema
(name, fields)
phases/11-llm-engineering/03-structured-outputs/code/main.py:105
↓ 2 callersFunctionmonte_carlo
(cfg: Config, cycles: int, trials: int)
phases/15-autonomous-systems/07-recursive-self-improvement/code/main.py:70
↓ 2 callersFunctionmount
(root = document)
site/figures.js:921
↓ 2 callersFunctionmove
(pos, action)
phases/09-reinforcement-learning/10-multi-agent-rl/code/main.py:11
↓ 2 callersFunctionms_disaggregated
(prompt: int, output: int, use_rdma: bool = True)
phases/17-infrastructure-and-production/17-disaggregated-prefill-decode/code/main.py:25
↓ 2 callersFunctionmse
(y_true, y_pred)
phases/02-ml-fundamentals/06-knn-and-distances/code/knn.py:179
↓ 2 callersFunctionmse_loss
(predicted, target)
phases/03-deep-learning-core/03-backpropagation/code/main.py:78
↓ 2 callersFunctionmtp_loss
Compute joint MTP loss over D depths. backbone_hidden[i] is h_i^(0), the main-model output at position i. modules[k-1] is the depth-k MTP mod
phases/10-llms-from-scratch/18-multi-token-prediction/code/main.py:137
↓ 2 callersFunctionnegative_log_likelihood
(labels, all_logits)
phases/01-math-foundations/09-information-theory/code/information_theory.py:62
↓ 2 callersFunctionneighbors
(s)
site/figures-genai-rl.js:189
↓ 2 callersMethodneighbors
(self, key: str)
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/main.py:46
↓ 2 callersMethodnext
(current: string, state: State)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.ts:60
↓ 2 callersMethodnext_action
Return (tool, argv, payload) for the next action. Pure function of self.state. Caller is responsible for transitioning state after th
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:539
↓ 2 callersFunctionngrams
(tokens, k)
phases/05-nlp-foundations-to-advanced/12-text-summarization/code/main.py:51
↓ 2 callersFunctionngrams
(tokens, n)
phases/05-nlp-foundations-to-advanced/11-machine-translation/code/main.py:9
↓ 2 callersFunctionnms
(boxes, scores, iou_threshold=0.45)
phases/04-computer-vision/06-object-detection-yolo/code/main.py:30
↓ 2 callersFunctionnorm
(a)
site/figures-llms2.js:389
↓ 2 callersFunctionnorm
(v)
site/figures-math.js:299
↓ 2 callersFunctionnormal_pdf
(x, mu, sigma)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:40
↓ 2 callersFunctionnormalise
(text: str)
phases/19-capstone-projects/41-eval-pipeline/code/main.py:175
↓ 2 callersFunctionnormalize
(text)
phases/06-speech-and-audio/17-audio-evaluation-metrics/code/main.py:26
↓ 2 callersMethodnormalize
(self)
phases/01-math-foundations/02-vectors-matrices-operations/code/matrices.py:27
↓ 2 callersMethodnormalize
(self, text)
phases/10-llms-from-scratch/02-building-a-tokenizer/code/main.py:66
↓ 2 callersFunctionnotification
(method: str, params: dict | None = None)
phases/13-tools-and-protocols/06-mcp-fundamentals/code/main.py:53
↓ 2 callersMethodoauth_flow
(self, auth_server: AuthorizationServer, scopes: set[str], resource: str)
phases/13-tools-and-protocols/16-mcp-security-oauth-2-1/code/main.py:111
↓ 2 callersFunctionobj
(s)
site/figures-agents-alignment.js:276
↓ 2 callersMethodobserve
(self, other: str, box: int)
phases/16-multi-agent-and-swarms/18-theory-of-mind-coordination/code/main.py:47
↓ 2 callersFunctionone_hot
(c, num)
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:33
↓ 2 callersFunctionone_hot_like
(char, noise=0.02, vocab_size=len(VOCAB))
phases/06-speech-and-audio/04-speech-recognition-asr/code/main.py:68
↓ 2 callersFunctionone_sample_ttest
(data, mu_0=0)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:182
↓ 2 callersFunctionopenai_moderation
Toy OpenAI Moderation: category -> score in [0,1].
phases/18-ethics-safety-alignment/29-moderation-systems-openai-perspective-llamaguard/code/main.py:33
↓ 2 callersFunctionorchestrator
(token: str, user_query: str)
phases/13-tools-and-protocols/23-capstone-tool-ecosystem/code/main.py:153
↓ 2 callersFunctionout
(x)
site/figures-llms2.js:74
↓ 2 callersFunctionp_value_two_sided
(t_val, df)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:177
↓ 2 callersFunctionpack_documents
Pack tokenized documents into fixed-length groups with boundary tokens. Yields lists of exactly max_tokens token ids. Long documents are split
phases/19-capstone-projects/43-hdf5-tokenized-corpus/code/main.py:410
↓ 2 callersFunctionpad2d
(x, p)
phases/04-computer-vision/02-convolutions-from-scratch/code/main.py:4
↓ 2 callersFunctionpaint
(n)
site/header.js:16
↓ 2 callersFunctionpairwise_diffs
( runs: Sequence[EvalRun], b: int = 500, alpha: float = 0.05, seed: int = 0, )
phases/19-capstone-projects/74-leaderboard-aggregation/code/main.py:202
↓ 2 callersFunctionparaphrase
Replace ratio of tokens at random with random tokens.
phases/18-ethics-safety-alignment/23-watermarking-synthid-stable-signature-c2pa/code/main.py:67
↓ 2 callersMethodparaphrase
(self, query: str, n: int = 3)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:239
↓ 2 callersFunctionparseRpc
( line: string, )
phases/19-capstone-projects/13-mcp-server-with-registry/code/ts/src/protocol.ts:85
↓ 2 callersFunctionpass_at_k_estimator
(samples: list[list[bool]], ks: list[int])
phases/19-capstone-projects/72-code-exec-metric/code/main.py:268
↓ 2 callersFunctionpatchify_with_pos
Each 'patch' here is one frame value + its time position embedding.
phases/08-generative-ai/10-video-generation/code/main.py:46
↓ 2 callersFunctionperplexity
(prob_fn, sentences)
phases/05-nlp-foundations-to-advanced/16-text-generation-pre-transformer/code/main.py:42
↓ 2 callersFunctionperplexity
(avg_cross_entropy, base="e")
phases/01-math-foundations/09-information-theory/code/information_theory.py:69
↓ 2 callersMethodpick
(rng: () => number)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:214
↓ 2 callersFunctionpin_manifest
(server: str, tools: list[dict])
phases/13-tools-and-protocols/17-mcp-gateways-and-registries/code/main.py:62
↓ 2 callersFunctionplan
Validate the manifest, print the DAG, compute the cost estimate.
phases/10-llms-from-scratch/13-building-complete-llm-pipeline/code/main.py:117
↓ 2 callersFunctionpoisson_pmf
(k, lam)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:30
↓ 2 callersFunctionpolicies
()
phases/19-capstone-projects/84-refusal-evaluation/code/mock_llm.py:70
← previousnext →2,001–2,100 of 8,347, ranked by callers