MCPcopy Create free account

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

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

↓ 1 callersMethodupdate
(self, layer_idx, new_keys, new_values)
phases/10-llms-from-scratch/12-inference-optimization/code/main.py:21
↓ 1 callersFunctionupdate_bias
Aux-loss-free balance: nudge bias up/down based on usage vs target.
phases/07-transformers-deep-dive/11-mixture-of-experts/code/main.py:65
↓ 1 callersMethodupdate_centre
(self, teacher_out)
phases/04-computer-vision/17-self-supervised-vision/code/main.py:44
↓ 1 callersFunctionupdate_counts
(counts, sequence, style)
phases/08-generative-ai/11-audio-generation/code/main.py:20
↓ 1 callersFunctionupdate_d
Gradient step on D to maximize log D(x) + log(1 - D(G(z))).
phases/08-generative-ai/03-gans-generator-discriminator/code/main.py:70
↓ 1 callersFunctionupdate_d
(reals, fakes, D, num_classes, lr)
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:76
↓ 1 callersFunctionupdate_g
Non-saturating G loss: maximize log D(G(z)). Gradient flows through both.
phases/08-generative-ai/03-gans-generator-discriminator/code/main.py:108
↓ 1 callersFunctionupdate_g
Non-saturating G loss + optional conditional L1 toward a target.
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:100
↓ 1 callersFunctionupdate_note
(nid: str, new_body: str)
phases/13-tools-and-protocols/10-mcp-resources-and-prompts/code/main.py:38
↓ 1 callersMethodupdate_plan
(self, tick: int)
phases/16-multi-agent-and-swarms/17-generative-agents-simulation/code/main.py:53
↓ 1 callersFunctionupdate_state
(state, utterance)
phases/05-nlp-foundations-to-advanced/29-dialogue-state-tracking/code/main.py:73
↓ 1 callersFunctionutilization_breakeven
()
phases/17-infrastructure-and-production/02-inference-platform-economics/code/main.py:74
↓ 1 callersFunctionvad
(chunk, threshold_dbfs=-35.0)
phases/06-speech-and-audio/12-voice-assistant-pipeline/code/main.py:32
↓ 1 callersFunctionvad
(chunk, threshold_dbfs=VAD_THRESHOLD_DBFS)
phases/06-speech-and-audio/11-real-time-audio-processing/code/main.py:30
↓ 1 callersFunctionvae_forward_demo
(mu, log_var)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:310
↓ 1 callersFunctionvalidTokenField
(v: unknown)
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/spans.ts:23
↓ 1 callersFunctionvalidate
(args: ToolArgs, schema: ToolInputSchema)
phases/14-agent-engineering/06-tool-use-and-function-calling/code/main.ts:100
↓ 1 callersFunctionvalidate
(args: dict[str, Any], schema: dict[str, Any])
phases/14-agent-engineering/06-tool-use-and-function-calling/code/main.py:75
↓ 1 callersFunctionvalidate
(schema: JsonSchema, value: unknown)
phases/13-tools-and-protocols/01-the-tool-interface/code/main.ts:120
↓ 1 callersFunctionvalidate
(schema: dict, value: Any)
phases/13-tools-and-protocols/01-the-tool-interface/code/main.py:109
↓ 1 callersFunctionvalidate
(schema: dict, value: Any, path: str = "$")
phases/13-tools-and-protocols/04-structured-output/code/main.py:60
↓ 1 callersMethodvalidate
(self, name: str, args: Any)
phases/19-capstone-projects/23-function-call-dispatcher/code/main.py:93
↓ 1 callersMethodvalidate
(self)
phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:95
↓ 1 callersMethodvalidate
(self)
phases/19-capstone-projects/53-result-evaluator/code/main.py:46
↓ 1 callersMethodvalidate
(self, token: str, required_scope: str | None = None)
phases/13-tools-and-protocols/18-mcp-auth-production/code/main.py:225
↓ 1 callersMethodvalidateInput
(userInput: string)
phases/11-llm-engineering/12-guardrails/code/main.ts:278
↓ 1 callersMethodvalidateOutput
(userInput: string, modelOutput: string)
phases/11-llm-engineering/12-guardrails/code/main.ts:282
↓ 1 callersFunctionvalidateToolArguments
(toolName: string, args: unknown)
phases/11-llm-engineering/09-function-calling/code/main.ts:278
↓ 1 callersMethodvalidate_input
(self, user_input)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:292
↓ 1 callersMethodvalidate_output
(self, user_input, model_output)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:300
↓ 1 callersFunctionvalidate_pack
(pack_dir: Path)
scripts/scaffold_workbench.py:63
↓ 1 callersFunctionvalidate_tool_arguments
(tool_name, arguments)
phases/11-llm-engineering/09-function-calling/code/function_calling.py:264
↓ 1 callersFunctionvalidate_tree_mask
(mask: np.ndarray, tree: list[tuple[int, list[int]]])
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:157
↓ 1 callersFunctionvalue_iteration
(gamma=0.99, tol=1e-6, max_iter=5000)
phases/09-reinforcement-learning/02-dynamic-programming/code/main.py:81
↓ 1 callersFunctionvanishing_gradient_sim
(seq_len, recurrent_weight=0.9)
phases/05-nlp-foundations-to-advanced/08-cnns-rnns-for-text/code/main.py:4
↓ 1 callersFunctionvariance
(values, probabilities)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:50
↓ 1 callersFunctionvariance_analysis
()
phases/03-deep-learning-core/08-weight-initialization/code/main.py:96
↓ 1 callersFunctionvariance_reduction
(parent_values, left_values, right_values)
phases/02-ml-fundamentals/04-decision-trees/code/trees.py:42
↓ 1 callersFunctionvariance_threshold
(features, threshold=0.01)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:226
↓ 1 callersFunctionvariance_threshold
(X, threshold=0.01)
phases/02-ml-fundamentals/18-feature-selection/code/feature_selection.py:37
↓ 1 callersFunctionvec_norm
(a)
phases/02-ml-fundamentals/05-support-vector-machines/code/svm.py:21
↓ 1 callersFunctionvec_sub
(a, b)
phases/02-ml-fundamentals/05-support-vector-machines/code/svm.py:13
↓ 1 callersFunctionvelocity_exceeded
(run: Run, gov: Governor, now_min: float)
phases/15-autonomous-systems/13-cost-governors/code/main.py:65
↓ 1 callersFunctionverifier_agent
Read-only agent. Re-fetches cited sources and flags inconsistencies. Returns a list of (entry_id, reason) tuples for the caller to act on. Th
phases/16-multi-agent-and-swarms/13-shared-memory-blackboard/code/main.py:143
↓ 1 callersFunctionverify
(triples, text)
phases/05-nlp-foundations-to-advanced/26-relation-extraction-kg/code/main.py:36
↓ 1 callersFunctionverify
(node: Node)
phases/19-capstone-projects/05-autonomous-research-agent/code/main.py:95
↓ 1 callersFunctionverify
(proposal: Proposal)
phases/15-autonomous-systems/15-propose-then-commit/code/main.py:70
↓ 1 callersMethodverify
Return (accepted_tokens, resampled_next). In one target call we can verify draft_tokens in a batched pass: the target produces a prob per
phases/19-capstone-projects/14-speculative-decoding-server/code/main.py:55
↓ 1 callersMethodverify
Return indexes of any tampered records.
phases/15-autonomous-systems/06-automated-alignment-research/code/main.py:44
↓ 1 callersFunctionverify_against_gloo
Compare mesh implementation against gloo reference, return (match, max_abs_diff).
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:333
↓ 1 callersFunctionverify_distribution
Compare next-token distributions under plain target sampling and speculative sampling. They must be statistically indistinguishable.
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:90
↓ 1 callersFunctionverify_equivalence
(n_layers=6, hidden=16, inner=32, batch=4, k=2)
phases/10-llms-from-scratch/34-gradient-checkpointing/code/main.py:133
↓ 1 callersFunctionverify_inverse_cdf
(lam, n=10000)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:16
↓ 1 callersFunctionverify_signature
(entry: dict[str, object])
phases/14-agent-engineering/38-verification-gates/code/main.py:191
↓ 1 callersFunctionvir_sim
(tiers: list[RouterTier])
phases/12-multimodal-ai/10-internvl3-native-multimodal/code/main.py:46
↓ 1 callersFunctionvisualize
(piece)
phases/06-speech-and-audio/09-music-generation/code/main.py:82
↓ 1 callersFunctionvisualize_context
(num_image_tokens: int, text_tokens: int)
phases/12-multimodal-ai/05-llava-visual-instruction-tuning/code/main.py:82
↓ 1 callersFunctionviterbi
(tokens, transitions, emissions, tags, vocab, alpha=0.01)
phases/05-nlp-foundations-to-advanced/07-pos-tagging-parsing/code/main.py:52
↓ 1 callersFunctionvocabAt
(s)
site/figures-transformers.js:280
↓ 1 callersMethodvocab_size
(self)
phases/10-llms-from-scratch/01-tokenizers/code/bpe.py:55
↓ 1 callersMethodvocab_size
(self)
phases/10-llms-from-scratch/02-building-a-tokenizer/code/main.py:119
↓ 1 callersFunctionvocabulary_stats
(tokenizer, texts)
phases/10-llms-from-scratch/01-tokenizers/code/main.py:74
↓ 1 callersFunctionvolumetric_render
(sigma, rgb, t_vals)
phases/04-computer-vision/13-3d-vision-nerf/code/main.py:67
↓ 1 callersFunctionvstar_infer
V-STaR-style best-of-N: pick the trace we'd believe. We model the verifier as a confidence score that is itself biased by sound vs shortcut (s
phases/15-autonomous-systems/02-star-family-reasoning/code/main.py:101
↓ 1 callersFunctionvstar_report
(model: Model)
phases/15-autonomous-systems/02-star-family-reasoning/code/main.py:141
↓ 1 callersFunctionwall_time_per_token
Draft cost is c per token relative to the verifier (cost 1.0). Each verifier call costs 1.0 plus N * c for the draft. Expected tokens emitted
phases/10-llms-from-scratch/15-speculative-decoding-eagle3/code/main.py:156
↓ 1 callersFunctionwarm_pool_break_even
(gpu_hourly: float, cold_seconds: float, sla_tolerated_drops_per_day: int)
phases/17-infrastructure-and-production/10-cold-start-mitigation/code/main.py:61
↓ 1 callersFunctionwarmup_impact
(data)
phases/03-deep-learning-core/09-learning-rate-schedules/code/main.py:172
↓ 1 callersFunctionwasserstein_1d
(p, q)
phases/01-math-foundations/14-norms-and-distances/code/distances.py:143
↓ 1 callersFunctionwatermark
Toy inaudible watermark: per-bit DC shift on a partitioned stride. Real systems (SilentCipher, PerTh) embed in perceptual domain and survive
phases/06-speech-and-audio/08-voice-cloning-conversion/code/main.py:57
↓ 1 callersFunctionwatermarked_sample
Bias = probability of sampling from the green set.
phases/18-ethics-safety-alignment/23-watermarking-synthid-stable-signature-c2pa/code/main.py:41
↓ 1 callersFunctionwcss
(cs, a)
site/figures-ml.js:236
↓ 1 callersFunctionweighted_choice
(agents: list[str], weights: list[float], rng: random.Random)
phases/16-multi-agent-and-swarms/21-agent-economies/code/main.py:86
↓ 1 callersMethodweighted_degree
(self, node)
phases/01-math-foundations/21-graph-theory/code/graph_theory.py:22
↓ 1 callersMethodweights
(self, agents: list[str])
phases/16-multi-agent-and-swarms/21-agent-economies/code/main.py:82
↓ 1 callersFunctionwelch_df
(data1, data2)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:137
↓ 1 callersFunctionwer
(ref, hyp)
phases/06-speech-and-audio/04-speech-recognition-asr/code/main.py:50
↓ 1 callersFunctionwer
(ref, hyp)
phases/06-speech-and-audio/17-audio-evaluation-metrics/code/main.py:34
↓ 1 callersFunctionwhole_word_mlm
Mask whole words: if any subword in a span is selected, mask all. word_spans: list of (start, end) half-open ranges into tokens.
phases/07-transformers-deep-dive/06-bert-masked-language-modeling/code/main.py:45
↓ 1 callersFunctionwin_rate
(pi: Policy)
phases/18-ethics-safety-alignment/03-direct-preference-optimization-family/code/main.py:172
↓ 1 callersFunctionwindow_frames
(x: list[float], sr: int, win_ms: int = 25, hop_ms: int = 10)
phases/12-multimodal-ai/19-audio-language-whisper-to-af3/code/main.py:25
↓ 1 callersMethodwithTools
(name: string, instructions: string, tools: MastraTool[])
phases/14-agent-engineering/18-agno-and-mastra-runtimes/code/main.ts:94
↓ 1 callersFunctionwordCounts
(text: string)
phases/05-nlp-foundations-to-advanced/19-subword-tokenization/code/main.ts:25
↓ 1 callersFunctionword_counts
(text)
phases/05-nlp-foundations-to-advanced/19-subword-tokenization/code/main.py:5
↓ 1 callersMethodworker
(self, fail_policy: Callable[[Job], bool])
phases/14-agent-engineering/29-production-runtimes/code/main.py:54
↓ 1 callersFunctionworkload_rag
(n: int = 80, docs: int = 4, seed: int = 1)
phases/17-infrastructure-and-production/06-sglang-radixattention/code/main.py:121
↓ 1 callersFunctionworkload_scrambled
Prompts reorder [SYSTEM, TOOLS, DOC] randomly. Tree cannot share the prefix.
phases/17-infrastructure-and-production/06-sglang-radixattention/code/main.py:132
↓ 1 callersFunctionworktreeDemo
()
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/index.ts:16
↓ 1 callersMethodwrite
(self, thread_id: str, super_step: int, state: dict)
phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/code/main.py:34
↓ 1 callersFunctionwriteBuildMeta
()
site/build.js:403
↓ 1 callersFunctionwriteCache
(n)
site/header.js:38
↓ 1 callersFunctionwriteLlms
(phases, glossaryCount, artifactCount)
site/build.js:514
↓ 1 callersFunctionwriteSitemap
(phases, glossaryCount)
site/build.js:489
↓ 1 callersFunctionwriteWebResponse
(res: ServerResponse, webRes: Response)
phases/19-capstone-projects/08-production-rag-chatbot/code/ts/src/index.ts:34
↓ 1 callersFunctionwriteWebResponse
(res: ServerResponse, webRes: Response)
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/ts/src/index.ts:36
↓ 1 callersFunctionwriteWebResponse
(res: ServerResponse, webRes: Response)
phases/19-capstone-projects/04-multimodal-document-qa/code/ts/src/index.ts:38
↓ 1 callersFunctionwrite_curve
(points: List[CurvePoint], path: Path)
phases/19-capstone-projects/46-gradient-accumulation/code/main.py:302
↓ 1 callersFunctionwrite_demo
(payload: Dict[str, object], path: Path)
phases/19-capstone-projects/48-distributed-fsdp-ddp/code/main.py:372
↓ 1 callersFunctionwrite_initial
(state_path: Path, board_path: Path, agents_path: Path)
phases/14-agent-engineering/32-minimal-agent-workbench/code/main.py:55
↓ 1 callersFunctionwrite_leaderboard
( board: Leaderboard, path: Path, *, adapter_name: str, include_per_example: bool = False,
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:362
← previousnext →5,701–5,800 of 8,347, ranked by callers