MCPcopy Create free account

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

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

↓ 1 callersFunctionsample_categorical
(probs: np.ndarray, rng: np.random.Generator)
phases/08-generative-ai/19-visual-autoregressive-var/code/main.py:171
↓ 1 callersFunctionsample_categorical
(probs, n=1)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:59
↓ 1 callersFunctionsample_data
(rng)
phases/08-generative-ai/06-diffusion-ddpm-from-scratch/code/main.py:108
↓ 1 callersFunctionsample_data
(rng)
phases/08-generative-ai/13-flow-matching-rectified-flows/code/main.py:84
↓ 1 callersFunctionsample_data
(rng)
phases/08-generative-ai/07-latent-diffusion-stable-diffusion/code/main.py:123
↓ 1 callersFunctionsample_ddim
(model, schedule, shape, steps=50, T=1000, device="cpu", eta=0.0)
phases/04-computer-vision/10-image-generation-diffusion/code/main.py:103
↓ 1 callersFunctionsample_ddpm
(model, schedule, shape, T=1000, device="cpu")
phases/04-computer-vision/10-image-generation-diffusion/code/main.py:83
↓ 1 callersFunctionsample_dense
(num_frames_total, T, rng=None)
phases/04-computer-vision/12-video-understanding/code/main.py:16
↓ 1 callersFunctionsample_greedy
(probs)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:50
↓ 1 callersFunctionsample_joint
(net, alphas, alpha_bars, T, t_dim, rng)
phases/08-generative-ai/10-video-generation/code/main.py:147
↓ 1 callersFunctionsample_min_p
(logits, min_p, rng, temperature=1.0)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:101
↓ 1 callersFunctionsample_mixture
Two-mode Gaussian mixture. Mode A at -2 (sigma 0.6), mode B at +2 (sigma 0.9).
phases/08-generative-ai/01-generative-models-taxonomy-history/code/main.py:5
↓ 1 callersFunctionsample_next
(bigram: dict, prev: int)
phases/12-multimodal-ai/11-chameleon-early-fusion-tokens/code/main.py:97
↓ 1 callersFunctionsample_normal_box_muller
(mu=0.0, sigma=1.0)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:31
↓ 1 callersFunctionsample_normal_box_muller
(mu, sigma, n=1)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:79
↓ 1 callersFunctionsample_predictions
(model, data)
phases/03-deep-learning-core/10-mini-framework/code/main.py:544
↓ 1 callersFunctionsample_pref_pair
Sample a preference pair (y_w, y_l) with true preference strength p_w.
phases/18-ethics-safety-alignment/03-direct-preference-optimization-family/code/main.py:47
↓ 1 callersFunctionsample_real_conditional
(n, num_classes, rng)
phases/08-generative-ai/04-conditional-gans-pix2pix/code/main.py:64
↓ 1 callersFunctionsample_sentence
(prob_fn, vocab, max_len=15, seed=0)
phases/05-nlp-foundations-to-advanced/16-text-generation-pre-transformer/code/main.py:54
↓ 1 callersFunctionsample_token
(probs, rng)
phases/09-reinforcement-learning/09-reward-modeling-rlhf/code/main.py:71
↓ 1 callersFunctionsample_top_k
(logits, k, rng, temperature=1.0)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:69
↓ 1 callersFunctionsample_top_p
(logits, p, rng, temperature=1.0)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:79
↓ 1 callersFunctionsample_uniform
(num_frames_total, T)
phases/04-computer-vision/12-video-understanding/code/main.py:7
↓ 1 callersFunctionsampler
(prompt: str)
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:133
↓ 1 callersFunctionsanitize
(text: str)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:23
↓ 1 callersFunctionsanitizer
Return (sanitized_html, triggered_rules). Does NOT inspect URLs.
phases/15-autonomous-systems/11-browser-agents/code/main.py:58
↓ 1 callersFunctionsarsa
(episodes, alpha=0.1, gamma=0.99, epsilon=0.1, rng=None)
phases/09-reinforcement-learning/04-q-learning-sarsa/code/main.py:32
↓ 1 callersFunctionsave
Serialize the tokenizer to a JSON file.
phases/19-capstone-projects/30-bpe-tokenizer-from-scratch/code/main.py:233
↓ 1 callersFunctionsave_board
(board_path: Path, board: list[Task])
phases/14-agent-engineering/32-minimal-agent-workbench/code/main.py:91
↓ 1 callersFunctionsave_cache
(entries: dict[str, dict[str, object]])
scripts/link_check.py:193
↓ 1 callersFunctionsave_checkpoint
( model: nn.Module, optimizer: torch.optim.Optimizer, scheduler: torch.optim.lr_scheduler._LRSched
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:164
↓ 1 callersFunctionsave_lora_adapter
(model, path)
phases/11-llm-engineering/08-fine-tuning-lora/code/lora.py:155
↓ 1 callersFunctionsave_sharded
(per_rank_state: list, dest_dir: str, step: int)
phases/19-capstone-projects/81-end-to-end-distributed-train/code/main.py:239
↓ 1 callersFunctionsave_sharded_checkpoint
( model: nn.Module, optimizer: torch.optim.Optimizer, scheduler: torch.optim.lr_scheduler._LRSched
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:231
↓ 1 callersFunctionsave_state
(state_path: Path, state: AgentState)
phases/14-agent-engineering/32-minimal-agent-workbench/code/main.py:87
↓ 1 callersMethodscalar_multiply
(self, scalar)
phases/01-math-foundations/02-vectors-matrices-operations/code/matrices.py:80
↓ 1 callersFunctionscale
(a: list[float], s: float)
phases/12-multimodal-ai/04-flamingo-gated-cross-attention/code/main.py:47
↓ 1 callersFunctionscaled_dot_product_attention
(Q, K, V, causal=False)
phases/07-transformers-deep-dive/05-full-transformer/code/main.py:129
↓ 1 callersFunctionscaled_dot_product_attention
(Q, K, V)
phases/07-transformers-deep-dive/02-self-attention-from-scratch/code/self_attention.py:10
↓ 1 callersFunctionscaled_dot_product_attention
(query, keys, values)
phases/10-llms-from-scratch/12-inference-optimization/code/main.py:42
↓ 1 callersFunctionscan_description
(desc: str)
phases/13-tools-and-protocols/15-mcp-security-tool-poisoning/code/main.py:48
↓ 1 callersFunctionscatter_flat_to_params
(module: nn.Module, flat: torch.Tensor)
phases/19-capstone-projects/81-end-to-end-distributed-train/code/main.py:127
↓ 1 callersFunctionschedule_trajectory
(data)
phases/03-deep-learning-core/09-learning-rate-schedules/code/main.py:190
↓ 1 callersFunctionscope_separated_copilot
Defense: block tool calls whose trigger is untrusted-retrieved content.
phases/18-ethics-safety-alignment/25-echoleak-cves-for-ai/code/main.py:65
↓ 1 callersFunctionscore
(r: Recipe)
phases/12-multimodal-ai/07-open-weight-vlm-recipes/code/main.py:117
↓ 1 callersMethodscore
(self, x: list[float])
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:55
↓ 1 callersMethodscore
(self, query, doc_idx)
phases/05-nlp-foundations-to-advanced/14-information-retrieval-search/code/main.py:28
↓ 1 callersMethodscore
(self, remaining_budget: float)
phases/19-capstone-projects/05-autonomous-research-agent/code/main.py:36
↓ 1 callersMethodscore
(self, query, doc_idx)
phases/11-llm-engineering/07-advanced-rag/code/main.py:90
↓ 1 callersFunctionscoreItem
(item, q)
site/cmdpalette.js:103
↓ 1 callersFunctionscoreRelevance
(query: string, docs: string[])
phases/11-llm-engineering/05-context-engineering/code/main.ts:159
↓ 1 callersFunctionscoreResponse
(text: string, criteria: Criteria)
phases/11-llm-engineering/01-prompt-engineering/code/main.ts:270
↓ 1 callersMethodscore_matrix
(self, prompts: list[str])
phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:150
↓ 1 callersFunctionscore_multi_needle
(context, expected_list, effective_capacity)
phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/code/main.py:43
↓ 1 callersFunctionscore_response
(response_text, criteria)
phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py:321
↓ 1 callersFunctionscore_single_needle
(context, expected, effective_capacity)
phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/code/main.py:37
↓ 1 callersFunctionscrubPiiFromOutput
(text: string)
phases/11-llm-engineering/12-guardrails/code/main.ts:183
↓ 1 callersFunctionscrub_pii_from_output
(text)
phases/11-llm-engineering/12-guardrails/code/guardrails.py:194
↓ 1 callersFunctionsearch
(queryEmb: number[], embeddings: number[][], topK = 5)
phases/11-llm-engineering/06-rag/code/main.ts:75
↓ 1 callersFunctionsearch
(query_embedding, stored_embeddings, top_k=5)
phases/11-llm-engineering/06-rag/code/main.py:56
↓ 1 callersMethodsearch
(self, query: str, k_each: int = 8, k_out: int = 12)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:220
↓ 1 callersMethodsearch
(self, query: str)
phases/19-capstone-projects/51-literature-retrieval/code/main.py:149
↓ 1 callersMethodsearch
(self, query: str)
phases/19-capstone-projects/51-literature-retrieval/code/main.py:172
↓ 1 callersMethodsearch
(self, query: str, top_n: int)
phases/19-capstone-projects/66-reranker-cross-encoder/code/main.py:204
↓ 1 callersMethodsearch
(self, query: str, k_each: int = 10, k_out: int = 5)
phases/19-capstone-projects/65-hybrid-retrieval-bm25-dense/code/main.py:178
↓ 1 callersMethodsearch
(self, query: str, top_k: int = 3)
phases/14-agent-engineering/07-memory-virtual-context-memgpt/code/main.py:67
↓ 1 callersMethodsearch
(self, query: str, top_k: int = 3, tag_filter: str | None = None)
phases/14-agent-engineering/10-skill-libraries-voyager/code/main.py:43
↓ 1 callersMethodsearch
(query: string, topK = 5, metric: Metric = "cosine")
phases/11-llm-engineering/04-embeddings/code/main.ts:209
↓ 1 callersMethodsearch
(self, query, top_k=5, metric="cosine")
phases/11-llm-engineering/04-embeddings/code/embeddings.py:159
↓ 1 callersMethodsearch_with_hypothetical
(self, query: str, hypothetical: str, k_each: int = 8, k_out: int = 12)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:225
↓ 1 callersMethodsearch_with_scores
(self, query, top_k=5)
phases/11-llm-engineering/04-embeddings/code/embeddings.py:163
↓ 1 callersFunctionsecond_price
(bids: list[Bid])
phases/16-multi-agent-and-swarms/21-agent-economies/code/main.py:57
↓ 1 callersFunctionseed_agent_state
(target: Path)
scripts/scaffold_workbench.py:145
↓ 1 callersFunctionseed_candidate
(test_xs: list[float], train_xs: list[float], gen: int)
phases/15-autonomous-systems/03-alphaevolve-evolutionary-coding/code/main.py:123
↓ 1 callersFunctionseed_fixture_tasks
(target_dir: Path)
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:449
↓ 1 callersFunctionseed_task_board
(target: Path)
scripts/scaffold_workbench.py:121
↓ 1 callersFunctionself_improvement_round
( prompts: list[str], sampler: Callable[[str], str], group_size: int = 8, )
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:156
↓ 1 callersFunctionseller_response
Seller uses OG-Narrator-style offer too (for both buyers).
phases/16-multi-agent-and-swarms/16-negotiation-bargaining/code/main.py:53
↓ 1 callersFunctionsemi_hard_negatives
(emb, labels, margin=0.2)
phases/04-computer-vision/20-image-retrieval-metric/code/main.py:12
↓ 1 callersMethodsendMessage
( agentName: string, message: AgentMessage, contextId?: string )
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:165
↓ 1 callersFunctionsentence_permute
(sentences, rng=None)
phases/07-transformers-deep-dive/08-t5-bart-encoder-decoder/code/main.py:130
↓ 1 callersFunctionsentence_split
(text)
phases/05-nlp-foundations-to-advanced/12-text-summarization/code/main.py:6
↓ 1 callersFunctionsequential_bayes
(prior, likelihood, false_positive_rate, num_tests)
phases/01-math-foundations/07-bayes-theorem/code/bayes.py:11
↓ 1 callersFunctionsequential_update_demo
()
phases/01-math-foundations/07-bayes-theorem/code/bayes.py:217
↓ 1 callersFunctionserial_scan
Prefix sum computed serially. Depth O(N).
phases/07-transformers-deep-dive/01-why-transformers/code/main.py:24
↓ 1 callersFunctionserveStdio
(state: ProtocolState)
phases/19-capstone-projects/13-mcp-server-with-registry/code/ts/src/transport.ts:37
↓ 1 callersFunctionserveStdio
()
phases/13-tools-and-protocols/07-building-an-mcp-server/code/main.ts:273
↓ 1 callersFunctionserve_stdio
()
phases/13-tools-and-protocols/07-building-an-mcp-server/code/main.py:223
↓ 1 callersMethodsetEntry
(name: string)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.ts:37
↓ 1 callersMethodset_entry
(self, name: str)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.py:41
↓ 1 callersMethodset_loss_fn
(self, fn: Callable[[torch.Tensor, torch.Tensor], torch.Tensor])
phases/19-capstone-projects/45-gradient-clipping-amp/code/main.py:183
↓ 1 callersMethodset_lr
(self, lr: float)
phases/19-capstone-projects/44-cosine-lr-warmup/code/main.py:150
↓ 1 callersMethodset_params
(self, params)
phases/03-deep-learning-core/06-optimizers/code/main.py:120
↓ 1 callersFunctionsetup_fixtures
()
phases/13-tools-and-protocols/22-skills-and-agent-sdks/code/main.py:70
↓ 1 callersFunctionsft_train
(model, dataset, num_epochs=2, lr=2e-5, seq_len=64)
phases/10-llms-from-scratch/06-instruction-tuning-sft/code/main.py:110
↓ 1 callersFunctionsh_degree_3_basis
(dirs)
phases/04-computer-vision/22-3d-gaussian-splatting/code/main.py:84
↓ 1 callersFunctionshade
(v)
site/figures-genai-rl.js:200
↓ 1 callersFunctionshadowDemo
()
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:253
↓ 1 callersFunctionshadowEvaluate
(samples: ShadowSample[])
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:131
↓ 1 callersFunctionshapley_exact
(value_fn: Callable[[frozenset], float], agents: list[str])
phases/16-multi-agent-and-swarms/21-agent-economies/code/main.py:18
← previousnext →5,201–5,300 of 8,347, ranked by callers