MCPcopy Create free account

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

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

↓ 5 callersFunctionfmt_m
(n: int)
phases/10-llms-from-scratch/16-differential-attention-v2/code/main.py:168
↓ 5 callersFunctionforward
(net, x)
phases/09-reinforcement-learning/05-dqn/code/main.py:41
↓ 5 callersFunctionfreeze_body
Set requires_grad=False on every body parameter. Returns count frozen.
phases/19-capstone-projects/38-classifier-finetuning/code/main.py:173
↓ 5 callersMethodfrom_default
(cls)
phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:92
↓ 5 callersFunctiongen_clean
(n: int)
phases/18-ethics-safety-alignment/07-sleeper-agents-persistent-deception/code/main.py:44
↓ 5 callersMethodget
(self, i: int, j: int)
phases/07-transformers-deep-dive/03-multi-head-attention/code/main.py:26
↓ 5 callersMethodget_slice
(self, start: int, stop: int)
phases/19-capstone-projects/43-hdf5-tokenized-corpus/code/main.py:303
↓ 5 callersFunctiongloo_reference
Run the same operation through torch.distributed gloo for verification. Uses file-based init (file:// URI) because TCP init through libuv has
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:236
↓ 5 callersFunctionhessian_eigenvalues_2d
(H)
phases/01-math-foundations/18-convex-optimization/code/convex.py:27
↓ 5 callersFunctionhorizon_at
Expert time where P(success) = p. sigmoid(w*log(t)+b) = p -> log(t) = (logit(p) - b) / w.
phases/15-autonomous-systems/21-metr-external-evaluation/code/main.py:67
↓ 5 callersFunctioninfo_nce_loss
Bidirectional InfoNCE used in CLIP and friends. Returns (loss, similarity_matrix). image_emb and text_emb must have the same shape (N, D). Th
phases/19-capstone-projects/62-vision-language-pretraining/code/main.py:73
↓ 5 callersMethodinitialize
Lay out the byte alphabet and reserve special-token ids.
phases/19-capstone-projects/30-bpe-tokenizer-from-scratch/code/main.py:49
↓ 5 callersFunctionkl_divergence
(p, q)
phases/01-math-foundations/14-norms-and-distances/code/distances.py:133
↓ 5 callersFunctionload_fixtures
()
phases/19-capstone-projects/87-end-to-end-safety-gate/code/main.py:37
↓ 5 callersFunctionlogsumexp_stable
(values)
phases/01-math-foundations/13-numerical-stability/code/numerical.py:23
↓ 5 callersFunctionloss
(gap, beta)
site/figures-llms2.js:185
↓ 5 callersFunctionmake_classification_data
(n_samples=300, n_features=5, noise=0.1, seed=42)
phases/02-ml-fundamentals/11-ensemble-methods/code/ensembles.py:5
↓ 5 callersFunctionmake_data
(n_samples=400, n_features=8, seed=42)
phases/02-ml-fundamentals/12-hyperparameter-tuning/code/tuning.py:6
↓ 5 callersFunctionmake_dataset
(n_per_class: int = 400, seed: int = 0)
phases/19-capstone-projects/38-classifier-finetuning/code/main.py:247
↓ 5 callersFunctionmake_deterministic_planner
Planner used in the demo and tests. When ``fail_step_id`` is given, the planner inserts a ``_force_fail`` marker into that step's args on the
phases/19-capstone-projects/24-plan-execute-control-flow/code/main.py:198
↓ 5 callersFunctionmake_mock_corpus
Build a deterministic mock corpus of n_pairs synthetic image-caption pairs. Caption tokens are correlated with the image seed so the model has a
phases/19-capstone-projects/62-vision-language-pretraining/code/main.py:192
↓ 5 callersFunctionmake_policy_and_ref
()
phases/18-ethics-safety-alignment/03-direct-preference-optimization-family/code/main.py:72
↓ 5 callersFunctionmake_requests
(n=30, seed=42)
phases/10-llms-from-scratch/12-inference-optimization/code/main.py:431
↓ 5 callersFunctionmake_synthetic_series
(n=500, seed=42)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:4
↓ 5 callersFunctionmse
(y_true, y_pred)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:143
↓ 5 callersFunctionnormaliseSpan
(raw: unknown)
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/spans.ts:72
↓ 5 callersFunctionnormalize
(text: str)
phases/19-capstone-projects/83-prompt-injection-detector/code/main.py:68
↓ 5 callersFunctionnow_unix_nano
()
phases/19-capstone-projects/28-observability-otel-traces/code/main.py:131
↓ 5 callersMethodobserve
(self, value: float, labels: dict[str, str] | None = None)
phases/19-capstone-projects/28-observability-otel-traces/code/main.py:236
↓ 5 callersMethodobserve
Update state based on the result of the last action.
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:570
↓ 5 callersFunctionok
(value: T)
phases/11-llm-engineering/03-structured-outputs/code/main.ts:20
↓ 5 callersFunctionoutput_size
(h_in, k, p, s)
phases/04-computer-vision/02-convolutions-from-scratch/code/main.py:13
↓ 5 callersFunctionparse_response
(raw: str)
phases/19-capstone-projects/50-hypothesis-generator/code/main.py:86
↓ 5 callersMethodphase
(self)
phases/01-math-foundations/19-complex-numbers/code/complex_numbers.py:52
↓ 5 callersFunctionpickNextLesson
( topo: string[], index: Record<string, Lesson>, mastery: Record<string, Mastery>, now: number, )
phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/curriculum.ts:64
↓ 5 callersFunctionprecision_at_k
(retrieved: list[str], gold: set[str], k: int)
phases/19-capstone-projects/68-rag-eval-precision-recall/code/main.py:39
↓ 5 callersFunctionprecision_at_k
(y_true, scores, k)
phases/02-ml-fundamentals/16-anomaly-detection/code/anomaly_detection.py:193
↓ 5 callersFunctionprecision_recall
(y_true, y_pred)
phases/02-ml-fundamentals/16-anomaly-detection/code/anomaly_detection.py:181
↓ 5 callersMethodpredict
(self, X)
phases/02-ml-fundamentals/15-time-series/code/time_series.py:119
↓ 5 callersMethodpredict
(self, x)
phases/02-ml-fundamentals/03-logistic-regression/code/logistic_regression.py:186
↓ 5 callersFunctionpredict_polynomial
(x, w)
phases/02-ml-fundamentals/10-bias-variance/code/bias_variance.py:28
↓ 5 callersMethodpredict_proba
(self, x)
phases/02-ml-fundamentals/03-logistic-regression/code/logistic_regression.py:179
↓ 5 callersFunctionprepare_scratch_repo
()
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:665
↓ 5 callersFunctionprint_row
(header: str, key: str)
phases/18-ethics-safety-alignment/18-frontier-safety-frameworks-rsp-pf-fsf/code/main.py:43
↓ 5 callersFunctionprint_separator
(title)
phases/02-ml-fundamentals/14-naive-bayes/code/naive_bayes.py:170
↓ 5 callersFunctionprint_separator
(title)
phases/02-ml-fundamentals/16-anomaly-detection/code/anomaly_detection.py:198
↓ 5 callersFunctionpx
(s)
site/figures-math2.js:338
↓ 5 callersFunctionpx
(k)
site/figures-frontier.js:252
↓ 5 callersFunctionpx
(b)
site/figures-infra.js:281
↓ 5 callersFunctionpy
(v)
site/figures-vision-speech.js:341
↓ 5 callersFunctionpy
(v)
site/figures-math2.js:339
↓ 5 callersFunctionpyMel
(m)
site/figures-vision-speech.js:305
↓ 5 callersFunctionrandn_matrix
(rows, cols, rng, scale=0.2)
phases/08-generative-ai/02-autoencoders-vae/code/main.py:21
↓ 5 callersMethodread_all
(self)
phases/16-multi-agent-and-swarms/13-shared-memory-blackboard/code/main.py:56
↓ 5 callersMethodregister
(self, skill: Skill, dedup: bool = True)
phases/14-agent-engineering/10-skill-libraries-voyager/code/main.py:29
↓ 5 callersFunctionregisterTool
(name: string, description: string, parameters: ToolParameters, fn: ToolFunction)
phases/11-llm-engineering/09-function-calling/code/main.ts:45
↓ 5 callersFunctionregister_tool
(name, description, parameters, function)
phases/11-llm-engineering/09-function-calling/code/function_calling.py:9
↓ 5 callersFunctionregularised_incomplete_beta
I_x(a, b) via the standard Lentz continued fraction, symmetric in x.
phases/19-capstone-projects/53-result-evaluator/code/main.py:126
↓ 5 callersFunctionreliability_diagram
(confidences: Sequence[float], correct: Sequence[int], bins: int = 10)
phases/19-capstone-projects/73-perplexity-calibration/code/main.py:143
↓ 5 callersMethodrender
(self)
phases/16-multi-agent-and-swarms/02-fipa-acl-heritage/code/main.py:38
↓ 5 callersFunctionreport
(title: str, m: float, u: float)
phases/18-ethics-safety-alignment/09-alignment-faking/code/main.py:64
↓ 5 callersFunctionreport
(label: string, cfg: Config, reqs: readonly Request[])
phases/17-infrastructure-and-production/14-prompt-semantic-caching/code/main.ts:304
↓ 5 callersFunctionreport
(label: str, cfg: Config, reqs: list[Request])
phases/17-infrastructure-and-production/14-prompt-semantic-caching/code/main.py:97
↓ 5 callersFunctionreport_stack
(label: str, stack: set[str])
phases/17-infrastructure-and-production/10-cold-start-mitigation/code/main.py:55
↓ 5 callersFunctionrerank
( model: CrossEncoder, query: str, candidates: list[Candidate], top_k: int = 5, )
phases/19-capstone-projects/66-reranker-cross-encoder/code/main.py:157
↓ 5 callersFunctionrms_norm
(X, eps=1e-6)
phases/07-transformers-deep-dive/05-full-transformer/code/main.py:98
↓ 5 callersFunctionrms_norm
(v: List[float], eps: float = 1e-6)
phases/10-llms-from-scratch/18-multi-token-prediction/code/main.py:38
↓ 5 callersMethodrow
(self, i)
phases/07-transformers-deep-dive/05-full-transformer/code/main.py:29
↓ 5 callersFunctionrrf
(rankings: list[list[tuple[Doc, float]]], k: int = 60)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:126
↓ 5 callersMethodrules
(self)
phases/19-capstone-projects/86-constitutional-rules-engine/code/main.py:141
↓ 5 callersMethodrun
(self)
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:691
↓ 5 callersMethodrun
(self, model_fn)
phases/10-llms-from-scratch/10-evaluation/code/main.py:20
↓ 5 callersFunctionrunQuery
( q: string, dense: DenseIndex, bm25: BM25Index, topK = 5, )
phases/19-capstone-projects/02-rag-over-codebase/code/ts/src/retrieval.ts:27
↓ 5 callersFunctionrun_ddp
Spawn world_size ranks, return per-rank loss history and param norm.
phases/19-capstone-projects/77-data-parallel-ddp/code/main.py:135
↓ 5 callersFunctionrun_transfer
(cp: Checkpoint, txid: str, from_acct: str, to_acct: str, amount: int, min_balance: int,
phases/15-autonomous-systems/16-checkpoints-rollback/code/main.py:74
↓ 5 callersFunctionrun_with_feedback
( command: list[str], agent_note: str = "", timeout_s: float = 30.0, parent_command_id: str |
phases/14-agent-engineering/37-runtime-feedback-loops/code/main.py:103
↓ 5 callersFunctionscheduleNextDue
( currentInterval: number, correct: boolean, now: number, )
phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/repetition.ts:6
↓ 5 callersMethodsearch
(self, query: str, k: int)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:163
↓ 5 callersMethodsearch
(self, query: str)
phases/19-capstone-projects/13-mcp-server-with-registry/code/main.py:157
↓ 5 callersMethodsearch
(self, query_vector, top_k=5, metric="cosine")
phases/11-llm-engineering/04-embeddings/code/embeddings.py:109
↓ 5 callersFunctionshard_bounds
Return (start, end) of the rank's shard in a length-total flat tensor. Pads the last shard with zeros if total is not divisible by world_size; th
phases/19-capstone-projects/78-zero-parameter-sharding/code/main.py:84
↓ 5 callersFunctionsigmoid
(x)
phases/03-deep-learning-core/04-activation-functions/code/main.py:5
↓ 5 callersFunctionsignForTesting
( signingSecret: string, timestamp: string, rawBody: string, )
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/ts/src/slack_verify.ts:32
↓ 5 callersFunctionsilhouette_score
(data, assignments)
phases/02-ml-fundamentals/07-unsupervised-learning/code/clustering.py:55
↓ 5 callersFunctionsinusoidal_2d
Build a deterministic 2D sinusoidal position table of shape (grid_h * grid_w, dim). Half of dim encodes row position, half encodes column positio
phases/19-capstone-projects/58-vision-encoder-patches/code/main.py:42
↓ 5 callersFunctionsmall_cfg
()
phases/19-capstone-projects/59-vit-transformer/code/test_main.py:19
↓ 5 callersFunctionsoftmax
(logits: list[float])
phases/18-ethics-safety-alignment/03-direct-preference-optimization-family/code/main.py:26
↓ 5 callersFunctionstart_span
(name: str, kind: str, parent: Span | None = None, attrs: dict | None = None)
phases/13-tools-and-protocols/20-opentelemetry-genai/code/main.py:67
↓ 5 callersFunctionstate_features
(state)
phases/09-reinforcement-learning/05-dqn/code/main.py:25
↓ 5 callersFunctionstd_dev
(data, sample=True)
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:39
↓ 5 callersFunctionstep
(state, action)
phases/09-reinforcement-learning/05-dqn/code/main.py:15
↓ 5 callersMethodstep
(self)
phases/03-deep-learning-core/10-mini-framework/code/main.py:312
↓ 5 callersMethodstore
(prompt: string, response: string)
phases/17-infrastructure-and-production/14-prompt-semantic-caching/code/main.ts:150
↓ 5 callersFunctionsummarize
(label: str, agent: Agent, under_eval: bool)
phases/18-ethics-safety-alignment/08-in-context-scheming-frontier-models/code/main.py:95
↓ 5 callersFunctiontemperature_bucket
Map a continuous temperature to a discrete bucket index.
phases/19-capstone-projects/50-hypothesis-generator/code/main.py:110
↓ 5 callersFunctiontextMessage
(role: MessageRole, text: string)
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:41
↓ 5 callersFunctiontfidfEmbed
(text: string, vocab: string[], idf: number[])
phases/11-llm-engineering/06-rag/code/main.ts:52
↓ 5 callersFunctiontfidf_embed
(text, vocab, idf)
phases/11-llm-engineering/06-rag/code/main.py:42
↓ 5 callersFunctiontokenize
(text: str)
phases/19-capstone-projects/65-hybrid-retrieval-bm25-dense/code/main.py:41
↓ 5 callersFunctiontraceLLMCall
( tracer: GenAITracer, provider: MockProvider, model: string, prompt: string, forceError = false, )
phases/17-infrastructure-and-production/13-llm-observability/code/main.ts:186
← previousnext →601–700 of 8,347, ranked by callers