सहायक कोड: पाठ्यक्रम के एल्गोरिदम स्वयं चलाएँ
DMXSF रिपॉज़िटरी में CPU पर चलने वाले 61 Python प्रयोग हैं। वे विकि के 66 लेखों को कवर करते हैं और मुख्य सूत्रों तथा तरीकों की जाँच करते हैं।
dmxsf/dmxsf में टेन्सर, GPU, स्थानीय इन्फ़रेंस, एजेंट, ट्रेनिंग, मूल्यांकन और सुरक्षा के प्रयोग हैं। हर प्रयोग में निर्देश, कमांड और दर्ज आउटपुट है। GPU या बाहरी मॉडल वज़न की ज़रूरत नहीं है।
जल्दी शुरू करें
git clone https://github.com/dmxsf/dmxsf.git
cd dmxsf
uv sync
uv run dmxsf list
uv run dmxsf run foundations/tensors-and-shapes
uv run dmxsf roadmap weekend
uv सुझाया जाता है। pip install -e . भी चलेगा; तब कमांड से uv run हटाएँ।
कोड और पाठ्यक्रम का संबंध
- प्रयोग लेखों के पथ
labs/<section>/<page>/का अनुसरण करते हैं। पास-पास के विषय एक प्रयोग साझा कर सकते हैं। - प्रयोग मुख्य सूत्रों और तरीकों की जाँच करते हैं। कुछ प्रदर्शन प्रयोग CPU के छोटे उदाहरणों पर चलते हैं।
- README हर प्रयोग का दायरा बताता है और शिक्षण उदाहरणों को पूर्ण माप से अलग करता है।
- लाइब्रेरी, प्रयोग और टेस्ट अलग हैं। CI टेस्ट तथा हर प्रयोग की त्वरित जाँच चलाता है।
उपयोग कैसे करें
- विकि पृष्ठ पढ़ें और जाँचने के लिए कोई सूत्र या तालिका चुनें।
- संबंधित प्रयोग चलाएँ और कोड को आउटपुट से मिलाएँ।
- पैरामीटर बदलकर फिर चलाएँ और अभ्यास करें।
वातावरण और समय
- CPU पर्याप्त है। प्रीट्रेन मॉडल वाला पहला प्रयोग आपके कंप्यूटर पर छोटा मॉडल ट्रेन करता है।
- हर प्रयोग का अनुमानित समय दिया है;
--quickछोटी जाँच चलाता है। - समय मशीन पर निर्भर करता है; अनुपात की तुलना करें, केवल पूर्ण समय की नहीं।
सभी प्रयोग 61 प्रयोग
विकी पृष्ठों से जुड़े प्रयोग।
शुरुआत
-
What is an LLM? The whole loop, small enough to read
Predict one byte, append it, repeat: the whole loop on an 842,496-parameter GPT you can open, from tokens and embeddings to the softmax, the training objective and the three numbers (parameters, tokens, context). It ends with the map from every page of the course to its lab.
संबंधित पृष्ठ LLM क्या है: token से सहायक तक, LLM सीखने का रोडमैप: विकी का नक्शा और चार लर्निंग रूट
uv run dmxsf run start/what-is-an-llmप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
LLM formula sheet: parameters, memory and compute
Cross-check released-model parameter counts, KV bytes, training FLOPs and pass@k.
संबंधित पृष्ठ बड़े मॉडल चीट शीट: पैरामीटर, गणना, मेमोरी और decoding गति का अनुमान
uv run dmxsf run start/cheat-sheetप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
बुनियादी बातें
-
Tensor shapes: a linear layer by hand
Track position and feature axes through a projection, bias and ReLU.
संबंधित पृष्ठ Python और टेन्सर के आकार: तालिका से रैखिक परत तक
uv run dmxsf run foundations/tensors-and-shapesप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Next-token prediction and information theory
Bigram counts on the page's toy corpus, entropy, cross-entropy and KL divergence checked against each other, character n-grams on Shakespeare until the counts run out, and a neural bigram that learns the count table by gradient descent.
संबंधित पृष्ठ भाषा मॉडलिंग से अगले टोकन की भविष्यवाणी तक, सूचना सिद्धांत की समीक्षा: entropy, cross-entropy और KL divergence
uv run dmxsf run foundations/next-token-predictionप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Neural networks: gradients and XOR
Check manual backpropagation with finite differences, then fit XOR with and without a hidden layer.
संबंधित पृष्ठ न्यूरल नेटवर्क की मूल बातें: रैखिक परत से backpropagation तक
uv run dmxsf run foundations/neural-network-basicsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
BPE by hand on the page's toy corpus, a byte-level BPE that never says <unk>, what the training text decides about a language's cost, an embedding table as a matrix multiply, and how much of a model the embedding table is.
संबंधित पृष्ठ शब्द एम्बेडिंग और Tokenizer का सिद्धांत
uv run dmxsf run foundations/tokenizer-and-embeddingsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Optimizers, schedules, mixed precision and loss spikes
SGD, Adam and AdamW written out and checked against PyTorch in float64; why Adam wins on an ill-conditioned quadratic; decoupled weight decay; learning-rate schedules; mixed precision and master weights; one corrupted batch and what clipping and beta2 do about it.
संबंधित पृष्ठ ऑप्टिमाइज़र और प्रशिक्षण स्थिरता: AdamW, LR schedule, mixed precision
uv run dmxsf run foundations/optimizers-and-training-stabilityप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
मॉडल आर्किटेक्चर
-
From RNN to attention: gradients and retrieval paths
Compare the gradient through a recurrent chain and a gated memory path, then recover an earlier value with attention.
संबंधित पृष्ठ RNN से attention तक: Transformer क्यों उभरा
uv run dmxsf run architecture/from-rnn-to-attentionप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Attention, by hand and in a model
The page's three-position example by hand, why scores are divided by sqrt(d) (the dot product has variance d), masks, heads and positions, and a small model that has to use attention to copy what followed the last occurrence.
संबंधित पृष्ठ Transformer attention तंत्र की शुरुआत
uv run dmxsf run architecture/attention-basicsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Position encodings and length extrapolation
Sinusoidal encodings as clocks, RoPE's score depending only on distance, the stretching recipes (position interpolation, NTK-aware, YaRN, the Llama 3.1 rule) computed side by side, and five position schemes trained on short text and tested on long text.
संबंधित पृष्ठ Positional encoding विस्तार से (absolute से relative और RoPE तक), Long context: स्थिति extrapolation, प्रशिक्षण नुस्खा व लागत
uv run dmxsf run architecture/positional-encodingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
The Transformer block and the modern recipe
Count a GPT-2 small block (12d²+13d parameters), see where real models keep their parameters, measure signal and gradient by depth for pre-norm and post-norm, then walk from GPT-2 to Llama one change at a time.
संबंधित पृष्ठ Transformer Block का पूरा विघटन, आधुनिक मॉडल architecture: GPT-2 से Llama, Qwen व DeepSeek तक
uv run dmxsf run architecture/transformer-blockप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
KV-cache formulas against the page's table and against real tensors, MLA caching a latent vector, FlashAttention's tiles and online softmax, sliding-window attention, and converting an MHA model to GQA by mean-pooling heads.
संबंधित पृष्ठ कुशल attention: MQA, GQA, MLA व FlashAttention
uv run dmxsf run architecture/efficient-attentionप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Mixture of experts: routing, load balance and the parameter accounts
A MoE layer that computes only the tokens an expert was chosen for, total against active parameters counted on real modules, a DeepSeek-V3-style toy model, expert capacity, the balance loss, how many experts a decoding batch touches, and a trained MoE against dense models of equal cost and equal size.
संबंधित पृष्ठ Mixture of Experts (MoE): routing, load balancing व sparse activation
uv run dmxsf run architecture/mixture-of-expertsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
State space and hybrids: equivalent scans and memory
Compare recurrent and explicit causal forms of the same selective update and account for hybrid state and cache.
संबंधित पृष्ठ State space model व hybrid architecture: नियत state से KV Cache हटाना
uv run dmxsf run architecture/state-space-and-hybridप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
कंप्यूट और सिस्टम
-
Hardware basics: storage and copy time
Compute tensor sizes and a copy-time lower bound with explicit units.
संबंधित पृष्ठ बड़े मॉडलों का hardware परिचय: CPU, GPU, मेमोरी और data का आवागमन
uv run dmxsf run systems/hardware-basicsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
GPU roofline: bytes, FLOPs and tile reuse
Compute the A100 and H100 ridge points, model a linear layer, and count matrix-multiply tile traffic.
संबंधित पृष्ठ GPU और Roofline मॉडल: बड़े मॉडल अक्सर मेमोरी bandwidth पर क्यों अटकते हैं
uv run dmxsf run systems/gpu-and-rooflineप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
GPU kernels: tiled GEMM and memory traffic
Run tiled matrix multiplication on uneven shapes and verify logical memory traffic.
संबंधित पृष्ठ GPU kernels का परिचय: Tiled matrix गुणन से operator fusion तक
uv run dmxsf run systems/gpu-kernelsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Numerical precision: rounding, overflow and loss scaling
Reproduce low-precision stalled addition, stable softmax, and loss scaling with CPU tensors.
संबंधित पृष्ठ सांख्यिक precision: FP16, BF16 व FP8 प्रशिक्षण की तीन प्रकार की विफलताएँ
uv run dmxsf run systems/numerical-precisionप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Collective communication: simulate a ring all-reduce
Track each chunk through reduce-scatter and all-gather, then compare the observed per-rank bytes with the alpha-beta model.
संबंधित पृष्ठ Collective communication: all-reduce के इतने अलग algorithms क्यों हैं
uv run dmxsf run systems/collective-communicationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
प्रशिक्षण से पहले: Pretraining
-
The pretraining pipeline on a laptop: monitoring, data mix, resuming, leakage
Two free checks before spending compute, a baseline run and how to read its log, then three experiments on a laptop: the data mix, four ways to resume from a checkpoint (only one is exact), and validation text leaking into the training data.
संबंधित पृष्ठ बड़े मॉडल की प्रशिक्षण pipeline का पूरा दृश्य
uv run dmxsf run pretraining/training-pipelineप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Data engineering: build and audit a dedup filter
Compare exact duplicates and shingle similarity, then read the banding curve before choosing a deduplication threshold.
संबंधित पृष्ठ Pretraining data engineering: छँटाई, dedup व मिश्रण
uv run dmxsf run pretraining/data-engineeringप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Scaling laws: the formulas, the serving cost, and a tiny study of our own
The page's power laws and compute-optimal split recomputed, what serving cost does to the best model, a real tiny scaling study (tune the learning rate per size, train a grid, fit L(N, D), predict an unseen run), and what a 12-point fit can and cannot identify.
संबंधित पृष्ठ Scaling laws: compute, पैरामीटर व data कैसे बाँटें
uv run dmxsf run pretraining/scaling-lawsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Training compute and memory: 6ND, MFU, model state and activations
Every formula on the page checked against a measurement: PyTorch's FLOP counter, the tensors autograd saves for the backward pass, and the optimizer's state; then MFU, GPU hours and a full Llama 2 7B account on 8 x 80 GiB.
संबंधित पृष्ठ प्रशिक्षण की गणना व मेमोरी का लेखा: FLOPs, MFU व मेमोरी बजट
uv run dmxsf run pretraining/compute-and-memoryप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Distributed training: gradients, ZeRO, tensor and pipeline parallelism
Built and measured in a few processes on one machine: data-parallel gradient averaging, the ring all-reduce, data parallelism, ZeRO-1 and ZeRO-3 trained side by side (same weights, measured memory and communication), Megatron-style tensor parallelism, and pipeline schedules.
संबंधित पृष्ठ Distributed training का परिचय: data, tensor व pipeline parallelism
uv run dmxsf run pretraining/distributed-trainingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Post-training और alignment
-
SFT data: the loss mask, a data health check, and what data size, noise, masking and replay do
What the SFT loss averages over (the -100 mask, packing and padding), data health checks against planted ground truth, and four controlled experiments: run-to-run noise, examples per intent, wrong labels, loss on the prompt and replaying general text.
संबंधित पृष्ठ SFT data ka nirman aur quality control
uv run dmxsf run post-training/sft-dataप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
LoRA: the parameter bill, the mechanics, LoRA against full fine-tuning, merging, NF4
LoRA written from scratch and compared with full fine-tuning: the exact parameter bill, learning-rate windows, rank and alpha, which matrices to adapt, how low-rank the learned update is, merging into the weights and into 4-bit (NF4) weights, memory and speed.
संबंधित पृष्ठ LoRA fine-tuning ka practical guide
uv run dmxsf run post-training/lora-finetuningप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Reward models: pairwise scores and label noise
Fit Bradley–Terry scores on a connected comparison graph and reproduce the agreement ceiling under independent label flips.
संबंधित पृष्ठ Reward model: insani preference ko optimize yogya score banana
uv run dmxsf run post-training/reward-modelsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Policy gradients: exact checks, baselines and GAE
Enumerate a tiny policy, compare gradients against finite differences, and vary lambda in a finite GAE trajectory.
संबंधित पृष्ठ RL fundamentals: policy gradient, advantage estimation aur PPO
uv run dmxsf run post-training/rl-fundamentalsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Preference optimization: the DPO loss, its closed form, and a real DPO run
The DPO loss by hand, its closed-form optimum checked against random competitors and fitted comparisons, a real DPO run on a small byte-level model (learning rate, beta, chosen log-probabilities that fall, the LoRA-off reference), and reward hacking as the KL budget grows.
संबंधित पृष्ठ Preference optimization: RLHF se DPO tak
uv run dmxsf run post-training/preference-optimizationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Reasoning RL: verifiers, GRPO advantages and loss, and a real RLVR run
The verifier, group advantages, the GRPO loss, clipping and the k3 KL estimator checked exactly; then a real RLVR run in which a tiny model is updated from nothing but exact-match 0/1 rewards.
संबंधित पृष्ठ Reasoning RL: RLVR और GRPO
uv run dmxsf run post-training/reasoning-rlप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Reasoning RL systems: rollout and learner scheduling
Replay serial and overlapping jobs, and verify policy lag and dropped batches.
संबंधित पृष्ठ Reasoning RL system: asynchronous sampling, training aur policy lag
uv run dmxsf run post-training/rollout-and-trainingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Inference aur deployment
-
First inference service: a local HTTP endpoint
Send real local HTTP requests to a toy decoder and check success and errors.
संबंधित पृष्ठ Pehla inference service: model function ko HTTP requests lena
uv run dmxsf run inference/first-inference-serviceप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Decoding and sampling: temperature, top-k, top-p, min-p, beam search, penalties
The page's four-token example reproduced exactly (temperature, top-k, top-p, min-p, and why the order matters), whether samples follow the processed distribution, what each knob does to real text, beam search, repetition penalties, and whether batch shape changes greedy output.
संबंधित पृष्ठ Decoding aur sampling: temperature, Top-k, Top-p aur beam search
uv run dmxsf run inference/decoding-and-samplingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
KV cache: the memory formula, exactness, the saving, prefill against decode
The memory formula against real cache tensors, cached and uncached decoding agreeing exactly, and the saving counted two ways: token positions processed (exact) and time on a CPU (read the ratios), plus the prefill and decode split.
संबंधित पृष्ठ KV cache aur inference performance optimization
uv run dmxsf run inference/kv-cacheप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Prefix caching: cache reuse versus queues
Replay bursty and spaced arrivals with two cache routing policies.
संबंधित पृष्ठ Prefix caching aur PD separation: repeat computation ek hi baar
uv run dmxsf run inference/prefix-cachingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Quantization: the ledger, the grid, weights, activations, calibration, the KV cache
The 80 GB ledger for Llama 3 8B, the rounding grid, and experiments on a small model: round-to-nearest, SmoothQuant, an AWQ-style scale search, GPTQ and a quantized KV cache, with outliers dialled in and labelled as constructed.
संबंधित पृष्ठ Model quantization: INT8, INT4, GPTQ aur AWQ ka siddhant aur measurement
uv run dmxsf run inference/quantizationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Serving: continuous batching, paged KV memory, prefix cache, TTFT, capacity
Roofline and exact batched decoding, static against continuous scheduling on paper and on a real model, a paged KV pool with copy-on-write, a hash-based prefix cache, and what a request costs (TTFT, TPOT, capacity). Read the ratios, not the milliseconds.
संबंधित पृष्ठ Continuous batching aur PagedAttention: service kai requests ek saath kaise, LLM inference service: latency metrics, measurement aur engine selection
uv run dmxsf run inference/continuous-batchingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Speculative decoding: the rule, the formulas, a real draft and target
The accept/reject rule that keeps the target's exact distribution, checked on the page's toy distribution, by exact algebra and on real models; the formulas of Leviathan et al.; a draft and target byte-level pair run with KV caches; and when it does not pay.
संबंधित पृष्ठ Speculative decoding
uv run dmxsf run inference/speculative-decodingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Application engineering
-
First agent: a bounded tool loop
Run a read-only lookup loop and check success, absence, and the step budget.
संबंधित पृष्ठ Pehla Agent: read-only tools se bounded loop tak
uv run dmxsf run applications/first-agentप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
The chat template rendered by hand, what a prefix cache can reuse, scorers that separate format failures from wrong judgments, the twelve word problems re-solved in code, and how far a 12-ticket eval set can be trusted. With --hf the page's experiments are rerun on Qwen2.5-1.5B-Instruct.
संबंधित पृष्ठ Prompt engineering: spec se message tak
uv run dmxsf run applications/prompt-engineeringप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗वैकल्पिक: --hf या --bge; uv sync --extra hf आवश्यक
-
Structured output: constrained decoding, its cost, and the function-calling loop
Constrained decoding from the automaton up: the page's demo token for token, why the stepwise mask is not the model's distribution over legal outputs, the mask on a byte-level GPT that has and has not seen the format, schemas, validation and retries.
संबंधित पृष्ठ Structured output aur function calling: JSON mode se constrained decoding tak
uv run dmxsf run applications/structured-output-and-function-callingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Chunking, similarity and index size, BM25 from the formula, rank fusion (RRF), retrieval metrics and context assembly, reproducing the page's numbers offline; with --bge the dense retriever and the reranker run too.
संबंधित पृष्ठ RAG system banane ka hands-on guide
uv run dmxsf run applications/ragप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗वैकल्पिक: --hf या --bge; uv sync --extra hf आवश्यक
-
Agents and tool calling: the loop, its guards, and the trace scorer
The tool-calling loop with its guards (format, business rules, repeats, confirmation, step limit) and the scorer, with the model swapped for a scripted stand-in that replays the page's decisions; then pass^k against pass@k. No language model runs.
संबंधित पृष्ठ Agents aur tool calling: function calling se ReAct workflows tak
uv run dmxsf run applications/agents-and-tool-callingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Agent context and memory: budget and precedence
Keep tool groups whole and verify overrides and deletion on versioned records.
संबंधित पृष्ठ Agent context engineering aur long-term memory: window, versions, state
uv run dmxsf run applications/context-and-memoryप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Agent evaluation: repeatability and terminal state
Compare equal one-run scores and validate four calendar traces.
संबंधित पृष्ठ Agent evaluation: system ko naapo, model ko nahi
uv run dmxsf run applications/agent-evaluationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
MCP tools: inspect discovery, calls and schema size
Inspect offline JSON-RPC tools/list and tools/call messages and measure what narrowing the catalog sends to a client.
संबंधित पृष्ठ MCP aur tool ecosystem: protocol kaise chalta hai, tools zyada hon to kya
uv run dmxsf run applications/mcp-and-tool-ecosystemप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Multimodal
-
Multimodal LLMs: images as tokens
Patches to visual tokens, what the tokens cost in KV cache and FLOPs, LLaVA's projector and two training stages, CLIP's contrastive loss and a small CLIP trained from scratch on rendered shapes. With --hf, CLIP ViT-B/32 on CIFAR-10.
संबंधित पृष्ठ Multimodal LLM: image kaise token banti hai
uv run dmxsf run multimodal/multimodal-llmsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗वैकल्पिक: --hf या --bge; uv sync --extra hf आवश्यक
-
Diffusion and flow matching: verify a Gaussian path
Measure the forward diffusion variance and integrate a simple analytic flow, checking how Euler error changes with step count.
संबंधित पृष्ठ Diffusion aur flow matching
uv run dmxsf run multimodal/diffusion-and-flow-matchingप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
World models: plan, observe, and replan
Compare fixed execution with feedback on a grid with a hidden wall.
संबंधित पृष्ठ World models और planning: state का पूर्वानुमान से closed-loop control तक
uv run dmxsf run multimodal/world-modelsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Evaluation
-
Benchmark contamination: an n-gram detector, and a leak you can measure
The page's n-gram contamination detector on its own example; a benchmark whose answers can only be memorised; a model trained with a third of it leaked verbatim, a third paraphrased and a third absent; what the detector flags and what the clean-subset check concludes.
संबंधित पृष्ठ LLM evaluation methodology: benchmarks, contamination aur eval process
uv run dmxsf run evaluation/llm-evaluationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Evaluation statistics: pass@k, the error of a score, paired tests, sample sizes
pass@k against brute-force enumeration, the 95% interval against how often it actually covers, paired comparisons and the sample-size table against the power of a real test, then two real models compared on held-out text.
संबंधित पृष्ठ Eval statistics: pass@k, confidence intervals aur needed sample size
uv run dmxsf run evaluation/eval-statisticsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
LLM-as-a-judge: bias, agreement, and Bradley-Terry leaderboards
A judge stand-in with chosen biases, so every number has an exact answer: swapping the order cancels position bias but not length bias, Cohen's kappa exposes a judge that always guesses the majority class, and a Bradley-Terry leaderboard is corrected for length.
संबंधित पृष्ठ LLM-as-a-Judge: model ko judge banana, uske biases aur calibration
uv run dmxsf run evaluation/llm-as-judgeप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Evaluation sets: noisy labels, agreement and item information
Check a four-option label-noise formula by simulation, compute Cohen's kappa, and locate a 2PL item's most informative difficulty.
संबंधित पृष्ठ Eval set banana: question sources, label quality aur question information
uv run dmxsf run evaluation/building-eval-setsप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Benchmark contamination: detect wording overlap and audit slices
Build real overlap flags on synthetic benchmark questions and audit how averaging hides contaminated and clean slices.
संबंधित पृष्ठ Benchmark contamination: kaise banti hai, kaise pakdein, kaise bachein
uv run dmxsf run evaluation/benchmark-contaminationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Production evaluation: replay and release gates
Replay paired outcomes and detect regressions and missing coverage in critical slices.
संबंधित पृष्ठ LLM production evaluation: offline replay, canary rollout aur rollback
uv run dmxsf run evaluation/production-evaluationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
सुरक्षा और alignment जोखिम
-
Tool authorization: separate data, proposals and permissions
Replay a benign read and policy-boundary cases in a mocked runtime, verifying that content cannot grant new privileges.
संबंधित पृष्ठ Prompt injection aur jailbreak: LLM application ki safety seema
uv run dmxsf run safety/prompt-injection-and-jailbreaksप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Calibration: withheld answers, confidence and accuracy
Fit temperature on held-out calibration examples and plot the trade-off between coverage and error using synthetic scores.
संबंधित पृष्ठ Hallucination aur calibration: model vajah se pakka galat kaise bolta hai
uv run dmxsf run safety/hallucination-and-calibrationप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Privacy audit: exposure for synthetic canaries
Compare rank exposure and top-one generation using an artificial candidate distribution, then measure uniform-rank exposure.
संबंधित पृष्ठ Memorization aur privacy
uv run dmxsf run safety/memorization-and-privacyप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
Frontier
-
Test-time compute: independent draws, reranking and majority voting
Compare independent and perfectly correlated draws and compute how a noisy selector changes best-of-N.
संबंधित पृष्ठ Test-time compute: inference par kharch karna
uv run dmxsf run frontier/test-time-computeप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Synthetic data: rare-event loss and verified selection
Measure support lost when each generation replaces the previous one, then see how an independent verifier filters synthetic labels.
संबंधित पृष्ठ Synthetic data aur self-improvement
uv run dmxsf run frontier/synthetic-data-and-self-improvementप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗ -
Interpretability: superposed features and causal patching
Measure interference between nonorthogonal features and patch one controlled activation to explain a toy prediction change.
संबंधित पृष्ठ Mechanistic interpretability: superposition, SAE aur circuits
uv run dmxsf run frontier/interpretabilityप्रयोग स्क्रिप्ट देखें ↗ प्रयोग विवरण ↗
सीखने के मार्ग के प्रयोग
हर सप्ताह या चरण के पृष्ठों से जुड़े प्रयोग। LLM एल्गोरिदम विकि →
Route 0: वीकेंड क्रैश कोर्स (लगभग 10 घंटे)
| चरण 1 | |
|---|---|
| चरण 2 | |
| चरण 3 | |
| चरण 4 | |
| चरण 5 | |
| चरण 6 | |
| चरण 7 |
Route 1: AI एप्लिकेशन डेवलपर (8 सप्ताह)
| सप्ताह 1 | |
|---|---|
| सप्ताह 2 | |
| सप्ताह 3 | |
| सप्ताह 4 | |
| सप्ताह 5 | |
| सप्ताह 6 | |
| सप्ताह 7 | |
| सप्ताह 8 |
Route 2: LLM इंजीनियर (14 सप्ताह)
| सप्ताह 1 | |
|---|---|
| सप्ताह 2 | |
| सप्ताह 3 | |
| सप्ताह 4 | |
| सप्ताह 5 | |
| सप्ताह 6 | |
| सप्ताह 7 | |
| सप्ताह 8 | |
| सप्ताह 9 | |
| सप्ताह 10 | |
| सप्ताह 11 | |
| सप्ताह 12 | |
| सप्ताह 13 | |
| सप्ताह 14 |
Route 3: LLM रिसर्चर (16 सप्ताह)
| सप्ताह 1 | |
|---|---|
| सप्ताह 2 | पढ़ना या लिखना |
| सप्ताह 3 | |
| सप्ताह 4 | |
| सप्ताह 5 | |
| सप्ताह 6 | |
| सप्ताह 7 | |
| सप्ताह 8 | |
| सप्ताह 9 | |
| सप्ताह 10 | |
| सप्ताह 11 | |
| सप्ताह 12 | |
| सप्ताह 13 | |
| सप्ताह 14 | |
| सप्ताह 15 | पढ़ना या लिखना |
| सप्ताह 16 | पढ़ना या लिखना |
रिपॉज़िटरी
अपडेट किया गया