MCPcopy Create free account

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

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

↓ 2 callersFunctioncloseModal
()
site/app.js:308
↓ 2 callersFunctioncolor
(kind)
site/figures-agents-alignment.js:86
↓ 2 callersFunctioncombine_heads
(heads: List[Matrix])
phases/07-transformers-deep-dive/03-multi-head-attention/code/main.py:104
↓ 2 callersFunctioncommandBasename
(command: string)
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/runtime.ts:44
↓ 2 callersFunctioncompare_quantization_methods
(tensor, num_bits=8)
phases/10-llms-from-scratch/11-quantization/code/main.py:158
↓ 2 callersFunctioncompress_mean
Collapse every l consecutive keys into their mean. Real NSA uses a learned MLP here — mean-pool is the pedagogical baseline.
phases/10-llms-from-scratch/17-native-sparse-attention/code/main.py:44
↓ 2 callersFunctioncomputeIDF
(documents: string[], vocab: string[])
phases/11-llm-engineering/06-rag/code/main.ts:42
↓ 2 callersFunctioncompute_class_weights
(y)
phases/02-ml-fundamentals/17-imbalanced-data/code/imbalanced.py:114
↓ 2 callersFunctioncompute_idf
(documents, vocab)
phases/11-llm-engineering/07-advanced-rag/code/main.py:33
↓ 2 callersFunctioncompute_idf
(documents, vocab)
phases/11-llm-engineering/06-rag/code/main.py:33
↓ 2 callersFunctioncompute_kernel_matrix
(X, kernel_fn, **kwargs)
phases/02-ml-fundamentals/05-support-vector-machines/code/svm.py:180
↓ 2 callersFunctioncompute_optimal
Find (N, D) minimizing loss subject to 6ND = C by grid search over log N.
phases/07-transformers-deep-dive/13-scaling-laws/code/main.py:20
↓ 2 callersMethodconfusion
(self)
phases/19-capstone-projects/38-classifier-finetuning/code/main.py:430
↓ 2 callersFunctionconfusion_matrix_values
(y_true, y_pred)
phases/02-ml-fundamentals/17-imbalanced-data/code/imbalanced.py:131
↓ 2 callersMethodconjugate
(self)
phases/01-math-foundations/19-complex-numbers/code/complex_numbers.py:55
↓ 2 callersFunctioncontent_vector
Deterministic 'content' representation of text — toy PPG stand-in.
phases/06-speech-and-audio/08-voice-cloning-conversion/code/main.py:17
↓ 2 callersFunctioncontent_words
(tokens)
phases/05-nlp-foundations-to-advanced/21-nli-textual-entailment/code/main.py:16
↓ 2 callersMethodcontextText
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:137
↓ 2 callersFunctioncontext_key
Hashable summary of all previous scales' tokens.
phases/08-generative-ai/19-visual-autoregressive-var/code/main.py:143
↓ 2 callersFunctioncontrastive_loss
(anchor, positive, negatives, temperature=0.07)
phases/03-deep-learning-core/05-loss-functions/code/main.py:86
↓ 2 callersMethodconv
(in_c, out_c, bn)
phases/04-computer-vision/09-image-generation-gans/code/main.py:34
↓ 2 callersFunctionconv1d_over_embeddings
(embeddings, filter_matrix, bias=0.0)
phases/05-nlp-foundations-to-advanced/08-cnns-rnns-for-text/code/main.py:8
↓ 2 callersFunctionconv2d_im2col
(x, w, b=None, stride=1, padding=0)
phases/04-computer-vision/02-convolutions-from-scratch/code/main.py:57
↓ 2 callersFunctioncopy_model_weights
(source, target)
phases/10-llms-from-scratch/07-rlhf/code/main.py:200
↓ 2 callersFunctioncorpus_bleu
(predictions: list[str], references: list[str], max_n: int = 4)
phases/19-capstone-projects/71-classical-metrics/code/main.py:168
↓ 2 callersFunctioncorpus_mean
(scores: list[float])
phases/19-capstone-projects/71-classical-metrics/code/main.py:162
↓ 2 callersFunctioncorrelation
(x, y)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:181
↓ 2 callersFunctioncos
(u: list[float], v: list[float])
phases/18-ethics-safety-alignment/20-bias-representational-harm/code/main.py:42
↓ 2 callersFunctioncosine
(a, b)
phases/06-speech-and-audio/06-speaker-recognition-verification/code/main.py:117
↓ 2 callersFunctioncosine
(a: Vec, b: Vec)
phases/05-nlp-foundations-to-advanced/23-chunking-strategies-rag/code/main.ts:44
↓ 2 callersFunctioncosine
(a, b)
phases/05-nlp-foundations-to-advanced/23-chunking-strategies-rag/code/main.py:23
↓ 2 callersFunctioncosine
(a: list[float], b: list[float])
phases/19-capstone-projects/64-chunking-strategies-advanced/code/main.py:172
↓ 2 callersFunctioncosine
(a: readonly number[], b: readonly number[])
phases/19-capstone-projects/02-rag-over-codebase/code/ts/src/index_store.ts:32
↓ 2 callersFunctioncosine
(a: list[float], b: list[float])
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:28
↓ 2 callersFunctioncosine
(a: list[float], b: list[float])
phases/12-multimodal-ai/02-clip-contrastive-pretraining/code/main.py:21
↓ 2 callersFunctioncosine_distance
(a, b)
phases/01-math-foundations/14-norms-and-distances/code/distances.py:53
↓ 2 callersFunctioncosine_schedule
Mask ratio at step t, in [0, 1]. Goes 1.0 -> 0.0.
phases/12-multimodal-ai/14-show-o-discrete-diffusion-unified/code/main.py:19
↓ 2 callersFunctioncostSync
( docs: number, prefixTokens: number, perDocTokens: number, outTokens: number, )
phases/17-infrastructure-and-production/15-batch-apis/code/main.ts:185
↓ 2 callersFunctioncostSyncCache
( docs: number, prefixTokens: number, perDocTokens: number, outTokens: number, )
phases/17-infrastructure-and-production/15-batch-apis/code/main.ts:200
↓ 2 callersMethodcost_by_model
(self)
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:266
↓ 2 callersFunctioncost_sync
(docs: int, prefix_tokens: int, per_doc_tokens: int, out_tokens: int)
phases/17-infrastructure-and-production/15-batch-apis/code/main.py:20
↓ 2 callersFunctioncost_sync_cache
(docs: int, prefix_tokens: int, per_doc_tokens: int, out_tokens: int)
phases/17-infrastructure-and-production/15-batch-apis/code/main.py:29
↓ 2 callersFunctioncount_id_switches
(tracks_per_frame, gt_per_frame)
phases/04-computer-vision/27-multi-object-tracking/code/main.py:94
↓ 2 callersFunctioncount_nsa
(N: int, l: int, k: int, W: int)
phases/10-llms-from-scratch/17-native-sparse-attention/code/main.py:148
↓ 2 callersMethodcounts
(self)
phases/10-llms-from-scratch/22-async-hogwild-inference/code/main.py:32
↓ 2 callersFunctioncovariance
(vectors, mu)
phases/08-generative-ai/14-evaluation-fid-clip-score/code/main.py:11
↓ 2 callersMethodcreate
(self, total_ms: int)
phases/13-tools-and-protocols/13-mcp-async-tasks/code/main.py:71
↓ 2 callersFunctioncreateIdentity
(domain: string, agentName: string)
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:437
↓ 2 callersMethodcreateTask
(contextId?: string)
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:211
↓ 2 callersFunctioncreate_loss_mask
(tokens)
phases/10-llms-from-scratch/06-instruction-tuning-sft/code/main.py:74
↓ 2 callersFunctioncreate_mlm_batch
Apply BERT masking. Returns (input_ids, labels). labels[i] = original token if position was selected for prediction, IGNORE_INDEX otherwise.
phases/07-transformers-deep-dive/06-bert-masked-language-modeling/code/main.py:18
↓ 2 callersFunctioncross_attention
Scaled dot-product cross-attention. queries: (Nq, Dq) -> Q = queries @ W_q^T shape (Nq, D) patches: (Np, Dp) -> K, V returns (attended, at
phases/12-multimodal-ai/03-blip2-qformer-bridge/code/main.py:62
↓ 2 callersFunctioncross_attention
(queries: list[list[float]], keys: list[list[float]], values: list[lis
phases/12-multimodal-ai/04-flamingo-gated-cross-attention/code/main.py:51
↓ 2 callersFunctioncross_entropy_naive
(true_class, logits)
phases/01-math-foundations/13-numerical-stability/code/numerical.py:34
↓ 2 callersFunctioncross_entropy_shifted
Next-token CE: logit_i vs target_{i+1}.
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:38
↓ 2 callersFunctioncrossing_cycle
(trajectory, threshold: float)
phases/15-autonomous-systems/07-recursive-self-improvement/code/main.py:42
↓ 2 callersFunctionctc_beam
(frame_probs, beam_width=8)
phases/06-speech-and-audio/04-speech-recognition-asr/code/main.py:27
↓ 2 callersFunctionctc_greedy
(frame_probs)
phases/06-speech-and-audio/04-speech-recognition-asr/code/main.py:16
↓ 2 callersMethodcurrent_key
(self)
phases/13-tools-and-protocols/18-mcp-auth-production/code/main.py:104
↓ 2 callersFunctioncurve
(fn, stroke)
site/lesson-figures.js:237
↓ 2 callersFunctioncurve
(fn, color)
site/figures-transformers.js:425
↓ 2 callersFunctioncurve
(fn, stroke)
site/figures-dl.js:395
↓ 2 callersFunctioncurve
(fn, st)
site/figures-genai-rl.js:158
↓ 2 callersFunctiondLoss
(b)
site/figures-genai-rl.js:150
↓ 2 callersFunctiond_forward
(x, c, D, num_classes)
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:56
↓ 2 callersMethoddecode
(self, tokens: list[int])
phases/12-multimodal-ai/15-janus-pro-decoupled-encoders/code/main.py:34
↓ 2 callersMethoddecode
(self, ids)
phases/10-llms-from-scratch/02-building-a-tokenizer/code/main.py:112
↓ 2 callersMethoddecode_response
Decode a generated response, dropping specials.
phases/19-capstone-projects/39-instruction-tuning-sft/code/main.py:71
↓ 2 callersFunctiondecode_score
(context, target)
phases/05-nlp-foundations-to-advanced/09-sequence-to-sequence/code/main.py:22
↓ 2 callersFunctiondecode_throughput
Tokens per second per GPU, memory-bandwidth-limited. Each decoded token reads `active_b * weight_bits/8` bytes of weights.
phases/17-infrastructure-and-production/07-tensorrt-llm-blackwell/code/main.py:51
↓ 2 callersMethoddegree
(self, node)
phases/01-math-foundations/21-graph-theory/code/graph_theory.py:19
↓ 2 callersMethoddelegateTask
( fromDid: string, signature: string, targetAgent: string, message: AgentMessage, sessionI
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:503
↓ 2 callersFunctiondemo
Self-contained demo. Builds a small paper from two mocked experiments. Writes into a temp directory by default so the worktree stays clean.
phases/19-capstone-projects/54-paper-writer/code/main.py:263
↓ 2 callersFunctiondemo_logging
()
phases/00-setup-and-tooling/12-debugging-and-profiling/code/debug_tools.py:249
↓ 2 callersFunctiondemo_memory_tracking
()
phases/00-setup-and-tooling/12-debugging-and-profiling/code/debug_tools.py:128
↓ 2 callersFunctiondemonstrate_clt
(dist_fn, n_per_sample, n_averages)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:125
↓ 2 callersFunctiondequantize_symmetric
(quantized, scale)
phases/10-llms-from-scratch/11-quantization/code/main.py:93
↓ 2 callersFunctiondestructiveGuard
(payload: HookPayload)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/hooks.ts:36
↓ 2 callersMethoddetect
(self, image_tensor)
phases/04-computer-vision/16-vision-pipeline-capstone/code/main.py:92
↓ 2 callersFunctiondetect_nan
(model, loss, step)
phases/00-setup-and-tooling/12-debugging-and-profiling/code/debug_tools.py:64
↓ 2 callersMethoddeterminant
(self)
phases/01-math-foundations/02-vectors-matrices-operations/code/matrices.py:119
↓ 2 callersFunctiondetokenize_multiscale
Decoder: sum upsampled scale embeddings.
phases/08-generative-ai/19-visual-autoregressive-var/code/main.py:120
↓ 2 callersFunctiondf
(x)
site/figures-math.js:151
↓ 2 callersFunctiondft
(x)
phases/06-speech-and-audio/01-audio-fundamentals/code/main.py:42
↓ 2 callersFunctiondifference
(series, order=1)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:29
↓ 2 callersMethoddiscoverBySkillTag
(tag: string)
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:75
↓ 2 callersFunctiondiscretize
Map a [-1,1]^D action to D integer bins.
phases/12-multimodal-ai/21-embodied-vlas-openvla-pi0-groot/code/main.py:15
↓ 2 callersFunctiondiscriminative_param_groups
(model, base_lr=1e-3, decay=0.3)
phases/04-computer-vision/05-transfer-learning/code/main.py:63
↓ 2 callersFunctiondispatch
(msg: JsonRpcRequest)
phases/13-tools-and-protocols/07-building-an-mcp-server/code/main.ts:249
↓ 2 callersFunctiondispatch
(msg: dict)
phases/13-tools-and-protocols/07-building-an-mcp-server/code/main.py:208
↓ 2 callersMethoddispatch
(self, name: str, args: dict[str, Any])
phases/14-agent-engineering/02-rewoo-plan-and-execute/code/main.py:37
↓ 2 callersFunctiondist
(p)
site/figures-ml.js:124
↓ 2 callersFunctiondistance_to_minimum
(params, target=(1.0, 1.0))
phases/01-math-foundations/08-optimization/code/optimizers.py:92
↓ 2 callersFunctiondoc_level_precision
(retrieved_chunks: list[tuple[Chunk, float]], gold: set[str], k: int)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:595
↓ 2 callersFunctiondoc_level_recall
(retrieved_chunks: list[tuple[Chunk, float]], gold: set[str], k: int)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:588
↓ 2 callersFunctiondot
(a, b)
phases/05-nlp-foundations-to-advanced/10-attention-mechanism/code/main.py:11
↓ 2 callersFunctiondot
(a, b)
phases/07-transformers-deep-dive/12-kv-cache-flash-attention/code/main.py:13
↓ 2 callersFunctiondot
(a, b)
phases/07-transformers-deep-dive/04-positional-encoding/code/main.py:36
↓ 2 callersFunctiondot
(a: List[float], b: List[float])
phases/10-llms-from-scratch/17-native-sparse-attention/code/main.py:21
↓ 2 callersFunctiondotProduct
(a: Vec, b: Vec)
phases/11-llm-engineering/04-embeddings/code/main.ts:115
← previousnext →1,701–1,800 of 8,347, ranked by callers