Associate Research Scientist Interview Questions

4,831 associate research scientist interview questions shared by candidates

def nucleus(probs: list[float], p: float) -> list[float]: """ Get the top-p nucleus on a list of probabilities with a given threshold p. Args: probs: A probability distribution where each value is between 0 and 1. Each index corresponds a different outcome. p: The nucleus sampling threshold (0 < p <= 1). Returns: list[float]: A list of probabilities where only the top-p probabilities are retained and normalized, all others are set to zero. The order of the output is the same as the order of the input. Example: >>> probs = [0.2, 0.2, 0.3, 0.3] >>> p = 0.5 >>> nucleus(probs, p) [0.0, 0.0, 0.5, 0.5] """ def single_headed_attention(q, k, v): """Perform single-headed multi-headed self attention with masking. Args: q: (q_seq_len, head_dim) k: (kv_seq_len, head_dim) v: (kv_seq_len, head_dim) Returns: np.ndarray: (q_seq_len, head_dim) """ scale = np.sqrt(q.shape[-1]) mask = ... # You may find np.triu or np.tri helpful # TODO raise NotImplementedError
avatar

Research Scientist

Interviewed at Scale

3.6
Mar 10, 2025

def nucleus(probs: list[float], p: float) -> list[float]: """ Get the top-p nucleus on a list of probabilities with a given threshold p. Args: probs: A probability distribution where each value is between 0 and 1. Each index corresponds a different outcome. p: The nucleus sampling threshold (0 < p <= 1). Returns: list[float]: A list of probabilities where only the top-p probabilities are retained and normalized, all others are set to zero. The order of the output is the same as the order of the input. Example: >>> probs = [0.2, 0.2, 0.3, 0.3] >>> p = 0.5 >>> nucleus(probs, p) [0.0, 0.0, 0.5, 0.5] """ def single_headed_attention(q, k, v): """Perform single-headed multi-headed self attention with masking. Args: q: (q_seq_len, head_dim) k: (kv_seq_len, head_dim) v: (kv_seq_len, head_dim) Returns: np.ndarray: (q_seq_len, head_dim) """ scale = np.sqrt(q.shape[-1]) mask = ... # You may find np.triu or np.tri helpful # TODO raise NotImplementedError

Viewing 691 - 700 interview questions

Glassdoor has 4,831 interview questions and reports from Associate research scientist interviews. Prepare for your interview. Get hired. Love your job.