MCPcopy Create free account

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

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

↓ 1 callersFunctionsoftmax
(row: List[float])
phases/10-llms-from-scratch/17-native-sparse-attention/code/main.py:25
↓ 1 callersFunctionsoftmax_from
(seed: int)
phases/19-capstone-projects/14-speculative-decoding-server/code/main.py:26
↓ 1 callersFunctionsoftmax_rows
(A: Matrix)
phases/07-transformers-deep-dive/03-multi-head-attention/code/main.py:68
↓ 1 callersFunctionsoftmax_rows
(A, mask=None)
phases/07-transformers-deep-dive/05-full-transformer/code/main.py:72
↓ 1 callersFunctionsolve
Gaussian elimination. D is small so this is fine.
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:82
↓ 1 callersFunctionsolve
(agent: str, task: tuple[str, float], regime: str)
phases/15-autonomous-systems/06-automated-alignment-research/code/main.py:67
↓ 1 callersFunctionsolve_with_escalation
(question, examples, client, model)
phases/11-llm-engineering/02-few-shot-cot/code/advanced_prompting.py:336
↓ 1 callersFunctionspanCostUsd
(span: GenAISpan)
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/pricing.ts:21
↓ 1 callersFunctionspans_to_bio
(tokens, spans)
phases/05-nlp-foundations-to-advanced/06-named-entity-recognition/code/main.py:34
↓ 1 callersFunctionsparse_score
(q_sparse, d_sparse)
phases/05-nlp-foundations-to-advanced/22-embedding-models-deep-dive/code/main.py:52
↓ 1 callersFunctionsparse_star_round
(hub: Debater, spokes: list[Debater], question: str, prior: dict[str, str])
phases/14-agent-engineering/25-multi-agent-debate/code/main.py:43
↓ 1 callersMethodspawn_subagents
(self, parent_session: str, tasks: list[tuple[str, list[tuple[str, dict[str, Any]]]]]
phases/14-agent-engineering/17-claude-agent-sdk/code/main.py:133
↓ 1 callersFunctionspectral_clustering
(graph, k=2)
phases/01-math-foundations/21-graph-theory/code/graph_theory.py:100
↓ 1 callersFunctionspeculative_decode
(n_tokens: int, k: int, rng: random.Random, target: TargetModel, draft: DraftModel)
phases/19-capstone-projects/14-speculative-decoding-server/code/main.py:120
↓ 1 callersFunctionspeculative_decode
(draft_model, target_model, context, num_speculative=5, draft_cost=1.0, target_cost=10.
phases/10-llms-from-scratch/12-inference-optimization/code/main.py:260
↓ 1 callersFunctionsplit_decay_groups
Split model parameters into a decay and a no-decay group. The convention for transformer training is to apply weight decay to dense weight ma
phases/19-capstone-projects/44-cosine-lr-warmup/code/main.py:343
↓ 1 callersMethodsplit_with_specials
(self, text)
phases/10-llms-from-scratch/02-building-a-tokenizer/code/main.py:44
↓ 1 callersFunctionsqrt_kl_from_origin
Two unit-variance Gaussians, one at 0, one at mu. KL = 1/2 * ||mu||^2.
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:102
↓ 1 callersFunctionsquare_cost
(img: Image, side: int = 336, patch: int = 14)
phases/12-multimodal-ai/06-any-resolution-patch-n-pack/code/main.py:92
↓ 1 callersFunctionstage1
Return True if Stage 1 flags the action. Keyword match handles explicit injection shapes. Repetition detection runs unconditionally so identi
phases/15-autonomous-systems/10-claude-code-permission-modes/code/main.py:52
↓ 1 callersFunctionstage1_sft
Imitation learning from labeler demonstrations. Labeler samples actions with probabilities softmax(utility). SFT maximum- likelihood estimate
phases/18-ethics-safety-alignment/01-instruction-following-alignment-signal/code/main.py:62
↓ 1 callersFunctionstage2
Return (verdict, reason). More expensive review of a flagged action plus trajectory context.
phases/15-autonomous-systems/10-claude-code-permission-modes/code/main.py:78
↓ 1 callersFunctionstage_seed
(i: int)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.py:81
↓ 1 callersFunctionstandardize
(values)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:13
↓ 1 callersFunctionstandardize
(X)
phases/02-ml-fundamentals/02-linear-regression/code/linear_regression.py:144
↓ 1 callersFunctionstar_round
One round of STaR: keep correct-answer traces, retrain.
phases/15-autonomous-systems/02-star-family-reasoning/code/main.py:62
↓ 1 callersFunctionstartServer
()
phases/19-capstone-projects/08-production-rag-chatbot/code/ts/src/index.ts:106
↓ 1 callersFunctionstartServer
()
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/ts/src/index.ts:144
↓ 1 callersFunctionstartServer
()
phases/19-capstone-projects/04-multimodal-document-qa/code/ts/src/index.ts:89
↓ 1 callersMethodstartSpan
(name: string, attributes: GenAIAttributes)
phases/17-infrastructure-and-production/13-llm-observability/code/main.ts:70
↓ 1 callersMethodstationary_distribution
(self)
phases/01-math-foundations/22-stochastic-processes/code/stochastic.py:46
↓ 1 callersFunctionstatistical_vs_practical_significance
(small_n=30, large_n=10000, effect=0.1)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:386
↓ 1 callersMethodstats
()
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/coordinator.ts:64
↓ 1 callersMethodstats
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:150
↓ 1 callersMethodstats
(self)
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:86
↓ 1 callersMethodstats
(self)
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:155
↓ 1 callersFunctionstem_step_1a
(word)
phases/05-nlp-foundations-to-advanced/01-text-processing/code/main.py:11
↓ 1 callersFunctionstep
(state, action_idx)
phases/09-reinforcement-learning/06-policy-gradients-reinforce/code/main.py:17
↓ 1 callersFunctionstep
(state, action)
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:15
↓ 1 callersFunctionstep
(state, action_idx)
phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/code/main.py:17
↓ 1 callersMethodstep
(self, data: list[Example], lr: float = 0.1)
phases/18-ethics-safety-alignment/07-sleeper-agents-persistent-deception/code/main.py:91
↓ 1 callersMethodstep
(self)
phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/code/main.py:90
↓ 1 callersMethodstep
(self, tokens: int, dollars: float)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/main.py:62
↓ 1 callersMethodstep
(_plan: PlanState, turn: number)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/model.ts:45
↓ 1 callersMethodstep
(workspace: SharedWorkspace, inbound: Message)
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/agent.ts:69
↓ 1 callersMethodstep
(self)
phases/19-capstone-projects/81-end-to-end-distributed-train/code/main.py:173
↓ 1 callersMethodstep
Reduce_scatter grads to per-rank shards, Adam-step, allgather params back.
phases/19-capstone-projects/78-zero-parameter-sharding/code/main.py:137
↓ 1 callersMethodstep
(self, params, grads)
phases/01-math-foundations/08-optimization/code/optimizers.py:50
↓ 1 callersMethodstep
(self, current_state, rng=None)
phases/01-math-foundations/22-stochastic-processes/code/stochastic.py:31
↓ 1 callersMethodstep
Return one JSON action at a time, based on current failing test.
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:77
↓ 1 callersMethodstep
Return one Python snippet that may edit multiple files in one go.
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:111
↓ 1 callersFunctionstep_one
( model: nn.Module, optimizer: torch.optim.Optimizer, scheduler: torch.optim.lr_scheduler._LRSched
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:318
↓ 1 callersMethodsteps
(self, total: int)
phases/12-multimodal-ai/10-internvl3-native-multimodal/code/main.py:30
↓ 1 callersFunctionstft_mag
(sig, frame_len, hop)
phases/06-speech-and-audio/03-audio-classification/code/main.py:47
↓ 1 callersFunctionstft_mag
(sig, frame_len, hop)
phases/06-speech-and-audio/06-speaker-recognition-verification/code/main.py:52
↓ 1 callersFunctionstorage_estimate
()
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:76
↓ 1 callersFunctionstratified_kfold_split
(y, k=5, seed=42)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:46
↓ 1 callersFunctionstream_dataset
(dataset_name: str, config: str = None, max_rows: int = 5)
phases/00-setup-and-tooling/09-data-management/code/data_utils.py:39
↓ 1 callersFunctionstream_response
(text)
phases/11-llm-engineering/13-production-app/code/production_app.py:415
↓ 1 callersFunctionstreaming
(input_text: str)
phases/14-agent-engineering/29-production-runtimes/code/main.py:29
↓ 1 callersFunctionstreaming_decode_latency
( prompt_audio_seconds: float = 2.0, model_size_b: int = 8, )
phases/12-multimodal-ai/16-mio-any-to-any-streaming/code/main.py:80
↓ 1 callersFunctionstreaming_stt
(utterance, sr=16000)
phases/06-speech-and-audio/12-voice-assistant-pipeline/code/main.py:37
↓ 1 callersFunctionstreaming_tts
(text)
phases/06-speech-and-audio/12-voice-assistant-pipeline/code/main.py:59
↓ 1 callersFunctionstrided_mask
(n, window, stride)
phases/07-transformers-deep-dive/15-attention-variants/code/main.py:30
↓ 1 callersFunctionstrip_trailing_punctuation
(text: str)
phases/19-capstone-projects/41-eval-pipeline/code/main.py:182
↓ 1 callersFunctionstudent_t
Heavy-tailed noise. For df=3, variance finite but kurtosis infinite.
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:33
↓ 1 callersFunctionsubpixel_refine
(heatmaps)
phases/04-computer-vision/21-keypoint-pose/code/main.py:38
↓ 1 callersMethodsuggest
(self)
phases/02-ml-fundamentals/12-hyperparameter-tuning/code/tuning.py:256
↓ 1 callersFunctionsummarise
(migrations: ReturnType<typeof defaultSeed>)
phases/19-capstone-projects/09-code-migration-agent/code/ts/src/index.ts:17
↓ 1 callersMethodsummarise
(turns: Turn[])
phases/11-llm-engineering/05-context-engineering/code/main.ts:129
↓ 1 callersFunctionsummarize_attention
(attn: list[list[float]])
phases/12-multimodal-ai/03-blip2-qformer-bridge/code/main.py:105
↓ 1 callersFunctionsummarize_repo_tool
(args: dict)
phases/13-tools-and-protocols/11-mcp-sampling/code/main.py:93
↓ 1 callersMethodsummary
(self)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/main.py:41
↓ 1 callersMethodsummary
(self)
phases/19-capstone-projects/07-end-to-end-fine-tuning-pipeline/code/main.py:48
↓ 1 callersMethodsummary
(self)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:403
↓ 1 callersFunctionsupervisor
(hypotheses: list[AgentHypothesis])
phases/17-infrastructure-and-production/23-sre-for-ai/code/main.py:52
↓ 1 callersFunctionsupport_agent_factory
()
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:68
↓ 1 callersMethodsupported
(self, claim: str, context: str)
phases/19-capstone-projects/68-rag-eval-precision-recall/code/main.py:131
↓ 1 callersFunctionsurface
(store: Store, k: str)
phases/15-autonomous-systems/15-propose-then-commit/code/main.py:91
↓ 1 callersFunctionsurveys_table
()
phases/12-multimodal-ai/24-multimodal-rag-cross-modal/code/main.py:119
↓ 1 callersFunctionsvd_from_scratch
(A, k=None)
phases/01-math-foundations/11-singular-value-decomposition/code/svd.py:24
↓ 1 callersFunctionsvm_objective
(X, y, w, b, lambda_param)
phases/02-ml-fundamentals/05-support-vector-machines/code/svm.py:47
↓ 1 callersFunctionswa_mask
(n, window)
phases/07-transformers-deep-dive/15-attention-variants/code/main.py:21
↓ 1 callersFunctionswe_demo
()
phases/14-agent-engineering/19-benchmarks-swebench-gaia/code/main.py:71
↓ 1 callersFunctionsweep_effective_batches
( *, micro_batch: int, accum_grid: Iterable[int], in_dim: int = 64, hidden: int = 128,
phases/19-capstone-projects/46-gradient-accumulation/code/main.py:208
↓ 1 callersFunctionswiglu
(v: List[float], W_gate: List[List[float]], W_up: List[List[float]], W_down: List[List[float]])
phases/10-llms-from-scratch/18-multi-token-prediction/code/main.py:48
↓ 1 callersFunctionswish
(x)
phases/03-deep-learning-core/04-activation-functions/code/main.py:50
↓ 1 callersFunctionsycophancy
(probs: list[float])
phases/18-ethics-safety-alignment/04-sycophancy-rlhf-amplification/code/main.py:106
↓ 1 callersFunctionsymmetry_demo
()
phases/03-deep-learning-core/08-weight-initialization/code/main.py:78
↓ 1 callersFunctionsyncCounts
(lessons, phaseCount, outputs)
site/build.js:584
↓ 1 callersFunctionsyncReadme
(lessons)
site/build.js:543
↓ 1 callersMethodsync_grads
(self)
phases/19-capstone-projects/48-distributed-fsdp-ddp/code/main.py:126
↓ 1 callersMethodsync_grads
(self)
phases/19-capstone-projects/77-data-parallel-ddp/code/main.py:76
↓ 1 callersFunctionsyntax_check
(py_files: list[Path])
scripts/lesson_run.py:110
↓ 1 callersFunctionsynth
(outputs: list[tuple[str, str]])
phases/14-agent-engineering/12-anthropic-workflow-patterns/code/main.py:156
↓ 1 callersFunctionsynth_bench
(rng: random.Random)
phases/19-capstone-projects/09-code-migration-agent/code/main.py:163
↓ 1 callersFunctionsynth_chunk
(kind, rng, sr=16000, chunk_ms=20)
phases/06-speech-and-audio/14-voice-activity-detection-turn-taking/code/main.py:14
↓ 1 callersFunctionsynth_fake_speech
(n_samples=16000, seed=0)
phases/06-speech-and-audio/16-anti-spoofing-audio-watermarking/code/main.py:25
↓ 1 callersFunctionsynth_tasks
Generate synthetic (expert_time_hours, success) pairs. P(success) = sigmoid(slope * (log(true_horizon) - log(expert_time))).
phases/15-autonomous-systems/21-metr-external-evaluation/code/main.py:19
↓ 1 callersFunctionsynth_trace
(trace_id: str, leak_pii: bool, rng: random.Random)
phases/19-capstone-projects/11-llm-observability-dashboard/code/main.py:145
← previousnext →5,401–5,500 of 8,347, ranked by callers