Company
17 problems tagged for Meta.
Build k-nearest neighbors classification using vectorized distance computation and top-k selection on tensors.
Build binary logistic regression from scratch with sigmoid, binary cross-entropy, and manual gradient descent updates.
Build numerically stable softmax using the log-sum-exp trick, handling overflow and underflow in raw tensor math.
Maintain and expand top-scoring partial sequences at each decoding step with length normalization and early stopping.
Train a smaller student model to match a larger teacher's soft predictions using temperature-scaled KL divergence loss.
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.
Build a Swin Transformer block from scratch: window partition, shifted-window attention masks, and a learned relative position bias.
Dynamically slot sequences in and out of a running batch as they finish, maximizing throughput without padding waste.
Compute the Direct Preference Optimization loss that trains a policy directly from preference pairs without a reward model.
Trade compute for memory by recomputing intermediate activations during backward instead of storing them all.
Build Proximal Policy Optimization with clipped surrogate objective, value function baseline, and KL penalty for RLHF.
Build ViT with masked autoencoder pretraining — randomly mask patches, encode visible ones, decode to reconstruct.
Write the tiled, fused attention kernel that computes exact attention in O(n) memory using online softmax in Triton.
Build Fully Sharded Data Parallel: shard parameters across GPUs, all-gather before forward, reduce-scatter gradients after backward.
Distribute attention computation across GPUs in a ring topology, enabling context lengths that exceed single-GPU memory.
Write a GPU kernel in Triton that fuses the softmax computation into a single pass, eliminating intermediate memory reads.