Company
15 problems tagged for Anthropic.
Divide logits by a temperature scalar before softmax to sharpen or flatten the token probability distribution.
Build 2D sinusoidal position encodings for vision transformers, encoding both row and column positions in patch grids.
Build the InfoNCE contrastive loss and a CLIP-style training loop that aligns image and text embeddings.
Cache key and value tensors from previous timesteps so each new token only computes attention over one new position.
Inject trainable low-rank decomposition matrices (A, B) into a frozen linear layer for parameter-efficient fine-tuning.
Restrict attention to a fixed local window around each token, reducing memory from O(n²) to O(n·w) for long sequences.
Select the k highest-probability tokens, zero out the rest, renormalize, and sample for controlled text generation.
Sort logits, compute cumulative probabilities, mask tokens below the nucleus threshold, and sample from the filtered distribution.
Compute the Direct Preference Optimization loss that trains a policy directly from preference pairs without a reward model.
Build Proximal Policy Optimization with clipped surrogate objective, value function baseline, and KL penalty for RLHF.
Build Mamba's selective scan mechanism with input-dependent parameters, achieving linear-time sequence modeling without attention.
Draft tokens with a fast model, verify in parallel with the target model, and accept/reject to guarantee identical output distribution.
Build Fully Sharded Data Parallel: shard parameters across GPUs, all-gather before forward, reduce-scatter gradients after backward.
Build Group Relative Policy Optimization that scores multiple completions per prompt and uses group-relative advantages.
Distribute attention computation across GPUs in a ring topology, enabling context lengths that exceed single-GPU memory.