MCPcopy Create free account

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

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

↓ 1 callersFunctionapply_softmax_row
(row)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:28
↓ 1 callersFunctionapply_standardize
(X, means, stds)
phases/02-ml-fundamentals/06-knn-and-distances/code/knn.py:45
↓ 1 callersFunctionapply_update
(params, grads, lr)
phases/08-generative-ai/02-autoencoders-vae/code/main.py:128
↓ 1 callersFunctionapply_update
(net, grads, lr)
phases/08-generative-ai/06-diffusion-ddpm-from-scratch/code/main.py:87
↓ 1 callersFunctionarch_compare
()
phases/12-multimodal-ai/17-video-language-temporal-grounding/code/main.py:109
↓ 1 callersFunctionarchitect_plan
Stubbed architect plan.
phases/19-capstone-projects/10-multi-agent-software-team/code/main.py:70
↓ 1 callersMethodarchival_memory_search
(self, query: str, top_k: int = 3)
phases/14-agent-engineering/07-memory-virtual-context-memgpt/code/main.py:107
↓ 1 callersFunctionascii_heatmap
(weights, tokens, chars=" ░▒▓█")
phases/07-transformers-deep-dive/02-self-attention-from-scratch/code/self_attention.py:73
↓ 1 callersFunctionascii_histogram
Tiny text histogram so you can see the two modes without a plotting lib.
phases/08-generative-ai/01-generative-models-taxonomy-history/code/main.py:53
↓ 1 callersFunctionask
(prompt: string)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/repl.ts:40
↓ 1 callersMethodassemble
(self, query)
phases/11-llm-engineering/05-context-engineering/code/main.py:264
↓ 1 callersMethodassess
(self, action: Action, screen: Screen)
phases/14-agent-engineering/21-computer-use-agents/code/main.py:59
↓ 1 callersFunctionassign
(cs)
site/figures-ml.js:217
↓ 1 callersFunctionassign_targets
(boxes_xyxy, classes, anchors, stride, grid_size, num_classes)
phases/04-computer-vision/06-object-detection-yolo/code/main.py:84
↓ 1 callersFunctionatomic_write
(path: Path, content: str)
phases/14-agent-engineering/34-repo-memory-and-state/code/main.py:99
↓ 1 callersFunctionattack_encoding
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:195
↓ 1 callersFunctionattack_gcg
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:178
↓ 1 callersFunctionattack_multi_turn
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:225
↓ 1 callersFunctionattack_multilingual
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:209
↓ 1 callersFunctionattack_pair
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:148
↓ 1 callersFunctionattack_tap
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:162
↓ 1 callersFunctionattempt_tamper
Rebuild a forum from records and attempt a silent edit.
phases/15-autonomous-systems/06-automated-alignment-research/code/main.py:92
↓ 1 callersFunctionattention_params_baseline
(hidden: int)
phases/10-llms-from-scratch/16-differential-attention-v2/code/main.py:131
↓ 1 callersFunctionattention_params_diff_v1
(hidden: int, n_heads: int, d_head: int)
phases/10-llms-from-scratch/16-differential-attention-v2/code/main.py:135
↓ 1 callersFunctionattention_params_diff_v2
(hidden: int, n_heads: int, d_head: int, kv_heads: int)
phases/10-llms-from-scratch/16-differential-attention-v2/code/main.py:144
↓ 1 callersFunctionattention_params_per_layer
(config: dict)
phases/10-llms-from-scratch/14-open-models-architecture-walkthroughs/code/main.py:108
↓ 1 callersFunctionattention_scheme
(config: dict)
phases/10-llms-from-scratch/14-open-models-architecture-walkthroughs/code/main.py:96
↓ 1 callersFunctionattention_scores_with_mask
(raw_scores, mask)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:24
↓ 1 callersFunctionattention_single
One-token self-attention stand-in. For a full sequence you would attend over K_cache; here the toy uses a degenerate q=k=self to keep the stru
phases/10-llms-from-scratch/18-multi-token-prediction/code/main.py:96
↓ 1 callersFunctionattention_style
Order-independent reduction: every element is independent.
phases/07-transformers-deep-dive/01-why-transformers/code/main.py:19
↓ 1 callersFunctionauc_roc
(y_true, y_scores)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:151
↓ 1 callersFunctionaudit_lesson
(audit: Audit, lesson: Path)
scripts/audit_lessons.py:214
↓ 1 callersFunctionaudit_log_call
(entry: AuditEntry)
phases/17-infrastructure-and-production/25-security-secrets-audit/code/main.py:60
↓ 1 callersMethodauthenticate
(presentedKey: string)
phases/17-infrastructure-and-production/19-ai-gateways/code/main.ts:45
↓ 1 callersMethodauthorize
(self, client_id: str, user_id: str, scopes: set[str], code_challenge: str, resource: str)
phases/13-tools-and-protocols/16-mcp-security-oauth-2-1/code/main.py:43
↓ 1 callersFunctionautocorrelation
(series, max_lag=20)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:60
↓ 1 callersMethodaward
(self, task: ContractNetTask)
phases/16-multi-agent-and-swarms/16-negotiation-bargaining/code/main.py:128
↓ 1 callersMethodaward
(self, winner: str, losers: list[str], conv: str)
phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:153
↓ 1 callersFunctionaxis_impact
()
phases/12-multimodal-ai/07-open-weight-vlm-recipes/code/main.py:44
↓ 1 callersFunctionbackend_call
(server: str, tool: str, args: dict)
phases/13-tools-and-protocols/17-mcp-gateways-and-registries/code/main.py:39
↓ 1 callersFunctionbackprop
(path: list[Node], reward: float)
phases/14-agent-engineering/04-tree-of-thoughts-lats/code/main.py:116
↓ 1 callersFunctionbackward
(target, out, cache, net)
phases/08-generative-ai/10-video-generation/code/main.py:80
↓ 1 callersFunctionbackward
Hand-written backprop. Returns gradient dict matching params shape.
phases/08-generative-ai/02-autoencoders-vae/code/main.py:71
↓ 1 callersFunctionbackward
(target_eps, eps_hat, cache, net)
phases/08-generative-ai/06-diffusion-ddpm-from-scratch/code/main.py:57
↓ 1 callersFunctionbackward
(target, out, cache, net)
phases/08-generative-ai/13-flow-matching-rectified-flows/code/main.py:46
↓ 1 callersFunctionbackward
(target, out, cache, net)
phases/08-generative-ai/09-inpainting-outpainting-editing/code/main.py:56
↓ 1 callersFunctionbackward
(target, out, cache, net)
phases/08-generative-ai/07-latent-diffusion-stable-diffusion/code/main.py:65
↓ 1 callersMethodbackward
(self, target)
phases/03-deep-learning-core/07-regularization/code/main.py:177
↓ 1 callersMethodbackward
(self, target)
phases/03-deep-learning-core/05-loss-functions/code/main.py:139
↓ 1 callersMethodbackward
(self, target)
phases/03-deep-learning-core/04-activation-functions/code/main.py:163
↓ 1 callersFunctionbag_of_words
(docs, vocab)
phases/05-nlp-foundations-to-advanced/02-bag-of-words-tfidf/code/main.py:21
↓ 1 callersFunctionbaseline_decode
(n_tokens: int, rng: random.Random, target: TargetModel)
phases/19-capstone-projects/14-speculative-decoding-server/code/main.py:141
↓ 1 callersFunctionbaseline_model
()
phases/18-ethics-safety-alignment/17-wmdp-dual-use-evaluation/code/main.py:55
↓ 1 callersFunctionbatchDemo
()
phases/17-infrastructure-and-production/15-batch-apis/code/main.ts:153
↓ 1 callersFunctionbce_gradient
(predictions, targets, eps=1e-15)
phases/03-deep-learning-core/05-loss-functions/code/main.py:33
↓ 1 callersFunctionbench_async
(n: int)
phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/code/main.py:124
↓ 1 callersFunctionbench_threads
(n: int)
phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/code/main.py:130
↓ 1 callersFunctionbenchmark
(pipe, num_runs=10, image_size=(400, 600))
phases/04-computer-vision/16-vision-pipeline-capstone/code/main.py:152
↓ 1 callersFunctionbenchmark
(n, reps=3)
phases/07-transformers-deep-dive/01-why-transformers/code/main.py:54
↓ 1 callersFunctionbenchmark_leaderboard
()
phases/12-multimodal-ai/25-multimodal-agents-computer-use/code/main.py:122
↓ 1 callersFunctionbestDir
(s, ep)
site/figures-genai-rl.js:205
↓ 1 callersFunctionbestPair
(pairs: PairCounts)
phases/05-nlp-foundations-to-advanced/19-subword-tokenization/code/main.ts:63
↓ 1 callersFunctionbestPair
(toks)
site/figures-transformers.js:252
↓ 1 callersFunctionbest_branch
(tree: Tree)
phases/19-capstone-projects/05-autonomous-research-agent/code/main.py:169
↓ 1 callersFunctionbest_of_n_sweep
Simulate best-of-n sampling at each n. Compute mean KL, proxy, gold scores of the chosen response.
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:112
↓ 1 callersFunctionbest_split
(X, y, feature_idx)
phases/02-ml-fundamentals/18-feature-selection/code/feature_selection.py:148
↓ 1 callersFunctionbeta_sensitivity_analysis
(sft_model, preference_data, betas, max_seq_len=128)
phases/10-llms-from-scratch/08-dpo/code/main.py:299
↓ 1 callersFunctionbeta_update
(alpha, beta_param, successes, failures)
phases/01-math-foundations/07-bayes-theorem/code/bayes.py:213
↓ 1 callersFunctionbias_correction_demo
()
phases/03-deep-learning-core/06-optimizers/code/main.py:200
↓ 1 callersFunctionbimodal_log_pdf
(x)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:190
↓ 1 callersFunctionbin_values
(values, n_bins=5)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:25
↓ 1 callersFunctionbinary_cross_entropy
(predictions, targets, eps=1e-15)
phases/03-deep-learning-core/05-loss-functions/code/main.py:23
↓ 1 callersFunctionbinary_evaluator
(attempt: list[int], target: int)
phases/14-agent-engineering/03-reflexion-verbal-rl/code/main.py:53
↓ 1 callersFunctionbit_accuracy
(a, b)
phases/06-speech-and-audio/08-voice-cloning-conversion/code/main.py:82
↓ 1 callersFunctionbit_width_sweep
(tensor)
phases/10-llms-from-scratch/11-quantization/code/main.py:181
↓ 1 callersMethodblast_radius
(self)
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:88
↓ 1 callersMethodblast_radius
(self)
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:127
↓ 1 callersFunctionblock_mean
(xs, block)
phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/code/main.py:164
↓ 1 callersFunctionblock_params
(cfg: ViTConfig)
phases/12-multimodal-ai/01-vision-transformer-patch-tokens/code/main.py:69
↓ 1 callersFunctionbm25_score
(query: str, chunk: Chunk)
phases/19-capstone-projects/08-production-rag-chatbot/code/main.py:63
↓ 1 callersFunctionbonferroni_correction
(p_values, alpha=0.05)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:302
↓ 1 callersFunctionbradley_terry_loss
(reward_preferred, reward_rejected)
phases/10-llms-from-scratch/07-rlhf/code/main.py:92
↓ 1 callersFunctionbreak_even_demo
()
phases/17-infrastructure-and-production/01-managed-llm-platforms/code/main.py:65
↓ 1 callersFunctionbreakeven_alpha
(k: int, verify_overhead: float, concurrency: int)
phases/17-infrastructure-and-production/05-eagle3-speculative-decoding/code/main.py:35
↓ 1 callersFunctionbrevity_penalty
(hyp_len, ref_len)
phases/05-nlp-foundations-to-advanced/11-machine-translation/code/main.py:26
↓ 1 callersFunctionbrier_decomposition
(confidences: Sequence[float], correct: Sequence[int], bins: int = 10)
phases/19-capstone-projects/73-perplexity-calibration/code/main.py:111
↓ 1 callersFunctionbroadcast
Tree broadcast in ceil(log2(world_size)) hops. At round r, the set of ranks that hold the value doubles. Source rank seeds the value; non-sou
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:120
↓ 1 callersMethodbroadcast_cfp
(self, task: ContractNetTask)
phases/16-multi-agent-and-swarms/16-negotiation-bargaining/code/main.py:120
↓ 1 callersFunctionbubble_dualpipev
DualPipeV uses a V-shape schedule on a single parameter copy. Its bubble is slightly larger than DualPipe's at the benefit of halving memory.
phases/10-llms-from-scratch/19-dualpipe-parallelism/code/main.py:57
↓ 1 callersFunctionbubble_zero_bubble
Zero Bubble (Qi 2023) splits backward into B + W. The W part can fill the 1F1B bubble. Approximate residual bubble is (P - 1) / 2 chunks of wa
phases/10-llms-from-scratch/19-dualpipe-parallelism/code/main.py:38
↓ 1 callersFunctionbudget_table
()
phases/12-multimodal-ai/18-long-video-million-token/code/main.py:19
↓ 1 callersFunctionbudget_table
(workload: list[Image])
phases/12-multimodal-ai/06-any-resolution-patch-n-pack/code/main.py:124
↓ 1 callersFunctionbuild
()
site/build.js:419
↓ 1 callersFunctionbuildApp
(store: JobStore)
phases/19-capstone-projects/12-video-understanding-pipeline/code/ts/src/server.ts:21
↓ 1 callersFunctionbuildApp
(mastery: MasteryStore)
phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/server.ts:5
↓ 1 callersFunctionbuildApp
(audit: AuditLog, secret: string)
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/ts/src/server.ts:6
↓ 1 callersFunctionbuildApp
(migrations: Migration[])
phases/19-capstone-projects/09-code-migration-agent/code/ts/src/server.ts:5
↓ 1 callersFunctionbuildApp
(store: ObservabilityStore)
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/server.ts:14
↓ 1 callersFunctionbuildDemoAgent
()
phases/14-agent-engineering/01-the-agent-loop/code/main.ts:151
↓ 1 callersFunctionbuildGraph
()
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.ts:163
← previousnext →2,801–2,900 of 8,347, ranked by callers