MCPcopy Create free account

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

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

↓ 1 callersFunctionmake_classification_data
(n=300, seed=42)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:292
↓ 1 callersFunctionmake_corpus
(seed: int, total_tokens: int)
phases/19-capstone-projects/81-end-to-end-distributed-train/code/main.py:289
↓ 1 callersFunctionmake_dataset
(seed: int, n_total: int)
phases/19-capstone-projects/78-zero-parameter-sharding/code/main.py:168
↓ 1 callersFunctionmake_dataset
(n: int = 24)
phases/12-multimodal-ai/13-transfusion-autoregressive-diffusion/code/main.py:28
↓ 1 callersFunctionmake_dataset
(n: int = 40)
phases/12-multimodal-ai/11-chameleon-early-fusion-tokens/code/main.py:77
↓ 1 callersFunctionmake_draft
A draft distribution whose expected token-level acceptance is near alpha_hint. We linearly blend target with a uniform distribution; the blend
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:37
↓ 1 callersFunctionmake_expert
Tiny 'expert': input -> silu -> output. Linear for illustration.
phases/07-transformers-deep-dive/11-mixture-of-experts/code/main.py:17
↓ 1 callersFunctionmake_feature_extractor
(num_classes=10)
phases/04-computer-vision/05-transfer-learning/code/main.py:47
↓ 1 callersFunctionmake_feature_selection_data
(n_samples=500, seed=42)
phases/02-ml-fundamentals/18-feature-selection/code/feature_selection.py:4
↓ 1 callersFunctionmake_fine_tune
(num_classes=10)
phases/04-computer-vision/05-transfer-learning/code/main.py:55
↓ 1 callersFunctionmake_hook
(name)
phases/00-setup-and-tooling/12-debugging-and-profiling/code/debug_tools.py:46
↓ 1 callersFunctionmake_housing_data
(n=200, seed=42)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:261
↓ 1 callersFunctionmake_image
(H, W, C=3, seed=0)
phases/07-transformers-deep-dive/09-vision-transformers/code/main.py:12
↓ 1 callersFunctionmake_imbalanced_data
(n_majority=950, n_minority=50, seed=42)
phases/02-ml-fundamentals/17-imbalanced-data/code/imbalanced.py:4
↓ 1 callersFunctionmake_imbalanced_data
(n=300, minority_ratio=0.05, seed=42)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:318
↓ 1 callersFunctionmake_moons
(n_samples=200, noise=0.1, seed=42)
phases/02-ml-fundamentals/07-unsupervised-learning/code/clustering.py:318
↓ 1 callersFunctionmake_mtp_module
(hidden: int, ff: int, rng: random.Random)
phases/10-llms-from-scratch/18-multi-token-prediction/code/main.py:82
↓ 1 callersFunctionmake_multimodal_data
(n_per_cluster=200, n_anomaly=20, seed=42)
phases/02-ml-fundamentals/16-anomaly-detection/code/anomaly_detection.py:165
↓ 1 callersFunctionmake_params
(n_layers, hidden, inner, seed=0)
phases/10-llms-from-scratch/34-gradient-checkpointing/code/main.py:121
↓ 1 callersFunctionmake_queries
32 learnable query vectors, dim 16.
phases/12-multimodal-ai/03-blip2-qformer-bridge/code/main.py:57
↓ 1 callersFunctionmake_realistic_workload
(n: int = 500, seed: int = 7)
phases/17-infrastructure-and-production/22-load-testing-llm-apis/code/main.py:30
↓ 1 callersFunctionmake_regression_data
(n=200, seed=42)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:305
↓ 1 callersFunctionmake_replicas
()
phases/17-infrastructure-and-production/11-multi-region-kv-locality/code/main.py:55
↓ 1 callersFunctionmake_schedule
(T)
phases/08-generative-ai/10-video-generation/code/main.py:120
↓ 1 callersFunctionmake_schedule
(T)
phases/08-generative-ai/06-diffusion-ddpm-from-scratch/code/main.py:98
↓ 1 callersFunctionmake_schedule
(T)
phases/08-generative-ai/09-inpainting-outpainting-editing/code/main.py:96
↓ 1 callersFunctionmake_schedule
(T)
phases/08-generative-ai/07-latent-diffusion-stable-diffusion/code/main.py:105
↓ 1 callersFunctionmake_splits
(ds, train_ratio: float = 0.8, val_ratio: float = 0.1, seed: int = 42)
phases/00-setup-and-tooling/09-data-management/code/data_utils.py:80
↓ 1 callersFunctionmake_target
Target: a smooth bright blob in the upper-left, dimmer one in the lower-right.
phases/08-generative-ai/12-3d-generation/code/main.py:8
↓ 1 callersFunctionmake_target
(size=48)
phases/04-computer-vision/22-3d-gaussian-splatting/code/main.py:74
↓ 1 callersFunctionmake_target
(vocab: int, rng: np.random.Generator)
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:31
↓ 1 callersFunctionmake_tasks
8 tasks: half fast (0.1s), half slow (0.4s). Pre-assignment is pessimal: worker 0 gets all slow tasks, others get fast ones.
phases/16-multi-agent-and-swarms/09-parallel-swarm-networks/code/main.py:88
↓ 1 callersFunctionmake_traffic
(n_requests: int, n_prefixes: int, prefix_size: int, suffix_size: int)
phases/11-llm-engineering/15-prompt-caching/code/main.py:126
↓ 1 callersFunctionmake_uniform_workload
(n: int = 500)
phases/17-infrastructure-and-production/22-load-testing-llm-apis/code/main.py:26
↓ 1 callersFunctionmake_video
1-D 'video': smooth trajectory of T_FRAMES values.
phases/08-generative-ai/10-video-generation/code/main.py:39
↓ 1 callersFunctionmake_workload
(n: int = 1000, seed: int = 7)
phases/17-infrastructure-and-production/16-model-routing/code/main.py:30
↓ 1 callersFunctionmake_workload
(n: int = 500, seed: int = 7)
phases/17-infrastructure-and-production/14-prompt-semantic-caching/code/main.py:38
↓ 1 callersFunctionmake_workload
(n: int = 60, seed: int = 7)
phases/17-infrastructure-and-production/04-vllm-serving-internals/code/main.py:55
↓ 1 callersFunctionmake_workload
(n: int = 1000, seed: int = 7)
phases/17-infrastructure-and-production/11-multi-region-kv-locality/code/main.py:59
↓ 1 callersFunctionmake_workload
(duration_sec: int = 3600, seed: int = 7)
phases/17-infrastructure-and-production/03-gpu-autoscaling-kubernetes/code/main.py:38
↓ 1 callersFunctionmake_workload
(n: int = 200, seed: int = 7)
phases/17-infrastructure-and-production/18-vllm-production-stack-lmcache/code/main.py:31
↓ 1 callersFunctionmanifest_to_json
(manifest: Manifest)
phases/10-llms-from-scratch/13-building-complete-llm-pipeline/code/main.py:206
↓ 1 callersFunctionmanual_all_reduce_matches_single_process
Each rank computes a gradient on its slice; all-reduce-mean recovers the full-batch gradient up to numerical noise.
phases/19-capstone-projects/48-distributed-fsdp-ddp/code/main.py:179
↓ 1 callersFunctionmap_to_case
(d: Design)
phases/16-multi-agent-and-swarms/25-case-studies-2026-sota/code/main.py:58
↓ 1 callersFunctionmape
(y_true, y_pred)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:151
↓ 1 callersFunctionmask_logits
(logits, valid_indices)
phases/05-nlp-foundations-to-advanced/20-structured-outputs-constrained-decoding/code/main.py:51
↓ 1 callersFunctionmasked_cross_entropy_loss
(logits, targets, loss_mask)
phases/10-llms-from-scratch/06-instruction-tuning-sft/code/main.py:88
↓ 1 callersFunctionmat_vec_2d
(M, v)
phases/01-math-foundations/18-convex-optimization/code/convex.py:58
↓ 1 callersFunctionmatmul
(A, B)
phases/08-generative-ai/14-evaluation-fid-clip-score/code/main.py:26
↓ 1 callersFunctionmax_const
(e: Expr)
phases/15-autonomous-systems/03-alphaevolve-evolutionary-coding/code/main.py:51
↓ 1 callersFunctionmax_sim_score
For every query token embedding, take max dot product against any doc patch; sum across query tokens. This is MaxSim / late interaction.
phases/19-capstone-projects/04-multimodal-document-qa/code/main.py:71
↓ 1 callersFunctionmax_steps_for_target
Largest N such that per_step**N >= target.
phases/15-autonomous-systems/01-long-horizon-agents/code/main.py:42
↓ 1 callersFunctionmaybe_rotate
Cap the active file at ROTATE_BYTES; rotate .1 .. .MAX, drop oldest.
phases/14-agent-engineering/37-runtime-feedback-loops/code/main.py:85
↓ 1 callersFunctionmc_control
(episodes, gamma=0.99, epsilon=0.1, rng=None)
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:73
↓ 1 callersFunctionmc_policy_evaluation
(policy, episodes, gamma=0.99, rng=None)
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:56
↓ 1 callersFunctionmcp_resources_read_to_acl
MCP resources/read JSON-RPC message -> FIPA-ACL query-ref.
phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:71
↓ 1 callersFunctionmcp_tools_call_to_acl
MCP tools/call JSON-RPC message -> FIPA-ACL request.
phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:56
↓ 1 callersFunctionmcts
(root: Node, iterations: int, rng: random.Random)
phases/14-agent-engineering/04-tree-of-thoughts-lats/code/main.py:122
↓ 1 callersFunctionmean
(xs)
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:152
↓ 1 callersFunctionmeasure_alpha
(q: List[float], p: List[float], n_samples: int, rng: random.Random)
phases/10-llms-from-scratch/15-speculative-decoding-eagle3/code/main.py:135
↓ 1 callersFunctionmeasure_alpha
(target: np.ndarray, draft: np.ndarray, n_samples: int, rng: np.random.Generator)
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:106
↓ 1 callersFunctionmeasure_latency
(model, input_shape, device="cpu", warmup=5, iters=20)
phases/04-computer-vision/15-real-time-edge/code/main.py:6
↓ 1 callersFunctionmeasure_over_refusal
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:262
↓ 1 callersFunctionmeasure_stage
(stage: float, reg: Regression, seed: int)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.py:41
↓ 1 callersFunctionmeasure_throughput
(target: np.ndarray, draft: np.ndarray, K: int, n_rounds: int, rng: np.random.Generator
phases/10-llms-from-scratch/25-speculative-decoding/code/main.py:123
↓ 1 callersFunctionmel_filterbank
(n_mels, n_fft, sr, fmin=0.0, fmax=None)
phases/06-speech-and-audio/02-spectrograms-mel-features/code/main.py:64
↓ 1 callersFunctionmel_filterbank
(n_mels, n_fft, sr)
phases/06-speech-and-audio/03-audio-classification/code/main.py:61
↓ 1 callersFunctionmel_filterbank
(n_mels, n_fft, sr)
phases/06-speech-and-audio/06-speaker-recognition-verification/code/main.py:66
↓ 1 callersFunctionmel_filterbank
Triangular Mel filter bank (simplified, linear warp as proxy).
phases/12-multimodal-ai/19-audio-language-whisper-to-af3/code/main.py:51
↓ 1 callersFunctionmel_schedule
(phones, durs, hop_ms=12.5)
phases/06-speech-and-audio/07-text-to-speech/code/main.py:82
↓ 1 callersFunctionmel_to_hz
(m)
phases/06-speech-and-audio/02-spectrograms-mel-features/code/main.py:60
↓ 1 callersFunctionmel_to_hz
(m)
phases/06-speech-and-audio/03-audio-classification/code/main.py:57
↓ 1 callersFunctionmel_to_hz
(m)
phases/06-speech-and-audio/06-speaker-recognition-verification/code/main.py:62
↓ 1 callersFunctionmemory_after_checkpoint
(n_layers, segment_size, hidden=8192, seq=8192, batch=1, bytes_per_value=2)
phases/10-llms-from-scratch/34-gradient-checkpointing/code/main.py:102
↓ 1 callersFunctionmemory_breakdown
(params_b: float, fmt: Format, concurrency: int = 128, ctx: int = 2048)
phases/17-infrastructure-and-production/09-production-quantization/code/main.py:37
↓ 1 callersFunctionmemory_budget
(config, gpu_memory_gb, model_dtype_bytes=2, kv_dtype_bytes=2)
phases/10-llms-from-scratch/12-inference-optimization/code/main.py:347
↓ 1 callersFunctionmemory_check
()
phases/00-setup-and-tooling/05-jupyter-notebooks/code/notebook_tips.py:69
↓ 1 callersFunctionmemory_estimate
()
phases/10-llms-from-scratch/04-pre-training-mini-gpt/code/main.py:300
↓ 1 callersFunctionmemory_write_guard
(write: MemoryWrite)
phases/14-agent-engineering/27-prompt-injection-defense/code/main.py:102
↓ 1 callersMethodmerge
(self, policy: str = "prefix-on-collision")
phases/13-tools-and-protocols/08-building-an-mcp-client/code/main.py:109
↓ 1 callersFunctionmergeEnv
()
phases/00-setup-and-tooling/04-apis-and-keys/code/first_api_call.ts:51
↓ 1 callersFunctionmergePair
(vocab: Vocab, pair: Pair)
phases/05-nlp-foundations-to-advanced/19-subword-tokenization/code/main.ts:73
↓ 1 callersFunctionmerge_contracts
Least-privilege merge: intersect allowed, union forbidden, narrowest budgets. allowed_files intersect (both contracts must permit a path), fo
phases/14-agent-engineering/36-scope-contracts/code/main.py:71
↓ 1 callersFunctionmerge_lora_weights
(model)
phases/11-llm-engineering/08-fine-tuning-lora/code/lora.py:67
↓ 1 callersFunctionmerge_pair
(vocab, pair)
phases/05-nlp-foundations-to-advanced/19-subword-tokenization/code/main.py:22
↓ 1 callersFunctionmesh_from_grid
(rank: int, world_size: int, grid, byte_counter)
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:79
↓ 1 callersMethodmessages
()
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/workspace.ts:42
↓ 1 callersMethodmetadata
RFC 8414 authorization server metadata.
phases/13-tools-and-protocols/18-mcp-auth-production/code/main.py:128
↓ 1 callersFunctionmetric_agent
(incident: str)
phases/17-infrastructure-and-production/23-sre-for-ai/code/main.py:32
↓ 1 callersFunctionmetric_code_exec
Execute the prediction in a small namespace and compare against expected outputs. Targets is a list of stringified expected results; extras c
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:209
↓ 1 callersFunctionmetric_exact_match
(prediction: str, targets: List[str])
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:153
↓ 1 callersFunctionmetric_multiple_choice
(prediction: str, targets: List[str])
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:163
↓ 1 callersFunctionmetric_rouge_l
(prediction: str, targets: List[str])
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:187
↓ 1 callersFunctionmetric_substring_contains
(prediction: str, targets: List[str])
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:158
↓ 1 callersFunctionmetropolis_hastings_2d
(target_log_pdf, x0, y0, n_samples, burn_in, proposal_std=0.5)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:167
↓ 1 callersFunctionmic_generator
(duration_s=2.0, sr=16000, chunk_ms=20, speech_mask=None)
phases/06-speech-and-audio/12-voice-assistant-pipeline/code/main.py:17
↓ 1 callersFunctionmigrate
(repo: Repo, rng: random.Random)
phases/19-capstone-projects/09-code-migration-agent/code/main.py:135
↓ 1 callersFunctionmin_max_scale
(values)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:5
↓ 1 callersFunctionminhash_signature
(shingles, num_hashes=128)
phases/10-llms-from-scratch/03-data-pipelines/code/main.py:37
↓ 1 callersFunctionminkowski_distance
(a, b, p=2)
phases/02-ml-fundamentals/06-knn-and-distances/code/knn.py:22
← previousnext →4,501–4,600 of 8,347, ranked by callers